The Fibonacci equation's basic recurrence, Fib(n) = Fib(n-1) + Fib(n-2).
But wait, let me explain my theory!

Steve Martin has a great autobiography about his comedy career called “Born Standing Up.” Like many comedians, he’s a smart guy and has great advice about practice and improvement. You can get most of the same thing from this interview, if you take time to read it.

He talks a lot about his early comedy and how it just doesn’t quite work (he’s right, it doesn’t - go back and watch.) He has some really interesting new ideas, but he doesn’t yet understand the important old ideas. He wasn’t good at physical comedy yet, his timing was off, he was clever but not consistent. He knew it wasn’t working and he wanted to say, “but wait, let me explain my theory!”

I’m a software engineer. Is it just me, or are there an awful lot of us whose pet theories don’t quite work, and when we’re called on it we say the same thing?

Until you have the fundamentals right, your new ideas mostly don’t work.

It turns out it’s really easy to have a theory about some new way to work. When we read about Extreme Programming or similar interesting ways of working, we all have opinions. But until we get the fundamentals right, we can’t even really try them out — we can only compare them to how we already work. The hard part about describing a new way of working is getting people to empty their cup first - so hard that usually it’s impossible.

And by “the fundamentals” of coding (not algorithm design, not project management, not agile — coding), I mean a “fingertip feel,” the ability to pick up a new problem or a new way of working and run with it.

You’ve met people who have it. You may even be one. But you never learn it by figuring out a theory.

Like Steve Martin, you have to learn it by practicing the fundamentals of your craft.

How to Practice for Writing Software

You can practice writing software, obviously. Isn’t it weird how few people seem to do that systematically? We go to boot camps (a few of us) or get four-year degrees (more common) or self-teach… But isn’t it weird how few people practice the specific skill of writing the code? I’m not counting studying algorithms, which is a different skill. Or learning to schedule and estimate tasks. I mean practicing actually writing code. It’s like playing tennis - it’s a separate skill that you learn by practicing.

You’ll see a little bit of that. Coding exercises, coding challenges, code katas. None of them are very popular or very common in our professional world, but they exist.

What’s interesting is that other professions have these same problems. They just… handle them better.

The quality of your work goes up and down, sure. Steve Martin says (I’m paraphrasing), “sometimes you’re bad. Sometimes you’re good. Sometimes you’re great. The greatness strikes like lightning and you don’t control it. So do the part you control - most days you can be good or you can be bad, so work on that.”

Sounds like coding, doesn’t it?

Or we act like we need inspiration. Here’s a famous quote from (possibly) the writer William Faulkner: “I only write when I’m inspired. Fortunately, inspiration strikes at nine every morning.” That is from a man who has practiced and works with discipline. Speaking from experience, you can do the same trick with writing code. But it’s about as hard and rare for software as for novels.

Practicing for Specific Skills

I’m surprised we don’t see more software exercises for specific skills. I’m not kidding when I say that inspiration is a skill and you can train yourself for it. I have three kids, so I’ve had to learn to go from zero to “inspired” immediately when I have time. I’ve heard Avdi Grimm talk about the same thing, which he’s had to do as a single dad. I’m a very engaged dad who works from home, so it’s similar.

But if you can do that by having your kids repeatedly interrupt you by surprise, then you can train yourself in that skill. The kids thing is one way to do the training. It’s unlikely that’s the only way, but if I say that only Avdi’s kids and mine can train you in software inspiration, will you volunteer to babysit for me? (Kidding. Mostly.)

It’s easier to find exercises in particular tools or languages. But given how important skills like Object-Oriented Design are, why don’t we see more exercises aimed specifically at them? 99 Bottles of OOP is fantastic, but it’s one of very few contenders…

The exception is skills you can learn via code challenges. Job interview problems (small, self-contained programming problems that look deceptively simple) can be trained that way. Simple algorithmic design can be trained that way. They also train working flat-footed — working on a problem that’s intentionally hard to approach without being able to research how to do it. Those aren’t the best skills for every situation, but they can be useful. More importantly, it’s more evidence that specific coding skills can be trained.

Why Don’t We Do This?

A chalk figure swings a tennis racket like a golf club toward a basketball on the ground.
It’s about practicing, but also about practicing correctly.

I’m giving these parallels (to comedy, to writing) and these examples of learnable skills because there clearly is an answer. We just don’t collectively use it much.

Why not?

I have a few answers, and I’d love your guesses too (comment below!)

First, we want programming to be a pure analytics discipline like math… And it isn’t. Coding, at least, seems to be a discipline of practice and repetition, more like playing tennis. Being clever isn’t enough, just as no theory will make you an amazing tennis player without actually spending time on the tennis court, and no theory of humour will make you an amazing comedian until you’re great at the basic skills.

Second, a lot of these kinds of practice suck. Getting interrupted a lot to be interruptible is, frankly, pretty awful. Coding challenges are certainly not everybody’s cup of tea. And the skills I mention like having to come up with algorithms in a limited time with no background are a lot like people’s least-favourite parts of job interviews (which are also not exactly popular.)

Putting the first and second reasons together and thinking a minute… I think programmers are often lazy smart kids. I certainly was. We want computer programming to be something you can think your way out of. Instead, it seems to be a discipline that requires lots of annoying work and lots of practice, and then you don’t really even get to brag much. Instead, the people we work with are impressed with cleverness. Annoying!

How Should We Do This?

I’m working on a book about how to practice coding. Not being a professional developer, or getting promoted or acing job interviews — there are great books on all those things already. About how to get to that “fingertip feel” point with coding where you can work with interruptions, make your own inspiration, pick up random “extra” coding skills and generally write code the way Faulkner talked about writing novels.

You can sign up for my email list (on the right side there unless you’re reading on your phone) and hear a lot more from me about how to start doing that. But in general, I’m looking for more people who care about this and want to be good at it.

Join me?