-
TEST DRIVEN DEVELOPMENT
History We’ve all heard of waterfall development, you know, first we make plan, then we do the architecture, when that is done, we start coding, after that we test and fix bugs, and lastly, we deliver. And then the clients are not happy with what they got 🙂 The problem with this is that the users will have to wait until the entire project is finished before they can see if it is what they wanted. And the same goes for us developers. We have to wait until we’re finished, then the testers are finished, before we are told if there are any bugs. And even longer before the users…
-
TESTS ENABLE CHANGE!
Unit tests are about facilitating change! Yes, tests find errors in the code, and it is nice to know that your code is working when you have delivered. But that is just a fraction of the benefits you get from tests. The biggie is that you can change your code and still be certain that it does what it’s supposed to do. Code is always evolving. From the first line you write, and never stops. And I don’t just mean that you refactor your functions. That too, obviously, but all the way up to really changing the code, breaking it up and repurposing it totally by reusing what you have,…
-
IT IS BORING TO TEST!
We’re developers. We want to be creative, we want to solve problems. That’s what we live for. But let’s face it, testing is the opposite of coding. It is just a big repetitive task. It is tedious. Unfulfilling. It. Is. Boring! Sure, you run the code that you are working on. Even single step it and verify that it works. But do you ever think of the rest of the code? What if you just move the counter in here, except that you forgot that it should be increased in that other leg of the if too. Or what about that other class that calls this one, that relies on…