01.Blogs :
RobMiles  
Programming, gadgets and life as a lecturer in a UK university.

Back On Track

After the wild ramblings of yesterday I'm back at work on Smartphone programming with cheese. I've been playing around with reflection so that objects in the Compact Framework can be made to save and restore the important parts of themselves. I reckon that this could be quite useful, as there is no serialization support in CF. So far so good.

I've also been playing around with Test Driven Development. I'm coming to the conclusion that it may be the only way to travel. I'm having a bit of bother understanding how it could be made to work if your application has a Graphical User Interface but for building all the internal bits of your program I reckon it is wonderful. Essentially you write all the test code before you write the product.

You end up with a situation where you can press a button and see whether or not your code is right. This is especially useful if you refactor your solution (something you should not be afraid to do) because it is very easy to make sure that it still behaves itself. I'm definitely going to build some of the practical work for next semester around the test driven approach. It occurs to me that designing a test which proves a program works is a very good way of honing your understanding of the problem.

posted on Monday, July 26, 2004 6:58 PM by RobMiles

# @ Monday, July 26, 2004 7:51 PM

Can you honestly see doing Test Driven Development (TDD) in a "real-world" project? I have been introduced to the idea of TDD and have done a project (school project) with it, but honestly, I'm not sure it would work for a project of any size. From what I've seen, you end up writing test cases that are 2x to 3x larger than the original codebase. I like the idea of clicking a button and having a report say areas X,Y,Z failed but it seems like TDD makes the project's costs go sky high....anyway, just curious about your opinion on that. (I may chage my tune with VS.NET 2005 Team because it has automatic test case generation and good stuff like that...but until then...:) )

AdamMB

# @ Tuesday, July 27, 2004 8:05 AM

I agree that you do end up writing a lot of "extra" code when you do test driven development. And in my case I thought of lots of new and embarrasing ways that the program could fail whilst I was writing the tests.... However, I think it is worth the extra effort. Particularly if we move into a legal situation where you may have to prove that your software was OK when you sold it. If you break the code into reasonably sized components the test effort should not be too hard. And the spin off benefit of forcing you to refine what the code will do and how it will be used is well worth having.

RobMiles


 
03.UPDATE CALENDAR :
<July 2004>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

05.MY LINKS :

07.Subscriptions :

Subscriptions


© Copyright 2005 Microsoft Corporation. All Rights Reserved.
Terms of Use | Privacy Statement | Code of Conduct | Hosted by MaximumASP for Microsoft
WHO-BAR