I am apparently one of the few developers that doesn't find it boring to write tests after the code. I actually find it more tedious to write it beforehand, in many cases.
Generally, any time that I know exactly where the code is going and how it's going to do it, I write the tests afterwards to actually test the code, instead of the time-honored practice of fiddling with it manually and hoping nothing gets missed. Any time that I am at all unsure where the code is going, writing the tests beforehand is usually better.
Generally, any time that I know exactly where the code is going and how it's going to do it, I write the tests afterwards to actually test the code, instead of the time-honored practice of fiddling with it manually and hoping nothing gets missed. Any time that I am at all unsure where the code is going, writing the tests beforehand is usually better.