The lost art of testing and debugging

by dotnetpete 19. September 2008 22:19

I wonder if future archaeologists will look back on us and find traces of software developers actually doing testing and debugging. As small software house, we don't have the luxury of having dedicated testers but that shouldn't mean that testing or debugging thoroughly should be any less important that wirting code.

My (brief) set of rules for testing and debugging are:

  1. You can't test what you can't reproduce.
  2. You can't test if you do not know the expected result.
  3. During testing, put yourself in the shoes of your audience.
  4. Debugging a piece of code, you have to be smarter that the person who wrote it.
Let me explain.
 
A manager of mine early in my career once said to me, "You can fix what you can't reproduce". I used to think nonsense, I know exactly where the error is. I can fix the error, test the code (which by the way I know will work) and viola problem solved. Of course my manager was right. I was just proving (to myself) that I could write code that would compile and pass my limited set of tests. 
 
If you're testing an application that outputs a file to be consumed by another system, how can you test the output if you don't know what the expected result is. All you're really doing is testing that the application can output a file without generating an error. 
 
It's all too easy as developers to perform technical testing. The application I have just tested allows me to enter data and output a file for processing wonderfully and without error. What about the user experience? Are the steps required to get the output file the most logical and the easist for non technical people. Is it intuitive and clear enough for a user with limited training?

Saying that you have to be smarter to debug code that the person who wrote it sounds plain arrogant. But to fully understand what a piece of code is doing and most (if not all) the potential side effects of the code or external factors that could affect execution of the code is no walk in the park. You have to be top of your game. 

I'd be interested in hearing other thoughts that people have.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

General

Add comment


 

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

dotnetpete

Hi I'm dotnetpete. I'm an owner and software developer at Advantech Software in Brisbane, Australia. My passions are writing great software and coffee.