Live data from Hacker News

Ask HN: Tricks to integrate late coding session in current workflow?

news.ycombinator.com

1–10 of 28 posts

Ask HN: Tricks to integrate late coding session in current workflow?

#1
Hi everyone,

We're under quite a lot of pressure lately to finish a project by the end of Feb. Probably like a lot of you guys, I'm at best when I'm "in the flow" which often leads me to code till 3 am - 4am.

The problem is that if in my early twenties I used to be able to recover over only a few hours sleep for the next day, it seems like it is impossible for me right now (early 30's).

1/ Do you have any tricks or tips to ease the recover and have a somehow normal day after a late coding session?

I know that this approach while somehow good for work purposes is disastrous for health on the long run so:

2/ What tricks/tips do you use during your working day to minimize interruptions (so you could go at least 1/2 way "in the flow") ?

Cheers!

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#2
As an early 30's myself, I can suggest couple of few things:

- aim to at least 6-7 hours of (continuous) sleep in 24 hours. Don't rely on the fact that you will sleep more in weekends (you won't, and even if you do, the body doesn't work this way) - try power naps: in the middle of the day, take an espresso shot then go in bed and try to sleep for maximum of 20 minutes. The caffeine will kick just when you wake up; 20 minutes is usually less than you need to go to deep sleep (so you won't wake up cranky, dizzy or whatever). Even if you don't actually sleep, you will relax for 20 minutes :)

http://io9.com/the-secrets-of-highly-efficient-napping-16809...

As for interruptions: turn off your internet connection and put your phone to airplane mode. I strongly doubt that you will have _anything_ to distract you anymore!

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#3
Here's what works for me:

1/

  - Intense workouts early in the day
  - A lot of water
  - Sunlight
2/

  - Airplane mode
  - Batching email, IM, SMS, ..
  - Automate payments
  - It's ok to be late with administration sometimes
Books that really helped me:

  - The 4-Hour Workweek by Tim Ferriss [1]
  - Getting Things Done by David Allen [2]
  - Rework by Jason Fried [3]
[1] http://amzn.com/0307465357 [2] http://amzn.com/0142000280 [3] http://amzn.com/0307463745

edit: added Rework

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#4
I'm still in my 20's, but I do need at least 5-6h of sleep to perform well the next day. Powernaps like i0nutzb suggests work for me too, but I wonder, are you anywhere near productive on any day between 8am en 11am? If not, wouldn't your employer understand you arriving later, if that means you're able to work more productively the rest of the day?

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#5
post #3

Here's what works for me: 1/ - Intense workouts early in the day - A lot of water - Sunlight 2/ - Airplane mode - Batching email, IM, SMS, .. - Automate payments - It's ok to be late with administration sometimes Books that really helped me: - The 4-Hour Workweek by Tim Ferriss [1] - Getting Things Done by David Allen [2] - Rework by Jason Fried [3] [1] http://amzn.com/0307465357 [2] http://amzn.com/0142000280 [3] ht…

> Intense workouts early in the day

Solid advice. Your body learns from your habits and exercise is a great way to teach it when it needs to be awake.

Another trick is regularized sleeping patterns. I had sleeping issues when I was a teenager and had some "soft" sleeping therapy. The most important thing I learned is: don't aim for a certain amount of hours, aim for specific times. E.g. Go to bed at midnight sharp and wake up at 7AM, come hell or high water. If you do stay up late, wake up at your usual time so as to not throw your clock off any more than it already has been.

Finally, if you are sleep deprived you are stupid. You're doing everyone a disservice by being that "hero" that pulls an all-nighter. Get your regular sleep and carry on with the task tomorrow: you'll finish it faster and do a better job of it.

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#6
The only work purpose for which pushing a team toward five straight weeks of mandated sleep deprevation is good is poor management. Good management matches scope, milestones and staffing to expectations.

This isn't to preclude the possibility of a person going manic on a project they own, but that's a case where those doing the work have control.

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#7
Let me turn this question around a little. I'm a manager of a software development department. I have a coder who works best at night. I got upset with him for falling asleep at his desk. Not once, but many times. He tells me "I'm up all night working".

To make this situation worse, our office is very over-crowded. It's hard for me to see how anyone gets anything done.

But, we have meetings the devs need to be at. Project scoping, standups with the stakeholders, etc. Plus, major architecture decisions are made in person. So, we have a pretty strict "work from home only twice per week" rule.

How do I let this developer work when he is at his best, without excluding him from critical decisions? And, how do I encourage him to work at his best, without encouraging the lower-performing members to see it as an opportunity to slack off?

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#8
post #7

Let me turn this question around a little. I'm a manager of a software development department. I have a coder who works best at night. I got upset with him for falling asleep at his desk. Not once, but many times. He tells me "I'm up all night working". To make this situation worse, our office is very over-crowded. It's hard for me to see how anyone gets anything done. But, we have meetings the devs need to be at. Pr…

Is he a very productive developer? One of your best?

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#9
post #7

Let me turn this question around a little. I'm a manager of a software development department. I have a coder who works best at night. I got upset with him for falling asleep at his desk. Not once, but many times. He tells me "I'm up all night working". To make this situation worse, our office is very over-crowded. It's hard for me to see how anyone gets anything done. But, we have meetings the devs need to be at. Pr…

Hope your developer doesn't realize there are places he could work that won't care what hours he keeps?

Seems like (a) if you focus on results rather than appearances, there won't be a problem with lower-performing members getting the wrong idea, and (b) sounds like you have a lot of meetings: are they really all as necessary as you think they are?

Re: Ask HN: Tricks to integrate late coding session in current workflow?

#10
post #5
post #3

Here's what works for me: 1/ - Intense workouts early in the day - A lot of water - Sunlight 2/ - Airplane mode - Batching email, IM, SMS, .. - Automate payments - It's ok to be late with administration sometimes Books that really helped me: - The 4-Hour Workweek by Tim Ferriss [1] - Getting Things Done by David Allen [2] - Rework by Jason Fried [3] [1] http://amzn.com/0307465357 [2] http://amzn.com/0142000280 [3] ht…

> Intense workouts early in the day Solid advice. Your body learns from your habits and exercise is a great way to teach it when it needs to be awake. Another trick is regularized sleeping patterns. I had sleeping issues when I was a teenager and had some "soft" sleeping therapy. The most important thing I learned is: don't aim for a certain amount of hours, aim for specific times. E.g. Go to bed at midnight sharp an…

I've struggled for years with getting up at a respectable time. I can't overemphasize this. There are classes (yes, multiple) in college I failed because I just simply could not get myself up and to class at 8am three days a week. That was when I was 18-20.

I'm 28 now, almost 29. I go to the gym 5 days a week at 5:30am. I'm up at 4:45 whether I set an alarm or not. I'm sure part of it is circadian rhythms and the fact that I'm going to bed at 9pm instead of 1am now. And as a result, my most productive coding hours have shifted from 7-11pm to 9am-12pm (give or take). So I keep my morning schedule open for the real work, and pack my afternoons with meetings and administrative work.

Post reply on HN