Just go for a walk
You know those days when nothing works? Those days when everything you touch turns to shit? When the more code you write, the worse it works?‹
I know those days. They’re the worst.
I don’t know what’s worse: knowing that I know the solution, or the humiliation of writing:
print “HELLOOOO THIS FILE HERE”
I even stop trusting Cmd+S. It’s as if the fabric of reality has unraveled, and nothing is even true anymore.
That’s when I starting cursing under my breath, fantasizing glorious death for my laptop, and making plans to become a goat herder in Kazakhstan. Before you ask, I don’t know why I picked goats.
But this is what a Kazakhstani goat herder looks like.
Isn’t it nice? No computers in sight.
As a smart man once said, “Why are you doing this?”
Why are we doing this? Why does any sane person decide to become a professional software engineer?
Coding is fun, that’s for sure. But professional software engineering is a quagmire of pain and suffering. It’s a dark abyss where only the dumbest dare travel.
Just think about what we do every day. It’s like explaining quantum physics to a toddler who’s asking about otters holding hands. While juggling chainsaws. On a unicycle. With a plate of vegetables on your head. The unicycle is on fire. And you’re not wearing pants.
You: “I need a button that opens a page.”
Computer: “What do you mean?”
You: “Like, something I can click on that does a thing.”
Computer: “Huh?”
You: “You know, a clickable rectangle?”
Computer: “A what?”
You: “<div>Button</div>”
Computer: “Oh, right! A block-level portion of a document such as a few paragraphs, or an image with its caption. The element has no meaning in itself but allows semantic attributes (e.g. lang=”en-US”), CSS styling (e.g. color, typography) or client-side scripting (e.g. animation, hiding, augmentation) to be applied.”*
You: “Yes! And it has to be clickable.”
Computer: “What’s that?”
You: “I want things to happen when a user clicks on the button.”
Computer: “What’s a button?”
You: “Ugh. Seriously? The thing we just defined.”
Computer: “Huh?”
You: “<div onclick=’doThing()’>Button<div>”
Computer: “That’s a syntax error.”
You: “#$!%#%! <div onclick=’doThing()’>Button</div>”
Computer: “Oooooooh! Now I get it. What’s doThing?”
Repeat. Forever. Send help, I’m trapped. It’s not funny anymore.
It reminds me of that Doctor Who episode where the doctor was trapped in a temporal loop. He’d wake up, solve the mystery, punch a wall made of the strongest crystal in the universe, then die. He’d wake up, solve the mystery, punch a wall made of the strongest crystal in the universe, then die. He’d wake up, solve the mystery, punch a wall made of the strongest crystal in the universe, then die.
A billion years later, he escaped. He had punched through the strongest wall in the universe. One micrometer at a time. Punch after punch.
That’s what coding feels like. Sometimes.
BUT! A simple solution exists. When you have One Of Those Days™, just go for a walk.
Stand up. Get out. Leave the phone. Just walk. Maybe listen to some music. Wait, on second thought, better not.
“Thinking is generally thought of as doing nothing in a production-oriented culture, and doing nothing is hard to do. It’s best done by disguising it as doing something, and the something closest to doing nothing is walking.” — Rebecca Solnit
Sometimes, I “go grab a coffee” and come back with nothing. It’s actually a 20-minute walk. In the middle of the workday.
So far, nobody’s noticed. It’s a secret superpower. Don’t tell them. Sssshhh.
PS: I write about being a better engineer and creative every week. You should subscribe by email.