One of the bad parts of moonlighting as a programmer1 is that, at the time of day I can code, I am often a terrible inefficient coder.

The time I have available for coding is very late at night, typically 11 PM to 1 AM. For the most part this is fine. I can’t get to sleep until 1 AM or later most nights, no matter what I do, and going to bed before I feel tired is counterproductive. Rather than staring at a ceiling in bed for hours, it is far better for me to stay up doing something I enjoy, like coding on my Mac while listening to music on my headphones.

Lately I have noticed that I am getting very little done in these coding sessions. The night before last I fixed one tricky bug, then decided to quit coding (but not yet go to sleep) for the night. Last night I wrote about half of one feature. To be fair, I wrote several implementations of the feature until I found one that would be most compatible with Apple’s frameworks. Still, I quit for the night before finishing it because the other part of the feature seemed too tricky to tackle after midnight.

Fortunately, when I brain is tired, I don’t end up coding a buggy mess. I have the sense to slack off for the rest of the night, so I don’t spend my next evening throwing away the garbage I coded the night before. Still, I get very little done compared to the time I spend on it. At least I enjoy the time I spend doing it.


  1. To be clear, I am a hobbyist and don’t have a second job. ↩︎