3 ms·
I've tried coding drunk. It was a disaster - even a couple of beers had me really struggling to produce anything worthwhile. I decided coding was like driving
by eneveu 15y ago
I've tried coding drunk. It was a disaster - even a couple of beers had me really struggling to produce anything worthwhile. I decided coding was like driving - you need all your faculties to work. [...] I've read things where people brag about coding drunk, and frankly I've been jealous that I couldn't do it. Or code tired, fuelled by nothing but pizza and coffee.
I'm reading Uncle Bob's latest book: "The Clean Coder". In chapter 4, "Coding", he writes about his set of rules and principles for coding (behavior, mood, and attitude while writing code). About 3 AM code, he writes:
The worst code I ever wrote was at 3 AM. [...] I remember feeling so good about myself for the long hours I was working. I remember feeling dedicated. I remember thinking that working at 3 AM is what serious professionals do. How wrong I was! [...] The moral of this story is: Don't write code when you are tired. Dedication and professionalism are more about discipline than hours. Make sure that your sleep, health, and lifestyle are tuned so that you can put in eight good hours per day.
I think this is solid advice. He later says that "The Zone" (aka "flow") should be avoided, which is more controversial... ;)