What It’s Really Like to Learn to Code
6 Lessons after a Semester at a Top Tech University
It’s just after midnight on a Sunday. I’m feverishly typing on my laptop to finish my latest assignment due the next morning. It’s an interactive gesture-based installation with LeapMotion. My eyes are red and itching, I’m exhausted, but I feel great. This is so deeply satisfying; to be in control, to make things and to understand this awesome inner world of computers. I take a moment to realize that just a couple of months ago none of what I’m seeing on the screen would make any sense to me. I started from scratch.
1. Start At Your Own Pace
2. Learning a Language Is Not the Same as Learning Programming
3. Programming Is Like Mental Origami
I am fairly comfortable with math and spent a good part of my career doing complex financial analysis in Excel. Naturally, I thought that my quantitative training would make it easier to learn programming. What I didn’t realize was how much of it is about abstract thinking. The best analogy I can think of is origami. Imagine folding a square piece of paper into a paper crane or a boat using only your imagination. Can you follow through the end? Now imagine that instead of one origami figurine, you are creating a thousand or a million simultaneously. And finally, imagine that instead of creating many origami figurines simultaneously, you are doing it sequentially according to a set of rules. For example, every time you make one fold on every odd numbered piece of paper, every even numbered piece gets folded twice in the opposite direction and is turned 45 degrees clockwise along the the X and Y axis. Are you confused yet? This is what it feels like for a beginner to code. Unlike in mathematics, where the sequence of operations is usually transparent to you in advance, in programming it’s not, You have to imagine abstract objects, containers, groups and perform some operations on them in your head. Then you try to write it in code or something called “pseudo code”, a fake code that helps you sequence how you would actually program what you just imagined. This doesn’t mean that you have to solve the programming problem in your head, only that you have to think abstractly about logical problems almost all the time. It’s often a mind-bending experience.
4. Writing Code Is a Painful Stop & Go
This is one of the most frustrating things about learning to code. You get stuck and you get stuck often. And when you do, nothing works. Unlike making with physical material like clay, wood or paper, you can try things out, make shapes and stick pieces to each other with tape to create a prototype. You can create workarounds and continue to move towards your final result. If something doesn’t work visually or mechanically you can usually see the problem. In programming, it’s a different story. Usually, when you make a mistake, your code just doesn’t run and you don’t know why. Modern code editors are getting better at showing you where the error is but for a beginner programmer, that’s not enough. So you spend hours trying to find a mistake or Google a possible solution. If you’re lucky you find that missing semicolon or curly bracket that broke everything and you think to yourself: “I thought computers are supposed to be smart.” Professionals call this “debugging,” but you might as well call it “banging your head against the wall” because that’s what it feels like: painful and useless. The key takeaway is that mastering programming, like many things in life, takes patience.
5. Programming is a Time Warp
The good news is that when you’re fully engaged in coding and you’re not stuck, you warp into an alternative existence where time doesn’t exist. You stare at the screen working on some problem and making progress. Suddenly you look at the clock in the corner of your screen realize that it’s been hours and you should probably go to bed. The only other activity that had the same effect on me is playing video games. You’re in the proverbial state of “flow”, with just the right amount of challenge and mastery. So the next time you see a programmer staring intensely at a screen and typing, you can be sure that he’s (or she) is not simply a geek, but a geek who is an alternative universe. You probably shouldn’t interrupt. And when you sit down to code yourself, for best results, make sure that you have some uninterrupted time.
6. Coding Doesn’t Have to Be a Profession
This may be a strange thing to say for someone who is about to dedicate 4–5 years of his life to a PhD in Digital Media, but you shouldn’t learn programming only to be a programmer. There is nothing wrong about programming professionally, but it can also be about self-expression, self-improvement, charity, a hobby with your kids and just plain fooling around. And with the proliferation of affordable and open source software and hardware tools, there has never been a better time to learn programming. Tools like Makey Makey, Arduino, Raspberry Pi, Processing, EarSketch, Phaser and many others, can open up a whole new world of possibilities in your life, even if you never intend to be a professional programmer. So go ahead and try taking a lesson or two. You might find a new passion.
Image Credits: Dmitry Baranovskiy