News for hackers. Stuff that matters.
Re:My Favourite Git Commit by gus_massa on Friday October 18, 2019 @07:22AM (#21290355)
I prefer that the commit includes the addition of a test in the test suit that get fixed (or a few). This is good because:

* It ensure that the bug is real. [1]

* It ensures that the bug is fixed. [1]

* It prevents reversions (assuming the test are run automatically).

* The test may prevent reversions in other related code, or discover other hidden bugs.

* It brings you closer to a 100% test coverage.

* You don't have to guess how to reproduce the bug, reading the comment.

* If the bug depends on subtle configurations, they should be set in the test. [2]

From time to time there are bugs that are obvious in the code, but they are too difficult to find a test for them.

[1] Been there, done that.

[2] Once I found a bug that depended on the local timezone.

Re:My Favourite Git Commit by toastal on Friday October 18, 2019 @02:31PM (#21293901)
100% test coverage is such an overrated stat.