Global Code Time Report
software.com
software.com
But more seriously, a lot of time is eaten up by meetings, coordinating what we're going to code, thinking or discussing how we're going to code it, testing the result, reproducing bugs found, etc.
But it seems this survey also doesn't consider reading code to be coding, which makes me wonder: if having the IDE open and focusing on the code in it is not enough, and they're only interested in the actual typing, how do they count the time around the typing? If I start writing `if (` and think a moment about the condition I'm going to put in there, does that thinking not count as coding? Because if that's the case, 52 minutes sounds high.
Coding is not just typing code. Thinking is the more important part of it.
* I made this comment to my uncle whom is a minister when I was a child *
> Our takeaway: Our findings suggest that developers frequently face constraints at work that prevent them from finding uninterrupted time to code.
While the title on HN is "Report: The median developer codes 52 minutes per day", actual title on report page is "Global Code Time Report".
I think the report addresses the thinking-planning-designing parts of your comment believing these things are "issues" and need to be offloaded to someone else so that the "coders" could code. Which is a narrow way to look at things, for sure.
Having some metrics is good, but coding time is definitely a wrong one
The 'optimal' amount of coding per working day probably depends a lot on the circumstances, but I'd hope it to be substantially higher than 1 hour in most cases.
The biggest boost to my productivity was when the company gave me an iPad and an Apple Pencil to sketch out flows and logic and design iterations, then AirDrop them into the computer to turn them into code.
First off, who says their users are professional developers? Working full time? Always using the same tooling? Spend time on pair programming? Etc
Then, why make the assumption that developers must be distracted? Who even says more time spent coding == more productive developers? IME the refinement of work prior to implementatuon, e g. outlining the general structure and defining data structure & algo's takes most time and prevents a lot of (coding) rework. It also reduces how much you then actually need to spend time on the implementation.
Edit : Ive seen mgmt in old company do this.
Thats management material right there.
Sounds like “I need to hear more tappy-tappy; that way I know the developers are working.”
If your organization has devolved to the point where your best measure of focused time is less than one hour per day, you’re screwed. Instead, I think this is a case of “this was easy for us to measure; now, what can we conclude from this measurement?”
He said something like “from my point of view, this code is perfectly written”, and it actually didn’t sound arrogant, partly because it was true.
I still have to think with my fingertips (i.e. write code before I know the solution), but his is the kind of approach I strive for.
Also, there are some limits to what one can entirely store and efficiently think about in their mind.
Of course, it doesn't mean that one should always start writing code straight away without actually thinking first, or without using pen and paper to lay down some facts and think about edge cases if necessary, for example.
So for me it is better building multiple small things and then wiring them together. Only after this im capable of doing any realistic implementation planning
It's akin to praising people for generating many lines of code. But truly good programmers are the ones that write efficient, concise, and, hence, readable code.
Similarly, more planning and less typing is probably a good thing.
They wake up, judiciously hit the "{" key on their keyboard, taking a leisurely 500 msec to do so.
Immediately the floorboards start to creak. A framed cat picture shakes itself loose from its position on the desk and drops to the floor as a clinking, rattling sound of metal-on-metal builds. A deluge of gold coins is extruded from the bare earth itself as gaia supplicates herself to the 21st century god of productivity, the 100x developer. Now the sky can be seen to darken, as a tornado of 100 dollar bills sweeps over the area, hovering up the gold coins.
As the money maelstrom recedes in the distance, headed due west towards silicon valley, the 100x developer inhales deeply.
This will make a fantastic piece of motivational broetry for my linkedin, they think.
Hey, that's just what I was thinking.
Double plot twist: after the 100x dev had left for greener pastures, nobody understands the system anymore and of course the initial afternoon of coding had no time for documentation or design reviews. The system has to be re-built and this time it will be built in-house with due attention to knowledge sharing and design documentation.
Triple plot twist: Several years later someone realizes that the in-house system is overly complex and maintenance heavy, then replaces it with some glued-together open source libraries on a Friday afternoon. The cycle continues.
I interpret that as being implicit. If 3 minutes of planning are needed for 1 minute of coding, it's still alarming that half of a developers hours are going to...less important work.
I don't consider that less important work, but it does change the ratio for myself and other more senior members of my team to more like 1:6
I don't stop working until I have five hours of coding or coding related work done each day. Some work days are six hours long, others are twelve. They all have about five hours of coding.
I keep a log book and track my hours each day. If it's Saturday morning and I'm at 24 hours for the week, Saturday morning is a work day. Some of my work weeks are four days long, others are seven. They all have about 25 hours of coding.
I've been doing this for three years and I'm incredibly proud of what I've been able to accomplish by keeping myself honest and holding myself accountable. It's easy too. Keeps you from working too much or too little.
edit Coding doesn’t mean “TYPING”. I include anything related to coding that pushes the project or my understanding of it forward.
Most people work jobs where they only get paid for the time they produce. Mow lawns or do landscaping for a few summers, it’s not fun. I set my own schedule and only put in 5 hours a day. I’m done before most people would get lunch. I feel like I’m working a part-time job most weeks.
I also like what I do, most days.
The details don’t matter much, this is the important bit: “Keeps you from working too much or too little.” Plug in whatever numbers work for you or do your own thing.
If I’m spending so much time in meetings or writing emails that I can’t do the work I’m good at, I need to hire.
It’s flexible too. I spent the first four hours of most days last week watching Star Trek or doing chores before finally getting to work. And the end of every day I have a yes/no answer to the question “Did I work enough today?”
Now, if you haven’t run your own company you might never have felt “did I work enough today” gnaw at you while you’re trying to sleep to sound of your bank account draining.
I don't think this is being honest. This is choosing some arbitrary metric and sticking to it, and very much Goodhart's law in practice.
If your job takes you away from the thing you want to be doing, you should try to change your job, not work 6-day weeks or 12-hour days for your employer.
Coding doesn’t mean “typing”. I include anything related to coding that pushes the project forward.
Have you ever bootstrapped a company? I’ve done it twice successfully and once unsuccessfully. You have to figure out how to make sure you work enough without working too little. It’s not an easy balance.
This isn’t arbitrary, far from it, it’s what works naturally for me. Measured and adjusted over two decades.
Same for meetings, not a lot but planning meetings, implementation discussions etc. That is time that should be considered too.
5 hours pure coding per day is just... Not healthy in my opinion. But each to their own.
> If people are interested I can put together a post about the process.
I think that would be good as it might clear up a lot of questions.
I like what I do (even if I might not like what I’m doing on any given day) and this lets me do it in a way that doesn’t cause any damage.
I don’t have anything to sell you. I’ll write it up if I can find a way to make money off it, if not I’m happy to keep chugging along in obscurity.
Honest question. Why exactly do you do this? Just pride in your work? Or do you it makes you more effective, less stressed etc?
> I could easily work from the moment I wake up to the moment I fall asleep, seven days/week, every single day
I for better or worse don't have this inclination.
Could you detail the kind of projects you're working on?
Also, are you a consultant or working for your own company?
Have you ever worked in an environment where your ability to produce reliable code, consistently, was the only thing keeping a company running for 6-12 months? That’s bootstrapping as the sole engineer. If you break, the company will die. You have to keep yourself from working too much without working too little either. There’s no one-size-fits-all model to copy.
edit
On working for a bigger company: Yes, that’s why I don’t work at big(ger) companies.. Unless I have a lot of leverage. I wouldn’t rewrite things or over-engineer them. I would quit.
The thing is, in a big(ger) company, even if you pull in 5 hrs of coding per day, you will be limited by the average speed of the people working around you. You would soon find yourself running ahead of scoped projects, over-engineering, feeling an urge to re-write the whole codebase etc.
I had a dev job where 90% of the work was maintainence.
I searched like 1-2 days for a bug and then wrote two lines to fix it.
So, we already had this situation for decades, so I don't think there will be any skyrocketing.
In my experience places with a devops culture will actively encourage developers to do stuff beyond coding. Places with a classic corporate culture enforce a more limited scope.
> But our findings point to a more alarming hypothesis: that most companies ineffectively deploy their development teams, bogging down engineers with distractions, disruptions, and meetings as well as system inefficiencies, such as slow reviews, slow builds, and bad tools.
So what they are saying (presumably to company managements/executives) is that you can make your developers code more per day by adopting better tooling ("perhaps buy our products?"). To me, this sounds like a classic "manufacture anxiety then selling solutions" scheme.
It is also worth noting that the "developers spent most of the time thinking" argument against the claimed statistic won't stand when companies need to lay off the "low performers" based on how much time they spent coding --- after all, were you able to come up with the right solutions more quickly, you will be able to spend more time coding implementing them.
He was a disaster to the team. It felt like having someone constantly talking or screaming in the office.
He was also a terrible communicator. He talked like everyone had read his code and understood his thinking process.
I've never been happier to see someone fired.
But oh boy he was "productive".
That said, as a lead engineer/subject matter expert for my employer, at least half of my days are spent doing many non-coding things.
The closest examples I have personally is contracting and co-running my own business, where I'd just turn off all my points off contact and work. (I set my hours.)
It was way more than an hour a day of coding, let alone coding+thinking.
I thought it was great.
I could imagine eg that time-constrained devs might be more likely to install the tool than people who are happily coding away most of their working hours, but I might be wrong.
It's kind of a "chicken and egg" thing.
I often start with what I call a "napkin sketch," implement it quickly, kick the tires, and then see what needs to change.
The results are good, but the process can look messy. It involves a lot of both "thinking," and "doing."
I guess it's a good thing that I tend to work alone, eh?
The workflow:
https://littlegreenviper.com/miscellany/forensic-design-docu...
https://littlegreenviper.com/miscellany/evolutionary-design-...
The results:
https://www.devopsparadox.com/episodes/you-probably-code-les...
No shit, Sherlock - though this is a very shallow reading of what a developer does or wants to do, or the variety of personality types out there.
Is debugging included in that 52 minutes?
Makes me feel a lot better about my progress.
As it stands, I'm inclined to agree with others who have said there are just too many hidden variables here.