Hacker News new | comments | show | ask | jobs | submit login

> Long hours: "It's 5 o'clock and I should be done with work, but I just need to finish this problem, just one more try," you tell yourself. But being tired it actually takes you another three hours to solve. The next day you go to work tired and unfocused.

> Shorter hours: "It's 5 o'clock and I wish I had this fixed, but I guess I'll try tomorrow morning." The next morning, refreshed, you solve the problem in 10 minutes.

I have too much experience with this. I remember when I was self-employed I humble-brag tweeted about my production deployment ~15 minutes after starting work. A friend of mine asked why I hadn't just deployed last night and the quote above was my first thought (in addition to the fact that you should never deploy to prod then go to bed). I was done with work, so I stopped. It avoids hitting that "grind it out" phase where you're lucky just not to do more harm than good.

This has happened way more times than I can count. Spending hours staring at a line of code, up all night. Wake up next morning, and it's a simple spelling mistake I've missed. Grinding out work has never been productive. Mistakes happen when you're tired. This applies to study cramming as well, and it's completely pointless. Study as much as you can, until your NORMAL bed time, then stop and get a full nights rest before the test.

Side note, it's no wonder these big games come riddled with bugs these days. Pushing developers to the extreme during crunch time, just to meet a deadline. There is NO WAY they are doing everything correctly.

I think it does sometimes work, which is why at last I fall back to it.

Grind out fix.. 90% success rate, average time to solve - 1 hour.

Sleep and fix in the morning.. 100% success rate, average time to solve - 15 minutes.

Clearly better to sleep but if something needs fixed NOW... then it's time to grind I guess...

In reality, though, how often does it need to be fixed NOW? Like, actually needs to be fixed now, or there will be serious consequences, and not just some manager thinks they want it now? I'd be willing to bet it's less than 10%.

Reality is basically never, unless it's a major system outage, or security issue. We don't even bother looking at issue priorities, because everyone raises them as critical.

Even then, is it really an emergency? What's the consequence of it being down? Death? People being fired?

IME, 90% of emergencies are "such-and-such a manager is going to look a little bad in a spreadsheet next Monday".

That doesn't mean it doesn't need fixing, but we should start being honest with ourselves. Defining P1, P2, etc. is useful.

Well in the case of Amazon, $66,000 per MINUTE. If you want to make a case for money only being money sure. But as far as business is concerned, that is an emergency.

Well to be fair, we're not talking about emergencies, obviously those get priority. And of course, as much as people would like you to believe, most things are not an emergency!

What about the 3rd option, getting two tasks done?

- Grind for 1 hour and assuming 90% success rate, finish the task 9 out of 10 times

- Sleep

- Finish another task in 15 min with, again based on your assumption, a success rate of 100%

In start-ups there is usually a near endless list of tasks to solve so this would be the most productive approach. Again, based on a lot of assumptions.

[edit: formatting]

Except that success rate was assuming that you did get the rest you needed, mainly from leaving at a reasonable time. Staying and grinding directly contradicts that, so you're not going to be rested and well in the morning, and you're not going to have the success rate of 100%.

Basically, you just advocated for crunch time and death marches. Things that are known to not work.

You haven't prepped and then slept on task 2 so I don't think you're finishing it in 15 minutes. And now you're sleep deprived.

There's a lot of science behind this phenomenon, this article does a good job of discussing the process https://www.psychologytoday.com/blog/your-brain-work/201209/...

But tl;dr your brain is adept at working on problems in the background after you've defocused on them. Your work is still getting done, even if you cut out of work and unwind, no guilt necessary ;-)

Spelling mistakes are the worst! You need less stringly-typed things in your life.

I had this problem until I realised, most of my work is being done while doing something else less brain challenging. I have awesome ideas on the shower, while walking, running, throwing out trash. Smoking really helps here as well (but I am not so proud of it). Just because I am not starring at the screen it doesn't mean I am not working on the problem. If my brain finds something interesting, it is working on it subconsciously.

I couldn't agree with you more. I can't even tell you how many times I've figured out something while on a run or walk -- far too often I've started writing code without thinking it through adequately. Getting away from the keyboard, away from google, away from every possible distraction and just letting your brain have some time to reflect on things is sadly lacking with today's constant barrage of information.

I've started doing something in the past year - when I go for a run, I pick one "small thing" to think about. It might be trouble I'm having with code (javascript Promises, anyone?), or something as unrelated as "why do we drive on the right side of the road in the U.S." I don't always intend to try to find an answer, I just want to get in the habit of just thinking without distraction.

+10. Blogged this a while ago:

Tech Video: Rich Hickey: Hammock-Driven Development:


Some people don't understand this, and it was one of the reasons I was so happy to get to work from home. It's really hard to work this way in an office, but at home people really only see the end result and assume you got there using whatever methods they think are best. Nobody knows or cares I took a couple laps around the block mid-morning, they just know I fixed the issue.

Most managers, especially in Europe don't get it. They need to see you that:

- you are working at least 9-3 (or pretending it)

- you are talking to your colleague in the kitchen (in manager terminology: knowledge sharing, my favorite one)

- you are present at unproductive meetings

- you are hitting you keyboard

- you have opened excel sheet, sharepoint, and other required tools major of working time.

I spent almost 6 years in corporate open office plans. Last year was working from home. Now, I am not able to go back to the standard 8 hours open office.

And yet I got downvoted in another thread about Marissa Meyer's quote on startup working weekends, when I suggested they were likely misusing their time, rather than getting ahead.

Short bursts are ok, but everyone needs time to recharge.

reading "The Power of Habit", "Mindset" and "How we Learn", it is ringing more true to me each day that we all have a fixed budget of willpower, creative thought, and focused learning -- and all three are extremely taxed working as a software engineer.

I also am a firm believer in the power of falling asleep while thinking about a problem, and waking up with a fresh approach on how to solve the problem. Thomas Edison was famous for taking naps with a steel bearing on a plate. Salvador Dali had a similar technique he called "slumber with a key"

I wasn't sure what you were trying to saying there so I looked it up:

To further assure that he would not lapse into sleep, he would hold a steel ball bearing in each hand. On the floor, placed directly below his closed hand would be a metal saucer. If he should fall completely asleep, his hands would relax and each ball bearing would fall to the floor, striking the metal saucer, making a noise loud enough to wake Edison.

1. https://fireballimagery.com/2011/09/01/the-naps-of-thomas-ed...

Just to clarify, as you make it sound like that fixed budget is something inherent in yourself; however there is evidence that you can influence what that budget is http://dx.doi.org/10.1037/pspp0000014

Full paper PDF: https://psychology.stanford.edu/sites/all/files/Implicit%20T...

I've only read the abstract. Does the paper address the possibility that people with more willpower might believe it's unlimited? Or that having more willpower in total allows some of tbat willpower to be allocated to the meta-allocation of willpower?

What is the direction of causation?

Now that you mention it, I should have left out "fixed" in "fixed budget" (Also goes contrary to the second book I listed, ironically

I am lucky. I finally have an office with a lockable door. At lunch time I take a power nap of 12 to 20 minutes. Afternoons flow better and if I am coding it goes much faster with better problem solving.

I deeply envy you.

LOL. Don't worry. The current state of Yahoo and their CEO clearly proves you're right. But remember, many people here make a living by pushing others to unhealthy extremes. This is their entire job. So of course they will downvote you for suggesting the time they and their exhausted programmers "worked" on weekends was wasted. Doesn't change the fact that it was.

Some ideas are doomed no matter how clever, motivated, or well-considered the working environments.

We champion Newton for his work in gravity, optics, and mechanics.

Not so much in alchemy.

If the field you're plowing isn't fertile, no amount of good agronomy will help you.

Yahoo may not have been abolutely intractable, but it was in a bad position and getting worse. I had no interest in working for the company or using its products, and I'm no particular fan of Meyers (I think she's accomplished a few useful things, may be felt by her absence at Google, and has also done and said some tremendously stupid things as well). But hanging Yahoo on her neck alone is false narrative.

In general I agree with you but I am pretty sure there are people who can work at high performance much longer than other people can do. Some people also need only 3 hours of sleep where others need 8 or more. I think it's genetic in the same way some people can run 100 m in 11 seconds without training where others need 14 seconds and will never get even close to 11 even if they train.

If you don't have that "talent" for long work hours it's probably counterproductive to force yourself into something you just can't do.

Also, it's much easier to start work in the morning if you have an unfinished task to complete. It's easier to get into the flow if you can dive right into something rather than having to start a new task from scratch. Even though it feels nice to have things wrapped up nicely before going home, that's often counter productive.

Hemingway said you should always finish for the day when you know what the next bit is

"I had learned already never to empty the well of my writing, but always to stop when there was still something there in the deep part of the well, and let it refill at night from the springs that fed it."

I'm not a developer but I believe it applies in a lot of other areas. I've been slowly rebuilding the Bronco II my dad left me when he passed away earlier this year, and I've found that if I come across an issue that I have to figure out and I'm hot and tired and sore from working on it all day, I am better off stopping there for the day and tackling that issue first thing the next day that I work on it. Otherwise I'll spend hours trying to do something in a boneheaded way that I will end up figuring out in 10 minutes the next attempt.

A recent example: I couldn't find the right combination of extensions and adapters to get a certain bolt off the transmission bellhousing from below the car, and I couldn't even touch the bolt from above. I spent half a day just getting a socket on there, then couldn't get my wrench to turn it. A couple days later I tackled it again and immediately realized I could remove the lower intake manifold (since I was replacing that part anyway) and get to it from the top. Twenty minutes later that bolt was out. My tired brain couldn't think that far ahead but when I was refreshed it was the first thing I thought of.

I think it's more important to think about what state of mind are you in - for example, if I'm tired, I'm just going to go home a lot of the time. I know that it isn't an efficient use of my time if I keep banging on a problem while not in a state to solve it efficiently.

This is something many academics learn quickly, as it is important in order to solve deep problems, especially with the workload that is levied on academics.

Myself, I've had many instances where this has happened, including with open source work.

This advice needs to be interpreted the right way: don't butt your head against walls.

Usually it makes sense to pick a task and finish it before going home. If you stop just because its 5pm, you waste time re-orienting yourself the next day. Worse, you can get into the clock-watching habit.

BUT, if at 4.55 pm, you realise there was some nasty wrinkle in the task and you need to rethink it or go back and do a big prepartory refactor, then you should go home and look at it with fresh eyes in the morning.

>you should never deploy to prod then go to bed

Ha ha. Yeah, that never quite works out does it?


Same. I also find that sometimes I need "passive" time to think about the problem in the evening. And then when I come back to it in the morning, I have a bunch of different ideas to try out. It's much more productive (and more enjoyable) than sitting at a computer, grinding away at a problem.

The solution is always in the pillow :)

Yes, relax and let your subconscious mind do some of the work.

Forcing things generally doesn't help. Like, the difference between working really hard at something and letting yourself attend to a task is minor at best. And the long-term cost of trying to "work hard" is huge.

I'm fairly sure this insight generalizes outside of programming as well. It's absolutely true for blues dancing, where not being relaxed enough hurts your dancing and having a couple drinks is performance-enhancing.

I've also had the solution (or at least ideas after hitting roadblocks) come to me at home, or on the drive home from work. Just last night I had a breakthrough while doing some dishes. Some days when it's not happening, it's just not happening, and trying to force it just doubles down on the frustrations I'm feeling by being stuck in the first place.

What you just described is my whole approach to programming and problem solving in general. Having time for your brain to chill out makes you exponentially more productive when you are actually working.

I help myself sometimes by taking a piece of paper, putting it next to my keyboard and writing down a schedule:

"It's 16:11, so:

    16:11 – 17:00    trying to fix that bug
    17:00            short pause
    17:05 – 17:45    implement easy feature XY so that I feel
                     I accomplished something
    17:45 – 18:00    wrapping up.

The thing with that is that you didn't really put down that problem for the 8-12 hours between ending one day and starting the next. You're percolating on it, thinking about it in the shower, playing out the different options, dreaming about it, sometimes even when you don't want to.

Sometimes on the way home I think of new approaches. After dinner I crack open the laptop and see if these approaches are possible. Just a quick test. Then in the morning I can usually nail the solution.

Edit: just noticed similar comment below. Seems common.

I had copied that exact paragraph before coming to the comments intending to make pretty much the same comment. This happened to me twice this week. Stuck on a problem for more than an hour late in the evening. Come in the next morning and solve it instantly .

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact