5 ms·
Avoiding "the stupid hour"
- kiba 14y agoI thought it's "Pulling all nighters"
- saraid216 14y ago"Pulling all nighters" implies that you code past midnight, which isn't the case. I used to do stupid hour by staying at work until 8pm; it was ridiculous, and I've since learned not to do it unless I've actually got some flow going.
- chrisacky 14y agoIt's really hard to emphasise how important identifying those moments when you're productivity starts to wane actually is.... I'm sure so many of us have this mindset where we all think we are indestructible, mentally and physically, and burning through the nights to be that guy who "gets shit done" is as important as shipping your first line of code. When I was a lot younger, I couldn't identify poor code even during my best hours, so I could happily burn through an all nighter, but after years of experience you get that wisdom to be able to notice when you aren't switched on. For me, this is usually at about 8pm at night (after working for a full 12 hours with minimal breaks). You start to notice that your concentrate flickers and something that should have taken 15 minutes has actually taken you 2 hours and it's now 10pm (and you have fifteen tabs of HackerNews open). Do yourself a favour and just stop. Come back refreshed. Whether that is in an hour, or even a full night. Unless you have some insane deadline that doesn't depend on code quality, it's inadvisable to ever burn through it... because ultimately you are wasting time that could be better used on recuperating your faculties!
- cstross 14y ago"should have taken 15 minutes and has actually taken 2 hours" is a really good sign that it's time to give up and go get some sleep. This is also a good sign that you should sign off sick if you've got a cold or flu or some other ailment, even if it's only 11am. It indicates that your productivity is about to go negative and you may actively damage your project if you keep flailing around.
- malnourish 14y agoI find that if I step back from the project when I'm sick, not only do I recover faster, but I often think of novel ways to solve a problem (or realize the solution was under my nose) by nature of taking some time away from the screen.
- hox 14y agoYou'll find that stepping back from a problem, even when not sick, generally can help your overall perspective. I personally like to take walks and focus on things other than the problem at hand; this almost always results in clarity for me.
- malnourish 14y agoExactly! Many of us who have pulled all nighters (or very late nights) know that not only does the quality of our product decrease, but the quality of our lives. I enjoy what I'm doing less, my body and mind begin to feel strange. What's worse, is that I'll likely spend more time sleeping than I would have had I gone to bed, and I'll wake up at a non-optimal time to boot. In almost all cases, I find it far better to hand in something a day late than on time and full of errors.
- cstross 14y agoSome folks can pull all-nighters; not only can I not stay awake for more than 24 hours (I literally keel over sideways and faceplant on the floor, snoring) but if I try working more than 10 hours, I run into stupid hour syndrome. And in my later post-programmer life as a writer, if I write past a certain point (roughly 4500 words of fiction or 6000 words of non-fiction) in a day, then for every 1000 words past that point, I end up having to bin and re-write about 1500 words the next day. Because it's unmitigated crap. Limits, folks: we have them. Learn and respect them and don't try to be macho about it, because it doesn't help.
- seanmcdirmid 14y agoAs for writing (scientific papers), I find it best to use my most productive hours for editing and the stupid hours for writing new material, under the assumption that I would have to edit new material anyways. Programming is much the same way. Use your best hours to refine/polish work that is furthest down the line, use your worst hours to write crap that gets you started thinking about what the real solution will look like. Even in your best hours, you probably aren't going to come up with the right solution immediately (unless the problem is easy).
- tankbot 14y agoThis is a very interesting philosophy I would like to hear more about. I suspect it is different for coding? It seems like tracking down all of the connected logic bits would be difficult after writing deliriously.
- seanmcdirmid 14y agoCoding is much the same way as writing to me; they are both forms of thought development and refinement. But then I write research code, not production code, so life is a bit different for me (prototypes vs. products). If you are applying and checking in a bug fix, you don't want to do that in your off hours. If you are building a compiler/interpreter/editor for a new language from scratch to explore some design ideas, then off hours are useful in pushing things along since there are lots of unknowns that require time to mull over. Also, you get something to sleep on.
- pcl 14y ago> Have you ever come back to a project and been unsure of where to get started? If you had left off just one item sooner the day or week before, you'd already have a known starting point. I can't find a cite for this right now, but I've heard this phrased as "park facing downhill." Towards the end of the day, I actively try to get myself into a position where I've put together the beginning of an idea and gotten some failing test cases written, or at least some non-compiling pseudocode into a buffer somewhere. This sets me up for success at the beginning of the next day -- I work right into a state of flow while tying together the loose ends from the day before.
- Evbn 14y agoWith this approach, you never have time to stop and clear your mind and look at the big picture, you are always stuck in the rut of what you were doing yesterday, which is what you were doing the day before, and on and on.
- pcl 14y agoIf I had the luxury of coding all day, I could see this as an issue. More often than not, however, I end up with meetings and whatnot peppered here and there throughout my day, so finding time to think about the larger picture isn't hard. What is hard (for me) is to kick-start myself in the morning, and a little help from my yesterday-self goes a long way.
- adrianhoward 14y agoThat's simple to get around - you just schedule in a regular cadence for stepping back. For example we do a little regroup after lunch, and have a weekly short 20m retrospective on Friday afternoons before stopping for the weekend.
- thirdtruck 14y agoAgreed. I have to make a point of doing this with my fiction, such a leaving sentences half-finished, and I found that it does wonders for maintaining productivity. It keeps my mind from "closing the loop" and treating a project as "finished" prematurely.
- derwiki 14y agoI never understood why people treated working through sleep deprivation as a badge of honor. Glad to see that others agree!
- chaz 14y agoThere's also the "hero night." It's pulling off an all nighter to accomplish a seemingly impossible task with a hard deadline. This happens about once a year, and it was in April for me this year. The company had 24 hours for an opportunity to be on national TV, but we needed a landing page built, with a contest, and a Facebook integration. Small company means you gotta take the chance. Grabbed my earbuds, fired up my Spotify, and got to work. Got it done and deployed a couple of hours before airtime in the morning. It worked great. Unfortunately, the TV spot didn't pan out quite the way we were told, and it didn't provide much value after all, but everything I built worked. I would have felt terrible if the opportunity was in fact huge, but what I had built was subpar. It's a nice feeling to be the hero, even for yourself. But it's also easy to overvalue a success like that and assume that it will always be that way, and always be the hero. Unfortunately, it turns into "stupid hour" most of the time.
- bitteralmond 14y agoThe last bit about the "subconscious processing" is spot on. I read a study once that found that people daydream/drift off around 30% of the entire day, and the people who do not resist doing this and allow themselves to dream are more creative and productive as a result.
- naner 14y agoThe worst part about the self-inflicted "stupid hour" is that your decision-making faculties are already working poorly by the time you decide whether to keep going or not. It reminds me of the tragic comedy of trying to overcome a bad habit. The stress from abstaining from the vice causes a strong impulse to seek solace in the very vice you're trying to quit. Plan ahead for moments of weakness. I actually have a "stop-hacking" alarm on my computer... gives me a brief warning to finish what I'm doing then it locks the screen 60 seconds later.
- jackcviers3 14y agoThere's a lot of talk about this subject as if the practicioners of coding long past the point of optimal productivity have a choice not to code when you are at that point. I don't think most of us actually have a choice - it is often a case of ship or lose customer x. Promises are made that can't be kept by humane working hours. Things break days before a huge demo. Someone gets sick. You are in an arms race with a well-funded competitor. Something I would like the programming world to discuss is that it isn't the best coded product that wins - technical quality rarely matters. Usually, the first product to market wins, or the programmer who kicks out the most features as long as the features works. Shipping isn't just a feature. It is the only code quality metric that matters to anyone who isn't a coder. It also is easier to ask forgiveness for refactoring after the ship date than it is to ask for permission to push the date back. All-nighters are ingrained in the practice of programming for a living. The code may not always be robust or elegant, but in most cases what matters is that it works and gets done faster than the others guys' high quality code job.
- wpietri 14y agoI agree that when emergencies happen, we should rise to the occasion. But I think it's a business mistake to let emergencies become the new normal. I have seen a number of shops that rely on last-minute rushes and big drama. Indeed, I've made some spectacular money from pulling their nuts out of the fire. But the main reason that they had to do something dramatic was the accumulated weight of all their poor decisions. It's as if their technical debt was held by a loan shark, showing up smacking them around just for fun. It isn't the best product that always wins. But shipping a shitty product also doesn't guarantee winning either. All else equal, wasteful organizations lose out over time. That doesn't mean I'll never step away from the optimum path, but it does mean I'll only leave it when I think there's a strong business case for doing so.
- adrianhoward 14y agoSomething I would like the programming world to discuss is that it isn't the best coded product that wins - technical quality rarely matters. Usually, the first product to market wins, or the programmer who kicks out the most features as long as the features works 1) The first product to market often doesn't win. In fact I'm hard pushed to think of many examples of that being true ;-) 2) Even taking that as true - I'm not sure I follow the argument. Working longer hours != shipping earlier. If you are working past the point of optimal productivity then, in anything but the very short term, you are slowing yourself down. I've seen multiple teams ship faster by working fewer hours. I know others have too. I find it freakishly bizarre that folk don't measure their productivity and optimise for going faster rather than working longer.
- gurkendoktor 14y agoI have this, but a 20 minute nap or a walk to 7/11 usually fixes it. What happens to anyone in this thread when they try that?
- NathanKP 14y agoI do the same thing. Whether or not it works depends on the time of day. If it is just a 4:00 in the afternoon lull in attention span a short walk (or if I have a deadline an espresso at the desk) will usually get me back on track. If it is late in the evening though I can only delay the inevitable need for sleep so much. I think that inevitable tired point where you aren't going to get anything more out of yourself effectively, no matter what you do, is what this article is about.
- adrianhoward 14y agoI have this, but a 20 minute nap or a walk to 7/11 usually fixes it. What happens to anyone in this thread when they try that? I will normally feel better and more awake after doing something like this. That, of course, may well have no effect on how productive I am. Optimising for 'feeling good while working longer hours' should not be the aim. Optimising for 'producing the most useful stuff in time period X' should be what we're after. Earlier in my life I could happily sit in front of the keyboard for fifty hours a week and feel fine. However, when I started measuring what I produced I found that I was more productive if I spent about 30 hours in front the keyboard. If I had a time machine that's what I'd tell my 20 year old self. You can do more by spending less time in front the keyboard, which has the happy side effect of giving you more time to do more away from the keyboard.
- lnanek2 14y agoA lot of times with a no sleep weekend hackathon or a launch or something I can work a long time on the tough parts first, clearing up all the technical risk in a design with little test screens/pages/activities for example, and then the next day running on no sleep I'm still OK for testing on a dozen different phones/emulators/browsers and making forms return nice looking error messages and making all the buttons on the site look consistent, etc.. Basically you just have to delegate to your stupid hour self the lousy slog work. :)
- jayferd 14y agoJust realized that I'm in "stupid hour" right now. Going to bed.
- Yoni1 14y ago+1. Good night :)
- jasonjackson 14y agoThese articles pop up all the time, as if people hadn't had the foresight to realize their brain function decreases when they don't sleep. Sleep deprivation is a tool which allows you to sacrifice some degree of brain functioning (different for each person) to gain in other areas like meeting hard deadlines, or taking advantage of your programmer flow state, or the positive feeling you get knowing you grinded away at a task non-stop until completion.
- epochwolf 14y agoYes, it's a tool but if you're constantly reaching for it, you have a problem. This tool robs future productivity at a 2 for 1 ratio. The only thing it's good for is getting a small task done sooner at the expense of getting other stuff done later.
- lostnet 14y agoI think a large problem is in our psychology of not wanting to scrap our previous labor even if it was substandard. At this point I hope most coders are checking in code regularly enough that they could identify a point close to where quality declined and could throw everything after it out. Personally, I usually start a day with a review of the previous changes but I rarely back out low quality changes. I often realize a continuation/rework has taken longer than a full backout and redo (and I have virtually never been disappointed by a redo,) yet there is a psychological barrier to overcome before backing out.
- nanook 14y agoIs the site down for anyone else? I haven't been able to access it for ~ 24 hours.