How Many Hours a Week Can You Program?
An anonymous reader writes "How many hours a week should a full-time programmer program? Trying to program anywhere near 40 wears me out. On a good week, I can do 20. Often, it is around 10 or 15. I'm talking about your programming session at the console, typing — including, of course, stopping and thinking for a minute, but not meetings, reading programming books, notes, specifications, etc., which by comparison feel like lunch breaks. I rarely get called to meetings (which is good) but that means to keep my brain from overheating I spend several hours a week surfing the web (usually reading tech news but also a few stops on Facebook, email, etc.). I should add that I am interrupted a few times per day. Me and another guy maintain an intranet site of a couple dozen web apps for an IT department, so we work on a few different things: phone calls, bug fixes, feature adds, as well as writing new web apps from the ground up, all in a day's work. And I know that wears a person out more than if they had just one project to work on. I wonder if programming is like mental sprinting, not walking, so you can only do it in bursts. Am I normal or stealing?"
If you mean purely the process of typing in code, well--that's kind of hard to gauge, isn't it? I've always found that the trial-and-error of development processes means that unless you're working in an orthodox manner it's really hard to separate "thinking" from "doing". Also, I find that when you're in the "zone" it's not painful at all. Sounds like you may be working on something you don't enjoy so much? :D
I rarely get called to meetings (which is good) but that means to keep my brain from overheating I spend several hours a week surfing the web (usually reading tech news but also a few stops on Facebook, email, etc).
My only work product is Excel spreadsheets and the occasional Word document. When I'm building these spreadsheets and documents, I'll get data for them over the phone, which I promptly type into my computer. The net impact is that I'm sitting at my computer all day, 40 hours a week. You just can't sit there and work spreadsheets all day, every day. If your job doesn't involve anything else, you're probably going to end up browsing the web to stay sane.
Yeah, if you are working on your own projects, it's easy to do a sixteen plus hour stretch. Some cola, pizza, and your imagination.
But, if you are implementing someones broken business logic or accounting rules, I'd guess that three to four hours a week is the norm.
Look, you aren't stealing. You aren't stealing until you're fired and you keep coming to work and forcibly removing money from your employer without their consent. That doesn't happen very often. Whoever says you're stealing by investing your time as you see fit is full of bullshit. You control your productivity and if your employer don't like it, they'll get someone else. It's that simple.
Now that said, I have no problem doing forty hours of sheer coding in a week. Meetings take up a lot of time but in one of my former positions as a lead developer, I did serious coding to make us look really really good. It involved 50-60 hours a week of being there and 30-40 was actually coding to make sprint deadlines. I mean code overnight into the next day with no sleep. And no interruptions! My god, you would not believe the lines of code (note: bad metric) I can put away with no interruptions. That's what headphones are for. Amen to the large DJ sized headphones I have at work. It's a polite do-not-disturb sign to my coworkers.
Coding involves also searching online so you don't re-invent the wheel. Aside from that, your list is good. And yeah, meetings are important for coding. How else do I get my requirements other than directly meeting the customer? That's part of coding unless you're leaving that up to some other guy to get (which is a horrible idea in my opinion).
Anyway, sounds like you're getting the job done and you're not pulling your hair out like I once was. So what's the problem? You may not realize it but you may produce forty hours of normal developer work in those ten hours. I don't know, maybe your code is less buggy than mine? Either way if the paychecks keep rolling in and your employer isn't hold an axe over your head, what's the problem?
My work here is dung.
I can program all day without being tired (8-9 hours with a lunch break(usually involves me eating at my desk getting work done @ same time)), because I like the projects that are given to me, but give me day long flowcharts to do and my brain is mush after wards. You have to like what you are doing or it's going to suck
If quiet, uninterrupted and sleeping peacefully (coding something interesting/challenging) I could go easily for 8 hours or more. However if you interrupt me, and this could be a meeting, lunch or even a visit form a coworker it can knock me out of my coding (wake me up) and it's usually going to take me some period of time to get back into the flow of it all. The longer the interruption usually the longer it takes for me to get back into it. Caffeine and other Nootropics can contribute to to length and motivation to get back to work.
I think it changes with age. When I was quite young, 10 hour a day for days on end wasn't so hard to pull off. Remembering to sleep and shower and brush my teeth were harder. The catch was that a very high percentage of the code I'd write was either pure crap, or could have been done better in less time by writing another program to write that code. As I've gotten older, I've found that it's easier to spend a large number of hours *contemplating* code -- but hard to work other than in smaller bursts actually writing the code. The difference is that when I do write code, the hours are far less wasted.
I've taken this into account and so now my plan is, that when I reach 90, I'll just wake up in the morning and fart. My heavily customized Emacs will analyze the fart and translate it into C. "Oh, boy, I wrote another new OS kernel this morning!"
Well, ok, one of the two above paragraphs is true and not the other.
Eight hours a day, five days a week was good enough for illiterate industrial workers doing manual labor when it was invented 150 years ago. I see no reason it shouldn't be a perfect fit for highly educated software engineers in 2010!!
I grok the humor attempt - but I want to point out that those "illiterate industrial workers" would've thanked God for a 40 hour work week. They were often working 10-12 hour days, six or seven days a week.
There's a reason unions caught on so well, and a reason companies hired goons to fight them so fiercely.
#DeleteChrome
he said he was also doing other things that pertained to his job.
"Me and another guy maintain an intranet site of a couple dozen web apps for an I.T. department, so we work on a few different things: phone calls, bug fixes, feature adds, as well as writing new web apps from the ground up, all in a days' work."
so he's not fucking off on the internet.
just because you're someone's ass monkey doesn't mean the rest of us have to be. it's called balance. and i'd say he's got a career ahead of him by being able to maintain equilibrium, too many people have attitudes like yours and burn out by the time they're 30.
That's pretty normal. The important point is if you get the job done on time and in a time frame considered reasonable. People aren't machines. No one works every second at their desk. It also leads to things like crunch time at the end though, time management is a tough thing for most people. Seems to be the nature of humans though.
Desk workers have it a lot better than assembly line workers, who are always 'on' when they are at their station, until they get their breaks.
Me, I hate clock watching, I don't pay attention to that sort of thing. I just do the job until its done within the required timeframe. But I am fortunate to have a job with a lot of different hats, so I have a large variety in what I do. I switched careers 8 years ago to get away from a job that required me to be at a desk all the time. Sitting at a desk all day is one of the most unhealthy things one can do to oneself.
The important thing is to balance and enjoy what you do. We really have no idea what happens when we die, there is a not-insignificant chance that there is no undying part of us. How do you want to spend your life? In fear of the clock and in guilt towards your employer, or have realistic expectations as a non-digital entity?
Work hard and put in long hours when its warranted. Relax when you need to. Don't kill yourself or you'll burn out quickly and end up quitting anyway. Any excessive exertion will have to be made up for anyhow. It's like sleep - the debt accumulates, you will lose productivity later if you go overboard now. Zero sum game. Have fun, enjoy life, work well, be productive. Work smarter, not harder. Etc.
A lot of programmers do that, actually. Programming is hard, and it's easy to get distracted. This is why if you learn to focus you can easily accomplish more in 8 hours than the average programmer does in 10. If you ever talk to people who put in 12 hour days, you'll find they usually waste a good portion of those hours.
Qxe4
I'd rather work in his job than yours
Unless you actually enjoy your work. I would prefer working many hours in a project I enjoy because I really like coding.
But I think both OP and GP are a bit extreme. Working 10 hour weeks yet be paid full 40 hour weeks sounds cheap, but just resting 10 minutes in a full 8 hours seems like too much work and no rest, which will burn you down pretty quickly.
"I see undead people" Warcraft III - Necromancer
"Am I normal or stealing?"
No.
I think the very concept of "stealing" time is arse-backwards. I don't care or count how many hours my team puts in. I judge them by what they do: how many tasks or projects they complete, and how much help they needed. If anybody seems easily able to deal with their workload, I give them more challenging tasks. And if they complete those too, I use that to justify a raise at the end of the year (theirs, not mine).
If an above-average guy only does an average amount of work and spends half his time web-surfing, that's no reason to fire him. But he'll only get an average review.
That's my system, and I think it's fair.
Eight hours a day, five days a week was good enough for illiterate industrial workers doing manual labor when it was invented 150 years ago. I see no reason it shouldn't be a perfect fit for highly educated software engineers in 2010!!
One of those "illiterate industrial worker" I know is working 12h a day, 6 days a week.
He couldn't do my job, but hell, I'm nowhere near willing to do his.
I've worked a number of places (sales, factory, desk jobs etc.) and at all of them I've seen people spend way less time doing "work" than the amount of time they were at the job site. Some examples:
Now I work in a lab and teach (I've always been a biologist, just not always employed as one) and my lab mates give me crap for the little amount of time I actually spend in the lab. They'll be here from 8 in the morning to 7 or 8 at night, and I'm usually here 9-5. The difference is that I multitask, while they tend to do one thing at a time. So if I have some PCR or a gel or something running, I'll start doing something else at the same time, staggering them so that I'm always doing something and, hopefully, when I finish with one thing, the next is about ready to be worked on. Or I'll read, write, or grade papers, things like that. I end up getting more work done in my 9 hours on site than they do in their 11 or 12. Luckily my boss has figured it out and lets me basically come and go as I please, as long as I give him good results, but everyone gets so worked up about face time that there have been multiple complaints.
I say, as long as your work is getting done, who cares how long it takes. If you're programming 15 hours a week and getting it done, more power to you. Just because someone else takes longer to do the same task doesn't make them any more valuable as an employee. Actually, assuming you're more efficient than them, it makes you more valuable, in my eyes.
Oh, and by the way, I'm on my daily 10 minute break. Back to actual work for me. Have a nice 8 hour day doing.....whatever it is you do.
You sound terribly mismanaged, and understandably a little bit bitter about it.
Let me tell you something. Best managers view programmers as black boxes. Work requests go in, work comes out. If work>=schedule, then you have a good programmer and that's that. Doesn't matter if he plays Tetris 39 hours a week. If the project gets done, done right, on schedule - why would you care about anything else?
The worst managers are micro managing nitwits like the one you work for. Seriously, he has a stopwatch and is timing your one single ten minute break? If you take an extra minute or two do you get written up or talked to? Sounds like kindergarten to me. No thanks.
Look around some. You might just find a job that doesn't make you die of hypertension by your 50th birthday. They do exist, you know. You can work, put in good solid days and make good product - and not be treated like a member of a chain gang.
Weaselmancer
rediculous.
That 8 hour stuff isn't possible. How many 17:30 meetings have you been in, or 08:00 corporate town halls? If you work hard for your 40, you'll just be taken advantage of.
Hoist Number One and Number Six.
Is it okay for you to hire a gardener for 20 hours of work and have him actually work 10 hours and take a break for 10 hours?
Some people may feel that that analogy doesn't have any bearing cause its not in an IT field. Say, if you decide to hire a web design consultant, would you be okay with paying him out of your own pocket for a 40 hour week if it includes surfing the web, chatting with friends over the phone, taking long lunches etc?
This doesn't mean you need to chain someone down to their job and certainly taking small breaks throughout the day is needed just to mentally refocus, but if you don't feel comfortable paying someone 40 hours for 20 hours of work, why would an employer be okay about it?
Food for thought.
If you're actually writing code more than 50% of your time you aren't thinking enough to warrant anything beside grunt programmer work. Good solutions require research and thought and if you aren't thinking and just coding, you're writing sub-standard code. That said if you aren't architecting anything, if you aren't actually designing solutions, there's no reason you can't stay on task for 40 hours, plenty of people do.
Personally, I'm of the mindset that good solutions need to percolate. So I'll keep multiple projects going at any given time, and break up the work an any one of them to minimize true down time, and read slashdot during compile/debug cycles. But that's just me.
-- Adam McCormick
I always found that I coded in sprints. I could get more accomplished in one sprint than in the three days prior. Programming often seems to be a thing of get stuck on some stupid issue totally separate from logic and design (the aspects of programming I enjoy) and finally getting through that stop gap and getting the rest of the code completed.
I've also found that many times that sprint occurs around 4pm-5pm (yes, when everyone else start going home). This has convinced me that we'd be better off if we offered programmers the option of working three 12 hour days. Such would facilitate longer sprints, and during periods of times with less distractions.
Let's see... Since the 1950s, we've been writing applications using text-based programming languages. All serious development is still done like that today.
Now, in the 1980s and 1990s we did have some fools who couldn't program worth a damn come along and preach to us about how we could draw some rectangles and diagrams and *POOF* we've have applications. We tried their ideas, saw that they were fucking stupid and just didn't work, and then we laughed them out of the building.
The "orthodox" way of developing software is to write text-based code by hand, line by line, until the job is done. UML is actually the antithesis of orthodoxy; it's about throwing out the orthodox method in favor of a technique that just doesn't work (but you do get lots and lots and lots of pretty pictures out of it).
So whenever you work greater than 40 hours, you get overtime, right?
No, but my manager does not require me to work overtime.
First of all, consider yourself very lucky. I think it's pretty rare to have a boss that manages your work load well enough to keep you to 40 hours.
Most of us that do mind-intensive work are non-overtime employees. Some weeks, the work takes more than 40 hours and we don't get paid a nickel for that extra work.
The next week, everything has calmed down and there's not as much to do -- should I really be expected to bust my ass looking for stuff to do so that I can fill 40 hours even though I put in 50 the previous week?
Eight hours a day, five days a week was good enough for illiterate industrial workers doing manual labor when it was invented 150 years ago. I see no reason it shouldn't be a perfect fit for highly educated software engineers in 2010!!
I grok the humor attempt - but I want to point out that those "illiterate industrial workers" would've thanked God for a 40 hour work week. They were often working 10-12 hour days, six or seven days a week.
There's a reason unions caught on so well, and a reason companies hired goons to fight them so fiercely.
There's also a lot of programmers working 80 hours a week now. Too bad information workers have a genetic pre-disposition toward avoiding unionization.
The problem with that philosophy is that if you are worth X, "this, this and this" invaribly changes to "this, this, this, this and set up the server" - while X remains constant.
And then the business wonders why good tech workers change jobs more often than they change their shorts.
If the project gets done, done right, on schedule - why would you care about anything else?
I agree. Where I work the head of IT moved up "from the ranks" and even lends a hand fixing bugs in the code when he gets a chance. But he knows his primary job is basically to run interference. I've seen it--it's ugly. Lots of time spent on the phone, hashing out specifications and requirements in looooong, boring-ass meetings. No thank you. And when things get to us, he trusts us to leave us to our devices and get the work done on time.
It's a pretty good trade-off.
To answer the original question...
How many hours a week should a full-time programmer program?
Should? I would say the answer is that there is no answer. What you should or I should do varies greatly depending on our personalities, our likes and dislikes. I like to build things. I enjoy solving problems. 40 hours a week doing what I enjoy is easy.
I'm experiencing something similar, although, I must say it's not the "coding" that kills me, but the amount of context-switching I'm forced to do on a daily basis.
First, just let me explain my work. I'm the only developer in a technical department of 15 people, in a small local branch of a much bigger company. As such, I serve both various developing needs of my local department, as well as other departments in my branch, most support-systems for first, second and third-line support staff, as well as a multitude of network partners. Except for the development duties, there's an emphasis on last-line support, IP-networking, and product management.
What I've discovered, is that the single largest mental challenge for me, is being forced to radical context-switches, often without advanced warning, and many, many times a day. One minute, I may be working with low-level IP-protocol-debugging in hex-dumps and bit-masks, and 5-minutes later supporting the operational staff with ongoing database-issues, 15-minutes later forced into a spontaneous meeting about human-resources content-managment problems in the customer-support systems, being interupted by another scheduled meeting about conceptual architecture and product management.
All the individual context-switches is what really hurts me. I've reached a point when whenever a colleague shows up, or whenever the next bug is in a different system than the last, I almost experience physical pain, and mental pictures of a harddrive about to give up, trying to chug in those long-gone swap-pages.
You mention "maintaining a couple of dozen web apps"? Even if the technologies may or may not vary much for you, is it possible that the context and nature of the different apps are much varying, giving you a similar problem to mine? That is, forced to "switch project" often, and spending a lot of time and energy on trying to remember the relevant details for the next bug on the list?
Otherwise, when circumstances allow, I try to work from home, turn off the cellphone and shield myself off, in order to concentrate on that specific project. With all the context-switching gone I usually don't have a problem spending at least 25-30H/week doing serious "coding" (including design. development-oriented QA, test-cases, careful versioning), more for mundane typing-heavy projects, and less for more demanding designs, either due to unusual requirements, really tricky algorithms, or simply big complex stuff.
For challenging projects however, there's certainly a "burstiness" to the productivity. Some problems simply needs to be processed "offline" for a while, before they can be solved, but I think that goes for any mentally challenging activity for anyone. Most people I talk to tells me that they solve problems best while sleeping, so maybe you should find someplace to hide for a nap during the workday? ;)
"There's also a lot of programmers working 80 hours a week now. Too bad information workers have a genetic pre-disposition toward avoiding unionization."
or a back-bone. Nobody is forcing you to work 80-120 hours a week. If enough developers refused, the practice would stop. The problem is that there is always a supply of developers that will work those insane hours.
I personally detest the idea of Unions and I'm glad programmers have avoided them. In most unions, your potential raise is dependent on all the other union members in your department. You also don't negotiate raises, your union lawyers/reps do. No thank you.
A union is almost like a small version of a communist country. Everyone is equal.
All of my development jobs for the past 10 years have 40 hours with occasional work after hours. The one job I had that required more than 40 hours on a weekly basis, I quit.
If you have the skills, you will always find someone that wants you. If not, then a union shouldn't be propping you up or forcing a company to pay you a salary any higher than what you deserve.
The free market works both ways. It's not a businesses fault that most people don't have the balls to demand a raise or walk.
No, perfectly serious. Problem is you're assuming a constant workload and a perfect equivalence between workers.
Although I'm a coder we are often put as "leads" in projects. Think "manager lite". And I did put a guy on a team I was leading who mostly plays Tetris. And sleeps in his cube.
The thing is - he knows more about the system than I do. Way more. The task I gave him took him an afternoon. Would have taken me two weeks, minimum. He banged it out, it worked perfectly, he went back to his Tetris. I'm happy, he's happy, my manager is happy we made the schedule, the customer is happy.
We're all happy so I don't see a problem.
I work more than he does, sure. But only because I have to. I'm not as good. I don't begrudge him one single bit.
Weaselmancer
rediculous.
If you go by the metric that, in the typical large project, the resulting product ends up with 10 to 100 "lines of code" per person per day, hey, most programmer's probably took about 15 minutes to type that in if you exclude all thinking (reading, studying, daydreaming while unconsciously problem solving, etc.) and meeting time.
this is the work cycle. Once you need to do something, you generally need to hatch an idea. and hatching is not always active. it can be passive too. while stupidly surfing or even doing your laundry at home, your mind can be busy with the issue in the background. in that respect, coding is a kind of work that generally intrudes one's personal and leisure time. and you cant rest until you actually devised a solution to the issue. when you feel that something clicked, your mind rests in ease, and you can function normal again. and you can start implementing the solution. that is the coding phase. of course, until the next problem is put forth. then the cycle begins.
resting is time that happens in between all those. whether you code or think for 15 minutes and then surf or just be stupid for 5 minutes, or while resting on weekend you cool off the engine.
you gotta cool off the engine. be warned. if you dont and just keep thinking and coding like a monkey for months, you will eventually snap, regardless of how young you are. concentration takes huge toll on one's brain.
so, act wise. dont feel that you are 'stealing'.
Read radical news here
Once you have the experience, the next time you're faced with the same problem, you'll come up with the 10 minute solution without the 12-16 hours of thrashing about.
Indeed it will burn you down.
I just did a 3month stint of constantly long days, not "insane" like 90hrs a week, but sprinting upto 60hrs a week, a minimum of 43hrs a week. I was lucky to have single 10minute break apart from smoke breaks, which aren't really breaks as your brain is still churning at almost 100% speed. Before that 3month i had 1 week of for christmas by knowing that i have to work 12hr days after i get back, and had been working a huge sprint for 3months.
best of it at all was i was promised a raise, but basicly told to f* off. I walked and they are in so deep shit now, their clients keep calling me as they can't get shit done. they are already about 4 weeks late of a simple transfer over of VMs task alone.
Also they had to hire atleast 2 full time guys and put some of my work to 3 others. And all of that because they refused to pay even industry average ... Now instead of paying me the well deserved 30% more (yes i was THAT underpaid), they have to actually pay atleast 130% more, maybe more like 250% more. But hey, all's good, they bill by the hour afterall, so when the no-clue goons are working they actually get more as they spend more time. That's competitive business, riiiiight? ;P
Pulsed Media Seedboxes
>They fired me a few months later for an arbitrary reason to get me out. Go figure.
That's easy : think of the manager who sold those thousands of hours of work (though pollution would be a more appropriate description, but I digress) to the customer.
Now, someone like you comes in, shows his utter uselessness as leader, and threatens to destroy the only motive for his existence, which is a biiiiig team of developper with a huge billing rate. All he wants now is to get rid of you.
One way out of this is for you to work freelance, if you can. Just remember to multiply your coding time by at least three, so your bills won't be ridiculously low, plus you'll need the time for the paperwork anyway.
this reminds me of a quote I read somewhere:
"You never know when it will strike, but there comes a moment at work when you’ve made up your mind that you just aren’t doing anything productive for the rest of the day."
so true...often hits around 8:30 am for me.
This seemed like a reasonable sig at the time.
Not when working time can be calculated in minutes, and they calculate them in hours or rounded hours. We'll use $20/hr as an example.
1 hr = 60 minutes = $20.00 .9996 hrs = $19.99
1 minute = 0.0166666666666667 hrs
0.0166666666666667 * 60 = 1.000000000000002 hrs = $20.00000000000004
0.01666 * 60 =
0.016 * 60 = 0.96 hrs = $19.20
0.01 * 60 = 0.6 hrs = $12.00
0.02 * 60 = 1.2 hrs = $24.00
So, which number would you rather your payroll company use? I prefer the accuracy of 1.000000000000002 hrs. By your logic, truncate anything beyond two decimal points, and you're getting *REALLY* shorted on your pay.
Serious? Seriousness is well above my pay grade.
"There's also a lot of programmers working 80 hours a week now. Too bad information workers have a genetic pre-disposition toward avoiding unionization."
or a back-bone. Nobody is forcing you to work 80-120 hours a week. If enough developers refused, the practice would stop. The problem is that there is always a supply of developers that will work those insane hours.
I personally detest the idea of Unions and I'm glad programmers have avoided them. In most unions, your potential raise is dependent on all the other union members in your department. You also don't negotiate raises, your union lawyers/reps do. No thank you.
A union is almost like a small version of a communist country. Everyone is equal.
All of my development jobs for the past 10 years have 40 hours with occasional work after hours. The one job I had that required more than 40 hours on a weekly basis, I quit.
If you have the skills, you will always find someone that wants you. If not, then a union shouldn't be propping you up or forcing a company to pay you a salary any higher than what you deserve.
The free market works both ways. It's not a businesses fault that most people don't have the balls to demand a raise or walk.
I'm a member or a union, I program for a living, and my union is nothing like your describing. They negotiate your minimum yearly pay rise, work out the overtime rates and rules, and bargain for your maternity/paternity leave, flexitime rules ect... and basically make sure my employer doesn’t shaft me. We are not all equal and its not a small communist country. When i want a pay rise I negotiate it with my manager. The union doesn’t force me to do anything. But then again I live in the real world not where ever you are.