So you want to learn how to code

Micheál Looney
8 min readSep 22, 2015

--

For quite a long time I knew I was interested in programming but I simply couldn’t find a way to break into it. After three of four failed attempts I finally cracked it and the pieces started to fit together. I’m a long way from being the programmer I want to be but I’m getting there. Along the way I’ve noticed one or two things about which tools and resources have helped me learn and which have not.

If you’re an aspiring programmer or if you have some knowledge of programming but want to improve, then this may be for you.

“You may have heard a phrase like this before: ‘A computer program is like a set of instructions.” This sounds like one of those phrases that might be technically true but is kind of useless because you hear this phrase but then you see a complex program like Photoshop or Flash and you think ‘yeah but that can’t just be a set of instructions’. But that’s exactly what these are.” -Simon Allardice

Learning to program can be incredibly frustrating, even for someone with a natural interest in the topic. Highly skilled programmers can seem like sorcerers and thinking about how a complex product like Spotify or Google Docs was created can make your head spin. If you venture far enough to poke around in some source code you may be confronted with something like this which is about the most incomprehensible and intimidating thing a beginner can see.

Black magic

“How the hell does anyone understand this stuff, much less write it. These programmer guys must be some kind of math super geniuses” you might think. And that’s a perfectly normal reaction. This is compounded by a pretty pervasive attitude amongst technology-users (read everyone under the age of 105) wherein the software they use on a day-to-day basis is a complete mystery outside of their often very narrow use-cases. Ask the average computer user to set up a static IP on their machine and you’re in for a treat. Sure, some percentage of people will know what to do right away and some will manage to find the information they need with google but I think it’s fair to say that most would give up relatively quickly, frustrated and annoyed.

This isn’t a commentary on the willful ignorance of the majority of computer users. What I’m trying to get at here is the “that stuff is voodoo magic’ view of computing. Why do we think that and how do we move past it and start learning how to make them do what we want?

Find your learning style

There is an enormous amount of learning resources available online possessing various degrees of quality. Unsurprisingly, an increasing number of people want to learn to code and teaching them to do so can be big business. This has it’s pros and cons for you as a learner. Plenty of code bootcamps and other services will promise to turn you into an expert in a short space of time. It can be easy to fall prey to marketing as a solution to all your problems. However in order to learn successfully, you first need to step back from the material and work out what your learning style is.

Again, there are a lot of resources available to you. Some well-known and well regarded psychological profiling tools like the Memletics learning style questionnaire, the Kolb learning styles test, the Myers–Briggs Type Indicator, the R2 Strengths Profiler and StrengthsFinder. Not all of these are strictly focused on finding your learning style. They may give you a broader overview of your strengths and weaknesses, how you make decisions and how you interact with unfamiliar situations and topics. You will also get more specific information on which kind of learner you are; whether you prefer a visual, aural or verbal method of delivery for example

Find some resources that match your learning style

Using your results as a base you can start to explore programming learning resources in a more structured way. There are lots of video tutorials available which may suit someone who prefers a visual approach. There are also interactive platforms like Codecademy that walk you through everything step-by-step. This has it’s advantages and disadvantages. You’re really spoon-fed the material and once you complete a Codecademy track on a particular language you will be far from an expert. Where it does excel however is in allowing you to make steady, constant progress. You can see yourself building up your skills and they have badges and achievements for completing different lessons. The ability to log in anywhere via a browser and pick up where you left off without installing any software is extremely valuable. Got a boring office job you hate? Get off Facebook and get on Codecademy.

There’s also online courses (called MOOCs) which follow a weekly schedule, have assignments and a syllabus. Sites like Coursera and Udacity are good for these. There’s an element of community to these, there may be forums where people discuss problem sets and try to help each other out. This kind of interpersonal interaction might suit your learning style well.

“a conversational style helps because people tend to pay more attention when they perceive that they’re in a conversation, since they’re expected to follow along and hold up their end. The amazing thing is, your brain doesn’t necessarily care that the “conversation” is between you and a book! On the other hand, if the writing style is formal and dry, your brain perceives it the same way you experience being lectured to while sitting in a roomful of passive attendees. No need to stay awake.” from Head First Java

All mainstream languages will have a mountain of written documentation available in varying tones from formal to casual. What’s important is that you realise that if what you’re reading isn’t working then you should try something else.

Immerse yourself in the culture

Programmers spend a lot of time hanging out on the internet (no surprises there). There are some great forums and online communities where people will exchange links, discuss languages, tools and frameworks and just generally talk shop. If programming is something you have a genuine interest in you’re sure to find this kind of stuff engaging, even if you don’t necessarily understand everything right away. Spending time browsing these sites can give you invaluable insight into the culture of programming as well as plenty of great career advice. I like to lurk on /r/WebDev, /r/Programming, /r/CSCareersquestions amongst others. Sites like Medium and HackerNews are also a great place to start.

Ask for help when you need it

One of my favourite things about programming is the willingness of the community to help out newcomers. Obvious attempts to get someone else to do your homework or questions by people who clearly haven’t tried to work things out for themselves first will not be well received but as a general rule people will be happy to help you work through problems, allowing you to find the answer yourself with some careful guidance rather than handing over a snippet of completed code.

StackOverflow is the most obvious place to post these questions. On Reddit you can try /r/learnprogramming or a language-specific subreddit like /r/learnpython. There’s also IRC channels you can try. Just make sure you know how to ask your question the smart way or how to write the perfect question

Write code! Find a problem and work on solving it

Once things start to make sense, you’ll be able to start making your own simple programs. Maybe you want to automate an everyday task or you’ve got a great idea for an app or a browser extension. Whatever it is you should get cracking. Start writing code and work on it often. Don’t be upset if what you produce is a bit rough around the edges. Work on getting the most basic version possible up and running, then you can start to tweak it and add incremental improvements.

Don’t get discouraged

As you make progress you’ll start to come up against various roadblocks. These days there are a million and one ways to do everything. There’s an endless variety of frameworks, build tools, libraries and protocols to wrap your head around. You may have a working Python script that does what you want it to do but how do you turn that into a webapp or wrap it in a GUI so it runs on a desktop machine? Again you’re going to start thinking that things are basically voodoo magic. Again, this is normal. Relax, take a deep breath and go back to step one. Find a guide that you understand, try to work it out and ask for help when you need to.

A brief note on languages

Depending on who you talk to you’ll get varying responses on what langugage you should pick. Each one has it’s pros and cons. Javascript for example will allow you to get up and running creating interactive webpages immediatly but some find it’s syntax a little overwhelming at first. Python on the other hand has probably the least steep learning curve of all but is harder to deploy. Once you start to get comfortable with one however you’ll find it a lot easier to transition to another.

My opinion, and this is purely personal preference, is that Python is ideal for beginners. It has a GREAT community behind it and those that use it love it, me included.

Links

Learning style questionnaires/personality tests

Interactive coding platforms

Online courses

Video tutorials and channels

  • Pythonprogramming.net— This guy is great. Really accessable and fun. Focuses on Python
  • E-Learnify — This is a gem of a channel. The playlists on Object Oriented Programming and Databases are delivered by Simon Allardice and are lifted right from his courses on Lynda.com which you would usually have to pay for. If we could clone this guy a million times and put him in every university in the world there would be no shortage of excellent programmers. Cannot recommend this enough.
  • MIT OpenCourseWare — Introduction to Computer Science and Programming — These are actual recordings of the CompSci lectures given to MIT students. A very, very valuabe resource.

Text

  • TutorialsPoint — I don’t really like text guides but this site manages to work for me
  • HeadFirst books — Programming and other technical concepts explained in plain English. Very accessable and engaging.
  • W3Schools

Where to ask for help

How to ask for help

Places programmers hang out

--

--