Poll: How much of your work time is typing code?

26 points by joss82 ↗ HN
Also, are you happy with that percentage? How much would your target be?

51 comments

[ 4.4 ms ] story [ 113 ms ] thread
1% or even less!
And why is that? Do you hate it or like it?
i really like it it is that most of the time is spent in debugging and planning!
if its less than 1% then why are you on this board?
jajajajajaja

...

man! everybody has a right to be here! don't they
I try not to start writing code until I am at the point where it's pretty much just typing. It doesn't always work out this way, and it isn't necessarily always the right move, but it forces me to have a really clear mental model of the problem in question before I start committing things to paper (so to speak), which typically saves a refactoring or two down the road.
I usually end up doing a lot of the thinking about the problem while talking to whoever is requesting it. That's the only way to guide them to easier, cheaper, cleaner paths. There's still a lot of finer details to work through, but it's usually enough to get started coding.
I do something similar. About 10 years ago or so I decided to force myself into writing the results of that sort of interaction down in a notebook, which forces me to rethink it as I convert it into user stories. This explicit step of recapitulating the same ideas repeatedly has had a lot of positive benefits for me.
Easily less than 1%. The code is just the manifestation of the solution that I spent most my time coming up with.

I am actually annoyed when I need to use Java because it triples my typing time compared to Python.

So, in the end, if it affects less than 1% of your time, language choice is not such a big deal for you, right?
Correct, although some languages fit my thinking better than others. Sometimes features are missing that can lead to really convoluted workarounds that would greatly increase the amount I need to type.
Alternatively, language choice is a big deal for him, as it has increased his productivity so he can focus on not-coding activities.
I'm not sure that follows. The idea that language choice is something that only comes into to play during the mechanical motions of banging your fingers upon the keyboard strikes me as wrong-headed.

If we agree with Wittgenstein that "The limits of my language mean the limits of my world", language choice profoundly affected the time he spent thinking about his solution, not just the time he spent inputting it.

On the plus side it only adds 2% additional time to a given project.
java doesn't just triple characters typed -- java changes the way you model the solution, most notably by making 'nouns' so easy and 'verbs' so hard. in fact, due to the 15% or whatever shown in this poll, i wonder if verbosity isn't really that big a deal. nor is VIM.
It will differ according to the problem I am solving. But in general, I need to see the code in my head before I type it.

Management may like to call you a coder(or worse, a resource) but don't be fooled, you solve problems first and foremost. Sometimes solving the problem doesn't require any code at all.

Its more of cut & paste now-a-days
I just assemble a 3d rubik's cube in between trips down to the wine cellar.
is there such thing as a non-3d Rubik's cube?
I imagine this depends a lot on the sort of problems you're trying to solve.

Also, a lot of my code is experimental, or adding more logging to diagnose the problem - does it count if I erase half of the code I write at the end of the day?

> [D]oes it count if I erase half of the code I write at the end of the day?

The best day of any programming career comes when you successfully refactor a massive monolith of a function into a well designed set of classes with predictable interaction, and can tell people you wrote negative seven hundred lines of code.

you lost me at 'set of "classes"'
Last week I spent 17.5 hours in MacVim, 7 hours in a shell, and 2 hours on Github. That's out of 42 total recorded hours. On a related note, I love RescueTime.
25% and this seems to be the average for everyone so far.

I'm not happy about it. Meetings and decision making takes most of the time.

In theory that is ok, but in reality those meetings and decisions are actually very slow. I'm expert in my field and I know most of my decisions are the correct and best ones, however I have to explain it to others, and usually they come to the same conclusion as me - but it takes a week for that process.

I would like if at least 50% of the time was actual coding or setup or w/e kind of "actual work", because discussions don't make me feel like I'm progressing.

I think it really depends on what's filling the remainder of your time. If I'm working on something difficult, and I spend that time talking my thoughts over with someone else, that's going to feel great. If I have only trivial work to do, but meetings and other bureaucratic nonsense get in the way, I'm going to feel like shit.
this is such a great question.

It really depends on if you are coming up w/ something new, or working on trying to get something up, you have already done ( think web app w/ 50 reports all w/ json datasets visualized by javascript ).

(comment deleted)
Isn't this like trying to measure a coastline (approximates a fractal at larger scales).

The finer interval that you measure the smaller the percentage will be:

Level1: I spend 4 days out of five coding (80%) Level2: I spend 4 hours out of 8 on those days (40%) Level3: I spend 2 hours out of those 4, bathroom breaks, code sketching, extended thinking time (20%) Level4: I spend 1 hour out of those 2, reading notes as you type, interruptions, "fatigue" pauses (10%) Level5: I spend 20 mins of that hour, pauses between keypresses, etc.. (3%)

So it's either 80% or 3% depending on your zoom level.

Exactly my problem with time spent typing code as a metric for efficiency/productivity.
What's the value of this question? I voted (w/ a wild guess), but I'd like to understand the motivation.
This is poignant as I just left a 3 hour scrum "sprint planning" meeting. I'm reminded of what Hal Abelson wrote in his recent Code Quarterly interview with Peter Seibel:

"I’ve decided that from now on, I should be measuring the quality of my life by the ratio of the amount of time spent programming to the amount of time sitting in meetings."

http://www.codequarterly.com/2011/hal-abelson/

Yeah it's hilarious how the original "let's get things done and plan this sprint" has been replaced by run-of-the-mill ass-covering and bean counting and pushing for sloppier software on shorter deadlines. If you can't change people's motivations, no process is going to help you produce better software.
Type? I do like Zed Shaw does, it gets melded from my thoughts via z-shank implants..
I have been programming since I was 13. But now that I'm in my late 20's, like a lot of developers, I've moved into the management side. It feels weird sometimes to ship a project that I have been working on for weeks but not actually contributed any code to, but at the end of the day there is a shortage of good project managers so somebody has to do it.

For me it's 1%.

I'll say about 25% and I am NOT happy. I would much prefer it to be 80-95% range. The customer support, administrivia etc drains the very life out of me!
Typically only a very small fraction of the time is spent typing (<10%). Often I have been described as looking as if I'm praying, but actually I'm just thinking.
Where's the "don't know, haven't measured it" option?

Without measurements this data does not mean anything.

5%, but if you take out the time I am writing console.log, 1% or less.
Working on an implementation > working on a code by thinking of it > typing code.

Still, all activities above are strictly technical.

So, is your question really about whether we have as much time for technical activities (as opposed to bureaucracy, marketing, managing, selling...) as we'd like to? Or is your question about how our time devoted to strictly technical things is organized?

FWIW, I recommend RHickey's "Hammock-driven development" to think of it more..

I'd prefer if this question was "How much of your work time is spent developing?"

I spend very little of my day writing code. Yet it's the sole reason I'm employable. I do spend a majority of my workday working on design, development and implementation (code)... this does include meetings, emails and written documentation.

I feel like the question "How much of your work time is spent not doing work" would give better information