Transitioning to agile is hard. I don’t think enough people are honest about this.
The other week I went to see a team at a company. This team are incredibly typical of the teams I go to see at the moment. They’d adopted the basic agile practices from a ScrumMaster course, and then coasted along for a couple of years. Here’s the practices I saw in action:
- having daily stand-up meetings
- working in fixed-length iterations, called sprints
- tracking their work as things called Stories
- estimating their work using things called Story Points
- trying to predict a release schedule using a thing called Velocity
This is where it started to fall down. This team have no handle on their velocity. It seems to vary wildly from sprint to sprint, and the elephant in the room is that it’s steadily dropping.
I see this a lot. Even where the velocity appears to be steady, it’s often because the team have been gradually inflating their estimates as time has gone on. They do this without noticing, because it genuinely is getting harder and harder to add the same amount of functionality to the code.
Why? Sadly, the easiest bits of agile are not enough on their own.
Keeping the code clean
Let’s have a look at what the team are not doing:
- continuous integration, where everyone on the team knows the current status of the build
- test-driven development
- refactoring
- pair programming
All of these practices are focussed on keeping the quality of the code high, keeping it malleable, and ultimately keeping your velocity under control in the long term.
Yet most agile teams, don’t do nearly enough of them. My view is that product owners should demand refactoring, just as the owner of a restaurant would demand their staff kept a clean kitchen. Most of the product owners I meet don’t know the meaning of the term, let alone the business benefit.
So why does this happen?
Reasons
Firstly, everyone on the team needs to understand what these practices are, and how they benefit the business. Without this buy-in from the whole team, it’s a rare developer who has the brass neck to invest enough time in writing tests and refactoring. Especially since these practices are largely invisible to anyone who doesn’t actually read the code.
On top of this, techniques like TDD do –despite the hype– slow a team down initially, as they climb the learning curve. It takes courage, investment, and a bit of faith to push your team up this learning curve. Many teams take one look at it and decide not to bother.
The dirty secret is that without these technical practices, your agile adoption is hollow. Sure, your short iterations and your velocity give you finer control over scope, but you’re still investing huge amounts of money having people write code that will ultimately have to be thrown away and re-written because it can no longer be maintained.
What to do
Like any investment decision, there’s a trade-off. Time and money spent helping developers learn skills like TDD and refactoring is time and money that could be spent paying them to build new features. If those features are urgently needed, then it may be the right choice in the short term to forgo the quality and knock them out quickly. If everyone is truly aware of the choice you’re making, and the consequences of it, I think there are situations where this is acceptable.
In my experience though, it’s far more common to see teams sleep-walking into this situation without having really attempted the alternative. If you recognise this as a problem on your team, take the time to explain to everyone what the business benefits of refactoring are. Ask them: would you throw a dinner party every night without doing the washing up?
Does the world need to hear this message? Vote for this article on Hacker News
100% agree
Nice post Matt. Glad you raise the point that starting TDD will result in a down-turn in output. In fact, the same will have happened when they first started Scrum – if only they could remember that far back.
Your lucid post really hit the spot. I hope my team reads and appreciate your pragmatic first-hand point of view. Thank you!
Are you sure the reason you see a slow down isn’t because the code base is increasingly complex to maintain and add features to?
Yes! (Did you see http://www.halfarsedagilemanifesto.org ?)
Another major reason for wildly fluctuating velocity is oversized user stories that limp, half done, from sprint to sprint. All the good technical practices in the world won’t give you a regular velocity if your stories can’t be delivered within the sprint.