3 ms·
A system that would tie software comments to 'blocks' of code. This way you would be able to automatically detect the problem where comments/in-software documen
by unimpressive 11y ago
A system that would tie software comments to 'blocks' of code. This way you would be able to automatically detect the problem where comments/in-software documentation becomes out of sync with the code it describes and correct it.
- danieltillett 11y agoEven better a system that would not let you check in code if the comments were not updated. Something simple like a section in the comment with a common tag, a checksum on the code, a check sum on the comment, and a human readable number that said how many lines the comment applied to. Something like: //[common tag]-[code checksum]-[comment checksum]-25 This could be updated automatically and be backward compatible with current system. You would just need some sort of hook in git/etc to calculate and update the check sums and issue warning/errors if code checksum changed, but the comment checksum didn’t.