Sunday, 9 April 2023

How many effective hours are in a typical work day?

In software development, the number of effective work hours is not the same as the number of hours you are at work. I'm going to be upfront and say it is never as high as you think it is.

This article is meant to give you a feel for what your effective hours might actually be.

Effective development hours calculation

Let's start with this formula for calculating effective work hours. 

E = W - (D + C + M)

E: Effective development hours per day
W: Work hours  
D: Time for daily non-development duties
C: The time penalty for context switching x the number of non-development duties
M: Time lost for morning inefficiency

We'll fill these in as we go...

The 8hr working day

Let's assume that you are working for 8hrs, not including your breaks. Developers tend to be encouraged to estimate tasks based on this full day. 

If I was fingers-on-keyboard effective 100% of the time during all work hours, then a task that I estimate for 1 day should be my maximum theoretical output of 8hrs. But this is never the case.

E = 8 - (D + C + M)


Let's deduct time for detractors

Here are 5 non-development items (with some average numbers based on my experience).
  • Emails (15min)
  • Standup (15min)
  • Meetings (30min - may be more or less depending on the day)
    • Meetings within a sprint are likely to include:
      • Scope/requirements/design discussions
      • Architecture discussions
      • Backlog grooming
      • Sprint planning
      • Sprint review (and possibly a demo)
      • Sprint retrospective
      • Misc.
  • Helping others (e.g. to debug, code review, aid decision making) & misc duties (15min - may be more or less depending on your role)
  • Random chatter (15min)

These 5 non-development items mean that 1.5hrs are deduced from each day on average. 

Now your day only has 6.5hrs.

So you are 100% effective for 6.5hrs right? No!

E = 8 - (1.5 + C + M)


What about context switching?

The multiple distractors have a cost.

Every time you change tasks, it takes time to ramp up to full speed. We call this getting into a flow state. According to Very Well Mind it can take around 10-15min to ramp up. For some tasks it could take a lot longer!

For the sake of this discussion, let's keep this conservative. Those 5 detractors require 15min each, totalling 1.25hrs. Note that this assumes that you only check your emails once per day, and help someone once per day.

Now your available time is 6.5 hrs - 1.25hrs = 5.25hrs

E = 8 - (1.5 + 1.25 + M)


It gets worse!

In my experience, those 5 items are spread throughout the day, and mornings are particularly inefficient. Here is an example schedule.

  • 9am - Get to work and settle in
  • 9:15am -9:30am - Check emails
    • At this point you already lost 15min of the day
  • 10:00am - 10:15am - Standup
    • But what happened to the 30min between checking emails and standup?
In this example we effectively lost 45min of the day.

Subtracting 45min of the day...

Now you have only 4.5hrs of effective development time to do your tasks.

E = 8 - (1.5 + 1.25 + 0.75) = 4.5hrs


Final thoughts

Some of you will be thinking that 4.5hrs of an 8hr day is not reasonable. 
You may be yelling: What if you line-up everything back to back? 

Sure! I actually recommend this! So let's assume you can totally remove the morning inefficiency by having a 915am standup. You are still only at 5.25hrs of effective development time per day. 

But what if you could reduce meetings too? Yes! You should totally reduce meetings. However, you may find that you still need a few of those meetings per week. So you cannot just say no meetings at all! In my experience, you "might" be able to squeeze 5.5hrs of effective development time on average per day.

At this point I would also remind you that people are not robots. We have slow days, and we also make mistakes. Software development is not like building a brick wall, and you have to be realistic about your effective hours, not just count the number of hours in the day.

In my experience I typically say that 5hrs is the number of effective hours per day. This is realistic based on the numbers above, and also allows for a bit of wiggle room.

I hope this gives you food for thought.

The next time you estimate 1 day for a task, remember that your effective hours per day is not 8hrs. It is likely closer to 5hrs.




No comments:

Post a Comment