Re:Writing system software: code comments
by majikandy on Sunday October 07, 2018 @05:07AM
(#18159597)
In my world, the test suite is a better “why” than code comments.
[ Parent
| on HN ]
Re:Writing system software: code comments
by tralarpa on Sunday October 07, 2018 @05:48AM
(#18159740)
What was hard to write should be also hard to read! /s
Re:Writing system software: code comments
by majikandy on Sunday October 07, 2018 @06:59AM
(#18159984)
Why read the code when you can read the out of date comments! /s
If comments are out of date you're not doing code reviews.
How do you tie the test suite to the specification? A test for a certain behavior alone doesn't document why it's testing that.
Re:Writing system software: code comments
by crdoconnor on Sunday October 07, 2018 @09:32AM
(#18160448)
I have a property on my specification tests called "about" that explains why the feature exists along with other contextual information.
It makes much more sense to centralize the "why does this behaviour exist" there where the specific behaviour is being tested rather than in the code.