Ask HN: How many hours per day do you work?

236 points by Akcium ↗ HN
I'm trying to log my time via timer app (manually switching it on when I code). Plus I use an app which checks what apps I use every minute.

It turns out that:

- I barely can code for more than 4 hours per day

- I have max. 60% of "productive" time, which means that 60% of time apps like IDE are open. The rest goes to random stuff, like messaging/youtube etc.

So I'm curious. I know that there are tons of articles saying that you can't be productive all the day.

But what's in real life?

Are there any persons who can work, say, 8+ hours? I mean, really work, not be at office.

185 comments

[ 3.3 ms ] story [ 239 ms ] thread
For me it really depends on the project. When I joined my current company we were much much smaller (6 engineers total), and there was a lot of new stuff to be built. I could easily work 8+ hours in a day, of actual coding.

Now, I probably get closer to 5-6. Though that may be impacted as well by the pandemic, where work from home is finally catching up with my productivity (been work from home since March).

Depends on what I'm working on. If I'm working on something that I made from scratch and totally understand, and it's something that I'm skilled at, I can go for 11 hours. If I'm doing something totally new and trying to understand code that someone else wrote, I struggle to be productive for 2 hours.
Productive work: probably 4-5 hours

All work related task (email / slack / reading the news / paperwork / ...): 8 hours

Time at my desk: 11 hours

I can work all day, but I have vast diminishing returns after hours 4 or 5. Especially if the work is intellectually complex or tiresome in any way. Oftentimes I overextend myself out of necessity - but usually work becomes exponentially stressful or futile at that point.
You can easily do routine work for 8+ hours daily. The sort of work that can potentially be automated one day. What you call "coding" is routine enough in my book.

But if you're doing something novel and solving hard problems, I think 4-5 hours would be a maximum for sure.

How can you presume to know if their coding is "routine" or not?
I 'think' they mean the universal you. Sometimes replaced with 'one'.
What qualifies ad routine coding and hard problem solving in your book?
I would call routine coding something like you have a set of constraints and you just have to manipulate code to fit these constraints.
(comment deleted)
If it's hard, mentally taxing work then likely around 4 hours total a day.

The funny thing is I also can't really do menial, brain dead work for long either. It seems to drain a different "tank" but its much smaller.

I've done factory work before and it is single handedly the worst torture on the planet. Imagine being bored when you were in pre-college level school. Now leave yourself in that state but for 12 hours. That's factory work.
I'm a phd student in physics, I'd say about 3 or 4 hours a day
I was that student once. I can't analyze or fault your work habits, especially since physics might be even harder to measure than coding. (Of course a lot of physics is coding). There's a difference between 3-4 hours of focused work surrounded by a regular day of work, and 3-4 hours of procrastinating. I was on the wrong side of that equation.

But I was up against a number of realities: 1) My project was not in fact moving forward at a sufficient rate. Work is not static, but decays if you leave it sit there, so the progress rate has to exceed the decay rate. And it wasn't. 2) I was paying through the nose in opportunity cost. 3) I wasn't happy with myself, and in fact was kind of depressed.

A stress of grad school is that you have to be self managing, and I still don't have a good formula for overcoming this problem. But I survived and eventually finished. My advisor leaving the university put a fire under my ass, because I had to finish before the lab got demolished.

But this is the other thing to know: The risk level is extreme in terms of something bad happening that sets you back or kills your project altogether.

One thing I found was that some kinds of work were easier to get into "flow" than others. Coding was easy. So I actually let coding occur in what I might actually call spare time. Interruptions weren't as much of a problem in grad school. The boring stuff was the hardest -- grinding on a supplier to get me a price quote and then grinding on the purchasing department to send out a purchase order. That's where my procrastination really kicked in.

So, enough of the scolding. If you're doing the right thing to get through, then ignore this message. You probably know better than anybody. Best of luck!

I think my situation is quite different. I do very little coding actually too! I am quite independent and a purely theoretical physicist. I've already put out a couple of papers and would be able to continue well without my supervisor.

Although I have had really bad periods of procrastination throughout my PhD, but in general I work in short sharp bursts rather than sustained periods. You mention flow, it's hard to get into the flow when you are deriving new equations or approaches to things!

Depending on energy levels, amount of meetings and other factors I swing between 4 hours a day up to 8 of active coding. During times of severe pressure I have had a few 12 hour days (edit: This is not healthy nor sustainable for long).

This is all active code input. Tracked using Wakatime. No affiliation, just really like the service.

I also found I could code for about 4 hours, so after that I like to reply to messages and read and sketch out ideas for how to approach bugs on paper, just get off the screen. And after a while of that I’ll go for a walk or something and maybe circle back around to the code if I thought of something.

I don’t mind this at all, 8 hours of screen time is a killer and no doubt led to my bad eyesight and wonky posture staring at screens when I was younger.

>no doubt led to my bad eyesight

fyi, "staring at screens" being bad for your eyes is a myth.

from: https://www.health.harvard.edu/healthbeat/safeguarding-your-...

>Myth: Staring at a computer screen all day is bad for the eyes.

>Fact: Although using a computer will not harm your eyes, staring at a computer screen all day will contribute to eyestrain or tired eyes.

So the myth is true, unless for some reason you don't consider eyestrain and tired eyes "bad for the eyes".
Being at the office is work.

Being around, being available to inquiries, questions, support, anything, is work.

Even taking a coffee break and a nap in between two active coding sessions is work - if only because those two sessions are related in purpose, and because your mind still processes your work during the "break".

Even unproductive, lousy days when nothing gets accomplished are work; if only because it sometimes is only your mind reflecting on an issue that you will, it seems, "code in a matter of 2 hours", while in reality, it tooks the two previous days to get/discuss/put things in perspective to allow for these 2 hours to cristallize the solution.

Your productivity is in your context and output. Not in the exact quantity you put in.

The taylorist factory view just does not function at all with design/creative work.

Slightly on a tangent, but I use Timing to automatically track my time.

On GNU/Linux, there is ActivityWatch. RescueTime works cross-platform.

If it's a hobby project I'm actually interested in, I can work all day every day. But if it's something I'm forced to do at work, 3-4 hours is the most I can do in a single stretch. If I can take a ~1 hour break after that and go to the gym or something, I can do another 3-4 hours. That's why WFH has been great for me; I can take a break as needed, and don't get bored to tears after a few hours in a cubicle farm.
I can pretty easily work 8-10 hours in a day, and have done somewhat frequently in the run-up to important deadlines. I try not to because it absolutely kills my productivity for the next couple of days, so its almost always counterproductive.

Sure that one day is good but if you add up the work done on (say) the next two days the total is usually less than what you'd get if I worked normally for three days.

3-4 hours of actual work: R&D, algo development, solution design. Max.

6 hours of writing and debugging SQL, simple linux systems maintenance, writing emails or powerpoints.

8 hours/day is just impossible for me.

VPE of a startup here. I work 10 to 15 hours a day.
Not for multiple consecutive years as measured in LinkedIn tenure years you don’t (assuming weekends get impacted too since you’re pushing 8am to 11pm daily at the edge).
I wasn't speaking in hyperbole. I have worked many 3am to 6pm days, and my typical day is 8am to 6pm. I have only had a few sane days, and I don't take breaks. I feel like shit most of the time.

Thanks for the down votes though.

That's impressive. Do you think it will get better mentally at one point?

I guess what drives it all is that the work is meaningful, am I correct?

No I will burn out and probably quit within a year if we don't hire a larger team.
Don't wait. If you're feeling the burn ask for help or find something else NOW.
Same.

I have a specific schedule that I balance with caffeine pills, antacids, and advil.

I've also developed quite a few habits and strategies that help me keep pace.

Here's my virtual fist bump in solidarity.

The way I think of it, there are two sessions a day of doing difficult coding work, before and after lunch. Maybe 3 hours each.

If you interrupt one of those blocks, you can't do "difficult coding work", but you can communicate with people, document your code, and organize. The easy work can take up a lot longer, it's just not part of the block, and interrupting the block means you don't have that block.

Organizing means simple stuff like moving pieces around to where it makes sense to have them, simplifying well understood issues, and automating parts of the build.

By difficult work, I mainly mean exploratory coding work, where you write new code, see if it compiles, and whether it does what you expected. Or you are debugging something that's broken and following various hypotheses about what might be wrong.

Once you've either written the new piece or discovered the bug, you can spend time doing "organizing", where you know the answer, but you just need to spend the time moving stuff around.

I'd be lucky to have a block each day.

That makes sense to me. Organizing and documenting feels a lot more creative for me than the wtf-am-I-doing orienteering-type stuff. My attitude can definitely come down to, "Okay, either me and the computer get square, or me and the people get square about what I did with the computer. But I'd like to sleep in-between those steps."
Yep, this is really well said. Do you track your deep work hours? I'd love to get your feedback on something I'm working on (trywinston.com). Email is on the website if you want to chat.
Work: 6-16 hours a day. Depends how interesting what I'm working on is.

Personal projects: as long as necessary

It depends on exactly what you count as 'work', but if I count all the things I do for the sake of work that tie me to the computer (so counting e.g. the team's informal chat half-hour), then about 9 hours.

If you count just mentally intensive work (writing/reviewing code, writing/reviewing designs, making plans), then it's hard to do more than 4-5 hours per day (in terms of how long I can focus - days usually don't have that much free time for "real" work!)

That depends entirely on how many meetings I have that day.

No meetings? I can squeeze in a solid 5-6 hours of productive time.

Any meetings? I'll be lucky to squeeze in 2 hours.

I try to aim for 4-6 hours of real work a day but a lot depends on what you call work. If you mean stuff I get paid for, my workload is variable. If you mean doing productive stuff, I probably do around 8-12 hours a day.

I do a lot of writing, which means a lot of reading. Some of that writing I publish, a lot is not.

I develop my skills, not always in ways that are directly related to tasks I do for money, but they generally end up contributing to my income.

I also don't really have a weekend. If work needs doing, it gets done and I take the time when I don't have work. I worked 3 days in a row about 12 hours a day on a hardware project I'm shipping, building hardware, testing software, writing a manual, imaging cards. I'll do more of that this afternoon but I'm not working a large amount of hours today due to unrelated outages.

Realistically about an hour a day of truly productive work.

The rest is eaten up with unproductive zoom meetings (I'm on one now as I post this), dealing with development tooling falling over and waiting for things.

Terrible efficiency.

In this case you're choosing to be unproductive. If you're able to spend time on HN and reply during a meeting you could just as easily be fixing the root cause of development tools failing.

Protect your time, block out your calendar, and fix the root causes that create the unproductive meetings.

I'm doing that too. I am waiting for Vagrant to install Windows :)
> fix the root causes that create the unproductive meetings

BRB, fixing the org chart. /s

Unironically, this is what we did. Removed all 'layering', practically making groups of either product or tech and only 'manager' layer between that and C-level. Manager is only allowed to deal with people-stuff and PO's are only allowed to deal with product stuff. Everything else is up to the teams. Works pretty well for us! (and 'allowed' doesn't mean as a hard rule, it's just not their focus point, same goes for product vs. tech, it's not that you are walled off or something, it just means your core is very clear and how far away from that core you can get depends on your team and needs)
I'm not paid twice for working during meetings, so I don't work during meetings.
True actual coding? 2-3 hours on average, and usually at night when all others are offline (8pm-1am window). All the other BS like emailing, meetings, assisting with manual testing, responding to support related Slacks, fire fighting, setting up DB queries or visualizations, checking a result of some scheduled job (these last two being business asks / annoyances and don't happen daily but you get it), etc, results in 5-8 hours BS, 2-3 hours code.

Hobby projects I can work on for 10-12 hours straight and still feel like I could go longer, but after a three day sprint of this, I have to take at least a day off to regroup my thoughts and make sure I'm not too far away from the original intention / goal, or over-engineering.

I'd say, accounting for all of the wasted time, and weekend hours, it's probably at least 50/week. Maybe 60. (Dev work at a startup - I am an early employee with a lot of equity.)
That doesn't sound unusual.

Back in my coding days, I could get into the zone for 4-5 hour chunks of time, but only if uninterrupted, which was rare. I'd say a typical day had 2x 2.5-3 hour blocks of productive coding, the rest of the 8-10 hour work day was meetings/conversations/etc plus an hour or two of not-work (internet, walking outside, etc).

This varied quite a bit over time, based on team and project. Greenfield projects, usually done in a group with lots of peer-programming and fast iteration were quite different than solo maintenance of legacy codebases.