|
|
|
|
|
by InitialLastName
775 days ago
|
|
> where you decide to add spaces and newlines can actually add subtle but important communication as to the significance of a particular part of one's code. Isn't this part of the problem? If the purpose of code is to be understandable, the important communications shouldn't also be subtle. Your intention that the extra empty line before a block of code signals "This is the important part" is likely to be entirely lost on a reader of the code (especially in a codebase where the formatting isn't consistent so those spare lines are littered everywhere). Much better to leave a comment saying "there's a subtle but important thing going on here". |
|
Sure, but don't let perfect be the enemy of the good. Well-meaning engineers frequently don't document their code at all. It's why I advocate programmers at least use descriptive variable names and function names; what I call "self-documenting code".
It still falls short of well-documented code but, as I say, gets you "good".