Programmers Weekly Newsletter
Programmers Weekly Newsletter

Top new questions this week:

Is a senior programmers advice about always using books a good idea?

I am a junior developer and have only been in the industry for 5 years. At my current company there is a senior let's call him Infestus. Occasionally I am being given opportunity to shine and do …

learning career-development self-improvement  
asked by Quillion 38 votes
answered by webdad3 70 votes

How necessary is it to follow defensive programming practices for code that will never be made publicly available?

I'm writing a Java implementation of a card game, so I created a special type of Collection I'm calling a Zone. All modification methods of Java's Collection are unsupported, but there's a method in …

java data-structures api-design  
asked by codebreaker 29 votes
answered by Michael K 49 votes

How far should we rename code and data when end users nomenclatures change?

A long time ago we added a feature where our users could "Accept" an image after it was added to a workflow queue. Turns out, we used the wrong term, and users actually "Approve" the image. Changing …

refactoring domain-driven-design  
asked by inerte 27 votes
answered by Ozz 15 votes

What is the real responsibility of a class?

I keep wondering if it is legitimate to use verbs that are based on nouns in OOP. I came across this brilliant article, though I still disagree with the point it makes. To explain the problem a bit …

object-oriented solid single-responsibility  
asked by Arlaud Pierre 20 votes
answered by Jörg W Mittag 21 votes

How to best protect from 0 passed to std::string parameters?

I have just realized something disturbing. Every time I have written a method that accepts a std::string as a paramater, I have opened up myself to undefined behaviour. For example, this... void …

c++  
asked by John Fitzpatrick 8 votes
answered by Vlad 3 votes

Contract Based Programming vs Unit Test

I am a somewhat defensive programmer and a big fan of Microsofts Code Contracts. Now I cannot always use C# and in most languages the only tool I have is assertions. So I usually end up with code …

testing code-contracts  
asked by ronag 8 votes
answered by duros 10 votes

Are types erased in Haskell?

Haskell has a notion of “generic functions” that has some apparent similarity with common lisp—having neither experience with Haskell nor with common lisp, I might be very approximative here. This …

haskell type-systems common-lisp  
asked by user40989 8 votes
answered by Kris 10 votes

Greatest hits from previous weeks:

Why is Clean Code suggesting avoiding protected variables?

Clean Code suggests avoiding protected variables in the "Vertical Distance" section of the "Formatting" chapter: Concepts that are closely related should be kept vertically close to each other. …

code-quality variables clean-code uncle-bob  
asked by Matsemann 94 votes
answered by Telastyn 172 votes

Why do programming languages, especially C, use curly braces and not square ones?

The definition of "C-Style language" can practically be simplified down to "uses curly braces ({})." Why do we use that particular character (and why not something more reasonable, like [], which …

programming-languages c history syntax  
asked by SomeKittens 58 votes
answered by MichaelT 76 votes

Can you answer these?

How can we calculate Big-O complexity in Functional & Reactive Programming

I started learning functional programming, I am trying to compare between different algorithms that are written in an imperative, functional , parallel programming and using Collections and Lamda …

c# architecture functional-programming asynchronous-programming  
asked by user3047512 2 votes

How to algorithmically add notes to an existing midi file relative to positions of existing notes in python

I have a midi file that I'd like to algorithmically add notes to relative to other notes that already exist in the midi file using python, or if it's easier using a different language I'm open to that …

design algorithms python  
asked by user110490 1 vote

Most suitable data structure for in-memory string -> int conversion for variable length strings

My project involves validating and normalising email addresses in this format [userpart]@[domainpart].[tld] After syntactic validation of the address, [tld] is checked to exist, otherwise the …

data-structures  
asked by innvo 1 vote
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3