3 ms·
Self-documenting code
by parasight 5y ago
Self-documenting code
- errcorrectcode 5y agoNot all code can be self-documenting, especially optimized algorithms and complex operations. Comments serve to add requisite context and clarification that code alone cannot provide. Simply regurgitating the obvious in comments is a waste.
- billconan 5y agoyes, agreed. good document is about why, not what.
- billconan 5y agoI do not believe this will work. 1. document should be about why, not what. 2. not all decisions can be revealed in code itself. (for example, adding a delay to workaround a hardware bug.) 3. the biggest part missing from code documentation is the big picture document, not really the code level document. even you know what a class/function is, you don't know how it is used in the entire project, its life cycle, etc.