Managing the code-garden

Kevin Barnes suggests that software engineering is a bit like gardening – software is never finished – you need to spend some time planning, some time adding new features and some time tending to what you have. Otherwise your code will become steadily more and more unmanageable.

Artfully planned decay

Basically, code is like a garden. We lay it out, plant it and then tend and maintain it for as long as it continues to warrant the attention.”

The trouble is how do you make sure that you allocate enough time to maintenance while continuing to add new features or enhancements? How do you make sure you don’t allocate all your time to adding the next new thing, nor spend weeks on end tidying your code because all you’ve done recently is add new features?

Likewise how do you give the team the time and space to innovate – to try out their ideas? One solution is to let anyone add a new item to the product backlog or requirements catalogue and then prioritise it alongside everything else. Well this is OK if it’s a big idea, but not great for smaller items nor for more geeky ideas if the Product Owner or the business at large doesn’t understand the value of such things. It also feels wrong – if someone has a good idea that can be implemented quickly then they should be able to so, after all going via the Product Baacklog route may take more time than simply implementing the feature. And that is as good a way to kill off innovation as anything else.

But likewise you need to provide appropriate project governance – if everyone did whatever they wanted then the business is unlikely to get what it needs from the software.

One solution is the idea of Gold Cards [pdf] as suggested by Tim MacKinnon. Gold cards are designed to address:

A lack of innovation because the customer does not necessarily explore options that are technically possible but not currently required. Consequently, cutting-edge knowledge may be slowly lost from the team.

Gold Cards allow developers time to explore technical possibilities in a controlled and focused way.

In Scrum the current sprint’s work items are written on cards and pinned to the wall – so everyone knows what’s being worked on and everyone knows what’s completed. Gold Cards are special cards that let you work on your own idea – it can be anything you want so long as it’s on the current project.

Each developer is allocated two Gold Cards at the beginning of each calendar month… Gold Cards can be used at any time during a month, but cannot be carried over into the next month. […]

Each card grants the developer who has it, one day of work on a topic of their choice.

In a similar fashion ‘Gardening Cards’ let you work on whatever is bugging you – not bugs which should be prioritised elsewhere – but those things that just annoy you about the way something is implemented, that missing feature that would make life much easier if it were there. It’s your chance to spend time tending to your garden, not planting new features.

So the idea is that you place one Gold Card and one Gardening Card on the wall. Each sprint everyone can spend one day on a gold card item and one on a bit of gardening. But because the project only has one gold card and one gardening card only one person can be doing each activity at a time – everyone else is working on the backlog as normal. It’s the Scrum Master’s responsibility to encourage everyone to take the time to work on these items.

Now clearly how many days you allocate to gardening and gold card items will depend on a number of different factors: team size, sprint length, age of the project and the state of the code (you wouldn’t allocate gardening time at the start of a project for instance). But generally when a project matures you should be allocating some time every sprint to this. The Scrum Master can plan around this because although they don’t know exactly what everyone will work on she does know how much time will be allocated.

The other advantage of this approach is that they also help fill the gaps – if your planning is a bit off, you encounter some unforeseen problems and some member of the team are being held up then they can remain productive by working on their gold card idea or fixing that pesky item that’s being bugging them for while rather than waiting for someone else.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: