Learning to Code? Start Small.

April 1, 2013

I liked a lot of things about Zack Shapiro’s post Want to learn to code? Start here. I actually remember reading his original post dedicated to Ruby on Rails last year, and thought it was a great starting point for the framework.

Zack’s obviously a smart dude, but there’s a certain hostility in his newest post and others like it towards those who “don’t want it enough" and I cringe every time I see it. Coding isn’t a secret club that requires a pledge of undying loyalty to join; it can be enjoyed on all parts of the spectrum. So advice like, “Nights, Weekends are bad” is incredibly damaging to the cause. If someone works days, then what? They just shouldn’t bother? Quit their job? Worst-case scenario they never try, and best-case they think they’re screwed from the get-go and have an easy excuse to quit. “Well, I could only code at night… so obviously it didn’t work out.” A more helpful way to phrase it would be, “The more you can give yourself to learning the better” which is both true and doesn’t alienate the rather large group of “people who do things during the day."

Put another way, this bitterness is like getting mad at a user for abandoning your app/site/product. Sure, maybe it never was for them and they were never planning on making it a part of their daily life. But maybe they would have stayed if you (the community) had done something differently. Regardless you should be excited that they were interested enough to try it out, and curious about what you can learn from their departure that could make your next version more “sticky.”

So. I want to offer an alternative. Instead, this post IS intended for the person who thinks they should code because they hear so much about it. It’s intended for nerds, jocks, English majors, CEOs, the mailroom guy, and anyone else who wants to know more about coding. Here's all you need to remember to get started:

Start Small

“Fundamentals, fundamentals, fundamentals. You’ve got to get the fundamentals down because otherwise the fancy stuff isn’t going to work.”

― Randy Pausch

Every coach I’ve ever had preached the importance of fundamentals daily, and it's something I still believe in. Sure, the strongest of you might be able to learn everything about Ruby on Rails all at once (Ruby, Rails, the terminal, HTML, CSS, Javascript, the distinctions between client-side and server-side, routing, file permissions) but only after weeks of frustration, searching online and not even understanding the solution, let alone the problem. All roads lead to Rome, but some take a lot longer than others and are covered in shit and its way easier to just not even bother.

Instead, start small and grow. If you want the first steps, I’d say learn (and get really familiar with) HTML, then CSS, and then Javascript + jQuery.

Hear that? That was the sound of a hundred programmers vomiting in rage. “HTML? CSS? That’s not even real programming! Where’s the MVC? Where’s CoffeeScript? How will they learn to setup a dev environment?” Ignore them; they’ve forgotten how hard it is to start out with next to no knowledge, when everything feels unfamiliar and frustrating. For you, it’ll feel just like programming and even better, it’ll get you familiar with how a computer reads and interprets what you’ve written. Get familiar with the fundamentals, and the fancy stuff will come easily when you're ready for it.

Have Fun

“If you have no interest in politics, will you enjoy a language course that uses political articles? Of course not. You’ll get bored and quit.”

― Tim Ferriss

I’m horrible at being bored. I can’t stay focused on anything for long unless I’m finding some sort of interest or entertainment in it. Last summer my cousin took me to a driving range to teach me how to swing a golf club. 10 minutes later I was falling asleep, but instead of quitting I just started messing around. I was hitting one ball into another, two balls at once, and lining 10 up for rapid-fire golf. It was a stupid distraction but it kept me interested and my stroke improved regardless.

Whether you like golf or not, apply this to your learning. The web is such a great place to start because It’s the most fun. Your rewards are immediate, visual, and can be shared with friends. I agree when Zack writes, “Stop telling [nontechnical] people you're learning to code” but disagree that learning to code should be a solitary act. Instead of telling everyone you're learning, tell everyone about what you’ve made. Send links out to your friends. Show people at work. Bring it up on dates. The point is, be proud and excited about what you've made and how much better you've gotten.

Tutorials are a great place to start, but creating a bunch of useless little things can quickly get old. Once you feel comfortable start something that you could excited being creative about, like a personal webpage or a simple idea for a site you’ve always had. Then if you want to add or learn something new, find a tutorial and try to follow it while applying it to your own, personal project. This will force you to actually understand and apply the concepts in the abstract instead of just understanding how they fit into any one specific example.

That’s it!

If you ever feel too frustrated, take a step back and ask yourself if you've bitten off more than you can chew, and if so find where you can compromise content for familiarity. When I was just starting out with NodeJS I had never seen the tempting engine Jade before (I'm more of a Django guy). It didn’t seem too hard to learn, but it felt unfamiliar and small problems kept getting in the way of the main goal: learning Node. So I switched out Jade for Swig (Django templating clone), and got back into it. Suddenly the whole thing felt way more familiar,I was enjoying myself, and most importantly I was able to leverage that familiarity towards learning Node faster. Then when I felt more comfortable with it all, I switched back in Jade.

In the end you need to do what works for you. I only post this to provide an alternative to the everything-at-once approach that seems so ingrained in the "Learning to Code" culture.