3 ms·
"Clean Code" by Robert C. Martin may be what you're looking for. Basically: express yourself in code. If you feel that some part of your code needs commenting,
by emilga 13y ago
"Clean Code" by Robert C. Martin may be what you're looking for.
Basically: express yourself in code. If you feel that some part of your code needs commenting, ask instead if it's possible to rewrite the code so that it is self explanatory. (The book goes into much more detail about this and more, of course.)
Example of "bad" code:
// days since initialization
int d;
Better code:
int daysSinceInitialization;
- rankam 13y agoExcellent! Thanks - I'll definitely check it out!