Getting started with programming

The most common question that people ask when they want to learn programming is: how do I get started? Some think this is the wrong question to ask, but it's understandable. The field is huge and can be overwhelming for newcomers.

Learning to program is like learning to ride a bike. Your parents didn't sit you down as a child to explain Newton's laws of motion and gravity. Instead, they strapped a helmet to your head, put you on your bike, gave you a push and off you went...sort of.

You learnt to ride a bike by riding a bike, and programming is exactly the same: you learn to program by programming.

Below are three great ways to get started with programming that get you writing code quickly.

Work through a textbook

When I started learning to program we didn't have an Internet connection at home so the only option was to work through programming books, and it's an excellent option for complete beginners. Textbooks go into a of depth, covering a wide range of topics to ensure that the reader leaves with enough a broad knowledge of the language to "go it alone".

You can find a good programming book for almost any language. Below is a list of books that I recommend for languages I've studied:

There is also a list of free programming books on github.

Bear in mind that working through a textbook requires a lot of discipline and self-motivation.

Solve online challenges

If you're more interested in solving challenges and puzzles, or creating real world applications, you might want to try online resources.

One way I've found to improve my programming skills is to work on small challenges that are quick to complete but help exercise the programming muscle. I've found the following websites extremely helpful:

Follow an online course

If you prefer a more structured, lesson-oriented approach to learning, you could also try the excellent Coursera, Khan Academy and Code Academy.

Coursera also has an active community around each course, but not all courses run year long. Usually you have to sign up and wait for it to begin.

Solve a problem you have

Programmers are lazy. We spend a lot of our time getting computers to do things for us, to solve our problems, in order to make our lives easier.

Solving your own problems through programming is a great way to learn. It's highly motivating and when you've finished, you have something useful to show for it. Moreover, as you maintain the finished product, you'll continue to learn.

I recently wrote a small program to compare GPS tracks because I wanted to know how often I'd run a particular route. I also wrote a menu system library for the Arduino so I could build an alarm clock. These were all problems I cared about, so solving them was fun.


Banner image Source code security plugin by Christiaan Colen. Licensed under CC BY 2.0. Changes were made to the original.
Author image
Creator of Humble Coder and serial hobbyist