The Lost Art of Typing Shit by Hand

By Dave Ceddia

All great programmers learn the same way. They poke the box. They code something and see what the computer does. They change it and see what the computer does. They repeat the process again and again until they figure out how the box works.

– Seth Godin, Poke The Box

A long time ago, back when DOS ruled the world, back before the World Wide Web, back when I was teaching myself BASIC… we typed code out by hand.

There really weren’t a whole lot of good alternatives. If you were lucky, your book came with a floppy disk in the back sleeve that had all the examples on it.

But for the most part, if you wanted to learn programming, it was a lot of trial and error, and a lot of “copying and pasting” code from books (with your hands… using a keyboard).

Why Typing Is Awesome

It’s easy to discount that story as an example of terrible hardship that nobody has to endure anymore. But there’s an amount of… badassity to it.

But more than badassity, typing code out by hand helps you learn. And learning is the name of the game in software.

Typing helps you learn the syntax. It helps you learn the keywords. It makes you think, and as you’re writing out the 10th import foo from 'foo', the little details become apparent.

“Oh, those separators in the for loop are semicolons, not commas.”

“Oh, import {foo} from 'foo' isn’t the same as import foo from 'foo'.”

Typing makes you curious about the words you are forced to write out. “What do all those things in public static void main(String[] args) mean, anyway?”

It also helps you learn the various error messages. Inevitably, you’ll type something wrong or leave out something you thought wasn’t important or that your eye didn’t notice (damn semicolons).

When you’re typing in a program by hand, you can try to run it at various points along the way, to see what works. Maybe more importantly, you can see where it breaks. “Poking the box.”

How To Start Typing in a World With Ctrl-C

At this point, let’s suppose you are convinced that typing shit by hand is the best way to learn. How would one go about mastering this skill?

Well, it’s quite simple. Every time you would copy and paste some example code, type it out by hand instead.

  • When copying from a StackOverflow answer: type it out instead
  • When copying example code out of an ebook: type it out instead
  • When following a tutorial on a blog: type it out instead
  • When following any tutorial that says “the sample code is available in the file below”: ignore that pre-packaged bundle of non-learning and type it out instead

By all means, use the example code to check your work; use it if you get stuck. But don’t let the example code be a crutch that prevents you from learning to walk on your own.

But What About…?

But wait! These days we have fancy IDEs, package managers, and millions of libraries at our fingertips. Shouldn’t we use those to make programming more efficient?

Yes, we should.

I’m not advocating for typing out every line of code that you use, or even that you read and understand every bit of library code you import. And I’m definitely not against automating repetitive typing.

Typing by hand is important for learning.

Once you understand the code… once you’ve mastered the syntax and the special symbols… once you’re saying, “Ok I get it now, typing this out is boring…” That’s a great time to start being more efficient about it.

Automate for speed, not for lack of understanding. [Tweet this]