3 ms·
> Maybe a better question is this: how do you write code that does the most possible to prevent a maintainer from screwing it up? By writing tests, that's the
by renox 7y ago
> Maybe a better question is this: how do you write code that does the most possible to prevent a maintainer from screwing it up?
By writing tests, that's the only way.. I remember recently writing the test two weeks after I added the feature, the feature was already broken!
The difficulty is that maintainers are very creative in their way to break your code so it's difficult to write 'thorough' tests.
- DanielBMarkham 7y agoYeah. That would be my answer if I had to pick just one. Tests should give you immediate feedback if you're wrong. They might not tell you exactly what to do. I think there's a bit more to the story than just tests, or I wouldn't have been so elliptical in my comment.