Want to Learn to Code? Start Small & Have Fun.
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 As small as possible, then build your skills off of each other
Have fun Build something you want to build, it will feel personal and keep you engaged in learning
â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. [1]
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.
â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 (On second thought maybe donât). 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.
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.
Discuss on HackerNews
Follow me on Twitter
[1] If there was a third point it would be this: You Can Google ANY PROBLEM YOUâLL EVER HAVE. EVER. Itâs too specific to make the big list, but the ability to help yourself out of jams is a crucial skill to learn early, and if I could think of a catchy way to write it into the title it would probably be up there bolded. Google will teach you new things. Google will find the solutions to your problems. Embrace it and never wrong her.