0
votes
4answers
398 views

Usage of magic strings/numbers [closed]

This is somewhat controversial topic, and I guess there is as many opinions as there are programmers. But for the sake of it, I want to know what are the common practices in business (or in your work ...
14
votes
1answer
2k views

Why Bootstrap 3 changes camelCase to dashes - is it more readable?

I'm wondering what's the reasoning behind Bootstrap's decision to change all camel case names into hyphenated names in v3.0. I searched on Google, and looked in a few books, but I can only find ...
6
votes
3answers
211 views

“static” as a semantic clue about statelessness?

this might be a little philosophical but I hope someone can help me find a good way to think about this. I've recently undertaken a refactoring of a medium sized project in Java to go back and add ...
4
votes
1answer
294 views

Are there any actual drawbacks to self-referential method chaining?

I recently suggested a method of chaining be implemented for a certain class in a certain project so readability of the code could be improved. I got a "fluent interfaces should not be implemented ...
10
votes
12answers
1k views

Maintainability of Boolean logic - Is nesting if statements needed?

Which of these is better for maintainability? if (byteArrayVariable != null) if (byteArrayVariable .Length != 0) //Do something with byteArrayVariable OR if ((byteArrayVariable != ...
19
votes
11answers
1k views

Are long functions acceptable if they have internal structure?

When dealing with complicated algorithms in languages with support for nested functions (such as Python and D) I often write huge functions (because the algorithm is complicated) but mitigate this by ...