PhD studies can be very different. Wet-lab students who do experiments can spend 12 hours a day in a lab cutting mice. But that’s somewhat mechanical work where you repeat the protocol. PhD students are also less experienced and spend a lot of time making mistakes and learning. When I got my fist full-time developer job I spent day and night working as well. After 5-7 years, I was something like the author because I could do non-trivial tasks quickly. It felt like the code was writing itself in the back of my mind while I was drinking coffee or browsing HN.