Monday, January 03, 2005

Developers Dilemma – Rewrite vs. rework part 3

If you were following this post then you might be wondering whatever happened. I started blogging about this issue and then went quiet. Well the main thing that happened was that blogging didn’t seem important. Funny how that happens when you get stuck into a project ;)
So on the second day I wrote a bunch of tests and fixed a load of issues with the device driver. That allowed me to move forward on the third day with starting to add new features to the device driver. In fact by the end of that day (it was a long day) I had driven (through tests) the development of all the new features required at the device driver level.
It became clear the following day that a couple of the other components presented different ways of communicating with the device driver. I am sure there is a Pattern for this. These components were easy to add tests to and most of the code called simply performs some data translation and then calls the device driver. The way these components worked drove the creation of some extra tests back in the device driver. It is always good to see how a component is being used :)
Finally the rest of the components presented the UI for controlling the device (the one that the driver talks to). These UI components communicate with the components that communicate with the device driver. On Friday I got to add the new features to the UI components and the project is pretty much finished. The UI has very little logic to it (which is great and as it should be!)
The answer in this case seems to be very much biased in favour of reworking and driving the work through the tests. I was surprised how quickly progress accelerated once a number of core tests were in place. Once again the process of driving development through tests proves its worth and makes me realize how powerful this technique is.

No comments: