So not including writing config files for build systems, setting up the architecture, cleaning up git branches, reading documentation, trying to find the right framework or plugin, learning new stuff, etc.
Just plain old solving problems with code.
The 10%'ers seems really low and the 95% from @JanVladimirMostert seems just a bit to high. It's also, context specific IMO. Am i trying to solve for something I've never done before or is it just another day installing Wordpress, building a custom newsletter system or a static page?
Stuff I know how to do / have done dozens of times? 95% probably is spent writing code that'll directly go into production. I may have to google a specific Wordpress function or a CSS property that's escaped me, but that shouldn't take more then moments to remember / find.
Something I don't know how to do? Say... sending a text message via PHP / Twillio ? (which I actually know how to do) If I had to think back to the first time I did that, it was probably 75% writing code and 25% reading the docs.
Learning a new framework? I'd think 0% of the time is on code that'll make it into production until I'm actually comfortable with using the framework in production. But then, you could say, what you learned will eventually make it into production because programming is all about experience. What I learn today may be used for years in production code on various projects. Ie: when I first learned AJS - it was probably 25% of the time, code being written for production and 75% learning. Now (2 years later) it's closer to 90% of the time code being written for production and 10% on a quick search here and there to see if theres a pre-made directive / filter / service to do X or if I have to write my own.
Roughly 10% of my time is probably accurate, the rest is spent thinking, discussing, grokking, and writing those pesky things we call unit tests :)
And for all those who want to quantify their time spent coding:
I use it, it's quite amazing, and can spark a lot of competition to see who codes the most. I recommend this to anyone who's not used or heard of it before :).
Writing the code itself - only about 10%. The rest is problem solving:
My most often used IDE is a notepad (not a software) and a pencil.
Also communicating, writing (not code, but docs, answers, etc) and reading (you always have to learn new things).
Mario Hartman
Software and coffee lover!
I would say that 20% is the time that I spent coding the solution, the rest of the time in my case is used in the following tasks:
all these things are part of my working day.