product designer, cyclist, armchair urbanist

Fear and Code


As I’m working through my apprenticeship at Sparkbox, there are a few ideas that have kept me going when I hit the paralyzing fear of a challenging programming problem:

“Small strokes fell great oaks.” –Benjamin Franklin

The only way to get somewhere is to start walking. If I feel really, really stuck, I open my Field Notes, grab a pen, and start sketching / writing out what my problem is.

Writing things in English, like a story, is a good way to start a programming challenge.

Then, the only problem is that my computer can’t read English. I start with the “once upon a time” – the one little piece of code I need to write so my computer knows the story is about to start. In Ruby, that might look something like this:

class Tree


There! Now I have “once upon a time”. I celebrate the small victories.

What’s the next thing I need to write? I figure that out, and write it. If it’s too hard or I don’t know what to write, I take what I thought I needed to write and cut it in half.

Always try to be doing something

I try to always be doing something. Sometimes I might just be thinking – that’s OK, but it’s better to think by sketching or writing ideas down on a blank page / text document. If I catch myself staring off into space for a minute or so, I’m not making any progress with my code. If I have even an inkling of an idea for the next thing to write, I can just write it! I don’t have to wait until the code is perfectly formed in my head.

“Putting it on paper lets you start fixing it. If it stays in your head, a perfect idea, you’ll never share it with anyone.” -Pixar, Pixar story rules

It’s easier for a potter to work with a problem in his clay than it is to work with the problem in his head. If he touches one side of the pot, it responds, and he immediately knows the next thing to do. Even if he made the wrong touch, he knows that it was a bad touch. If all of his molding happens as planning in his head, he’s merely guessing.