Bonnie Eisenman bio photo

Bonnie Eisenman

Software engineer, author, knitter, Esperantist. Member of NYC Resistor and author of Learning React Native.

šŸ¦ Twitter šŸ¤– Github šŸ”¶ RSS Feed

Software estimation is one of those tasks that can feel like a distraction from the ā€œrealā€ work of engineering. In practice, though, Iā€™ve found that making reasonable estimates for engineering tasks is a really useful - if mysterious - skill. So letā€™s talk about it!

I work on a team of ~8 engineers at a large company. Many other teams depend on our work, and we depend on many others. There is always more work to be done than we have time for, so prioritization and communication are crucial. Software estimates are one of the tools we use to help with project planning.

If I worked at a startup with a single engineering team, like my last job, my estimation process would be really different! But in the kind of environment that I work in today, I find software estimation useful forā€¦.

  • Sequencing work: What can be parallelized? What work depends on other projects? Do your timelines make sense?
  • Staffing: again, what work can be parallelized? If itā€™s mostly linear, it doesnā€™t make sense to assign multiple engineers; conversely, parallelizable work benefits from having multiple engineers implementing it.
  • Forcing prioritization: thereā€™s only so much time in a day (or week, or month), and a limited number of people per team. Having estimates helps you make explicit tradeoffs and identify the highest-impact work.
  • Outward communication: if another team really wants or needs something that Iā€™m going to build, having a rough timeline is useful for setting expectations.

In order to meet the above goals, we donā€™t need exact estimates. Hereā€™s the granularity that I like to use (also referred to as ā€œt-shirt sizingā€):

  • XS: tasks that take less than a day
  • S: a couple of days, no more than a week
  • M: several weeks
  • L: several months
  • XL: several quarters

The above generally assumes 1 engineer working on a project. In practice, as part of this exercise weā€™ll identify which pieces can be parallelized. Then we can adjust our wall-clock estimate based on project staffing.

Of course, some kinds of work canā€™t be easily estimated. Exploratory work, where youā€™re working in a new codebase, or hunting for a bug, or doing some kind of novel project, will usually defy estimation. Thatā€™s fine! This is more relevant to work where you are already familiar with the systems involved.

Okay! Now that Iā€™ve gotten the long-winded parts out of the way, letā€™s break down the formula. Credit to my former coworker Alex Cebrian, from whom Iā€™m stealing these tips:

  1. List all the tasks related for this feature. Be as specific as you can, as you would break them into branches.

  2. Assign how much time you think you would need to spend on each task with 1 day minimum. Nothing should be more than 3-4 days, if it is, it should be broken down even further.

  3. Go back to whatever number you assigned on (2) and double itā€¦ Really.

  4. Build a dependency graph between tasks. This will help you identify what can be parallelized.

  5. Have you thought about time for code reviews? Go back to (3) and add 30% more, minimum one day.

  6. Have you thought about time for testing? (Both unit tests & manual end-to-end testing.) For features which need end-to-end testing, add at least 1 day each.

ā€¦and thatā€™s it! I canā€™t stress enough how important steps #3 and #5 are, really, even if the estimate you end up with seems excessive. In practice, Iā€™ve found that this approach does a good job of accounting for all of the unexpected problems that crop up in real software development. Did you need to do a minor refactor to add your new feature? Maybe you discovered a pre-existing bug that needed to get fixed? Or did you CI pipeline break just as you were ready to roll out your feature for testing? Those kinds of issues are entirely normal, so having a buffer for your ā€œunknown unknownsā€ is really useful.

Okay. Now you have an estimate. What do you do with it?

This depends on your organizationā€™s culture around estimation, project planning, and roadmaps, as well as what stakeholders are involved. Maybe you just share this with your manager, or perhaps you need to communicate this with other teams as well. The most nerve-wracking software estimate Iā€™ve been asked to provide ended up being passed along to our CEO.

That probably sounds a lot scarier than it needs to be. Iā€™ve most often seen these estimates being used to evaluate tradeoffs: ā€œIf we build Product A, it might take several months. But we can build Product B in a couple of weeks. Or we could build Product C, which will still take my team a few months, but we can unblock the other teams in about two weeks, and then we can develop in parallel with client engineersā€¦.ā€ If your product managers or designers or executives are gung-ho about Product A but would still be happy with B or C, this lets them make more realistic choices about which direction to pursue. Crucially, in order to make those decisions effectively, your estimates donā€™t need to be precise; they just have to be accurate relative to each other.

This ā€œformulaā€ definitely isnā€™t scientific, but it doesnā€™t need to be. Hopefully, it gives you a starting point the next time someone asks you, ā€œSo how long will that take?ā€

Thanks to Laura Lindzey, Peter Lyons, Venkatesh Srinivas for their feedback on a draft of this post.