If the code I am writing right now doesn't involve me poking at a system because I don't understand it and learning it, then at a guess, I would say I spend far more of my time thinking about the production code I will write than writing the actual production code. Hands on keyboard for hours at a time is a sure sign you're working on a problem you don't really understand. It took me decades to come to that realization because many companies measure productivity by "number of hours of your butt in a chair multiplied by lines of code written."
In my current role I am considered one of the most productive developers on the team. I am physically at the keyboard writing code or debugging code for maybe three hours a day.