Home

So you want to learn a Programming Language

Resources, Guides, and Advice for self-motivated students

This is partially just a brain-dump for me, but also a resource for anyone hoping to learn computer programming. There are many different reasons why people choose to learn a programming language and there are many different types of programmers out there. I tend to lean strongly in the "Computer Science" direction so often my suggestions, advice, and reasoning will be biased towards that perspective. I believe that everyone needs to understand at least the basics of Computer Science regardless of which language they plan to learn or how they plan to use it. To that end, I'm going to recommend that everyone who lacks a formal understanding of Computer Science (even if you've programmed before) start with Step 1.

Step 0: Learning what programming is.

One difficulty a lot of people have when they're first introduced to programming is that they have trouble learning what, exactly, programming is and what it entails.

A well-written, brief introduction to the subject is the (in progress) "Programming for all" articles at ArsTechnica:

These articles introduce some fundamental concepts that will make more advanced reading easier to grasp. Most importantly, it shows that programming is a skill that anyone can learn.

Step 1: Intro to Computer Science.

Short of taking an actual class, the best way to learn Computer Science that I know of is the wonderful lectures of Richard Buckland. Richard is a Computer Science professor at the University of New South Whales (UNSW) in sunny Australia. These classes give you a solid foundation in the concepts, principals, and vocabulary of Computer Science which you will need to really excel at learning a programming language. Through this course, you will also learn the basics of the C programming language.

I highly recommend watching both playlists through in order. Especially with a first language, there is really no substitute for having a teacher or mentor on hand. You will get the most out of these lectures if you have someone available to help you setup your programming environment and provide additional exercise to challenge you and make sure you have mastered the concepts.

NEW!:

You should also pick up a copy of the "K & R Bible".

Alternatively, try this online book, Programming in C by Dave Marshall. (Recommended by Grey Wolf.)

Another good introductory resource is "The Elements of Computing Systems". This is a course that takes you from logic-gates up to operating systems in just a single semester. It gives you a detailed understanding of the whole hardware and software stack.

Yet another excellent resource is Charles Petzold's Code. It's an excellent book that takes a similar approach to The Elements of Computing Systems, that introduces Computer Science from first principles.

Step 2: A Second Language

Once you've completed the Richard Buckland lectures, it's time to apply those Computer Science concepts and learn a new language (or even two).

Now programming languages can generally be categorized into one of two paradigms: Imperative and Declarative. These aren't necessarily mutually exclusive, but a language will always lean distinctly towards one or the other. C is an Imperative language. There will be more discussion of paradigms later on, but for now the important thing is that for this step you should pick another Imperative language. A few good languages include:

(If anyone can recommend good tutorials for the listed languages or other beginner-friendly imperative languages, please let me know.)

Step 3: A Fresh Perspective

By this point, you should have a pretty firm understanding of the Imperative style of programming. But that's only half of the story. Your education would be incomplete without learning at least one Declarative programming language. These languages are distinctly different from the Imperative languages you have been using and will give you a fresh perspective on programming in general. Learning Declarative programming has forever changed how I think about and write code. Here are a few languages to try:

(Again, I'm open to recommendations for tutorials for these and other Declarative languages.)

Step 4: Continuing Education

There are many interesting multi-paradigm languages out there. A few of the interesting/useful ones include:

It is also useful to learn an Assembly Language. There are many different kinds of CPUs, each with their own unique set of assembly instructions:

Further reading

C&T's Suggested Reading list - A lot of good books recommended by developers, for developers.