|
|
|
|
|
by geocar
3438 days ago
|
|
> Is this supposed to be a joke? … there is no way they increase bugs. No, it's not supposed to be a joke. Steve McConnell 1993 observed density is proportional to source program length, so this should be obvious to every programmer: If a small program (as measured in source code bytes) is more likely to be a correct program, then this follows. A major issue with discussing programming is the sheer number of people who believe they know how to program, when any non-programmer could see quite obviously that they don't: A professional bridge-builder doesn't often fail to build a bridge, but a professional CMS programmer seems to unable to get much past hello world without a bug or two; Less code will therefore produce less bugs. |
|
There is a summary of his advice here[1], but just to highlight
Describe everything the routine does And we mean literally everything. If that makes the name ridiculously long, the name isn't the problem. Your routine is.
And
Make names as long as necessary According to McConnell, the optimum name length for a variable is 9 to 15 characters; routines tend to be more complex and therefore deserve longer names. Make your names as long as they need to be in order to make them understandable.
I've read McConnell, and your claims are so completely the opposite of what he recommends that I'm still unconvinced you aren't trolling.
[1] https://blog.codinghorror.com/i-shall-call-it-somethingmanag...