I often cannot say know how long it’ll take me to code some feature, or whether I’ll succeed at all, given the requirements. This might be because I’ve never attempted anything like that before, or because the technical constraints around it make the solution hardly plausible. In times like these, I set myself a box of time.
Timeboxing is a practice well known to Agile practitioners. A sprint or iteration is a timebox, during which we work in pursuit of a milestone for a fixed amount of time, then stop to inspect:
- how far we’ve come,
- whether we’re on track towards the overall goal (project milestone, KPI), and
- knowing what we learned, is the overall goal still feasible?
The approach helps to reduce the risk in uncertain endeavors, preventing us from going too far working on the wrong thing.
The decision to invest additional resources in a losing account, when better investments are available, is known as the sunk-cost fallacy, a costly mistake that is observed in decisions large and small.
The sunk-cost fallacy keeps people for too long in poor jobs, unhappy marriages, and unpromising research projects. [emphasis mine]
Daniel Kahneman, Thinking, Fast and Slow
Set yourself a fixed upfront time to pursue a task or project, then stop to reflect. Knowing the cost you’ve already carried on it, with the currently expected return on investment, and the likely chance of success, does it still make sense to continue?
Always decide this by calculating your total cost against expected benefits. Stop yourself if you realize you’re thinking “I already invested so much into this. I can’t afford not to finish.” That’s why you have to literally stop and detach yourself from work to reflect, to not fall victim to the sunk-cost fallacy.
Timeboxing isn’t useful just for big endeavors, but for daily work too. All programmers have memories of problems they were trying to solve for hours and days, before someone else looked at these only to point out solutions within minutes. Putting a time limit on that kind of work helps manage uncertainty: “try solving this for two more hours, and if you haven’t made significant progress by then, we’ll find help.“
Finally, by imposing scarcity on time, timeboxing helps sharpen focus and defeat procrastination:
- the Pomodoro technique lets you commit to working for 25 minutes at a time, without letting yourself be disturbed or distracted,
- I often approach tasks that I cannot complete in one work session (like a pile of clothes waiting to be ironed), by setting up a timebox, e.g. working for a maximum of 1 hour, starting with the top priority portion, leave the rest for the next time I will be available.
Procrastination usually affects smart people facing large and complex undertakings. Tackling them one timebox at a time makes these so much more manageable. And once you start moving, however slow, resistance fades away.
If you’re like me, you’ll look for tools to help you track the timeboxes. Don’t overcomplicate it. It’s a very simple technique that will work just fine with a simple kitchen timer (though you might want to use something more discrete, like a cell phone timer, since these things tick and ring like crazy):
and for timeboxes spanning multiple days, just mark the cut-off on a calendar that you’re sure to see. Teams working with Scrum will likely want to highlight the end of their timebox on a Scrum Board, where everyone can see it.
Don’t block yourself thinking you need to find the right tool first. Just start, and see your work flow.
Thanks to Jarek Piotrowski for motivating me to write this post. Photo by Darren W.
*[KPI]: Key Performance Indicator