Jon Shute's Weblog : Ramblings on .NET and writing debuggers
Updated: 08/05/2004; 13:38:39.

 

Subscribe to "Jon Shute's Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

22 November 2002

Again I'm amazed at the confidence that adding some unit tests to code gives me. I've spent the day adding unit tests to some code that I threw together as a quick proof of concept, and that's triggered a set of refactorings that have turned the code into a production quality assembly that's ready to go live.

My next task is a test spec for a website, which should be an interesting chance to try to demonstrate how I think they should be written. I don't agree with the way that the test team do things here, and so I want to prove that you can do full testing at each stage without costing too much more. There's a certain amount of reluctance to do comprehensive testing here and there's an idea that validating requirements is enough. While this is technically true for the projects in question it leads to problems down the line as code changes, or conditions not considered by the requirements occur. These projects are all embedded, so the inputs are all very controlled and there's no pesky user trying to break things.

The key to writting solid software is trusting nobody. Whenever you receive data, be it from the serial port or as a parameter to a function you should check that it seems valid. It's a bit more complicated on embedded projects because processor time and memory is limited, but the hardware we're using can take it.

All I need to do now is find an answer to the question as to if more quality will cost more than the time spent finding and correcting problems.


What other blogs are saying about this post.
3:19:07 PM    comment []  trackback []

Converting Microsoft sites to passport must be very high up on their priorities, but why can't they get it right? This is the second time they've tried to convert the site I'm trying to use and it's still not working properly.
What other blogs are saying about this post.
1:49:55 PM    comment []  trackback []

© Copyright 2004 Jon Shute.



Click here to visit the Radio UserLand website.   Listed on BlogShares

 


November 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Oct   Dec