Latest / DevQuestions with Tim Corey / 177 How Do I Estimate Tasks Correctly? How Do I Estimate Time Accurately?
Transcript
- 0:00SPEAKER_00: Welcome to the Dev Questions Podcast with Tim Corey.
- 0:03SPEAKER_00: Join us each episode as we tackle the questions you are asking about a career in software development, understanding the industry, and new technology.
- 0:12SPEAKER_00: If you're just starting out or you want to grow stronger as a developer, this is the place to get your questions answered.
- 0:19SPEAKER_00: Now, here's your host, expert developer and online educator, Tim Corey.
- 0:25SPEAKER_02: How do I estimate tasks correctly?
- 0:28SPEAKER_02: How do I estimate time accurately?
- 0:32SPEAKER_02: This is a question I was asked on a suggestion site, and it's one that I think is really important to talk about because you're gonna find out it depends.
- 0:41SPEAKER_02: All right?
- 0:42SPEAKER_02: So let's talk about it in today's episode of DevQuestions.
- 0:46SPEAKER_02: Again, if you have a suggestion you want to see answered, go to suggestions.imtimcorey.com, leave it there, and hopefully you'll see your question answered in a future episode of DevQuestions.
- 0:56SPEAKER_02: Now, how do you estimate tasks correctly and how do you estimate time accurately for software development?
- 1:02SPEAKER_02: Well, you don't.
- 1:04SPEAKER_02: There's your answer.
- 1:05SPEAKER_02: All right, so you have a nice day.
- 1:07SPEAKER_02: Um, estimates are often seen as guarantees.
- 1:11SPEAKER_02: This is the real trap.
- 1:13SPEAKER_02: It's kind of like when you show a customer a, you know, a drawn-out user interface, or maybe you create a temp user interface and say, hey, this is what we're trying to build.
- 1:22SPEAKER_02: Is this right?
- 1:23SPEAKER_02: And they go, yes, let's go put that in production.
- 1:26SPEAKER_02: And you're like, no, no, no.
- 1:27SPEAKER_02: That was just an estimate.
- 1:28SPEAKER_02: That was just a sketch.
- 1:30SPEAKER_02: And they're like, no, no, no, I want to see that in production tomorrow.
- 1:33SPEAKER_02: Because they don't understand the difference between creating a rough something and creating the actual final thing.
- 1:40SPEAKER_02: Well, the estimates, what is seen as an estimate is actually assumed to be a guarantee.
- 1:47SPEAKER_02: As in, I think it might take us about two weeks.
- 1:50SPEAKER_02: So two weeks goes by and they're like, okay, where is it?
- 1:53SPEAKER_02: I want to see it right now.
- 1:55SPEAKER_02: You're like, well, we had some you know, slowdowns or whatever, and they're like, okay, so you're not a good developer then, right?
- 2:01SPEAKER_02: Because you didn't do what you promised.
- 2:05SPEAKER_02: Well, it wasn't a promise, it was an estimate.
- 2:08SPEAKER_02: So that's why estimates are really a trap.
- 2:12SPEAKER_02: So estimates are not guarantees.
- 2:16SPEAKER_02: All right.
- 2:17SPEAKER_02: And this is where some confusion comes in about what software is and what it's not when you're building it.
- 2:24SPEAKER_02: So building software is like building cars from scratch each time with different specifications.
- 2:32SPEAKER_02: You see, if you are looking for a Toyota Corolla, well, Toyota can tell you how long it takes to build a Corolla.
- 2:41SPEAKER_02: Because they have an assembly line, they've built them over and over, day after day, week after week, month after month.
- 2:48SPEAKER_02: And so they know which parts go on in what order and which parts to have made and what the shapes are and all the rest of everything I need to build a Corolla.
- 2:59SPEAKER_02: But if you told Toyota, hey, I want you to build a different car every time.
- 3:05SPEAKER_02: This time I want a Corolla, but you know, next time I want like something totally different, maybe something with six wheels instead of four, maybe something with an engine in the back, or maybe something with a different structure, or maybe it's a truck this time or a van this time.
- 3:20SPEAKER_02: Well, they couldn't estimate how long that would take, right?
- 3:23SPEAKER_02: Because they know how much a Corolla takes because they've done it over and over and over.
- 3:28SPEAKER_02: And sometimes people think, well, that's what software is, right?
- 3:32SPEAKER_02: You've you've already done this over and over again, just do it for me and use the same time frame.
- 3:37SPEAKER_02: But that's not what we do.
- 3:39SPEAKER_02: At least not in most cases.
- 3:41SPEAKER_02: In most cases, we're building something from scratch.
- 3:44SPEAKER_02: So we're building a thing that is similar, an application, but it's like building a car with different specifications.
- 3:52SPEAKER_02: The basic parts are probably all there, but how they fit together and how they're specifically constructed is going to change from vehicle to vehicle.
- 4:01SPEAKER_02: I can't take a bumper from a Corolla and put it onto a truck.
- 4:05SPEAKER_02: It doesn't work that way.
- 4:07SPEAKER_02: So that's how we build software is building a different thing every single time.
- 4:13SPEAKER_02: Estimates are always going to be guesses.
- 4:16SPEAKER_02: No matter how much structure or planning, you'll you'll never get truly good estimates.
- 4:23SPEAKER_02: And there are some systems in place that people say, well, this gives you good estimates.
- 4:27SPEAKER_02: We're gonna do story points, or we're gonna do something else to try and figure out how to structure this to really give us a good estimate.
- 4:36SPEAKER_02: But the reality is they're guesses.
- 4:39SPEAKER_02: The absolute best way, the best solution to the problem is to break a project down into tiny steps.
- 4:48SPEAKER_02: Now, tiny steps are easier to estimate because there's very little that's unknown.
- 4:53SPEAKER_02: Okay, you pretty much know everything about how to, that's just a super simple example.
- 4:59SPEAKER_02: I want to build an if statement.
- 5:01SPEAKER_02: Well, I can figure out how long it's gonna take to build an if statement, right?
- 5:04SPEAKER_02: And I need two of those and I need a for loop.
- 5:06SPEAKER_02: Okay, that's pretty simple to break down and estimate, but there's little unknown there.
- 5:13SPEAKER_02: But if we're gonna add it all up, those tiny estimates could, in theory, give you a decent estimate.
- 5:19SPEAKER_02: However, at that point, you've already architected your entire application and you could have just built it.
- 5:26SPEAKER_02: Plus, that fails to take into account the assumptions that you have that are going to be wrong.
- 5:33SPEAKER_02: Okay.
- 5:34SPEAKER_02: When you build a project, you almost always have assumptions that have to get changed.
- 5:40SPEAKER_02: Maybe it's the client saying, Well, we actually want it this way.
- 5:43SPEAKER_02: I've had clients that say, Well, I know we said desktop, but we really meant web.
- 5:48SPEAKER_02: Well, that's a problem because now all of our estimates are based upon something that's going to have to change entirely or mostly.
- 5:56SPEAKER_02: So that's a big deal.
- 5:58SPEAKER_02: But it's also sometimes where you're saying, hey, I think we can just do this authentication thing.
- 6:03SPEAKER_02: We just drop drag and drop this thing in.
- 6:05SPEAKER_02: You find out, ooh, it's not quite that simple.
- 6:08SPEAKER_02: We have to do something else.
- 6:10SPEAKER_02: And that's going to take some more time.
- 6:12SPEAKER_02: So that's where it's going to fail to take into account some things that might cause major differences in your time, because now you've got a cascading effect.
- 6:23SPEAKER_02: You've mapped out the entire application in minute detail in order to get a great estimate.
- 6:28SPEAKER_02: And then you find that a quarter of the way in that something is different, then you have to change.
- 6:35SPEAKER_02: And now everything from there on down has to change as well because it's based upon the thing that you changed.
- 6:42SPEAKER_02: So now three-quarters of your estimate is no longer valid, even with that tiny little estimation system where you're estimating every little task.
- 6:49SPEAKER_02: So even that is not going to be a perfect system.
- 6:53SPEAKER_02: So, how do software products ever launch on time?
- 6:58SPEAKER_02: Well, the answer is most don't.
- 7:01SPEAKER_02: Okay.
- 7:01SPEAKER_02: However, there are ways to meet a given deadline.
- 7:06SPEAKER_02: So be careful here because there are ways to meet estimates.
- 7:11SPEAKER_02: As my boss used to tell me and tell customers all the time: time, money, and quality.
- 7:18SPEAKER_02: Pick two.
- 7:20SPEAKER_02: So there's ways to meet the deadline, but it's by manipulating one of those levers.
- 7:26SPEAKER_02: Okay.
- 7:27SPEAKER_02: So time.
- 7:28SPEAKER_02: You can spend more time on a project, or you can extend the deadline.
- 7:32SPEAKER_02: Okay.
- 7:33SPEAKER_02: So maybe you're working 20 hours a week on a project, you work 40 instead.
- 7:38SPEAKER_02: Or maybe you push off the deadline to a later date, which kind of would usually miss an estimate if you're saying that the estimate is time, like we'll be done by May 1st.
- 7:49SPEAKER_02: But sometimes your estimate is how much money you're going to spend on this.
- 7:54SPEAKER_02: So you can push off that deadline and say, hey, we're going to still work 20 hours a week, but now we're working through until July 1st instead of May 1st.
- 8:03SPEAKER_02: So you have two more months to put in the time necessary to complete this goal.
- 8:10SPEAKER_02: That's one lever you can pull.
- 8:11SPEAKER_02: The second lever is money.
- 8:14SPEAKER_02: You can hire more employees onto the project, or you can have them work overtime or things like that, or you can buy parts of the project instead of building them.
- 8:25SPEAKER_02: Maybe you decide that, please don't do this, but maybe you decide we're going to build this database on our own.
- 8:30SPEAKER_02: We're going to build our own data, our own database type.
- 8:33SPEAKER_02: Instead of using SQL or MongoDB or one of those database types, we're going to build our own because we know best how to build a database.
- 8:41SPEAKER_02: If you get tight on time, well, you can buy a database instead.
- 8:47SPEAKER_02: And you can use that instead of trying to do the whole thing yourself.
- 8:51SPEAKER_02: Or maybe it's authentication.
- 8:53SPEAKER_02: Don't roll your own authentication.
- 8:54SPEAKER_02: But maybe it's authentication instead.
- 8:56SPEAKER_02: Or maybe it's a piece you can buy a control from some company to drop into place to do that or most of that instead of doing it yourself.
- 9:05SPEAKER_02: Okay.
- 9:06SPEAKER_02: So that's money.
- 9:07SPEAKER_02: You can spend money on people or on things to speed up your process.
- 9:13SPEAKER_02: Or the third lever is quality.
- 9:16SPEAKER_02: You can remove features or reduce the scope of your project.
- 9:21SPEAKER_02: This is a pretty popular one.
- 9:23SPEAKER_02: So we want to have this application that maybe signs people up for this guest book.
- 9:30SPEAKER_02: And it's a simple application.
- 9:31SPEAKER_02: It's just a guestbook application for weddings.
- 9:34SPEAKER_02: And you want to be able to have them upload images and upload videos, record videos in the spot, and so on for the guest book.
- 9:42SPEAKER_02: Well, maybe what you do is say, okay, we can do text messages, like type it out, or we can do images and text messages, but that recording videos thing that has to be pushed off until version two.
- 9:56SPEAKER_02: We just don't have the time to be able to get that in for version one.
- 10:00SPEAKER_02: So if you want to get this project out the door by a certain date and you don't want to spend more money buying things to put in place, we could cut out the video portion but get the rest done in time.
- 10:12SPEAKER_02: You'll see things like games do this a lot, where maybe they wanted to have both a single player mission as well as multiplayer, and they might cut the single player until later, or they might cut the multiplayer until later, and they say, we'll just do this part of it for launch.
- 10:31SPEAKER_02: So this is a pretty common thing.
- 10:34SPEAKER_02: It's time, money, or quality, and you can pull one or more of these levers in order to hit a deadline of time or money.
- 10:43SPEAKER_02: Okay?
- 10:44SPEAKER_02: So how do you come up with estimates if things are always shifting, you really are just doing a guess, and you have to manipulate one of these three things in order to really meet an arbitrary deadline?
- 10:58SPEAKER_02: Well, here's my way of estimating things.
- 11:02SPEAKER_02: Number one, identify things you've done before.
- 11:06SPEAKER_02: So let's just say, you know, talking to a SQL database.
- 11:10SPEAKER_02: I know how to do that, I've been done it before, I've done it a lot of times.
- 11:13SPEAKER_02: I have sample code that I've done before for maybe for another customer, so I can just, you know, reuse some of the things I've already done.
- 11:20SPEAKER_02: Therefore, I'm pretty sure I know exactly how much time it's going to take.
- 11:25SPEAKER_02: Do that estimate and add 50% or more.
- 11:29SPEAKER_02: Okay.
- 11:29SPEAKER_02: A significant margin.
- 11:31SPEAKER_02: So if you think that'll take three days, make it five.
- 11:35SPEAKER_02: Okay, make it a full week.
- 11:37SPEAKER_02: If you say, well, it's actually gonna take, you know, only a day, really, let's do three days.
- 11:43SPEAKER_02: Let's make it sure we have a bit of a margin here.
- 11:46SPEAKER_02: And you say, well, three days is more than 50%.
- 11:49SPEAKER_02: Yes, but you get so small, then a little extra doesn't give you a whole lot.
- 11:54SPEAKER_02: You see, if if we could estimate in a week time frame, well, if we had to, we have the weekend.
- 12:01SPEAKER_02: Okay?
- 12:01SPEAKER_02: We have two spare days that we could potentially work overtime to make sure we meet that goal.
- 12:07SPEAKER_02: So that's things that you've done before.
- 12:09SPEAKER_02: Number two, research the things you have not done before.
- 12:13SPEAKER_02: So if you have not done something before, maybe adding authentication into a mobile app.
- 12:19SPEAKER_02: Well, do that.
- 12:20SPEAKER_02: Do it into a test project.
- 12:22SPEAKER_02: Figure out how it works, figure out the ins and outs of it.
- 12:26SPEAKER_02: And then once you figure out your time frame, add a large margin.
- 12:31SPEAKER_02: I'd ask me 100% or more.
- 12:33SPEAKER_02: So if you say that's gonna take a week, make it two.
- 12:36SPEAKER_02: All right.
- 12:37SPEAKER_02: That way you're sure to have some buffer time in there.
- 12:41SPEAKER_02: And here's the thing.
- 12:44SPEAKER_02: At the very worst, where you say, you know what, we've got all this done early, then great.
- 12:51SPEAKER_02: If you're done early, the customer's not gonna complain that you've done the application early.
- 12:55SPEAKER_02: At the worst case is that it's done early and you sit around and wait for that deadline.
- 13:02SPEAKER_02: Now, on the other end, if you don't do a good job estimating, you're cutting things out, you're adding more people, you're stressing out.
- 13:09SPEAKER_02: So that's the worst on the other end, which is if you can't get it done in time, which is why you should know how long it takes first.
- 13:18SPEAKER_02: Now, number three, add all those estimates together and present that to the client.
- 13:23SPEAKER_02: So if you've add your one week and your two week and your four weeks, and you figure it all out and say, okay, it's gonna take us eight months to get this project done.
- 13:32SPEAKER_02: Probably you should be confident in about four months.
- 13:36SPEAKER_02: So you say, I'm pretty sure we can get this done in four months, maybe five, but you say eight.
- 13:42SPEAKER_02: Okay?
- 13:43SPEAKER_02: So get it together and present it to the client.
- 13:45SPEAKER_02: And then communicate clearly that this is an estimate, not a promise.
- 13:53SPEAKER_02: Okay?
- 13:54SPEAKER_02: So communicate clearly, we're going to try and hit this date.
- 13:57SPEAKER_02: We're going to do these things to make sure that we're doing our part to hit that date, like working this number of hours per week, making sure that we're checking in our schedule, making sure that we're communicating whenever we have something that gets behind.
- 14:13SPEAKER_02: All those things are important, but communicate clearly this is an estimate, a almost a guess, not a promise.
- 14:22SPEAKER_02: Okay.
- 14:23SPEAKER_02: It's an informed estimate, but it's not a guarantee.
- 14:27SPEAKER_02: Now, number five, if they want that guarantee or a promise to say, we're gonna hit this date.
- 14:34SPEAKER_02: So if if they say, you know what, no, I need to know for certain you're gonna hit a certain date, then maybe even right in front of them.
- 14:42SPEAKER_02: Say, okay, we'd said eight eight months from now, it's now a year.
- 14:46SPEAKER_02: Add 50%.
- 14:48SPEAKER_02: Now you've already overestimated.
- 14:50SPEAKER_02: Add another 50% right in front of them.
- 14:51SPEAKER_02: And they say, whoa, whoa, whoa, I want it done in eight months.
- 14:55SPEAKER_02: Well, then let's start cutting things.
- 14:57SPEAKER_02: Because we cannot guarantee that eight-month deadline.
- 15:01SPEAKER_02: If you want to guarantee, we need to shrink things down.
- 15:05SPEAKER_02: But if you want a guarantee, we're gonna go with 12 months.
- 15:09SPEAKER_02: We'll guarantee it in 12 months time, not eight.
- 15:12SPEAKER_02: Add that 50% right on top of you're already above the top estimations.
- 15:18SPEAKER_02: Okay?
- 15:18SPEAKER_02: And then communicate, they might not get all their features, or it might cost more.
- 15:24SPEAKER_02: So quality or money.
- 15:26SPEAKER_02: Because they're asking for a specific time.
- 15:28SPEAKER_02: You're still saying this is still a bit of an estimate.
- 15:31SPEAKER_02: Even though you want a guaranteed date, sure, we'll lock in that date, but we're gonna maybe spend more money or take more of your money to make this easier for us to do, or it might be we do some features in order to get the core thing out the door by your estimate.
- 15:47SPEAKER_02: Now, you try and get everything out the door.
- 15:50SPEAKER_02: My thing as a as a consultant was always to underpromise, over-deliver.
- 15:56SPEAKER_02: If you say it's gonna take a year and it takes eight months, the client is ecstatic.
- 16:02SPEAKER_02: If you say it's gonna take six months and it takes eight months, the client hates you.
- 16:08SPEAKER_02: So always underpromise and over-deliver.
- 16:12SPEAKER_02: Give yourself plenty of padding and then use those three levers to try and make sure you hit whatever deadline needs to be hit, but always communicate what you're going through and what what's coming up that might cause problems to your deadline of time or money.
- 16:31SPEAKER_02: Okay?
- 16:32SPEAKER_02: So that's the way I estimate because estimates are pretty much guesses.
- 16:38SPEAKER_02: And so the way I do is I always try to, even to myself, underpromise and over-deliver.
- 16:46SPEAKER_02: Always give myself more time than I think I need, because as developers, we often get into this mindset of, oh, that's easy.
- 16:53SPEAKER_02: They don't think a day.
- 16:55SPEAKER_02: You know, the weekend project.
- 16:56SPEAKER_02: You know, my wife chuckles at the weekend project because that weekend project is a month.
- 17:00SPEAKER_02: You know, if it, oh, it's just a weekend project.
- 17:03SPEAKER_02: Okay, that's a month.
- 17:04SPEAKER_02: Because we always look at a problem and only see the parts that we we know, the the easy parts.
- 17:12SPEAKER_02: We forget about all the hard things and all the work that goes into connecting everything and debugging problems and so many other things that happen throughout the life of a project.
- 17:21SPEAKER_02: Okay, so that's my recommendation on how to estimate things.
- 17:26SPEAKER_02: Okay?
- 17:27SPEAKER_02: Thanks for asking the question.
- 17:29SPEAKER_02: Thanks for listening.
- 17:30SPEAKER_02: As always, I am Tim Corey.
- 17:32SPEAKER_01: Thank you for joining us for this episode of Dev Questions.
- 17:35SPEAKER_01: Tim is committed to making it easier for you to become a developer.
- 17:38SPEAKER_01: If you would like to help make more content like this possible, please like, subscribe, rate, and share Dev Questions.
- 17:45SPEAKER_01: You can also send your questions to questions at IamTimcorey.com.
- 17:50SPEAKER_01: Until next time, remember, you are too smart and your time too valuable to waste it making all the mistakes Tim did.
- 17:58SPEAKER_01: When you're ready to learn to think and code like a professional developer, head over to imtimcore.com and enroll in a course.