4 ms·
What is coding? Actively typing in code, maybe 30 minutes long term average, with spikes up to 8 to 10 hours when the road ahead is clear and what to do is obv
by barrkel 2y ago
What is coding?
Actively typing in code, maybe 30 minutes long term average, with spikes up to 8 to 10 hours when the road ahead is clear and what to do is obvious, which happens about once a year for a few weeks. It's quite rare outside of greenfield, which itself is rare. It's much more common in hobby projects.
Debugging? Sometimes I can spend several days debugging a problem, not actively writing any code which goes into production, but creating harnesses, ad-hoc logging, verification / assertion routines and so on. The amount this averages to depends heavily on the maturity of the product and the health of the code. A mature product with a gnarly codebase means a lot more time debugging.
Reading code? I spend a fair amount of time reading and analyzing code before a chunky task, figuring out where the seams are, where the data I need comes from, what the best places to add code are, figuring out data flow. When I'm at the start of a task like that, I can do that for 3 or 4 hours a day. But long term average, it's more like 10 to 20 minutes?
Reviewing code: this is similar but different to reading code. I don't do as in-depth reading as I do for a task, but if I find something suspicious and I want to make sure I'm right, I can go for an hour or two on research, to prevent something problematic hitting production. But I guess this averages about 20 to 30 minutes a day long-term. I don't do as much code review as I used to when I was more senior roles before. Expect a lot more code review with more seniority.
- perrygeo 2y agoWell said. Reading, debugging, reviewing - provides a nice taxonomy for the things we do with code when we're not writing lines of code. I'd also include time spent in books, forums, and documentation as reading about code; sometimes you need the concepts in plain language. Given this broader definition of coding, I'd say I do roughly 6 hours a day, with 2 hours spent on email/meetings/etc. The time spent actually writing lines of production code is significant but highly variable - maybe 0 hours for the first week, 25 hours the next. Only when "the road ahead is clear", as you said. So the primary work of software engineer tends to be "clear a path so that I can write code" - which involves reading, debugging, reviewing...