Ask HN: Can you code more than 40 hours/wk?

29 points by netmau5 ↗ HN
Greetings HN. I have a problem, at least I think I do. I want to code more because I'm really passionate about creating things. That has meant many different things throughout my life, but it has meant writing software since I discovered my first BBS. I have a full-time day job and, while I enjoy it, I want to create something on the side. I've been working on a side-project since early August but I feel like it's developing extremely slowly.

I can code about 40 hours a week. And I mean really code, not just being at work: heads-down, super-productive hacking. All told, I spend about 32-34 hours a week at work coding so I usually end up spending about 10 hours a week on my side-project. This comes out to around 6-8 hours coding and 2-4 hours designing, researching, etc. Those numbers change quite a bit depending on overtime so I typically get in about 25 hours a month on my side-project. The thing is that I want more, but I simply cannot bring myself to code more.

It's somewhat amorphous, but I know that sometime every week I'll hit a limit. While I can keep pushing on, my productivity takes a dive. If I persist, after a week or two of overdrive, my overall performance starts to dive. I thought something was wrong with me so I took several steps to try to improve through life-hacking: I began going to a gym 3 times a week, dramatically improved my diet, and have almost entirely kicked the smoking habit (down to 2 a day from a sadly higher number). Nothing seems to work. The fatigue from ultra-focused coding just leaves my mind incapable after 40 hours of further deep concentration.

I typically spend the rest of my free time learning new things, playing games, or being with my girlfriend. I definitely enjoy these things and like to have some balance, but I feel like I'm missing that hardcore edge to really hunker down and produce a quality side-project once in a while. I feel like the hacker version of a guy who needs steroids to take it to the next level. Is this normal? Are the 16 hour/day guys the exception? Is it really that naive to try a side-project and keep the day job? Am I demanding an unreasonable amount from myself?

Thanks in advance for any feedback you guys have.

54 comments

[ 2.7 ms ] story [ 113 ms ] thread
I'm doing around 8 hours + side project. I'm still standing, fortunately!
I find learning new programming languages stimulating. Or re-learning old ones.
Totally agree with you: even if I never end up using the language, learning new idioms and patterns has been immensely useful.

I still make time to learn new technologies, I just find the physical act of coding to have rapid mental diminishing returns after around 40 hours. That probably isn't a big deal if you were running a startup. Code for a while and then attend to the many other aspects of the venture. Having a day job can really throw that balance off, especially when working for a company that doesn't waste much time with meetings and busywork (which is a nice thing).

Exactly. People call bullshit if I mention my sleep habits but there's something about learning new things that is so addictive. It's my joy in life certainly.
Is it possible the side projects are not interesting enough? If they feel like work, rather than fun, it may be hard to keep plugging away at them after a long day of coding.
I have fun working on it but I think having a partner would really energize me after a day's work. Unfortunately, living in Alabama makes it hard to find a partner. I've made contacts over the net but they tend to fizzle out after a couple weeks. Being solo means isolation and that definitely kills some of the fun for me.
Having a partner is amazing. Whenever I feel down or just too tired to get things done, I go & talk to my partner to get myself fired up again. If you don't have a business partner, maybe you can find someone who works in the same field & just meet up for drinks & bullshitting from time to time?
I think I'm roughly on par with you. I spend 40 give or take at work and then come home and bang away on a side project. My girlfriend luckily has some crochet projects usually so all day Sunday I can work on my side project (6-8 hours) plus about 2 hours a night another 4 nights out of the week. So say maybe 15 hours a week on my side project not counting other research and such I do for it (researching hosting plans, new gems to make life easier, etc).

Given that there are only 24 hours in a day, pulling a 16 hour day frequently means you're not getting much sleep nor much of anything else ;)

Worry less about what other people can do. It's an ego-oriented goal and it can end up causing you to feel defeated as well as lose track of your real purpose. Instead focus on whether or not you feel like you could do more, and whether or not it's worth it.

You've got plenty of company no matter what you decide. :)

I find that while my 'dayjob' programming saps my willpower, the same activity for my sideprojects refills it right up.

I firmly believe that you need downtime though. Between my dayjob and my sideprojects I always take an hour or so to play, watch television, read or anything else that doesnt take much brainpower.

This phenomenon has everything to do with intrinsic motivation. When you can decide yourself what to work on, you can be orders of magnitude more motivated & productive. Dan Pink's Drive is a good book to learn more about this stuff.
Is it about your side-project? You really should only be doing a side-project for your enjoyment and the challenge. However, if you stress about your productivity you might lose sight of the reason you started a side-project. I am the person who can concentrate 16 hours a day, or even days on end without sleep or breaks (in fact, i'm well known for it). It doesn't mean my projects get done faster, the real result has been making those around, like my family, feel neglected. I say enjoy your time with your girlfriend, focus your productivity at work where it matters, and just enjoy your projects. --- There is probably a good argument about the mental health of those, like myself, who can concentrate for days on end, months at a time. Actually, I think its great that you can relax after 10 hours a week on your project. I can never shut my mind down long enough stop working on my projects, or even sleep.
Your last word worries me, because I've seen insomnia and it's a killer. Like you I often have trouble shutting off my mind, causing me to continue working on problems in my mind while I'm supposed to sleep. Sometimes productive, but you will crash in the end, especially as you get older. When it gets really bad I force myself to sit down & meditate. When I do that for a few days I know I can find a healthy rhythm again. Heartpain, headaches & stress-induced illness are not worth any perceived productivity gain. Learn to shut down your mind.
You are absolutely correct. I’ve never met anyone else with my level of concentration. So other than what I experience first hand, I’ve never seen anyone suffer from fatigue. But, while others can seem jealous about my small accomplishments, I actually get jealous that they have lives.
I have been slammed with work for the last 6 mo, picked up two other guys and am still slammed. I literally code 12-16 hours a day and have a side project that has just been languishing on the back burner for months. It is definitely not a case of want to but I have too, I pulled a 116hr week one week of literally non-stop code. I freelance and not pulling those hours means that I loose the contracts that I have. It is a treadmill but one thing I have learned and the piece of advice I can give you is that once it becomes habit, it is actually easy to put in these kind of hours regularly if it is what you want to do. I now find that while I work long hours when I do work, I also tend to schedule longer amounts of time off to travel and recharge, it works for me, but I would like to have enough head room to get back to doing my own stuff as well.
You just outlined the exact reason that getting into freelancing worries me. You start out as one guy and will have to face some long hours no matter how well you plan. I know when push comes to shove, I can do it, but anyone capable of doing 80+ hours/wk for 3 or more weeks and stay productive is superhuman to me.
The trick is learning to say no. Once you have too much work you can pick your clients. Then you can do the most interesting work at the best rate for the most reliable clients.
Right I call it the "no or grow" decision, I chose the latter, I just found out that the grow decision is a difficult one to make, we are working through it but it take time.
You only want to grow your business based on sustained clients with a lot of work. Do it very slowly and carefully, one of the most common ways for a business to fail is to get too big, too fast.

Are you totally certain that you will have a lot of work 3 months from now? 12?

That is the point of contention and why I said it is a difficult spot. We are taking a very pragmatic approach to growth but that means that for the time being, that we have to pull a lot of hours for a time to ensure that we are at a point to sustain another hire, when the numbers reflect a sustained volume then we can justify the hire. It also means that because we are growth oriented that we have to take the projects to grow. After we move through this critical point the reserve starts to stack up so that another employee is not such a risky venture. The issue is not only is it bad to burn a client, but it is also just as bad to burn a good developer with on again off again employment. So we want to ensure that once we pick one up that we keep them for the long haul. We have a great reputation as a development house from both clients and employees and we intend to keep it that way. We have to stack up the reserve to do so. The hope is to build the development house on contracts and then pivot into a product company once we have amassed a solid team. That will be the next difficult transition for us and we are already laying plans for the time when revenues and growth can sustain that transition of business models.
Sounds like you have a solid idea of where you are going. Well done.

Doing the overtime to justify the new hire sounds like a good, low risk approach. Congrats on putting in the hard yards now to enjoy the growth soon. :)

Don't do it too long - you WILL burn out.

A couple of years ago I made the mistake of committing to too many projects. (I'd just started free-lancing and put a few feelers out and they all came in at the same time! Typical!)

Think I was pulling 16 hours a day consistently for two or three months. Managed to meet all deadlines, but in hindsight I think I made a couple of poor design decisions - and I didn't question some of the things clients asked for (just cracked on and did them without offering much input).

Now I make a conscious effort to say no (which I don't like to do, but must) when I don't think I have the spare capacity.

Only problem with freelancing is how difficult it is to find time for your side-projects. Am also trying to sort out enough head room to be able to focus on my own stuff. Good luck with it!

Yeah, I have been doing this for a while, but something is going on as of late, they just don't stop coming, I double my rate and they still take it, double that the next time and they still take it. So I am on this treadmill where I can't say no and bringing people on, means having to stop to train. I am at that critical point where it is very hard to grow correctly but can't continue to handle it with the 3 people we have now, the other two where guys I worked with extensively so they where real easy to onboard, the next won't be so easy. Our time is so constrained that we don't even have time to build a company web site (pretty sure we are going to just sub that one out, but we still have to come up with the marketing messages). Not complaining though it is a good problem to have.
Personally I can't code for more than 5 hours a day productively. Luckily I work from home so I'm not forced to sit in someones office and be judged not by what I accomplish but by how long I sit in my chair.

I actually get more done at home anyway since I have my perfect setup, good music and no interruptions. Anyway, count yourself lucky that you're actually very productive already.

In the 24 or 48hr competitions (rails rumble, node ko, tc disrupt,) the most frequent winners are those that still get sleep.

I think it is unreasonable to expect > 40hrs of pure programming productivity a week -- the body/mind needs time to recover.

You should still keep up the gym, diet and smoking improvements as they will continue to benefit you as you age (we all age, dont ignore it!)

Thanks, my lifestyle changes have definitely made me feel a ton better, especially in the mornings. Hopefully that will translate into more mental acuity over the coming months as well.
I have been coding 14-16 hours a day for the past year for my startup. The only down time I have is to hang out with my girl friend to keep her happy. Originally it was my day job and the start-up and about 18 hours a day, but ended up quitting the day job because it was draining my energy because I did not enjoy it. I have to say it is not normal and very unhealthy and I personally can't wait to force myself to reduce my time (for which I have plans soon). That being said I don't find my productivity taking a dive and I do love doing it, it's just awkward not dedicating time to anything else.
Where is this 40hr number from? Is it written in the manual book for our brains? I am certain that it is cultural and does not apply identically person to person.
"Are the 16 hour/day guys the exception?"

I sincerely hope so, and I question the hygiene/health of anyone who spends 16 hours a day > 1 day a week in front of a computer. I certainly have done 16 hour stretches of coding, but I don't think anyone can sustain that for more than a day or two and still be sane. (I think you turn into rms, which can be seen as good or bad).

The message that I would like to give you is that of quality over quantity.

First off, you don't have to be at a computer to be solving your coding problems, keep a notebook, keep them in your head, write down answers as they come. Relaxing you think about a problem probably doesn't count against your concentration hours.

Secondly, if you are banging your head against a problem, it is probably time to take a break or get help with it... There are diminishing returns from struggling with a problem.

I don't doubt that you can spend more than 40 hours a week coding, but that seems like a shitty quality of life. Wouldn't you rather see the sun occasionally?

Wouldn't it be better for you to just work within the 40 hours, optimizing your use of them? Maybe find a way to get stuff done at work more efficiently, so you can spend more of your quota coding your side project?

It might also help to not try so hard when you are 'concentrating'. Let me explain:

I feel like if you are trying really hard, it takes more out of you mentally than if you are approaching it from a mentality of playing. Having more fun will definitely stretch your endurance for these things.

My mantra is to 'work' as little as possible to achieve my goals. So I like to turn 'work' things into puzzles/games. 'Work' is psychologically un-fun.

Interesting!

May I throw in my two cents?

For me personally, and because I am 22, and because I truly enjoy my job (game engine programmer), I tend to put in way more hours than I need to.

Way more hours.

On the order of 80-100hrs/wk. Of coding. (Which is to say, 80-100hrs/wk of actual thinking + typing. Not "time spent getting ready to program" or "time spent psyching myself up to begin working on the problem" etc.)

(Also, I love Vim. I'd likely be massively frustrated with all the programming I was trying to do, if not for ViEmu + Visual Assist.)

And damn, it's fun! The only strain I feel is from lack of sleep.

Also, I think the 'quality' argument is subjective. It's true that if you're physically exhausted, you can't work. But if I'm merely pushing myself, the output of my work is of a similar quality as when I'm living a "balanced" week.

But the insidious thing is, I have a personality where if I try to "balance" myself, I wind up mentally not "getting in the zone" for any of my projects. And for me, it's a little depressing to be in that state, because I am only capable of bug fixes / minor tasks. Nothing architectural.

So, in conclusion, I am certainly not planning on keeping up this lifestyle forever --- I'm just enjoying the 80-100hr weeks while they last. It's a similar feeling to being a kid staying up all night at a friend's house. It's fun!

I think it is much easier to do one job single-minded 80 hours a week than it is to do a 40hr and a 20hr job. When you have one job, you don't have to shift focus.

It's great to hear that you are loving your job. When I have a decent programming problem to sink my teeth into, I am just the same way.

out of curiosity, how do you count 80-100 hours a week? Do you keep timesheets?

100 hours is 14 hours a day, every day.

Nah, no tracking. But maybe I should, that would be interesting.

The reason I make those claims is because I don't do much else at the moment except "work" (which for me equals fun). I don't play any video games anymore except the one I work on, and even then it's usually only once a week. I don't use facebook. Etc. Hacker News is my outlet, typically before bed (like now).

Think of it this way... there are 168 hours in a week. A "proper" amount of sleep is 8 hours a day, which is 1/3 of a day. So 168 * (2/3) = 112 waking hours. Throw in the fact that I often have trouble sleeping, or go without sleep, and... well, you get the idea.

I'm not claiming that I typically work 100 hours. This week in particular has been unique. I'm just saying, for me personally, when I'm passionate about a thing, I wind up way, way more productive by obsessing over it and pushing myself than if I try to "balance" myself.

Also, when I'm in "hardcore work" mode, I can only focus on exactly one project. There is little or no room for any other projects, such as side projects. Even doing an unrelated small bugfix has the potential to completely destroy my enthusiasm / flow.

There are downsides, of course... one example that springs to mind is: my right wrist has been hurting me. Badly, actually. I've been ignoring it, but that's stupid obviously. I think it's possibly because of the shape of my mouse. (I've heard that I should get a "splint" to prevent horizontal / vertical wrist movement.)

Also I need to take care to ensure good nutrition, which I've been slacking on. Also, Vitamin D pills + B12 pills.

I got a sore right wrist during a Diablo 2 weekend, and it persisted for about 4 years.

In the end I had to get a chair of the right height, a desk of the right height and a wrist rest.

Take it seriously, the most important thing is an ergonomic work setup and some breaks.

I don't pull 100 these days, but I have a chronometer and I time my work sessions, usually aiming for 12 hour days at super busy times, which is about max sustainable for me
My two cents: * We need a Work-Life balance and it is easier said than it is done. * Periodical break and relaxation is essential. * You dont need to be at computer always to solve problems and design. How about a whiteboard/notebook?
I agree with you, I mostly solve really tricky problems when I'm not in front of a computer.
I managed to code about 20 hours a week for 6 months, while also working parttime. I blogged about it - http://blog.gridspy.co.nz/2010/02/part-time-entrepreneur.htm... - Great HN reaction here: http://news.ycombinator.com/item?id=1150061

I found that trying to be a father, an employee and also a startup entrepreneur all-consuming. I really couldn't do anything else, all my time was tied up.

Also, I probably couldn't have done it at all if my fulltime job required my full talents. As it was, it was a pretty simple role requiring only lightweight UI work in C++, so it didn't drain my brain at all.

Don't beat yourself up about not sustaining a huge number of hours. The best solution is to be clever about how you use your time and to try to reduce the number of hours you work.

I code 12 hours a day (3 4h sessions). But I dont have a traditional schedule because dont sleep. I only nap. If I did sleep there is no way I could do it.
Are you relatively young? Don't burn yourself out.

If I can manage 10 hours per week, I consider the week highly successful.

Eh. I'm capable of it, but not at a sustained rate. I exceed that kind of rate in response to external pressures.

I'm most productive when I fiddle my thumbs and have bizarre bursts of genius or when I plug at it at a pretty normal number of hours per week.

I've been exceeding that on a regular basis lately mostly because I have a full-time job + side projects. It's not sustainable and I don't want to keep doing it, so I'm going to try to wrap up a few things pretty soon.

People will tell you things ...

This is a topic that:

a) people really like to brag about,

b) it's hard to separate "hanging around" hours from really productive hours,

c) even if you can distinguish those, it's a major pain to accurately track them (do not trust what anybody says just from remembering).

Do not worry to much about raw hours numbers. Focus more on quality of these hours.

In my experience, the difference in productivity / results achieved between "good" and "bad" hours can be staggering. Well rested me can easily outcode several tired overworked stressed mes :).

Forcing yourself heroically to work more when you already can't can be very counterproductive (game industry notorious for permanent crunch times sometimes does self-reflection [1][2]).

Working many forced hours can make sense when you have some external situation where additional benefits of getting something done by deadline outweigh loss of productivity. But even there, you are only borrowing it from your future self.

Yes, I had situations where hunkered down and produced magnificent amount of results working crazy hours every day, but at the end I got literally sick and was unable to do any intellectual work for quite some time afterwards.

[1] http://archives.igda.org/articles/erobinson_crunch.php

[2] http://www.lostgarden.com/2008/09/rules-of-productivity-pres...

Have a look at the Mylyn plug-in for eclipse and TaskTop Pro. Even if you don't use eclipse as your IDE, there is a standalone version and it connects to your bug-tracker / gmail and other task repositories, and let's not only very easily track your active time on tasks/tickets, but has some very cool tools for staying focused and organized.

And the reports really do help understand where your time goes.

They also help you see how your productivity is declining through the week, and the patterns that match when you can really burn through stuff.

First, I commend your self awareness. That right there is the biggest battle for me honestly. You should pay attention to your mind and body, and make sure you are letting yourself recharge. I'm reminded of a recent article on here about how Germans have the same productivity as Americans with fewer weekly hours and a lot more vacation. The American culture values putting in the hours more than it does productivity, and it's dreadfully easy to fall into the trap.

As to the answer to your question, I think it varies a great deal, but I don't think you'll ever get an honest answer based on any kind of data from silicon valley, statistical or otherwise. The problem is that productivity is too amorphous, and there's really no hope of getting an honest appraisal from actual engineers because they're just as likely to fooling themselves as to provide factual data. I know I've had some amazing 100 hour weeks where mountains were moved, but it's really hard to be sure that I wouldn't have gotten twice as much done in two 30 hour weeks...

Also apropos, I've currently been on a death march for the past three months. At this point I'm still pulling 80 hour weeks, but I'm so worn down now that I'm sure I'm not getting anything more done than I would in a normal 40-hour week. It's sort of a make or break moment for the company I've spent the last 3 years building, so it's worth it this time, but it's also the sort of experience that highlights the dangers of too much work. My body mind and body are down far beyond what I could achieve on a personal project, or some artificial scenario like you are given in college. It's definitely not a lifestyle that I plan to continue, and I would caution anyone against living this way. It's better not to burn yourself out, and always keep something in reserve for when you really need it.

I think it depends on the project. I've spent the odd weekend starting on Friday night and finishing on Sunday morning (although that doesn't happen now with a wife).

Years back I started writing multi-format shellcode, which required me to learn 4 different OS and 3 different chip architectures to the point where I could get assembly running across all of them. That was an insane project that started out as get shellcode that worked on Linux and Freebsd/x86 and just ran and ran as I found more things to add in and tweak. Then I'd sleep through the whole of sunday and turn up for work on monday.

On the other hand I've worked on projects in my work time that are so mind numbingly dull that I've spent 4-6 hours a day actual programming, come home and collapsed in a heap.

It sounds to me like you're going past your wall and it's not flexible. You need to qualify and stick to your limits. The gym, diet and smoking side of things is a good idea, but not enough.

How's your sleep? I find that's the biggest factor in my day.

I can identify with you on boring stuff, even a few hours of work can be draining there. Not all parts of coding are equally interesting.

I should probably work on my sleep schedule. I get about 5-6 hours a night on a weeknight and 10 on the weekend. I have a seriously difficult problem going to bed before 2am, but fortunately my job doesn't expect me in until 9 or so.

Interesting. How much caffeine do you get through in a day, and when is your last caffeinated drink?
I can't even do 40 anymore. When I was in my twenties I did about 4 years of 60 hours a week but those days are over.
Don't worry, you're normal.

I've wondered the same thing a LOT. What I've discovered is that you can only push yourself so much (although it's more than many people believe), and that there are limits on how long you can spend focusing on one (type of) thing.

Also check this out: http://dl.dropbox.com/u/242985/rules_of_productivity.pdf

It's called "Laws of Producitivity: 8 Productivity Experiments You Don't Need to Repeat" and it's exactly what it says it is. Very interesting; I forget where I originally discovered it.

My advice is to keep pushing yourself, but don't sweat it if you don't improve over night.

I usually code around 5 hours at work. About an hour is spent getting coffee/lunch or just stretching, another hour at scrums or the occassional meeting, another couple in discussions around desks.

At home, when I'm actually working on a project (ie. not work related) it usually goes from 2 hours to 4 or 5, if it's a weekend I might spend a whole evening on it, otherwise I save my nights for relaxing, playing a game, going out etc.

All in all, it's probably more than 40 hours a week; around 55, I'd say. I'm kind of trying to reduce it though, maybe hit the gym 3-4 times a week again, or just find a hobby. :-)

I tend to spend ~40 hours coding and rest designing/discussions and run to clear my mind. It just wouldn't work if I code all the time.