 This is Unreasonable Estimates and Improbable Goals. My name's Adam Sanderson. I'm a full stack developer at Liquid Planner. I've been there for about six, nearly seven years working on Rails databases, like Frontend, Backend, you name it. If you want to, you can find me on GitHub, Twitter. These slides are going to be on Speaker Deck. It's all under Adam Sanderson. That makes it easy. A bit more awkward, I write code, or I write about code on monkeyandcro.com. If you like to talks about reading and learning about Rails, I'm actually writing a series called Reading Rails. So go check that out if that's what you're into. And hey, it's RailsConf, you probably are. So like I said, I work for Liquid Planner. We make online project management software. Probably the most interesting thing for you guys is that we do probabilistic scheduling, which is pretty awesome. So if that sounds kind of cool, like everyone else here, we're hiring. And I need somebody to come help me build new stuff. So really, if you're in Seattle, let me know. So you can't really work on project management software without thinking about the work of work. Specifically I'm talking about estimating projects, finding the hidden costs involved in those, and then dealing with deadlines. Sounds like fun, right? Ah, sounds like life. All right, how hard would it be? I get asked this question all the time. People come up to me and they say, hey, Adam, how hard would it be? How hard would it be to change all of our buttons from red to blue? How hard would it be to implement a new, like, class of user? How hard would it be to implement email integration? What should I do? Clarify. Before I tell somebody how hard it would be, and pro tip, they don't care how hard you gotta hit the keyboard, what they're actually asking is, how long is it gonna take you to get this done? Before you tell them, clarify. Make sure you know what they want. Make sure that what's in your head is what's in their head, because a lot of times when people come to us, developers have a very specific vocabulary. Things that we think mean one thing mean a different thing to somebody in sales, or marketing, or QA or support. So make sure that you know what they mean when they say, hey, how hard would it be to implement email integration? Does that mean sending emails out of our system? Does it mean receiving emails from someone else? Does that mean a plug-in for, like, Outlook or Gmail? If you don't clarify upfront, you could spend a lot of time wandering off into the woods, and when you come back with your amazing feature, they're gonna look at it and be like, what is this? And you'll have just wasted an hour, a day, a week. Oh, that's gonna suck. So clarify. Next, clarify. Again, so look, you know what you're doing? Now you gotta figure out why you're doing it. Ask them, hey, why do you need me to implement email integration? Maybe they turn around and they say, well, look, we've been getting a lot of customers sending us screenshots, and it'd be nice to just be able to email those into the system. Does a solution already exist? If it does, you might be able to point them towards that. And a bonus for you, now you don't have to do anything. Maybe they turn around and they say, yeah, I know that that exists, but it's kind of a pain to use. Well, now maybe you've found that there's a better approach to solving their problem. Maybe you just need to fix existing functionality. People come to us all the time with prescriptions for solutions to problems. It's really useful for us to take a step back and before we say, yeah, I'm gonna do that, to say, wait, why do you need me to do that? Maybe you can help them come to a better solution. And by doing this, you're gonna get a better idea of what you need to do. All right, once you know the what and you know the why, it's time to start thinking about estimating how hard it's gonna be, how long it's gonna take you. I want you to think about the major pieces of work that you're gonna need to do. Imagine the project and instead of thinking about it in their terms, in terms of the domain of the person asking you, think about it in terms of what you have to do. Is it gonna require a lot of database work? Well, think about the tables. Is it gonna require a lot of work in Rails? Think about your models, your views, your controllers. Is it gonna require a lot of front-end work? Well, think about the different components on the screen. Break these large tasks down into smaller things and write it down. You're gonna need to refer back to this later anyways. This is the stuff that you need to do in order to service their request. Next, sometimes it could be overwhelming to get some of these asks from people. You'll find that they have so many business rules that they want. They've got so many little details that they want to impart upon you. It can make it really hard for you to see the forest for the trees. Step back for a moment. Try and find unifying principles in what they're asking for. Is there some model that you can make in your head that explains what they're looking for? It doesn't have to be perfect. It's just gotta be enough so that you understand what direction to be going in. Again, write this stuff down. You'll need it later. All right, you've broken stuff down. You've grouped stuff back up. It's now in a stage where you can sort of wrap your head around it. Think about other things that you've done. Have you done anything like this before? One of the unique things about our profession is that we tend not to do the same thing twice, and if we do, we're kinda doing it wrong. So, if you can, think about similar things, but maybe you haven't. Turn and ask one of the other developers in your company. Maybe they've worked on this code before. Maybe they've dealt with this type of issue before. They can help you get a better estimate. And on top of that, if they're doing their job right, maybe they'll ask you what it is that you're trying to do, and they'll ask you why. This is awesome because it turns you around and makes you be the person who is asking you for work. It's really helpful for clarifying what you've gotta do. Now, there are dozens of different methodologies, different approaches, different sciences of estimation. Here's what I want you to do. Make a guess. That's it. I know, you could play planning poker, you could do all number of things, but just make a guess. Here, I'm gonna make it flash. There, isn't that awesome? Seriously, look, an estimate's just an informed guess. A lot of times, we put way too much value on an estimate. It's okay for you to be wrong, and it's okay for you to be uncertain. In fact, if you're not uncertain, you're probably wrong. I want you to quantify that uncertainty. Embrace it. Are there things that you're being asked to do that you don't know how they're gonna turn out? Maybe you've gotta load a whole lot of data into the database, and you're not sure if it's gonna handle that. Maybe you've gotta make some flippy-clicky thing that's gonna be really hard to implement in Internet Explorer 8. Do you know how that's gonna work? Maybe it will. Maybe it won't. Race these things up. Let other people know if they're asking you to do this work. Say, you know, I'm not really sure about how this is gonna impact our database. I'm not really sure whether IE8's gonna support this user interaction you're asking for. This is helpful because it gives the other person a better understanding of what you need to be doing. Now, next, play a spread. Tell them a story. If everything goes well, I think that this might be done in a week. If I need to denormalize my database, if I need to do something really crazy to get this supported cross-browser, this could take me four weeks. Look, it's a lot easier for you to hit an estimate, a range than it is for you to give them one hard number. So that's great for us, but it's also good for the person asking you to do the work because you're giving them a story about the future. You're telling them useful information about how this could play out. And if they've got that information, they can start making better use of that. They can plan better based on that. And it starts a better dialogue between you, but you're not done there. You've gotta deal with this uncertainty. Nobody likes to get bad news. Nobody likes to find out that the project is doomed. But you know when they like to hear that? Never. Okay, do you know when they'll tolerate it? They'll tolerate it right at the very beginning. You know when they won't tolerate it in the 11th hour? Oh man, are you gonna be ever so happy when your fellow developer says, hey guys, I know we're gonna ship, but I just checked the clicky flippy thing in IE8 and it doesn't work. Wait, we're supposed to ship when? Nobody wants to find out that the uncertainty got left to the end. So do it first. It's really hard to do this, but deal with uncertainty upfront. That way when you find out that something's going to take a long time, you can communicate that back to people and you guys can adjust your plans to accommodate that. I know, we always wanna do the fun things first. I wanna like jump in and do the stuff that I know really well first because I feel like I'm making progress. That's a great way to set yourself up for failure later. Now, doing that alone isn't enough. You remember that estimate? Change it. Change it continuously. As you learn new things, as you figure out the uncertain things and as you make progress, circle back until anybody who depends on you how long this is gonna take. Give them your vision of the future. Give them your mental model of what the risks are. Give them the understanding that you have right now about what you think is gonna happen. Communicate often. All right. Let's talk about the dark arts of project management for a moment. Look, you know what you're doing. You know why you're doing it. You've got an estimate and now, oh, shoot. We can get screwed as developers. We think that we're all logical, that we're sane. Now, it's ever happened to you. It happens to me all the time. Somebody comes up to me and they say, hey, Adam, how long is it gonna take? And I say, it's gonna take about three weeks. And they say, look, we need this done really quickly. Could you maybe do it in one? And I say, well, oh, how about two weeks? I thought that was just being nice. I thought I was like splitting the difference right, wrong. I just screwed myself. It's natural for people to haggle, but you don't win when people are bargaining over estimates. Look, your estimate is your best understanding of what the future holds. What made it go from three weeks to two weeks? How did you suddenly manage to shave off a whole week of work in five seconds? Because I wanna know. I need to be able to do that later. So you come up and you tell me. No, look, you can't negotiate time, but you can negotiate features. And as you learn more about the project, you can re-estimate. Moral of the story, don't give people estimates that you think are gonna make them happy. Give them estimates that you think are true. If they keep badgering you about it, point it out. Say, hey, look, I know what you're doing here. I see what you're doing. Estimation bargaining. It's not gonna work. Not only is it not gonna work for me, it's not gonna work for you. If you give in to this kind of thing, you're actually setting up not just yourself for trouble, but your team, the people who rely on you. And whether or not the person asking you to do the work knows it, you're setting them up for failure as well because they depend on that estimate that you just gave them. So you know what you're doing. You know why you're doing it. You've got an estimate. You defended it. Awesome. Maybe you shouldn't do it at all. There are hidden costs involved in everything. Like complexity costs. Look, some features that we build incur costs on all the future work that we do. For instance, if you build a new RESTful API, great idea. If you build a new access controls, it was dropping in CanCan. If you build a new native mobile client, yeah. You're not done there. From now on, every new feature that you implement has to take those old features into account. So what you just did is you made it so that your future work, future you, is gonna hate past you. You're just incurring new costs for the future. So watch out for these cross-cutting concerns. They can really bite us sometimes. Now, there are ways to do this that are gonna cut down on those costs. You can never get rid of them entirely. But if you want to, do the extra engineering up front, factor that into your original estimate. Let the people know that you're gonna need a little bit more time. What about operational costs? Look, are you introducing new moving parts? You're gonna build a new job queue. You're gonna throw rescue and redis in place. They're awesome tech, but guess what? They're costly. How are you gonna test this in a production server? How are you gonna monitor it? How are you gonna deploy this? How are you gonna make sure that it's running every time you spin up a new server? It's not necessarily hard, but it does take time. And once you've done it, it still takes time. And you know what? When rescue goes down, who are they gonna call? They're gonna call you. You're the one that put it in place, right? So dealing with that is gonna take more time out of what you consider to be your budget for developing support costs. These are awesome. There are a lot of things that we can do as developers that are just really easy. We can knock out a feature in like 10 minutes. The downside? Nobody understands how that feature works. So what if your users don't get it? Like you built this awesome thing and they've got no clue what it does. Who are they gonna talk to? Well, if you've got one, they're gonna talk to your support team. I hope your support team doesn't understand it. Okay, awesome. Your support team's now talking to you. And that takes time that you're gonna be not able to develop in. What if your business as a whole doesn't get it? Meetings, that's what. And you know what meetings mean? It's not just your time that's being used up then. It's your entire company. Everyone around that table, you're sinking more and more costs into this. So again, you can combat some of this, but go back, update those estimates to factor this in. What about opportunity costs? Slightly different thing, but think about this. You can really only do one thing at a time. So what's the highest priority thing for you to be doing right now? What's the highest priority thing for your team? For your business as a whole? Because whatever you're doing now is excluding every other feature that you could be working on right now. Think about it. Prioritize all the things that you would like to be doing, all the things that you know you should be doing. Make sure that this is actually the most important thing, not just the most immediate thing that you need to deal with. Look, I'm not saying don't do anything, but weigh the costs. Understand them, recognize them. Everything that we do as developers costs us down the road. Choose which ones you're willing to pay. All right. More dark arts, because I love these. This one's the most insidious. This one trips us up as developers because we've got egos, and it's really easy to manipulate us. What's happening to you? Somebody comes up to you. They say, hey, how long's it gonna take? And you say, I don't know about a week? And they say, really? Oh, and they look so disappointed. And then they say, I thought you were smarter than that. Oh, that hurts. And then it's like kicking you when they're down. They say, oh, I'll go ask her. I'll go ask the intern. She seems pretty smart. Oh, even worse. You know what happens next? I don't know about you, but me? I start begging to do the work. I'm like, you know what? Did I say a week? I meant maybe like three days. Whoa, stop going towards the intern. One day, I'll have it to you by noon. Don't let your ego get you into trouble. Stand by those estimates. Really, the best thing that we can be as developers in this case is have a little humility. And if you see somebody trying to do this to you, call their bluff. Like, they're not really gonna go to the intern. Well, they might. And it might be a learning experience for everyone. But name this. Say, I know what you're doing there. It's not gonna work on me. Stand up for yourself. And if you can't, find a new job. All right, deadlines. Like, I've got one coming up in 11 minutes. Deadlines come in all forms. They come in a spectrum, from soft deadlines to hard deadlines. Soft deadlines are things like goals. They're things we would like to achieve. For instance, we would like to ship this by the end of the week. We would like to get this out by, I don't know, this next conference. Hey, we're gonna try to get this out for the customer by Q1. Hard deadlines are things like RailsConf. For me, anyways. Can you imagine? Ruby Central's sending out an email. They say, hey guys, funny story. I didn't do his slides. So, postponing RubyConf by like a week. Just change your reservations. Yeah, I'm not DHH, so I can't get away with that. It's a hard deadline. So, when hard deadlines come up, actually, when all deadlines come up, what do we do? You gotta deal with it. Ignoring it's not gonna work, and panicking also doesn't work. So, we've really got four options. The first two are ones that we as developers think that we really like, and the second two are ones that managers think that they really like. Nobody really likes any of these options when you get down to it. But, if it's a soft deadline, if it's just a goal, you guys can ship late, you can miss it, maybe. It's probably not the end of the world. Don't do this all the time, because you're gonna look like an idiot. But, recognize, weigh the balance, weigh the things that you've got to weigh. I don't know. Yeah, this talk is about work, not about how to give a good talk. So, yeah, sometimes you can ship late. Of course, there are hard deadlines, right? There are things like RubyConf, and I can't miss this deadline. If I did, we would all be standing here, and I would be stammering like I was. So, what else can we do? Well, we can cut scope, we can cut features. Like, honestly, prioritize the things that you've got to do. Figure out what you can get done by the deadline, cut the rest. For instance, I illustrated all of these slides, except for what I got about here, and I ran out of time. So, I cut my little illustration. One of the things that is scary about this, though, is that some of the things that get cut aren't the things that we as developers think are important. Performance, testing, correctness. All of these things can get cut if you're not careful. So, if you value that, make sure that it's put high in your priority. Make sure that you guard that against the deadline. Okay, another option. If you're not gonna get it done and you can't ship late and you can't cut features, well, you can add more people, right? Well, you can go read the Mythical Man Month, but basically boils down to this. Unless you've got a project where everybody can work completely independently, you're gonna have to start talking to each other. Ew, it's kind of uncomfortable. So, I'm about to miss my deadline. They pull you in to work with me. Now, you and I have to start talking. We've gotta make sure that we aren't gonna be stepping on each other's toes. We've gotta keep each other appraised of the situation. We've gotta understand which direction we're both going in. That adds overhead. And if you're splitting up work between two people, then it means that you're gonna start, like, depending on the other person to get things done. And if I'm waiting on you and I'm twiddling my thumbs, that's sort of wasted time. That's time that's not actually going towards getting the work out. So, adding more people sometimes works, but sometimes it's just gonna make everything go more slowly. Oh, and if you do add more people, make sure they get along. Cause nothing is more awkward than running up against a deadline, working with somebody who you wanna punch. Like, this is how sparks fly, right? You don't wanna do this. All right, final way that you can deal with a deadline. If you can't get two people to do the work twice as fast, maybe you can make one person work twice as hard. This really sucks, and I'll tell you why. It works. It can, honestly. But it's not sustainable. And I don't think any of us enjoy it. Look, think about this. You've got eight hours to work, you've got eight hours to sleep, and then you've got eight hours for your daily commute, for cleaning up after your dog, for cooking dinner, for spending time with your friends, your family, for reading 17th century poetry. Where's that overtime gonna come out of? I got a hint for you. It's not coming out of work, bummer. Okay, your only two remaining options are sleep and what I would like to call life. So, if that time's coming out of sleep, you're gonna be tired. You're not gonna be very proficient. You're not gonna be thinking straight. We make the stupidest mistakes when we're up at 3 a.m. pounding on our keyboards. So quality takes a hit. Shoot. Well, okay, what about life? Use up a little bit of life to get this out the door. This is the path to burnout, to depression. Use it very sparingly. Use it wisely. Think to yourself, is this more important than cleaning up after my dog? Is this more important than spending time with my kids? Depends on how much you like your kids, right? Just be careful, that's all I can say. All right, let's talk about one more of the dark arts. Deadline hardening. This is the magical thing. Whoops, I don't wanna show this to you yet. I gotta tell you about it first, because here's what I love about this one. It happens to us all the time, and every time it does, we're totally surprised that it happened. We're like, where did that come from? And I'm like, didn't this happen to you last week or yesterday? All right, here's roughly how it goes. Somebody comes up to you and they're like, hey, let's try to release by the end of the month. And you're like, I don't think we can actually do that, but I'll try. Okay, and you go back to your keyboard really quick, right? Clock spins, pages fly off the calendar, 80s work montage. All of a sudden, manager comes back and they're like, hey, we need to release by the end of the month. You're like, wait, what? Why? Why do we need to release by the end of the month? And they're like, we've got customers waiting on it now. You say, why did you promise that to them? And I'll tell you why. They heard you say that you were going to try to do it by the end of the month. Now, I know that what you said in your head was, hey, get out of here. I know that what you said was, leave me alone, I got a code. I know that what you said was, I don't see you. But what they heard is, I'm on it. It's a bit of wishful thinking on their part, but it's true. Look, don't commit to making any deadlines that you don't think that you can meet. And saying that you'll try is committing. Look, people are less likely to turn a goal, a soft deadline, into a promise, a hard deadline, if they think it's risky. When do they think it's risky? They think it's risky when they know that there's uncertainty. They know it's risky when they know that the amount of work that you've got to do is large. And that you're likely to go over the deadline. So, communicate your status and risk often. Communicate uncertainty. If you take nothing else away from this, communicate. Make sure that other people understand what your view of the world is right now. Because if you don't, that's how you're gonna end up with unreasonable estimates and the other thing in my title. I can't remember it. Awesome. That's my talk. You guys have any questions? Wait, clap first.