The C compiler being like a ballet instructor

My sister once told me of her struggles with ballet instructors over the years. She was a good dancer but she struggled still—she struggled because ballet dance instructors tend to be middle-aged Russian women who are strict as hell and they're always poking you, moving your body to their whims, always telling you what you're doing wrong

That's what it means to be a ballet dancer—you are forever up against this unforgiving teacher, you are almost always wrong, the teacher does not care about the effect of her statements on your psyche

My sister said she wished she had a skill like computer programming. I had that skill—and my sister wondered what it was like to have an encyclopedic knowledge of computer languages and to be able to apply that knowledge without a middle-aged woman poking me every time I did something wrong

I said wait a minute. How it is for me (programming) is a lot how it is for you (dancing)

The compiler (a program that interprets human-readable languages like C into machine language) is actually a hell of a ballet instructor. During the process of programming, your program is almost always wrong! You write it but your human brain makes mistakes. Then the compiler comes in. The compiler is very strict. When you run it, all the compiler tells you is a list of your mistakes. Your job as a programmer is to fix the mistakes and get your compiler to shut up

That's what it means to be a programmer—it's not mostly glorious moments of knowledge and perfection. It's mostly being bent over the knee of the compiler and having to lie there listening to catalogues of the mistakes you've made while typing

It turns out that being a ballet dancer and being a programmer are quite similar in this way. As a dancer you dutifully take instruction from a teacher—as a programmer you similarly take instruction from the compiler

Neither is glamorous except in that final moment when everything works. Then the dancer moves on from her performance and the programmer leaves behind his program. What they produce in the end can be impressive, but the process is almost completely categorized by failure—and humility—before a near-perfect teacher

Subscribe to triangledirt.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe