Programmers Weekly Newsletter
Programmers Weekly Newsletter

Top new questions this week:

How do I move away from the “for-loop” school of thought?

This is a rather conceptual question, but I was hoping I could get some good advice on this. A lot of the programming I do is with (NumPy) arrays; I often have to match items in two or more arrays …

python array loops thought-process  
asked by PPG 33 votes
answered by Gareth Rees 49 votes

What's wrong with comments that explain complex code?

A lot of people claim that "comments should explain 'why', but not 'how'". Others say that "code should be self-documenting" and comments should be scarce. Robert C. Martin claims that (rephrased to …

programming-practices documentation comments complexity simplicity  
asked by Prog 20 votes
answered by user61852 50 votes

Multithreading: am I doing it wrong?

I'm working on an application that plays music. During playback, often things need to happen on separate threads because they need to happen simultaneously. For example, the notes of a chord need to …

asked by Prog 20 votes
answered by ptyx 43 votes

What specifically does expressive power refer to?

Expressive Power is defined by Wikipedia as: .. the breadth of ideas that can be represented and communicated in that language. Does "ideas" refer to the things (operations, structures, …

programming-languages terminology expressive-power language-theory  
asked by svidgen 15 votes
answered by Jörg W Mittag 21 votes

"Ever change the value of 4?" - how did this come into Hayes-Thomas quiz?

In 1989 Felix Lee, John Hayes and Angela Thomas wrote a Hacker's test taking the form of a quiz with many insider jokes, as “Do you eat slime-molds?” I am considering the following series: 0015 Ever …

history fortran  
asked by Michael Grünewald 14 votes
answered by Basile Starynkevitch 19 votes

Addressing the fact that primary keys are not part of your business domain

In almost all circumstances, primary keys are not a part of your business domain. Sure, you may have some important user-facing objects with unique indices (UserName for users or OrderNumber for …

architecture domain  
asked by tacos_tacos_tacos 14 votes
answered by Doc Brown 27 votes

What does it mean when some technology is a "standard"?

I started learning Java EE 7 and I am frequently coming across this term "standard", and I don't understand what it means. So, for example, here is a quotation from this book: Contrary to SOAP …

coding-standards standards  
asked by Djole Pi 11 votes
answered by Mathew Foscarini 14 votes

Greatest hits from previous weeks:

Does C++ compiler remove/optimize useless parentheses?

Will the code int a = ((1 + 2) + 3); // Easy to read run slower than int a = 1 + 2 + 3; // (Barely) Not quite so easy to read or are modern compilers clever enough to remove/optimize "useless" …

c++ optimization compiling  
asked by Serge 17 votes
answered by Marc van Leeuwen 78 votes

Why does java.util.ArrayList allow to add null?

I wonder why java.util.ArrayList allows to add null. Is there any case where I would want to add null to an ArrayList? I am asking this question because in a project we had a bug where some code was …

java api-design  
asked by Alfredo Osorio 10 votes
answered by gnat 17 votes

Can you answer these?

How do I resolve $ref in a JSON object?

I have written a single page application that uses rest services to retrieve JSON objects. The JSON objects being returned are C# objects serialized using the Newtonsoft.JSON library. The returned …

c# json serialization  
asked by Cameron McKay 1 vote

Best way to deal with Floors and Ceiling when using substitution method to solve Recurrences

I'm currently using substitution method to solve recurrences. The problem I'm having is dealing with T(n) that have either ceilings or floors. For example in the following example see example here. …

asked by user12345 3 votes

What is the logic behind the use of different arrows (-> <-) in Haskell?

I've been thinking about language design lately, and reading over some of the new things in Haskell (always a nice source of inspiration). I'm struck by the many odd uses of the left <- and right …

language-design haskell  
asked by CodexArcanum 1 vote
Subscribe to more Stack Exchange newsletters

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

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

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