Moving from cowboy coding to agile development

Friday, September 01, 2006

Old Habits Are Hard to Break

In the last two weeks I've spent some time writing a small program, which I finished a couple of days ago. It served its purpose but looking back, I see some room for improvement.

First, the GUI was a crucial part of the program, and I am still to learn automated testing techniques for user interfaces, so I didn't go far tests-first. Instead of learning to use the appropriate tools and techniques I decided to go on without (GUI) tests.

Second, since I didn't know how to write good tests for the interface, I started slacking with writing tests altogether. When I was running out of time, I also reverted to the "good" old cowboy coding style.

Third, I tried to write the program one feature at a time, using a simple planning game by myself (me being the customer as well as the software provider). I made some time estimates and decided on the next features to write based on the available time. I guess I could have prioritized the features in a different way, but I did get a working piece of software in the end - with the chosen features done to the end, and the rest missing completely. However, my accuracy concerning the time estimates varied a lot. I also think I could have adjusted my time estimates better based on the time I used while implementing the previous features.

And last, I actually noticed all of these issues already while writing the program but didn't "have time" to correct them. I guess this way of thinking is the first thing I should change. (This might be closely related to reverting back to the old coding style, but deserves to be mentioned separately.)

Still learning, I guess. But then again, aren't we always?

P.S. Two co-workers returning from their holidays commented on my unit testing paper. One of them was impressed by the detailed instructions I had written. The other - the head of our C# development, kind of - asked where I got the idea and started chatting with me about automatic builds - of which I didn't write much in the paper... I guess there might be a breeding ground that I was unaware of for some agility.

No comments: