Something like 6-8 hours on weekdays, and like 4 on weekends. I count coding as having the editor open and I'm either actively writing/reading code, or researching something that will help me write code.<p>I used to be closer to 2 hours/day, early in my career, and it definitely held me back. I was told that meetings and talking to people counted as work, which is true - but they don't make me a better programmer. The act of just writing code constantly has made me advance tremendously in the last couple of years.
Coding at 78 is a hobby.<p>If I get a project in mind, I can easily spend 8 hours or so in coding. Got to get 'In the Zone'.<p>However I refuse to pull all-nighters like in my 30s and 40s. OMG! It's daylight already! I've got to get changed for work! (I started in my 30s)<p>Most days, I don't do any coding. Futzing with stuff? That's a different matter.
I don't think I can manage much more than 4 hours of actual productive code writing. Not counting time spent testing or stepping away and thinking.