Tuesday, March 26, 2013
John Polacek discusses how getting married and having kids made
him a more effective programmer. Needless to say, having kids motivated him to
do good work, but, much to his surprise, he got an additional boost from his
new time constraints.
First, Polacek compares his old timescape and workstyle to his new:
In the old days, I would hunker down and spend long stretches of time working on a project. If I ran into an issue or a block, I would just keep hacking away at it for hours. I would curse and get frustrated at the lack of progress, but eventually power through.Noting that the brain can and does work on problems even when one isn't necessarily concentrating on them, Polacek eventually realized this was a common occurrence for him, and that it was a "blessing in disguise":
Nowadays, as a matter of necessity, I can only code in short bursts, maybe 2 hours at most. Sometimes, I'll be struggling to fix a bug or work through an issue and be getting nowhere. Next thing I know, the baby is awake, or it is time to eat or any number of other things that come up in the course of a parent's day.
This phenomenon has made a big impact on the way I code, and deal with problems in general. It has given me confidence in my ability to work things out. Instead of getting stressed, I step back and let my brain churn away. It almost never fails. Sometimes I wake up and an answer will effortlessly appear in my mind. It is uncanny.I have had what Polacek calls "unconscious cognition" happen occasionally both before and after our baby arrived. In fact, I very recently benefitted from it when I decided to force myself to work on a project in short increments over a couple of weeks as an experiment, even though we have the baby in daycare part time. After my time ran out one morning, I drove off to do errands and, as I left the driveway, an elegant solution to a problem I could have easily wasted the whole morning on popped into my head. It is encouraging to be reminded of this phenomenon on the heels of that experience.