While looking for a place to start learning programming, my friend Phil brought this to my attention: Codecademy Closes $10 Million Round. He asked me what I think of it [as a place for him to start].

While I applaud their existence, and congratulate their funding, I doubt I would’ve gotten into programming if I were introduced via something like Codecademy.

I’m lazy, impatient and have lots of things I’d rather be doing than whatever I’m doing right now. And I definitely don’t want to sit through grammar school, regardless of whether it was English language or the lovely Ruby programming language. I find programming interesting only because gets me results.

Story was, our home PC’s 40mb hard disk crashed and we were left with whatever that was on floppies. My brother borrowed a book from the library with computer games inside. I would boot up the computer, ran “gwbasic”, choose a game from the book, and type all the gibberish code into the computer, character by character. Some games were a few lines long, some spanned a few pages. After everything was typed in, I’d run and play my game.

I remember especially liking a cowboy fast draw turn-based game that had dice roll based on your character’s stats (speed, accuracy), distance, dealt damages based on the gun you used and where you hit. It was fun.

Before long I realize I didn’t have to transcribe every character in the book. If I changed some numbers, the computer wouldn’t know it came from me, and the game would play out differently. I made the games better (or worse, depending on whether you think god-mode is a good thing or not).

Before long I realize I didn’t have to transcribe anything from the book. If I’d just written anything I wanted, the computer wouldn’t know none of it came from the book. The computer would follow my instructions and run my game like it would run the games from the book.

Wow. I am as authoritative to the computer as The Book.

(The next big milestone would come several years later, when I produced my first “.exe” file. aka, shit just got real.)

That’s why I’m biased to think that programming should only ever be introduced as a means to get something real done or done faster. Hacking on something you already understand. Then there is a purpose and motivation to learn. Then programming is meaningful. It is sad [to me] to know that some people’s first contact with programming would be a dry grammar class (or some patronizing guided tour to nowhere, ”yippie, you can count!”) that they just have to sit through to learn, no biggie, like everything else they’d done in school.

[Update 27 Sept 2012]

This essay was an immune response, triggered by hearing too many times that Inventing on Principle was “about live coding”, and seeing too many attempts to “teach programming” by adorning a JavaScript editor with badges and mascots.

– “Learnable Programming”, Bret Victor