Testing is important…

November 21, 2010

Recently I’ve been upset about code not being tested… mostly because I’ve been told it was and deployed it…

Sometimes it’s better to redo some code yourself and finally test it than having trouble, debugging in a rush because it’s not working anymore and finally tested it in the live environment because you didnt have time to do it otherwise. If you’ve been forced to go down that path, the level of trust you gave to the programmer that coded it just dropped.

Programming is not much about the code, it’s about a business that needs your work to run. A programmer is responsible for much more than the code.

When you ask a programmer to code something, you’re not asking for perfection. You’re asking for the to work under the conditions you specified.

It is fine to take some time to test your code to make sure it works. As a programmer, you should be able to tell if your code works and you should be able to prove it. You might not be the fastest to deliver but the quality of your work will be working for you in the long run.

I know it sucks sometimes to test your code because you’re sure it works, it’s a simple code. We’re all humans, sometimes you lack of sleep, sometimes you got disturbed in the process…. and at the end, your code is compiling, but a line in your code is not doing what it was supposed to.

Without doing it the hard way, it’s possible to test your code just by creating a class that has some scenarios in it so you can test your objects and methods. You will be able to use it later and you have a proof  that it works. It’s nice to use a framework for unit testing but if you dont have the time to learn it at this time, just do a simple class to test your code, it might save your job in the long run.

Would people trust you on words if they were about to drive a car you built ? I know I would not.

Leave a Reply