First published: October 15, 2012
Last updated: July 29, 2014
For the past few years, I’ve had multiple people ask me how to start programming, or what tutorials I recommend. I thought it would be useful to compile a general list of useful resources, both for my future reference and for others’.
I generally tend to recommend Python as an ideal language for a beginner – it’s designed to be clear and easy to use, but doesn’t compromise in power (Python is an industry-level language used in companies like Google).
These are resources I found helpful for learning specifically the Python programming language.
Despite the name, this is actually one of the most useful and most clear tutorials I’ve found. Many other tutorials tend to be somewhat confusing, and either try teaching you to code without teaching the underlying reason behind things or takes things to the other extreme and becomes very confusing. This book very neatly avoids this trap, and is extremely clear and easy to understand and follow.
How to think like a Computer Scientist
This is a fairly new tutorial (or is an adaptation of an older one?) which I haven’t personally fully read through. It does appear to give a more comprehensive overview of Python then the previous tutorial while still being at the beginner level.
This is the official Python tutorial. As a beginner, I did find it was a bit confusing, mostly because it was moderately dense and progressed fairly rapidly. However, it will give a very comprehensive overview of the Python language.
I’d recommend that you pick either the first or second tutorial. However, they do present material in a slightly unconventional order, so it may be useful to occasionally consult the third, more standard, tutorial. I’ve also seen people say good things about Mark Lutz’s “Learning Python”. I’ve personally never read through it, but it may be useful if you prefer reading books instead of online tutorials.
However, I do NOT recommend you try reading Dive into Python. It’s written for people with prior programming experience, and so will be fairly difficult for beginners. It was also last updated in 2004, and is very outdated. It uses Python 2.2 or 2.3, instead of Python 2.7 or 3.0, so is missing several key language features.
However, I can recommend Dive into Python 3, the revised version of Dive into Python. The revised version is still geared towards people with prior programming experience, but is much more up-to-date and fixed many of the objections I had to the previous version.
If you have experience in other languages, and want to know in what ways Python is idiomatically different from other languages, or if you’re a beginner who wants to know what the “correct” way to write programs in Python is, try reading these articles. They explain some of the underlying principles of Python.
Most of these webpages come from Stack Overflow and were useful for understanding either confusing corners of the language, or topics generally neglected by tutorials. I’d recommend reading through these after you’ve completed a fair chunk of your tutorial of choice.
In general, simply reading through the top-rated posts on Stack Overflow is a good way to expand your programming knowledge. Besides the Python tag, try reading through the language-agnostic tag for more broader, general knowledge.
These articles are focused on information about coding in general.
Often times, I find that beginner programmers don’t know how to react or debug their code when things go wrong and often resort to making random and increasingly erratic changes to their code. I found this writeup by Eric Lippert to be a fairly good introduction on how to begin debugging and developing a more methodical mindset to writing programs.
Advice to Aimless, Excited Programmers
A lot of people learn how to program, but don’t really know how to move on beyond reading the tutorials, or how to get started actually coding something. This article addresses some of that, and the mindset you should adopt to begin coding.
This article doesn’t literally teach you how to hack, but does teach how the underlying motivations and mindsets programmers tend to have. I recommend anybody who wants to program to read this article.
These are a series of essays written by Paul Graham. I recommend you start from the bottom and work your way up (since the more recent essays are about startups), picking and choosing essays that seem interesting.
These are a series of essays that are more focused on general knowledge, and in some cases, the programming industry. The middle, green column has a list of recommended articles to read. Start from there.
An uber-list of additional free-tutorials on the internet.
Write tons of programs. The best way to learn isn’t through tutorials, but rather through practical experience. Find a problem that personally irritates you or a project that excites you, and try writing a program.
Consult Google/Stack Overflow/Documentation frequently. In Python, there’s usually an easy solution to most problems. Treat Python as a magic wand – usually, there’s already a solution to the problem you have, so long as you search for it.
Browse through the top-rated questions on Stack Overflow. You won’t be able to understand much of it if you’re a beginner, but they will sort of indicate interesting areas to investigate.