Learning to Program

Where should you start?

Many folks will recommend that if you want to learn to program, Python is a good place to start. If you want to learn a popular, general purpose langauge, sure, why not! Python isn't a holy grail, but it'll be a decent start.

Many folks will also recommend you follow a tutorial. I've found that it takes a certain amount of patience and trust to complete a tutorial and learn from it on your own. Tutorials and introductions are useful to get the basic lay of the land, but then, you'll see a lot more growth by trying to make something. What? I don't know. Think of a thing you want to exist, and then make it exist.

Programming Concepts

There are a certain number of programming terms and concepts that are useful to know, no matter what language you want to use or what program you want to make. I've compiled some basics, which you might review as you are getting started.

Introduction to Programming with Python

Learnpython.org is a nice Python tutorial with interactive features. It's got information and interactive examples, but is pretty easy to jump around in. If you want a tutorial but you get impatient easily, you might find this to be a decent starting place.

Byte of Python is more like a textbook than a tutorial. If you are starting as a complete beginner and really want to learn how to create Python programs on your own computer, this is the place to go. Unlike some interactive tutorials, it covers installation, setup, problem solving, and more.

If you've got something else in mind, The Hitchhiker's Guide to Python has links to every imaginable tutorial and resource.

For just a quick syntax reference, see my brief guide to the right.


Functional Programming with Haskell

Are you feeling adventurous? I think I grew the most by learning about functional programming in Haskell. It's going to be a lot different than what lots of people might recommend to you. If you're up for it, trust me here.

Haskell is a purely-functional programming language, meaning it works a lot more like mathematical logic than like other programming languages. In Haskell (and in Excel spreadsheets, for example), we specify what we want computed. In most other languages, we specify how and when to compute it. This subtle difference is a profound one, and makes Haskell code brief, concise, and mathematically provable.

Try Haskell! is an interactive tutorial where you can run Haskell in your browser. If you just want to see what all this is about, start here.

Learn You a Haskell for Great Good is my favorite beginner's guide to functional progamming. It's got clear descriptions and a sense of humor that make it a joy to read, along with lots of examples to help you see for yourself how things work.

Real World Haskell teaches you how to make things. As we said before, making things is good, and this book will show you how to make things that are actually useful.

More Practice

If you've gotten a hang of the basics and want some problems to practice with, there are plenty of ways to do that.

Project Euler is one of my favorite collection of problems. These mathematical problems are often easy to understand, but challenging to solve quickly and completely. This is a perfect way to practice your problem solving and decomposition skills, because you'll often need to solve a simpler, related problem before you can tackle the whole thing.

Daily Programmer is a subreddit with a wide variety of problems, categorized by difficulty. Here you can also see what solutions others have proposed and ask for feedback on your own solutions too.

Daily Coding Problems is an email list that sends out programming interview questions daily, and is good if you want to practice data structures and algorithms.