3 ms·
Comments rot, but so does everything else such as type names, tests, variable names, field names, designs, architectures, etc.
by JamesBarney 7y ago
Comments rot, but so does everything else such as type names, tests, variable names, field names, designs, architectures, etc.
- marvin 7y agoYep - it doesn't help much with a method that's named EmptyCacheToPreventBlugblagCongestion() if external circumstances have stopped the blugblag from ever congesting any longer. So discipline in maintaining the intent of the code is required even if you never write a single comment.
- lmm 7y agoTests, types and field names get checked on build.
- JamesBarney 7y agoIf someone adds functionality to a type so the name isn't really applicable anymore I don't think the build catches that.
- lmm 7y agoAs soon as you form something that should conform to the type (according to its name) and find that it doesn't, you notice the problem, and then you fix it once and for all (because the type is defined in one place). So yes, you can have misleading type names in the codebase, but there's a natural pressure to correct them, in a way that there largely isn't for misleading comments.