|
|
|
|
|
by DanielBMarkham
4314 days ago
|
|
Thanks Andrew. I think you missed a key point, or maybe I overlooked it while scanning. Because modern programming languages allow very long variable and method names, you should be able to construct a "grammar" in your code. That is, the code itself should be able to be read -- and when you read it, it tells you what it does. So "if CustomerHasALargeAccount then WriteThemASalesLetter()" not only is a piece of code, it's also directly explaining what's going on. As long as you make sure your names are long and explicit enough, your comments and code become one. (Except for some oddball cases) I like comments while I'm constructing my thoughts. Once I've coded it, I delete the comments. I can also see using comments as sort of a mnemonic for future work. A lot of good points here. Keep up the blogging! |
|