I had a spontaneous agile moment and I can confirm to those at the back: Agile Works.
Working with two other guys on a project, we agreed with the manager that in one month from now (ooh agile, a sprint) we would demo it (ooh agile, a sprint demo). The demo would consist of putting simple data into a lightweight front-end and going all the way through to the database and back (ooh agile, a “full slice of cake” like a user story). During that month, we evolved (ooh agile) a way of working that was very effective; we would meet up each day at about 9:30 (ooh agile, daily standup meeting) and talk about the results of yesterday and what we would do today. At least 25% of the time was spent working together at the same computer (ooh agile, pairing). We had a continuous integration build using CruiseControl.Net (ooh agile) running unit tests (ooh agile) and some integration tests (ooh agile). The CI build was also doing some static code analysis (ooh agile) using Simian.
And it was really working. OK we didn’t really have the code coverage from the tests, and the code was, in places, not only a bit dirrrrrty but it was a little heavy on the singletons (the hackers favourite). And we had a few code smells like interacting tests due to all the tests running off the same database. However, we kept each other honest with the pairing and even if we weren’t doing TDD then we were writing fairly OO code that had at least a few tests per class. And, we were really cranking it out. 3 people, 1 month and nearly several thousand lines of code written. It was classic “three guys in a garage” stuff.
And then, of course, the wheels come off.
I got pulled onto something else, and the project got split in 2 so everyone now working on their own decoupled piece. And when I checked back after a few days I find that; quelle horreur it’s all gone wrong. 80% casualty rate on the automated tests; 20% progress on a deliverable and the rest of the time spent changing the structure and putting out the resulting fires. OK the changes were legit; required to get the foundations right and even agilistas like that when there is a business case for it (and there was).
So what did I learn:
- Focus matters: One person doing one task is much more productive than one person doing two tasks. It sounds obvious but I really believe that the difference is huge.
- Teamwork matters: Two people doing one task are much more productive that two people doing two tasks. In this “controlled” experiment with the same people doing the same tasks the difference was significant. The extra person keeps you honest and keeps you on track. They stop you getting distracted by other non-project tasks but more subtly they give you moral support when you get stuck.
- Test-first matters: working alone it is easy to slip and not test first; or even have a test in mind. Headphones on and in the zone you can be hundreds of lines of code in trouble before you realise that you aren’t even going to be able to test this. If you can’t make a test, you don’t have working code.
- Deadlines matter: A 4-person team working on a one-week deadline work harder than one person on a one-month deadline. The tight deadlines of agile are important; they Keep It Real and keep it scary. You won’t get scared when you have a 3 month deadline until you run the numbers and see that – even if it all goes to plan – you have 100 days of work to do. And even then you won’t be scared until you realise that in each calendar week you probably only get 3.5 days of solid work in.
- Mood matters: when we were cooking with gas, it felt good. We were all upbeat and had a great positive feedback loop going; the more productive we were the more we wanted to get done.