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
As long as you're interested in what you program, you can easily do it full work days. However it seems like you're doing the usual code monkey job - these effects are what happens when its not fulfilling or at all interesting. Not in your area of interest and not challenging in the needing-to-think-and-solve-problems way, but just to produce code. That's what it basically comes down to.
A friend of mine gets his job done and still plays computer games and codes his own projects at work a lot. Since he gets his work done, it's not a problem (though he hasn't told this). Another programmer I know spends 30-40 minutes breaks playing Civilization or other games he enjoys and his boss knows this and likes it because after those gaming breaks he has unwind, maybe has think some of the problems and gets really good programming done again. But he works at a software house, attends to meetings and is in other ways involved in the business too.
It's no surprise that so many programmers also go as developers later. You get to solve actual problems and do more interesting stuff. When you were a teen, you didn't just program - you developed and spend time thinking what you did. It's no fun if you leave that part out.
That's easy! I can do 169, no problem. Of course, I'll be tired and I may make a mistake here and there.
Surfing the net takes more energy for me than programming. Reading takes more effort for me than programming. I can program 40 hours a week without fatigue.
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.
168 hours per week. 191 if you're onboard Air Code One and circling the globe in DEFCON style.
80 is the limit.
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!!
168 hours
"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."
You said you usually work about 10-15 hours per week. So that means that on some weeks, you fuck off on the internet for 30 hours a week!?! Sorry you to hear you get "interrupted a few times per day" while Facebooking. You poor, poor thing.
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.
Authority questions you. Return the favor.
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
To this day I sometimes catch myself working on some interesting problem at home and putting in 30+ hours over three days when I've got some time off from work, because the problem is interesting and there's no one around to make it uninteresting by coming up with changes halfway through, demanding arbitrary things that have no place in the app and similar stupidity.
But when I'm at work building some glorified CRUDified spreadsheet in WEB_LANGUAGE_OF_CHOICE and I can't get two hours of coding in before the specs change or some PHB from another department feels like pointing out that the blue background color is a bit too blue for his tastes or whatever, well I sometimes end up taking a lot of little breaks just to clear my head enough to be able to function at all.
Greylisting is to SMTP as NAT is to IPv4
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.
If i'm working on bug fixes or boring stuff, I'm not very inclined to get engrossed. If i'm designing a new module or solving a complex problem, then I get really into it to the point where I can zone everything else out. I think about it most hours after work and even before I go to sleep, and get right back into it when i'm back at work. I'm sort of obsessed with it until its done.
There isnt really a time limit to it. If it takes 40 hours to build, then i'll stay with it until its done. Its only when I'm pulled off, or distracted in some way where I break my concentation. Once I stop, I find it very hard to resume what I was doing.
I am going on 10 years of development, mostly web related stuff. If it is "same shit different day" type of work 20 hours is a good estimate of actual work I get done in a week. However, If I get to work on new and interesting stuff, I can go 50 -60 hours a week easy, but those are rare.
I have found that the amount of time I actually spend coding has been less and less as I have become a more and more senior developer. I used to spend most of my day coding when I first entered the industry (mixed with glancing at web & book references to make sure I was using the correct syntax, or to track down the method/class/exception I wanted to reference).
Now I find I spend more time in architectural/database design meetings, consulting other junior developers, planning meetings for other teams to help advice on technical dependencies, documenting design decisions, reviewing code, interviewing, etc..
When I was 20, I would program 8-10 hours a day, then go home and code for 4-6 hours into the night.
Now I get distracted before an hour's coding is up. That's why I moved into management.
The cake is a pie
40 hours a week.
What the hell kind of idiot is posting this? When at work you should be working. If you mean actually sitting there and pushing buttons to create code that then is compiled and will remain as part of the code? 15 hours. If you mean all the required steps to create an actually half useful piece of code? FORTY HOURS A FRIGEN WEEK.
So basically, -1 troll/offtopic is really slashdots way of saying "I hate that you thought of something before me."
/p>yessir, i have no problem wiht a 40 hour weel of html coding and i >i>never,/i. maek a mistake.,
This ain't rocket surgery.
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.
I swear, programmers rarely actually use the software they program. If they did, then there wouldn't be all these horrible double-negative "Are you sure you don't want to upgrade your document format?" and the proliferation of poorly thought out interfaces.
Design things for elegance and simplicity - if you don't know how, get someone else to look at it for you and to tell you not to nest an important, frequently used function within 3 submenus and two windows or via an obscure, undocumented command line switch.
g=
In the right environment on the right projects with the right team....I could easily design, develop, and test for 40+ hours a week and feel energized. Unfortunately that right environment, project and team is very rare.
-- Dr. Evil
...it gets tired after a continuous effort. I personally find that I can only concentrate on one task for about 30 minutes. Then I have to rest for a while doing simpler tasks like reading slashdot :). :).
One thing I've found now that I'm involved in two projects is that when I have to deal with both on the same day my brain gets significantly more tired...so context switching IT IS expensive
Now I try to do things belonging to one project one day, to the other the next day and so on.
I think bigger question is how many hours a week are you actually able to program when you consider all interruptions. I rarely am able to program for more hours than my brain is capable of.
When you have managers wanting meetings three times a week (granted, they are short usually), you expect to get a least a few inquiries a day about the code from someone who's not understanding what you are doing, and you work from home and/or you just get called frequently by the Significant Other... all these interruptions break up your day resulting actual concentrated programming being hard to do for any length of time.
I find I probably only spend 10 - 16 hours a week doing solid coding. Another 10 - 16 is spent just thinking about higher level things like architecture or scaling issues or whatever, and depending on the week 4 - 8 hours "alternately stimulating" my brain with related (slashdot) but not directly applicable stuff. The rest is taken up by the aforementioned interruptions.
But I'm not a "grunt programmer" either.
-- Senior Software Engineer, Attorney appearance services, locallawyerapp.com.
I love to program. When I am really into something, I lose track of time, forget to eat and drink, etc. I can do weekly marathons of it.
However, meetings, telcos, reports seem to knock me down so much, that it's difficult to get back into the programming stride.
I dunno . . . programming seems to generate and stimulate my mind, and keeps it going by itself.
Meetings and co. make me comatose, so that it is difficult to maintain that programming stride.
Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
I agree with the comment regarding being in the "zone." I don't code for a living anymore, but when I do, I can sometimes spend a full 9 hour day doing nothing but keyboard banging.
Interestingly, I'd like to point out that when you're coding and really straining your brain, you're burning a lot more calories than you might think. I always thought it weird after a 10 hour day of coding to go home feeling like I was physically exhausted. In reality, the brain is one of the highest consumers of energy in the body and so it makes sense to me now.
I'd happily pay you Tuesday for a biopsy today!
So what if I am ? I have no problem coding circles around people that , oh wait a minute there goes a bunny.
I've been developing software for 18 years, and I've never encountered a time when I couldn't program anymore. 40 hours of work, plus another 10-15 while working on a masters and then back to programming freeware apps on the Mac. Easily 80 hours a week a while ago. Now I just don't have that kind of time, but I never feel as if I'd had enough. I rather like programming, hence pursuing that in college. I have had friends who became programmers just because of the high pay and you couldn't get them to touch a compiler outside of work. Sad, really. In fact, that was one of my major interview questions: do you program outside of work/school? If not, you have no passion and I don't want to work with you.
Now if I had to develop highly analytical software like DSP or stuff involving tons of differential equations, I may feel differently.
I don't know, but it works for me.
As a woodchuck chucking. Up.
Thinking is a physical thing, it requires energy, and can tire you out. If your body isn't in good health, you're not going to be able to concentrate for long periods of time without getting exhausted. If you aren't feeding yourself properly, you aren't going to have enough nutrients to keep your brain going.
Now, being in good physical form doesn't mean being skinny: you can have terrible energy levels even if you are skinny, and you can have amazing levels even if you are fat. That said, the easiest way I've found to increase energy levels are first, to get enough nutrients (proteins, carbohydrates, fats, vitamins, fruits and vegetables) so your body can rebuild itself, and second, running. If you can run far, you will be able to program 60 hours a week without a problem. If you want inspiration (ie, extra motivation beyond just high energy levels), check out this book (I've no relation to the author, just found it inspiring).
Whether you would want to program 60 hours a week is a different question.
Qxe4
I swear, programmers rarely actually use the software they program. If they did, then there wouldn't be all these horrible double-negative "Are you sure you don't want to upgrade your document format?"
Wait, where's the double negative?
The user has clearly elected not to upgrade the document format, and the application is asking for confirmation...
Bow-ties are cool.
I find some projects I can just tear into and code like a mad man. Others are painfully dull slogs and I just can't seem to focus much on them. There is also a lot of the time I'll spend hours looking at a problem and just can't seem to make any progress on it because I'm just not grasping it. So, I can easily vary from about 40+ hours one of those mad man rushes, to much more painful 15 or so if I hit one of those troublesome problems.
Peter Gibbons: Well, I generally come in at least fifteen minutes late, ah, I use the side door - that way Lumbergh can't see me, heh heh - and, uh, after that I just sorta space out for about an hour.
Bob Porter: Da-uh? Space out?
Peter Gibbons: Yeah, I just stare at my desk; but it looks like I'm working. I do that for probably another hour after lunch, too. I'd say in a given week I probably only do about fifteen minutes of real, actual, work.
Knowledge = Power
P= W/t
t=Money
Money = Work/Knowledge so the less you know the more you make
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.
I'm working, really!
Luminaries such as Jamie Zawinski and Richard Stallman work long hours. Richard Stallman worked 70 hours a week creating GCC in the 80s, I suppose that's why their the best.
I find that I'm super productive for about 4 hours a day, in the morning. So, I set my schedule so meetings and less creative and mentally challenging (but necessary) work is done in the afternoons. I'd love to play games instead, but that's not an option.
Very often, people confuse simple with simplistic. The nuance is lost on most. - Clement Mok
I have spent over 30 years doing custom business programming but it's a sideline to my regular business, so I work on projects off-and-on.
I view programming as a cross between writing a novel and solving a crossword puzzle, and I have never been able to be creative-on-demand, though I'll spend hours on end writing something when I'm "in the zone".
I'm on nobody's clock, though. I don't think I could do an 8-hours-a-day programming job. I would be either bored out of my mind, or blocked and feeling stupid.
If you're a zombie and you know it, bite your friend!
I'm referring to combination thinking/designing/coding, not counting breaks etc. (We were required to track our hours, what a pain). I'm also mostly autonomous and don't have to go to too many meetings.
For you young weenies, I'm 54. Most of you kids can't keep up. (I did once meet a young kid who could wear me out time-wise).
It helps that I've changed industries and roles several times, keeps things fresh.
Hmmm, I wonder wonder why I sometimes get burned out?
Stupidity... has a habit of getting its way.
but usually I only GET to about 10-15 hours, and spend the rest of my time dealing with meetings, documentation, etc. Coding is the fun part.
In Soviet Russia jokes are formulaic and decidedly non-humorous.
You must have the wrong end of this stick. I *love* programming; many programmers do. I don't actually do it much anymore, sadly, but I can still waste days on hobby projects. The trick is *stopping*. ... I mean the guy talking about boring work has got a point, but I've done some pretty boring stuff and once I get there staring at the screen and testing the stuff -- as it says on my resume, I "try to figure out why things don't do what I want - and the hours pass like the wind...."
I'm in a very similar position. Coding something that is not interesting with a boss that hovers over me and thinks my productivity goes up if I spend an hour a day in meetings with her (she is not tech-saavy by any means and lacks any understanding of program developing). I'm pretty good at forcing myself to work, but end up with 45-50 minutes of good work in an hour. I chalk it up to the Yerkes-Dodson Law ( http://en.wikipedia.org/wiki/Yerkes%E2%80%93Dodson_law ) which basically says productivity has an inverse-U shape as a function of creativity. If you're a grunt adding receipts you need pressure on you to do your job and get anything done, but if you are asked to solve a problem creatively using a computer (e.g. most software development--the path to the finished version is not always explicit), high pressure from above makes productivity go way down.
As long as you are getting your work done, does it matter? Now if you are limiting the number of projects being completed then there is a problem.
At my job for instance, I have a certain amount I am supposed to get done and then I am supposed to be on call. I remain on call during the work day (yes thats part of your service) and I fulfill my other duties. If you are getting stuff completed in a reasonable time and providing the tech support service on call at all times, whats the issue? Unless you are building up a que from not getting stuff done fast enough, in which case you need to kick it in to gear.
I like how this guy just thinks programming is bashing on a keyboard.
Open source people have rarely seen, or written, any good specs. I'm sure some fanboy will now come up with some dumb reason why NOT writing specs is somehow cooler and free-er.
There's more to programming than typing in a debugger, mashing "go", and then fixing your next NULL deref. Try thinking! Try writing a spec, which is proof that you actually put some thought into something!
I allow myself little breaks here and there to check Slashdot, read my email, watch a quick TV show, etc.
I don't see a difference between actually typing up code versus jotting down notes to sketch up an algorithm. As far as I'm concerned that's also part of programming and definitely still working.
On some weeks I can spend up to 100 hours programming. I doubt I've ever gone below 35 hours a week in the past 4 years during a work week, although I have taken some vacations during which I didn't work at all.
I find it depends a lot on how motivated you are. There are weeks in which I have spent more than 60 hours just coding. That's with practically all the design work done up front and an attitude of "let's sit down and get the code written". At other times, I have a hard time even being at work for 30 hours a week, let alone focusing on coding. On the other hand, some very useful things have sprung from those weeks, too. Turns out coding isn't all there is to life, and there are a lot of things I can do besides coding that people end up appreciating a lot.
As for how much pure coding I can do in a week without getting worn out, I think that works out to about 30 to 40 hours, but obviously that, too, depends on several factors - e.g. if things outside work are draining your energy, you'll have less energy left to write good code.
Please correct me if I got my facts wrong.
It's not about how many hours per week you can program, it's whether it's sensible. Sure, I could code 60 hours in a week, but I've observed that I'm at top productivity when I code about 6 hours per day. I'll be less tired and more focused the next day, and will make fewer mistakes. Breaks are all right, but ideally when a piece of code is "done" so you won't interrupt your flow. Getting to bed on time, eating well etc. also makes a difference. I think your boss, too, would rather that you work at sustained top productivity than to see you burn out in a month by working 60 hours of straight coding per week.
Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
You said you usually work about 10-15 hours per week. So that means that on some weeks, you fuck off on the internet for 30 hours a week!?! Sorry you to hear you get "interrupted a few times per day" while Facebooking. You poor, poor thing.
We need to get away from this paradigm of "You must work 40 hours a week" to the paradigm of "You must do this, this, and this for me and I will pay you X." Sometimes we work the full 40, sometimes we work more, sometimes we work less -- the important part is delivering to your employer what he wants. Clearly, asker is doing that or he wouldn't be employed.
I subscribe to the "As long as you're not illegally gambling or moonlighting from your desk, and as long as you're getting me what I need and not bothering anyone else, screw around on the Web as much as you want."
Luminaries such as Jamie Zawinski and Richard Stallman work long hours. Richard Stallman worked 70 hours a week creating GCC in the 80s. There is an Arabic saying "If you want to surpass others you have to burn the midnight oil" I suppose that's why their the best.
Ignoring for the moment that I'm pretty much always grinding on some problem in my head, anywhere from 5 to 80 with 30 being normal. It's not something I can really control, sometimes it just flows, sometimes it's pulling nails to do anything. But from another perspective, the 5 hour weeks usually preceed the 80 hour weeks, and it's often thinking about the project/problems that gets in the way of doing them, so probably it's a good thing.
Realities just a bunch of bits.
"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.
For me it takes 20 hours of product planning to allocate 20 hours of my time which allocates 40 hours of QA time. So while our product planning team could double their amount of planning (and do nothing else) to allocate me full time, we still don't have the QA for it.
Sometimes with maturity you realize that you can't code as fast as you like, not because you're not able, but because the rest of the organization can't keep up.
It's only relatively recently that natural breaks have disappeared from our landscape. In the 70's, I would have to wait 20-30 minutes after reading in a box of punch cards to get output from the run. Later, the COBOL compiler I used would take at least ten minutes to complete. Ditto Turbo C if I recompiled the whole project including all dependent programs. Now I use Delphi or Flex Builder and there is no waiting so I take a break now and then anyway.
Sure there's always going to deadlines and other crunch times when you need to go all out, but if you're in this for the long term, you're going to have to pace your schedule so that you don't burn out. Fail to do that and I guarantee that in a few short years you will be ready to chew your own arm off just to get away from that stinking job.
"The ferrets, they're every where I tell you!"
My experience is that good coding does not work in large blocks over long periods of time. Productivity takes a nosedive pretty quickly at more then 4 hours or so in a day. I have run many tests on my code and others and so far my experience is that while you can keep writing code all day the code ends up buggier the longer you work on it and nastier to maintain later. Many times if I have a hard problem to solve I will just leave it for the next day since overnight almost 100% of the time I will dream up a better solution that will be simpler, faster, easier to write and easier to maintain. I have had to work with so many systems that where built by someone staying late and kept working on it that where so darn nasty to work with later and massively buggy.
Mental activities are just not well suited to extended effort. There are too many things to go wrong as you start to get tired or can't see the entire picture of what you need to get the code working right. I also try to follow rules of keeping functions very short with well defined inputs and output and no tricks to speed things up unless actually required. Lots of functions where the output only depends on the input where possible are easier to debug later, easier to replace, easier to maintain and easier to make faster later then giant balls of code. I am not suggesting functional programming but some aspects of functional programming are good ideas for maintenance.
Computer modeling for biotech drug manufacturing is HARD!
Get married dude. you'll be hitting 70 hours a week of productive coding in no time as you get sick of your stupid, worthless wife, and she goes off and finds a boyfriend, and then you hate her and him more and more...
Uh... not saying anything like personal, or anything.
This is my sig.
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.
I'm a full-time programmer - all I do is program. Rarely have meetings (every other week), don't deal with customers. Just program. My boss is strict on me logging hours - not to keep track of time, but to bill clients. He doesn't mind if I'm only getting 4-5hrs in an 8hr day, because he knows I'm being honest. The important part is logging accurate hours for billing the customers. In a good week (where I'm dealing with new issues each week, resolving lots of bugs, adding new features), I will log around 25-30 hrs. In a slow week (one problem bug), I get bogged down and do around 20hrs. I find that if it's difficult, it's best to clear my head and do other activities (walk, surf the tubes), but if it's not frustrating, I really get immersed in my work, and am really productive. It really depends on how the person handles what they're working on. If it's tedious and drains your attention, I find that most people turn to distractions to clear their head, like going on Slashdot an hour before you get off work (hehe). Other days, I'm so caught up in knocking out bugs left and right and getting a lot accomplished that time flies and I might put in a full 8hrs of work. Really depends on your work environment and what work you're doing.
-Bob
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.
This job fulfilling in creative way. Such a load of crap.
I judt got a nre Kinesis keybiartf so please excusr ant egregiou typos.
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.
Both!
15 hours/week is pretty typical, given meetings, bio-breaks and other interruptions. I've been on a TSP team (stop-watches, dashboard, etc.), and while it helped (greatly!) to get us to CMM Level 4 in record time, it also clearly showed that even the most-productive of us could only manage 18-20 hours without totally burning out.
Whether or not Facebook, etc., is a good use of your time (and company's budget) is between you and your boss. If you're getting the work done and it is of high enough quality, good job.
If you're interested in TSP, check out the SEI web site at Carnegie Mellon University. Like I said, been on a team, leading several such right now, and I was the govmint babysitter for a contractor team. TSP is painful, but worth it.
Maybe you need more discipline.
hmm Anonymous Idiot. What does that post have to do with the original question? Also you do know that most programmers don't have a clue about design right?
I have only had one job that was mostly just programming.
In that job I would come into work in the morning (9:00) take a few minute lunch break and leave at 5:00pm, otherwise it was siting in front of a monitor coding.
In general I would say, as long as you enjoy your work and want to be a good employee, you should work 95-99% of the work day, excluding designated break times.
Troll is not a replacement for I disagree.
24*7=168 DUH!
The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
... you're doing it wrong. The hardest problems can be solved while waiting for the coffee machine to fill your cup. If your programming work requires too much typing, you're using the wrong language/tools or you can probably be replaced by a Perl script.
"I love my job, but I hate talking to people like you" (Freddie Mercury)
I can code like a freaking monkey for days without sleep. Its all about art, and applying some science to it at the same time to get folks to buy into what you are doing. I have gone 8 days without sleep in the past writing device drivers, and at some point the code reflects the sleep deprivation level. Sleep, oh sleep, what is that? Its that thing that gets in the way of success.
Basic stuff where I have a good knowledge of the domain is one thing. It's easy to be productive in that sort of environment.
Really low-level stuff where I'm dealing with bits and register offsets in obsolete spaghetti code in an OS that I'm not familiar with for unfamiliar mission-critical hardware ...I can't concentrate for more than half a day or so at a time.
You can program for 80 hours a week, but you cannot do that for too many weeks in a row. If you tend to write code in spurts with lots of down time in between, then I'd say you're pretty normal. I also believe good managers realize that writing code is not a steady, 9 to 5 thing.
I've abandoned my search for truth; now I'm just looking for some useful delusions.
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).
I enjoy my job. I have many roles now even though my primary role is supposed to be programmer/developer (I'm the only one in a small company so I do it all). So I do get annoyed when I have to do unrelated and unexpected things sometimes, such as random reports (every single one is different and you have to go back to them to get the actual requirements), or managing one part of our business etc. When I am programming though, I'm into it and can go for quite a while. I'm sometimes into it and look at the clock and it's 5 o'clock, whoa how did that happen. I need to get to a good place to stop so there aren't a dozen hairy untested things out there that might give me a headache the next day when I get back into the flow of it. If it's a big project I can definitely put in some hours. The fiancee isn't too nice about that though.
Anyway a lot of the previous comments are right on. If you're interested by what you're working on it's easier. Personally I can motivate myself to work on a project even if it's not my idea or interesting in any way, and then once I'm into it, it's ok and I want to get it right. When I am interested by it or I'm working on my idea it's similar but I'm already motivated. I also get slowed down by interruptions and the flow matters as another poster described. Interruptions take me out of my focus and the flow of things I'm working on. Sometimes you have to keep track of a lot of stuff in the back of your head while working (outstanding unknowns or you have to keep track of everything you have to update because it had a dependency or something else you changed, or you have to remember you changed something and there might be lots of dependencies you have to check on still).... so when that happens frequently, I go a lot slower and end up coding less. I also do a little web surfing in between these things sometimes. When I'm going though, it can be for long stretches. Sometimes I wear headphones and sometimes I don't. Sometimes the person next door in the office who is on the phone frequently and has Rush Limbaugh going on the radio annoys me and sometimes not. I do put the headphones on often if I know I really need to focus on something like if I'm in the middle of coding something difficult or I'm starting a project and need to do some careful planning.
I'm guessing you actually work more than 10-15hrs, that is just programming time. That's probably ok. I might have a problem with myself if I worked less than half the time I was at work. That could be a reason to be looking for another job. If you have time, start your own project! If you really aren't bothered by it, work on it during work too. I have lots of things I really want to work on but frustratingly don't have the time.
simple, fast homepage with your links: http://www.ngumbi.com/
In other words, assuming that you're paid a salary (as opposed to an hourly wage), they're paying you for an output, not for time. If you can accomplish the tasks set before you in 10 hours, then the other 30 that you're mandated to be there by your manager are yours. Of course, a good manager will give you more work because they underestimated your abilities. And a wily employee will then ask for correspondingly more pay. But that's the circle of life.
My past few years' experience was something like this:
1.Middle management is asked to give a time frame estimation, which they make as small as possible, to please upper management.
2.About 80% of the guys in the office work for 12-16hrs a day, even though their contract is for 8hrs, to please upper management.
3.Regardless of the quality of your code, they always get better appreciation than you do, because you go home to your family while they don't, since they don't have one, or hobbies, or whatever
I've drawn a few conclusions:
1.Size does matter. The guy working the most hours always wins, even if only for the fact that he is more available than you are.
2.This isn't a job I want for the rest of my life.
3.If you really like doing something, don't turn it into a job. Sooner or later you'll hate it.
It really depends on what you're programming. Most of the projects I've worked on are similar to what you describe, intranet and web applications, which I find quite easy to put long days into. You need the occasional short break to re-focus, but if you're at work for 8 hours a day, at least a good 5 or 6 of them should be spent actually getting your job done. On the other hand, there are certain projects that can feel like they have been created for the sheer purpose of poking millions of tiny holes into your brain. Reverse engineering, memory tracing and some forms of debugging (to name a few) can just rip away at your sanity if you try and work at them for 8 straight hours. That being said, I tend to find that these sorts of projects also put your brain in a certain state where continuing is pretty much all you're good for until a good night's sleep. After reverse engineering file formats or network protocols for a day, the only thing my mind can actually focus on when I get home is continuing with the same project. So I suppose I end up putting in longer days some times, just with bigger (if less common) breaks...
I can easily code 40+ hours a week. I did much more when I was a grad student.
The trick? TAKE BREAKS.
I've been known to disappear for an hour at lunch to jam. Really helps clear the head.
And stop when your code no longer makes sense. If you start to crap out at hour 12, but you keep going until hour 17, you'll spend much more than that extra five hours fixing all the bugs you made.
I also believe it's a huge error for anyone to code to the exclusion of other parts of the process. A decent rule of thumb is that you'll spend half your time between testing and designing or analyzing. Decent design paradigms do not consist of doing all the design up front; this is doomed to fail. And code monkeys tend not to have the "big picture" in mind, which can lead to a lot of wasted time, and confusing or inappropriate code.
Am I normal or stealing?
Your MO isn't unusual; Dilbert's Wally isn't pure fiction, you know. Yes, you are lazy, there are people who are smarter than you, who are willing to work harder than you. Luckily, your boss isn't so swift either, so you probably don't need to worry too much.
A lot of my coding time happens in bursts. The process tends to go like this:
1. Look at a requirement and invent a strategy for implementing it.
2. Start writing the code.
3. Run into an issue that will require significant refactoring.
4. Plan a refactoring that will solve the issue.
5. Take a break. The break is required for stepping back and getting a big-picture view of how the refactoring will affect code quality. If the refactoring is large or complex, the break might take hours or even days. I might have to switch projects for a while.
6. Evaluate whether I am still happy with the planned refactoring. If I am not happy with it, go back to step 4.
7. Refactor and commit.
8. Write more code until I finally solve the original requirement. I may have to go back to step 3.
I don't know of any other way to maintain code quality. When I was a newbie coder, I painted myself into a corner fairly often by creating code so complicated that I was not smart enough to fix or improve it. Today, I recognize the limits of my brain, so I spend a good deal of time pondering how to simplify code and then simplifying it. That is the only way I know to remain productive.
/me does 40-80 dev-hours/week... Full time as a c++ programmer, and in extra time as an managed c++ and php programmer. In my free time, i'm doing some Amiga coding. Rest time is for my Wife :). Well - welcome to Poland :)
See, there's the damn problem. "Hours." Why even hire a gardener for "hours" instead of hiring them for "the job."
Look at it like this, I need my hedges trimmed, flowers planted, weeded and watered, walkway trimmed, and my blue grass planted. I don't care how long you take to do it, but I feel that doing all that work is worth X$ to me me. It takes you 10 hours solid, great, if you think X$ is worth your time then take the job. If it takes you 20 hours with 10 hours goofing off, again, AWESOME, if you think it's worth it to you then take it. If you do a great job I'll come back to you, if your performance is sub-par I'll start looking for another solution.
But if I hire a gardener for 20 hours at X$ per hour to do...stuff...then we've arrived at the terrible model that most companies use for employees. That's probably why many IT positions are salary for full time employees.
Also, what about quality of work in those hours? I *know* I can do more in 2 hours than many people can do in 4, or even 6 hours. But we get paid pretty much the same at the end of the week...is that fair? I can turn out 500 *quality* units per hour and you turn out 250 can I work 4 hours and stop or do I have to work 8 hours too to get the same pay? How many places even have metrics to determine work levels such as this, and how expensive is it to implement those metrics in the first place?
And time itself...well let's not even get started on that highly controversial and relative subject...
Comment removed based on user account deletion
There is another downside that I just realized.
For quite a number of years my feet have been bothering me.
I think I have found the answer. Too much sitting!
I spend at least 8 hours a day at the computer sitting.
I have recently tried standing while typing (I am doing that now)
and the feet are slightly better. I believe the circulation to my
legs is restricted by constant pressure but then it probably
depends upon the "mass of the ass". I am quite thin,
weigh 142lbs and so do not have too much padding.
But this should be a general phenomena so recommend that
you frequently get up and walk around. I am in fairly good
shape for my age since I walk/run at mile a day. But the
sitting undoes that good work.
I sense inexperience in your question so here's what you will learn as you progress in your career:
1. The only metric that has a direct effect on your compensation is your performance review. Like in that joke about two men and a hungry bear, you don't need to run faster than the bear. You need to run faster than the other guy, which in practical terms is not that hard to do. Optimize for a good review score and you will do well.
2. It is not possible to code anything technically complicated for 40 hours a week for any extended period of time. Anyone who tells you otherwise is either lying to you, or they do the kind of job that a Perl script could easily do instead.
3. Most people around you aren't as smart as they seem. They too screw up and make mistakes and goof off at work. You'll see it eventually.
4. Most people around you work about as hard as you do (which means they too spend 15 hours a week coding, at best).
5. Innovation and creativity trump the 40 hour work week requirement. If your output is worth it, your employer will be happy. If not, even 60 hour work week won't make up for its deficiencies.
Several times, when I was highly motivated on exciting new projects I was able to code for about 120 hours for 2-3 weeks. That would be 7 days per week, 4 hours of sleep, minus mealtime, teatime and shower time. But thinking back, a lot of the code produced was crap, it was basically a joyride implementing what seemed to be a straightforward approach and enjoying a lot of incremental results.
These days I prefer to plan for 3 hours of coding a day with most of the time spent on meetings, learning, planning and a lot of contemplation about the easiest approach to implementation. It's funny that just sitting on a couch meditating about simple solutions often produced ideas that made me implement solutions in days that other programmers would take months.
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.
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.
The other possibility is that he's full of it. So he's chained to a computer all day long with just 10 minutes of break, and he decides to spend those 10 minutes surfing slashdot? Yeah.
168 hours would seem to be kind of a hard upper limit.
In the land of the blind, the one-eyed man is king.
....we used two rocks to beat binary into each others heads. Uh, I mean... When I was programming, which was about 75% of my job, I'd say that of that 75%, 50% was actual programming, but in that I include mapping out the next planned code to be written and doing pseudo-code and documentation to make the next task easier. The other 25% of the day was meetings of slacking/research.
normal
We've been using a new methodology at work where we keep track of the hours of actual productivity, not counting all the distractions. I get an average of 13 hours in per week.
During the core business day, I am interrupted every 5 minutes by something or someone. Programming sprints used to be 5PM past midnight, when it was finally quiet and I could concentrate. Since the PHB wants his minions in their cubicles at 9AM, that ends up being some crazy hours, most of them wasted.
Three 12 hours days would be heavenly. They'd get so much more for their money and I could have a life.
Coding is definitely one of those things you can only do when you're "on". If I am having a bad brain day (hung over, not enough sleep, whatever), I know I am not going to be very productive, so I work on other tasks, like writing documentation for the code I would otherwise be writing, catching up on client phone calls, etc. Fortunately, I am my own boss, so I don't get micromanaged. In the end, everything works out fine. I figure I spend maybe 20-25% of my time writing code, and the rest doing something else. Since I know I am not really going to be in the mood to code most of the time, I make a point of setting aside work in other areas so I have something to do when I am not going to be productive coding.
I can do a couple of weeks of 80 hours each no problem. After that I'll need a couple of days off. But I just can't do this if I am not looking after my physical well-being. That means eating well and gym workouts every second day. As other people have said you also need be interested in the project and be in 'the zone' a lot of the time. That requires minimal distractions. As an aside, others have mentioned you can't write QUALITY code working long hours. Well, not exactly true. Provided you realise when you're rushing a solution and are willing to put it aside until the next morning, you will find your unconscious mind can come up with some elegant solutions while you sleep. Not kidding, try it. And this just in, science agrees.. http://fora.tv/2009/08/11/Matt_Walker_Secrets_of_the_Sleeping_Brain
42
If the only way you can accept an assertion is by faith, then you are conceding that it can't be taken on its own merits
I unrolled an infinite loop in assembly once. Let me tell you, I was a typing machine until that BSOD. That bumped up my personal best to just under 30 minutes.
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?
I understand what you're getting at, and obviously you're using an extreme example, but if you have somone "working" for you who is spending that much time not working, you're drastically underusing your resources. Either that or you have too many people for the workload.
You wouldn't hire a painter and then stand next to him with a stopwatch adding up the amount of time his brush spends in contact with the canvas, would you?
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? ;)
i'm a CTO and i do at least 30 hours a week programming. if my developers only did 15-20, i'd fire them.
All that a newspaper reporter does is collect facts, determine if they are reasonable, and format and contextualize them. Why haven't they been replaced by computer programs?
Get back to work!
This is totally true. If you don't get any exercise, and your energy levels are low, then sustaining decent amounts of programming in a work-week is almost impossible.
This is why, when I moved to a new city a few years ago to take a programming job, I made a point of finding an apartment about 3km from work, and I walk to work and back almost every day (about once a month I take a cab instead). So I get something like 30km of walking a week just walking to work and back. Its not much exercise but its a damn sight better than nothing.
If you're out of shape and can't figure out how to turn it around, I suggest this:
(1) buy a cheap bicycle. (2) every Saturday, hop on that bike and ride around your neighborhood for 30 minutes. Just bike to a local park or something, then go back home.
I don't think it's that linear. If you hassle them more about their Tetris-playing, it may cut into how much they like their job / your workplace, which may lead to exploring other options, and/or being more aggressive about looking for raises. When you squeeze your resources, they often get more expensive...
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
. . . and then my brain falls out of my head and takes three weeks to put it back in.
... could a programmer program if a programmer could program programs?
49 20 61 72 65 20 6E 65 72 64 2E
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.
outside of that, about 10-12 hours/day, 7days/week (if my faithful female companion allows me to)
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.
After reading this, I felt compelled to compile some of the similar thoughts from here and put together a short blurb on what it's like for me, being a programmer.
Programming is Mental Sprinting
Written by: Maxwell Rathbone
Pieces Compiled from: http://ask.slashdot.org/story/10/04/14/1925218/How-Many-Hours-a-Week-Can-You-Program
I do find myself writing code in a sprinting fashion. I can always code when it's time, but sometimes I get a burst of speed and clarity that I might not have every single day. I sprint ahead and make up for the days when I'm not so sharp. Many programmers do this. Programming is hard, and it's easy to get distracted. As a programmer, I have honed my ability to focus, almost in a meditative state, while I write code. While I'm in this meditative state, I'll have dozens of pieces of my code visualized in my head, potentially solving multiple 'problems' at once related to the project. I'll also have the overall path of the project and the various smaller tasks I could potentially be working on visualized. Getting distracted while in this state is the equivalent to someone walking up to my mental whiteboard and erasing everything on it. For this reason, when I'm distracted it takes additional time to regain my previous state of concentration and clarity. It takes time to reload into my active thought process all the pieces to the project I'm working on. For this reason, it is imperative to retain my focus while coding.
I do believe this 'mental sprinting' changes with age. Years ago, coding 12 hours a day for weeks on end was not difficult to pull off. The catch was that a very high percentage of the code I wrote, was either poorly written or bug-ridden and easily could have been written in far less time had I spent more time thinking about the code before I wrote it. As I've gotten older and gained more coding experience, I've found that it's easier to spend a large amount of time contemplating the code, and then writing the code in shorter bursts. The difference is that when I write code this way, far less hours are wasted.
Our minds naturally work in a cyclical nature. Sometimes I'll get excited about a project or idea and I'll want to work sixteen hours a day on it. Other times, nothing seems interesting. To write quality code and keep my efficiency up, I take these cycles into account. I've discovered they're affected by how I react to them. I keep a cache of easy tasks that are part of the larger project, so that when my mental cycle is at a lull, instead of trying to force difficult code out, I can give my mind a rest and perform easy tasks. Debugging code is great for this. Debugging is as straightforward as most people think programming is. The problem is completely constrained, and all I have to do is troubleshoot it. It's almost relaxing. When my mental cycle is at a peak, I'll perform coding bursts up to 16hrs a day. Generally this does not last more than a few days before I start feeling mentally 'burned out.' By working with these mental cycles, I'm able to keep my coding efficiency as high as possible.
I do find that with some projects, I can write code like a mad man much more easily. Others are painfully slow dredging, and I have great difficulty focusing on them. There are also times where I'll spend hours looking at a problem and just can't seem to make any progress on it because I have a degradation of clarity in visualizing the problem or best solution. Because of this, it can vary greatly how productive I am when I write code. I could spend 40+ on one of those mad man sprints, or a much more painful 15 hours of slow dredging.
I've taken all of this knowledge and experience into account and now my plan is, that when I reach 90, I'll just wake up in the morning and fart. My very lengthy and heavily customized script will analyze the fart and translate it into C++. "Oh, boy, I wrote another new Oper
http://www.timchilders.com/the-candle-problem
Where having a manager watch the clock is the extrinsic.
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
So do we need unions or goons? On the outside they both sound like good ideas :)
-Matt
--- Need web hosting?
I'm biased because it's a hobby of mine, but yes, I could see doing that if the break allows for thinking about drought resistant perennials, planning so that the garden has some interesting blooms each month, and thinking about how to get rid of some bugs that other gardeners are succumbing to. Then again, gardening is a pretty good activity to think while working. As an aside, and it may be observation bias, but I do know quite a few long time programmers who do get into gardening for the mental challenges (we had some folks at the Tech Shop/Maker Fair working on wireless soil sensor equipment).
So, you hit '=' in some cells and click on other ones, and occasionally you change text/cell colors.
Do you bold text sometimes too, or does that cost extra?
Think his job is underwhelming, you should see what I do; I use plain old text editors, no relations between cells whatsoever, just typing away in one long linear stream punctuated by whitespace. I can't even bold text or use colors.
Just waiting for a program to come replace me. It'll happen to me first since my C source code doesn't have half the features of a spread sheet.
I understand what you're getting at, and obviously you're using an extreme example, but if you have somone "working" for you who is spending that much time not working, you're drastically underusing your resources.
As long as the employer recognises that 40 hours of that Tetris-player's week contributes more value than 40 hours of TakesADayToCodeHelloWorld McGee's week, and therefore should require more money to finance, then he's free to reallocate his resources. Ideally, that is.
An old manager told me once that they were told in a seminar that they should expect 4-5 hours per day "real work" and the rest crap from most engineers. You are always going to be interrupted with random stuff-- answering email going to find someone to have a mini work meeting etc. I find that this is pretty normal. I myself can't do more than 4 hours without being extremely burned out at the end of the day.
If you work on your own company's projects, or you get paid by the project and your boss is a "good manager" take all the Tetris breaks you want... If you work for a company that does projects for other people and bills them by the hour, you don't have that luxury. A client isn't going to pay for your video game break, and you boss will fire you for wasting your time (and his money).
The more code you write the more bugs there are. So you write a data driven scripting framework so you can write as little code as possible. But it never works...
Depends. If you're Indian it's zero or rather it should be.
You code as much as can you between every interruption you get throughout the day.
The way I look at it - if I am awake - I can code. No excuses. If you can think, you can code.
Viewing developer as requests go in, finished product comes out as only is a veeeery bad way to look at it.
development is nothing like industrial work where you get actually "N requests in, N produced out". A single request might be estimated 1hr or 1000hr.
Nevermind the fact that if the manager did evaluate the specifications and required hours, it's going to be wildly off... I've seen them being by order of magnitude off. Project managers don't tend to do their research.
In industrial work every unit of work is the same size, and you can measure productivity like that. In development you cannot judge by produced count alone even. There's such things as code quality, % of actually delivered in usable manner, # of bugs etc.
Pulsed Media Seedboxes
Since in a small shop most people have to handle multiple roles, its sometimes hard to evaluate what your real work load is as far as any given set of tasks. The effort to effectively track each task is another task, and most people aren't really willing to give up 10-20% of their employees time to administrative tasks involving time tracking, so the end result is a sort of vague count "I spent about 5 hours programming, and about 2 hours production support and 1 hour administrative"
However, any computer programmer who is exhausted by heads down coding should probably find something better to do. When I was in my twenties I often would code for 10-12 hours a day for stretches lasting as long as a month. I think I once did 20 hour days for 4 weeks with really no break on weekends. Not that it was healthy, but as far as just pounding out code, testing it, packaging it for UAT and then moving on, I was pretty non-stop. Now that I am 40 I prefer not to do that however I had a project in which I lost my coder to another project and suddenly had to fill in for 8 weeks that wasn't on my schedule. I did a few all nighters, and certainly was averaging 14 hours per day for about 2 weeks, mostly coding.
Obviously that doesn't just mean writing a line of code a minute. It does involve testing things, finding answers to problems, designing algorithms, refactoring, but if you think programming is purely a function of typing out commands then I suspect you are writing trivial code.
In any case, I don't want to judge, and I don't think people are being fair talking about you being lazy. It is VERY difficult to really code productively when you have to break every hour. I find that I like to set myself up for 4 hour slots for programming, so that I can really warm up, get into the right head and have time to really complete a few significant things.
Still I think about programming when I am showering, or eating, or walking. Thinking is a big part of my job. Its really a challenge to just program at work and then stop thinking about it afterwards.
The real question always has to be, are you delivering what you promise to deliver on time. If you are having trouble getting things done on time then you have to worry about how you are organizing yourself. If you are feeling like you just can't program more than a certain number of hours a week without your head hurting then get a better monitor.
This livescience.com article on about the navy seals said:
"Their capacity to excel mentally and physically is widely known. These findings suggest that this may be achieved not by greater effort but by reducing effort when not needed and increasing it in relevant conditions. They appear to be able to appropriately tune their behavior to the environment."
How many more years will slashdot have an off-by-one error on your Score in your profile?
Have gnu, will travel.
How about if I just pay the gardener $100 to trim the hedges and mow the lawn, and then not worry about how long he spends doing it. This hourly wage thing is nonsense.
Are a workaholic. And you can never get enough workahol.
Science advances one funeral at a time- Max Planck
30-40 hours a week
Still going strong for 16 years already!
Yeah! I'm a geek. who the fuck cares?
I believe that coding and doing mathematics is quite similar; you have a certain amount of "mana" that only lasts for so long. A potion of mana, a.k.a. Red Bull (name your poison here), can make you stay focused a bit longer, but I believe you can only produce a certain amount of intellectual work each day. I usually don't do scheduled research math for more than four hours a day. It does not work that way anyways, insight cannot be scheduled.
I usually program about 5 hours a week. The other 35 work hours are spent thinking about code. One well-considered line of code is worth a thousand lines of stream-of-conciousness code vomit.
It's surprisingly important to feed your head when you code. Ratiocination takes a lot of energy and expends certain nutrients. Make sure you're getting an ample diet, with a significant amount of animal fat, beef or pork preferred. Take a multivitamin every day. Dieting while coding may not work well, with the possible exception of a low-carb style diet.
I code part-time at work (it's secondary to my support role) and some weeks I'll put in a good 30 hours of coding. It all depends on my other workloads and what I need to get programmed that week.
...in a given week I do about 15 minutes of real work.
My experience is that 40 hours is quite possible however I will need more sleep and of course enough insight in to the task at hand to keep going for that long which is quite unusual
To those doing all the UML bashing...
Have you ever used it, or more to the point, have you ever used it properly ?
I find it hard to believe that anyone with any experience with it at all would take that stand. It's not because I think it's particularly easier to create a complex object oriented design using diagrams - that depends more on the particular project as well as the experience of the developer. No, the real reason I find it indispensable is that (unlike apparently some of the bashers here) I have to communicate my designs to people that are not software engineers (i.e. customers, managers,etc.). These folks may not even understand the language I'm developing in - or care, but if I've done a good job, they can understand the diagrams.
That macho "real programmers don't use UML" crap doesn't fly with me, and I've been around long enough to have used Rumbaugh, Booch and Fusion before it became UML.
Real programmers (at least any that I would employ) use whatever is the most efficient tool for the given task. You can keep you're "I only program using vi" attitude and get washed out by a college grad or offshore resource willing to work for a fraction of your rate who understands the basic principle that for a design to be good it must be comprehensible by someone besides the designer.
Now get off my lawn!
Sometimes the light at the end of the tunnel is the headlight of an oncoming train.
Maintaining antiquated code on a platform with no appreciable version control and clueless superiors? 20 hours per week, tops.
Writing something well that will be useful and is actually interesting? A hundred, easily.
If you work for a company that does projects for other people and bills them by the hour, you don't have that luxury. A client isn't going to pay for your video game break, and you boss will fire you for wasting your time (and his money).
See, this is what I don't get. If you go on break, you aren't on the clock. If you aren't on the clock, they aren't paying you. If they aren't paying you, you aren't wasting their money. So what's the problem?
i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
If you are not actually coding for at least 60 hours a week, you are a pussy. Get a real job a write some code instead of posting bullshit on Slashdot. Pussy.
Definitions: Typing code, and thinking as a process where typing is the end result, are work. Thinking about something else, which is healthy and necessary, is a break, and shouldn't count against accrued leave or set as unpaid time. I don't have a developer on my staff who doesn't routinely put in 6 solid hours of work. I've also had developers writers-blocked take breaks, one which lasted the better part of two days. I can't imagine a developer putting in only 20 hours and meeting my milestones, but neither would I particularly care if I had one.
I spent one spring about a decade ago at a large financial concern somewhere near Malvern, PA. To give an idea of the flavor of the place, ever time the assets grew by $10Bn dollars the employees got a slightly-less-business casual Friday. I flew in to work on the deployment of the web-services session authentication mechanism and got a desk in the contractor section next to an experienced Cobol programmer. Compared to most web deployments the work was going wicked slow. Between drafting specs, reviewing specs, project meetings, etc. the cobol programmer meant it when she said "a good day was creating 25 lines of Cobol."
I guess when you're working at a place where the tiniest error could propagate through transactions affecting hundreds of billions of dollars in assets, you stress-out over the smallest changes. Somewhere between caring for other people's money, or writing software that deals with life and death (say, how do you emulate in software the effects of the mechanical system when someone presses on the gas and the brake at the same time?) and the far end of the scale where something innocuous happens, is a happy medium for you and your particular product.
Keep in mind that programmers roll of the assembly line every day, hopefully the position you are in now delivers value added above just cranking out code and value which is appreciated by the company and recognized as part of your position.
I felt that coding is like running a marathon and the manager is like the coach. More often than not the athlete knows his stuff better than the coach does. The athlete needs to constantly exhibit exertion while the coach may do little to nothing.
God spoke to me.
I'm a psychology student and programming, when I do any, is merely a hobby for me.
Property is theft.
is that you?
http://www.supermanhomepage.com/movies/movies.php?topic=m-movie3
intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
I just sat back and thought to myself, "This thread is awesome!". Its great chatting to other like-minded programmers.
I'm a bit of a visionary sometimes and I often think, if enough programmers got together we could develop some pretty crazy and amazing stuff. Thats why Microsoft and Google do so well, both of them treat the programmers/developers very well.
This seemed like a reasonable sig at the time.
When we talk about getting in the zone, I think there are two types of problems that need to be considered. First, there is the abstract, technical, or otherwise difficult problem that can only be solved with a short-term burst of extreme concentration and mental effort. Then there is the type of problem that requires a great deal of familiarity with disparate variables, classes, objects, or other pieces to a puzzle. When these pieces are all loaded into your personal RAM, a solution becomes tractable, but which if you try to look at the issues piecemeal, some here and some tomorrow, you may not be able to solve. These generally take a large chunk of devoted time in a single sitting. Both of these problems are mentally taxing.
I've found in my computing/coding/developing that these periods of solid work can really zap my energy, not because they're not interesting or because I'm not up to the task, but occasionally it just requires a great deal of mental effort. Even when a problem is technically simple, it can require much mental energy, as if I were just multiplying large numbers in my head--the process is known to a first grade pupil, but it still takes a special effort to actually do it.
So, I think I know how you feel about programming, but I'm sorry I can't answer your question about whether it's okay to surf the web and etc while you're on the clock. On the one hand, it doesn't appear to be fair to the employer, and on the other hand it appears to be a nice mindless respite required for you to relax so you can get back to your work refreshed and ready for another heave-ho. An employer might say something like, well, how about if you work on less intense programming for your breaks -- clean up a script, or change the appearance of one thing or another, type up a report, answer some email, or find something mindless which contributes to the company/community.
I think there has been some hyperbole here, saying if you can do in 1 hour what others do in 8, then why not--I see what they mean. You seem pretty reasonable, so I think you're handling it alright. Your maximum efficiency level should be a high priority for you, but another should be how you are perceived by your managers and coworkers, so keep this in mind as well, since it may affect your pay or your career. Of course, your sanity is also important, so try to hang on to that. I think you should try reading Tracy Kidder's book "Soul of a New Machine." http://tiny.cc/bv3sf It's the story of the workers in a company that designed and built a new 32-bit computer in one year in the late 70's. Their lives were totally committed to cranking this out, and they did it, but some of them cracked. Oh, and it's extremely well-written. (Note: no conflict of interest here, except that I liked this and another of his books, "Mountains Beyond Mountains.")
I program 50+ hours a week for a site that gets 1.5m unique visitors a month and then find 20+ hours for my own projects. I love what I do. Do you?
...192 hours. No, wait...uh...
If I have a big project I can put in significantly more than 40 hours a week. Infact, I've put in about 30 hours programming in the last 48 hours because I have a project on at the moment. On the other hand, if my workload is lots of small tasks, bug fixes etc... I find it much harder to stay on track and probably only put in about 30 hours real programming on a week. I am definitely a thinker though. I approach a problem from a few different directions, boil it down to it's essence, then write the minimal amount of code that provides the functionality and can still be understood by a colleague who may have to maintain it somewhere down the line. There's always a balance to be struck between writing the most optimised code and writing code that can be maintained (and these days the compilers do a better job than a person optimising the vast majority of code scenarios anyway).
Blueprints are just a bunch of pretty pictures. Forget 'em! Just call in all the contractors and tell 'em to start building...
"We receive as friendly that which agrees with, we resist with dislike that which opposes us" - Faraday
Vary your activities ... whatever you do to take breaks from typing and clicking, *don't* occupy your time with more typing and clicking. Stay away from facebook (and this god forsaken place). Walk. Pick up pencil and paper and draw your solution (use case diagram, cartoon, funny dialog you imagine coming on over the support lines, anything that busts you out of your rut). Sort your paper files. Consider your day/week/month/year and do some planning.
Being tired from coding (particularly if you're not getting into the zone) is not so bad; sometimes it's a signal that you need to do something else for a bit.
Now, as a VP of Tech in my mid 50's I code for sanity! Though now I only manage 10 to 15 hours a week. But there were 20+ years of serial months of 65+ hour weeks and living on 3-4 hours to make the release. I miss those days of singular focus. Now have a staff of developers that are all stars in one form or another. When I hire I look for smart people and let them do what they do. I value symmetry in their lives. If they can strike a healthy balance between home life and work productivity they are rewarded. I always take the heat for headcount and yes we do have then highest FTE rate in the company but you always get what you pay for.
I don't measure performance by the clock, rather the achievement. We live in a no excuses environment and from the start we take responsibility for our actions. I'll take 20 hours of cogent well thought out code to 80 hours of slash and hack...So if it takes you 80 hours to produce the result...there better be great code because I'm going to look...and if you try and bullshit me...I'll hand what's left of your balls back to you on a bed of rice with a little wasabi as I walk you to the door. It's only happened twice in the last 10 years I've been with the company.
So if there is any advice this recovering manager can offer, it's "Live and Code like really matters to you". Do your internal best given your skill set and experience. Learn something new everyday, the half-life of your current technology knowledge is a couple years at best. And finally, remember your manager always has fresh wasabi and his rice cooker plugged in.
Fooey. How do you calculate the value of thought?
Maybe playing Tetris is what makes this guy tick. Who can say? The customer has a project. It is expected to take X hours. An engineer gets it done in X hours to your satisfaction. If 0.9*X is spent playing Tetris...who cares? Everyone at the end game got what they want.
Me, I get most of my best ideas in the shower in the morning before I go in to work. Should I bill the customer for all the time I spend in the tub?
Seriously - it's about the bottom line here. Is everyone happy? That's the final metric. What happens along the path is secondary to that.
Weaselmancer
rediculous.
168?
What you're describing isn't my bad idea, it's your bad managers. If they miss their estimates by orders of magnitude it's not your problem. Or mine. It's theirs.
Your managers need to do their due diligence.
In my case I have good managers. They get solid specs from the customer, consult us engineers about the details...then we hammer out a schedule collectively. It's never off by much since we collaborate.
Weaselmancer
rediculous.
Actual, 50-60.
Sucks
I'd very loosely estimate that I can average 20 hours per week. If I "crunch" up to 60 hours per week for 3 weeks or so, I get something like writer's block, where I *just can't type in the code* even though I know exactly what needs to be done. I was working on a menu system for Open GL for about three weeks lately, and when I fiddled around with glCopyPixels() for icons, I found that I couldn't specify a non-zero origin for the source. I knew perfectly well that I could blit a sub-bitmap from system memory to a buffer for OGL to upload, but I just *could not* type in the necessary code (which should have taken 5 minutes). If I push hard enough, I get physically ill, with nausea and backaches.
I work as a developer consultant. On most projects, thanks to agile (read: slave-driving) methodologies, I bill the client for approximately 80% of a given day for actual coding time. The remainder is spent on meetings, communicating with BAs and PMs, estimating hours, and performing SCM update-build-commit cycles when completing tickets that describe my units of work.
We bill a full 8h/day to the client for client work; anything tangential to client work -- such as talking to HR, or doing internal infrastructure stuff, or chatting with co-workers, or attending local networking events (which is not only required of us, but we are strongly encouraged to help build our presence by wrangling speaking engagements, etc.), attending company meetings and social events to bond with our co-workers, etc. -- must occur outside this time.
In all, I typically bill the client for 8.5-11 hour days, every day. We obviously do not bill for lunch time (indeed, this does not count as part of the work day; I don't know who these people are who work 9-5 jobs with 0.5-1h lunch breaks included in that 9-5 period, such that their actual, non-lunch work hours are = 7.5h/day). I do not spend time surfing e.g. Slashdot at work during non-lunch time, because my PM or architect would chide me for it because we're in "crunch mode" -- and have been for the last 3 months, and will be through the end of June (6 months of "crunch mode"? Yes, really).
And I'm paid salary for 8h/day, and not a minute more. But "work ethic" (that horrendous Puritanical piece of bullshit IT people and especially their management like to moralistically parade-around and push on everyone else because such people have no lives and few friends and are hence under-socialized) demands we work more than that -- that we work for free. You only find that sort of free-labor communism in 2 types of economies: communist, "work for the good of everyone" nations, and capitalist "work for the good of everyone in your firm" nations. Oh wait - that's everywhere...
And we should, everywhere, oppose such IT slavery. I propose starting a union.
A true programmer is like a true Klingon. The true programmer can program all day, BECAUSE he is a programmer. He breathes it, it is his honor and his life.
If you don't mind meetings because they give you a break from programming, perhaps this is a sign that you should try something else. Perhaps your heart isn't truly Klingon, longing to do battle with the code.
I think your heart must instead be Romulan. You should try management.
Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
Those managers who judge a persons worth based on hours or lines of code should
be fired for incompetence.
It is difficult to code much more than 10-15 hours in a session, not in a week. Small breaks should be allowed, away from the computer and TV.
If you get stuck, get outside. Get fresh air, go for a run. Get away from the keyboard.
If it is at work, they might not like you going out for a run / walk. But it should be no problem coding 4-5 hours a day for 5 days a week. Much more than that requires more breaks away from the computer.
If you code at many different things, efficiency goes down. It always take time to adjust to another piece of software. Sometimes you need to spend time finding solutions on the net, but I consider this part of coding as well.
Seriously, my favorite style of work is 48 hours non-stop (light food only, tons of cofee and good music), finish the deliverable, go get drunk and pass-out. Don't touch any work-activity for next 1-2 days. I get more work done in those 2 days that in regular 2 months of 9to5 work style peppered with meetings and interruptions.
If I have 15 minutes left until a meeting or lunch, I don't even bother starting on a task, its just waste of brain power, it takes me more to enter "the zone".
I generally do 80 hours coding/debugging documentation (over 6 days) across three projects and two programming languages (five if you count HTML, CSS, JavaScript, Ruby and Delphi as separate languages).
I do find that by day six I am mentally exhausted and need a day off, which means no PC time at all.
A day off used to mean playing with a side project... but that got too exhausting.
What burns me out more than straight coding is sitting in an office landscape under scrutiny by peers and my bosses. I have some severe ADHD and work at much higher speeds but I also get very easily annoyed and distracted by the constant chatter and banter around me. If I work from home I get done in an hour what my average colleague gets done in a day but at work I can't focus for shit. I'm no supercoder, I get shit done and working, I'm not like one of my colleagues which is just awesome and holds seminars all over and is called inn as a codeninja on projects but I get shit done.
What is also straineous is the fact that I work at multiple projects at once in a company where communication is very bad. One project has stagnated for 2 years due to people just not doing their job or replying to mails (10k+ employees in several towns working together). Some days I can sit even with 4+ projects and have nothing to do because I'm waiting for people to respond or do their part, it's fucking annoying.
I hope to move on to somewhere I can work from home though just to lessen the strain from my ADHD and the fact that I find most people to be imbicils.
I vaguely recall reading a study about the optimum work week for thoughtworkers. I've often cursed myself for not keeping a link or reference around. Maybe someone else might help me find it? I think it was a german study. The conclusion was that 25h per week produced optimal results. The number might be a bit off but the idea is about right.
These days I find after I solve the problem I havent the desire to code it Ive become Wally in my old age. (mid 40's)
I have done 10 to 15 hours straight on a project, and been wiped after that, but the most interesting time I was working with two other guys to redesign/redo a program in Smalltalk. We were essentially doing triples programming and we found that 6 hours was just about all we could handle. 3 hours in the morning, lunch, 3 hours in the afternoon and then we were basically wiped. After that we could do email or other unrelated things, but not programming.
The level of concentration in that effort was as high as I've achieved -- we were in the unusual position of basically knowing everything we needed to know, so we didn't need to spend time investigating this API or that library or what the requirements were -- we could focus on exploring the design space, implementing and testing.
It was exhilarating but exhausting.
I can honestly say that it's possible to pull 80 hour weeks during a coding binge. Now that includes meal breaks (that usually included dragging along listings that let you do some debugging, rearranging, etc. while eating; they double as a placemat, too) and sessions standing in front of a blackboard (sort of tells ya how long ago it was that I did this) working out the flow and logic of the code. Luckily I only did that for 3-4 four weeks while I was in grad school working over the summer. Most other weeks were only 50-60 hours. :-D
CUR ALLOC 20195.....5804M
Here's an article about Richard Feynman's spinning dinner plate at Cornell University. It's an excellcent read about mental productivity- how insight into angular momentum came from thinking about something simple and at the time he was feeling worn out and a bit depressed.
http://www.news.cornell.edu/chronicle/05/3.24.05/CUplate.html
Awesome; I respect this. I myself spend a good part of my work time looking at art online or slashdot or just reading online ... but when I code, I go into the zone and get things build solid quick -- and I'm always available when something comes up. So I'm in the office 9-5, coding chunks of that time, organizing my tasks part of the time, designing part of thet time ... and relaxing / playing part of it. The recreation increases/helps my creativity and prevents me from being burned out at 5 when I go home to my wife and young daughter.
There were times when I would actually code for 35-45 hours a week. Assuming "code" includes the wrote, run, crash, debug, rinse and repeat cycle.
These days I am lucky if I actually code more then 5 hours a week on average. I spend most of my times doing administrative tasks, being interrupted by coworkers and attending ineffective meetings.
Normal.
Back when I was younger and a grad student I'd typically work 8 to 12 hours a day, 7 days a week on work projects, particularly when there were deadlines. I'd do this for several months at a time, meet the deadline, do some cleanup for a week and take a week off. Most of this was creating new code as I was developing software. I've done this for shorter times since then, like a few days at a time to solve problems for customers at another job. I've done the 8 to 12 hours/day 7 days a week for a couple months several times.
I'm now diabetic and have diabetic eye problems and can't focus on the computer screen well enough to reliably do more then around 10 hours computer work a week. I really miss the ability to program or read tech manuals.
I think the posters above have covered the hours-worked vs. actual productivity metrics, but for me the number of hours I can work is directly related to how much my mental framework needs to load and unload given projects. I work on a few different pet projects, each of which has multiple components (web-based, databases, perl/python, whatever). Once I've sort of mentally loaded the specifics of the area of code I'm working on - the relevant functions, the tables, the variable spaces, etc - I can go like mad for hours. The "zone" ppl are talking about. Even if I have to walk away for a day or two, if that was the last thing I was doing I still have most of it in working memory and after a few minutes catching up I can get right back into the groove. On the other hand, jumping to a whole new piece of code is going to require significantly more mental effort to refresh my memory of what all the fiddly-bits do and where I need to start the changes/updates/whatever.
Thus we see the results of not reading actual books, thinking video that jumps around rather than giving you actual viewpoints is "edgy", and that anything intelligible can be written in the 140 chars that were intended for a ball and chain (aka a pager).
I've had plenty of projects and jobs over my career where I was wotking 30-40 hours a day, no meetings, for weeks or months, straight development cycles - making flow charts or reading Revealed Specs, code, test, debug....
The real question about "are you stealing" is whether you're actually getting your work done, or falling behind.
mark
Hey, are you a coffee drinker?
For myself, I've noticed that if I drink lots of coffee, I can think really fast for a few hours (note: fast != better), but then I've tuckered myself out and I can't keep going at the end of the work day.
Try cutting back your caffeine intake and see how it compares. Let us know how it goes!
That's where the afternoon double mocha comes in. :)
Qxe4
In my earlier years, being full of piss and vinegar, I was coding a minimum of 40 hours a week and up to 60 or even 70 hours. After working for several companies and a slew of projects, most of which generated millions in income for the business, I did a project that almost killed me. In order to hit the deadline, I worked on average 13.6 hours everyday for 4 months. I was beyond burned out, mentally exhausted, and just overall fried. Before delivery on the project I wanted to settle on the fees due for all the overtime, which quickly became a problem, even though every minute was logged. My philosophy on coding drastically changed after that.
Here is the truth and reality for every programmer. Any company you code for will take their sweet time coming up with specs and approval for a project. By the time you get it, they will undoubtedly want it yesterday, so you'll always be under a tight time crunch. You could have no life and kill yourself coding it and at the end get a shinny star or "great job" comment. If you work in a salary position, you may gain some respect, or even best case a small bonus, but is it really worth it? Unless you have a vested interest in the company, through something like stock options or profit sharing, it is worth it in the end. I suppose that is something to be answered on an individual basis. Personally for me, this is why I quit being a System Admin and became a programmer. I don't want to be on call 24/7 and when I've gone home for the day, I'm on my time.
As to if it's stealing doing less than 40 hours, well that's a question of ethics really, with no universal black and white answer. Although I believe most companies expect a certain amount of lost time during a day, they are for the most part paying you to work each day. Pride (or the lack there of) in doing what you do will determine the quality of your work. Easily the majority of businesses have little to no ethics or honor in how they conduct business. Most business models are based on the final profits, with little consideration as to how they got there, so long as the amount grows. I still believe any company making a quality product or service can make a good profit and still have honor. While it is easy to fall into what is common place in the business world and it's practices, I'd ask yourself if you believe it's fair and justified working 20 hours for a 40 hour paycheck. Would you have the same view if you were the employer instead of the employee? In the end, you are the only one that has to live with the choice, but remember that we are what we do - not what we think, believe, or say. Actions define a person.
I would die for the day where I could get a chance to program 40 hours a week. I think I get about an hours worth of actual programming done during the week. The rest is spent dealing / haggling with process related overheads, testers, test managers, managers and meetings.
If I'm REALLY into it, I'll fucking write code till my eyes bleed green shit. If I hate the project I'll hate my life and start plotting to kill innocents.
So on a good week, I'll code 50 hours, on a shit week.... maybe 5.
The problem is when you get into that ZONE.. and you code hard and forget all about reality, you are on the path to burning out. It's not a matter of if but a matter of when. Then you're fucked because nobody wants a burnt out c0der.
I once worked for a software company where the owner said that programmers should not work more than forty hours a week, except in VERY rare emergencies. He based that on the observation that the programming done after the eight hour a day limit often required reworking, thus negating the gains achieved by overtime.
As far as my maximum effectiveness level, I could usually do about twenty hours hours of programming a week, including doing pseudo-code for some of the more complex bits of code. The rest of the time was spent in testing, tweaking and making sure that the new code works as desired, plus the standard overhead of keeping up the skill sets.
I consider the process of programming to be a job that requires a lot of brain sweat if you are trying for something that works and works well. After you reach a limit your mind needs a break, otherwise you end up with headaches or other stress related problems.
I seem to get a burst of creativity around 30 minutes before the end of the day, especially if I have to be somewhere after work.
There may be no "I" in team, but there's also no "F" in way.
40 ain't hard at all. I used to work 11hr days 6.5 days a week writing games. Of course I burnt out after a few months doing it, but coming back to 40 is an absolute breeze and have been doing that for years now.
You should toughen up: http://www.youtube.com/watch?v=unkIVvjZc9Y
Perhaps purchasing this (therapeutic?) wristband can help: http://store.ronniejohns.com/?show_product=HTFU
was my longest I think. 80+ per week was routine on some contracts.
oh yeah, and it was uphill both ways, in the snow, using rocks for a computer... but we didn't complain about it.. we liked it like that!
The tyrant will always find a pretext for his tyranny - Aesop
Next time this happens yell out to an imaginary colleague somewhere on the other side of the cube farm "Frank! Hey Frank! Were you able to purge all the trojans from our latest release? Bob needs to decide if we can fix this quietly or if we have to inform our customers."