(description of Metacademy)
But some topics are so important and fundamental that they appear all over the place. If you do any sort of programming, there are some basic concepts you'll simply have to be familiar with: control structures, functions, arrays, and so on. These are the air you breathe, the water you drink. Trying to list all the things that depend on them would be hopeless.
If you have already taken a university level programming course, or AP Computer Science, or have taught yourself enough programming to write simple programs (e.g. games), then you know enough to use Metacademy. You can skip the rest of this roadmap. If not, then read on.
What language to start with?
All the languages I just listed are procedural programming languages, where statements are executed in order. At some universities, the introductory courses are taught in a functional programming language, such as Scheme or Haskell. You're free to follow this path as well, and being comfortable with functional programming ideas will pay off even in imperative programming languages. But be warned that this road can be more difficult, since the mapping between programs and algorithms is less obvious. Also, since functional and imperative languages are very different, it will be more work to translate what you've learned from one setting to the other. (Introductory college courses which use Scheme or Haskell are typically intended for students who have already done some programming in an imperative langauge.)
If you don't have a reason to want to learn a particular language, our recommendation is to start with Python. Here are some of the advantages:
- The core language is clean and simple, and presents fewer hurdles to beginners compared with some of the alternatives
- It is an interpreted language, so you can quickly experiment in an interactive shell
- It is a very widely used language, with among the best software platforms for web development, data science, scientific computing, etc.
What to learn?
You should be comfortable with all the things we use on a daily basis when programming. In particular:
- Know the basic syntax of the language: statements and expressions, comments, etc.
- Know what variables are and what it means when you assign to a variable
- Be familiar with basic data types like integers, floating points, and strings, and the operations you can use to manipulate them
- Know and be able to use the basic control structures: conditionals and loops
- Be able to decompose your code into functions and understand why it is a good idea to do so
- Know the language's common idioms for iterating over arrays and associative arrays
- Know the language's paradigms for reading and writing from files
- Be able to use a debugger
- Know the basic guidelines of good coding style
[TODO: suggest a few fun little projects to practice/test your skills]
Where to learn?
There are hundreds of textbooks, online courses, tutorials, and other kinds of introductions to programming out there. Any of them will probably cover all or most of the topics listed above. We list here a few free online resources which we happen to know about.
Option 1: online programming course
Do one of the following:
- The EdX course CS50, Introduction to Computer Science, is Harvard's introductory programming course, aimed at non-majors. This has a light-hearted style, with high production values. The course covers several languages, but the relevant parts are taught in C. You should watch the videos for Weeks 0 through 3, and do problem sets 1 and 2.
- 6.00sc, Introduction to Computer Science and Programming, is MIT's introductory computer science course, taught in Python. You should watch the lecture videos for Unit 1, which corresponds to about 1/3 of a semester course. Try the Unit 1 Quiz at the end.
Option 2: textbook
Here are some free online programming textbooks. Work your way through any one of them, doing the exercises as you go.
- Think Python: How to Think like a Computer Scientist. This teaches you the basics of programming and of the Python programming language. Read up through the chapter "Classes and objects" (roughly 2/3 of the book), plus the chapter "Debugging."
- The Art and Craft of Programming. This is another book which teaches basic programming concepts in Python. Read the whole thing.
Do one of the following: