Re:Ask HN: If you had the time, what software would you build?
by unimpressive on Sunday August 30, 2015 @11:49PM
(#10145338)
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.
[ Parent
| on HN ]
Re:Ask HN: If you had the time, what software would you build?
by danieltillett on Monday August 31, 2015 @12:32AM
(#10145426)
Even 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.