I've been a big advocate of Agile development for a while.
The only thing is, I hadn't really done any true Agile
development.
I've worked in an agile environment with an already designed
system, and that worked well. We managed to do everything required,
get it in on time, and add a bit more than was expected to boot.
We could never have done any of that work without tools like
CruiseControl(.Net in this instance), unit testing, code coverage,
or the metrics supplied by a myriad of other tools. Not to
mention the 3 massive architecture re-shuffles we did (ahh, we
forgot a few things :-s).
And so the other day, as a skills sharpening excercise, and a
means of doing something I'd wanted to do for a while, I began the
task of upgrading an application I started writing 6-8 years ago,
and shelved due to conflicts with my work some 4 years ago.
At the time, I had no idea about Agile and even less about
Design Patterns.
My task: to upgrade the app using a whole host of cutting edge
technologies and use Design Patterns judiciously throughout.
I pretty much had a design in my head, but when I started
coding it, I got a little stuck. I didn't quite know where to
begin this journey, and of course I wanted it to be perfect.
So I dawdled round a few classes and didn't really get
anything constructive.
Eventually, it struck me. Test first! So
I took a step back, and re-started my development in a TDD manner.
Interestingly, the app took shape in a near heart-beat.
One test had set up a structure of about 10 classes and
interfaces, and spawned another 50 tests to test the functionality
represented in those new application artifacts. I'm still a
long way away from the re-written app I set out to develop, but the
exercise highlighted to me two very important lessons.
- TDD does work. There's absolutely no doubt in my mind
about it. (and yes, I do know that TDD is not Agile)
- I've got a long way to go to really be a true Agile guy.
The situation might be slightly skewed by the fact that I've
thought about this application almost every day for the last 8
years, regardless of my ability to program it, but then how many
developments are truly greenfield? Almost every app I know
takes a little something from somewhere else, and that's as good a
starting point as any. Before you know it, you'll have a full
application architecture using Agile, and writing those pesky
little tests first.
Enjoy.