Don't Just Learn to Code; Learn to Program

Posted 2014-03-06 09:45 PM GMT

Paint by number

There has been a lot of excitement lately about learning to code. As a part of "Hour of Code", Khan academy,, and codecademy all have tutorials that help you code up some sort of app within an hour. I love the excitement and the push to make programming more accessible to more people, because it certainly didn't feel accessible to me when I was teaching myself to program.

I was recently reading an article on Medium about how easy it is to learn to code. The article promotes the same excitement as the "Hour of Code" program, but something about it didn't sit right with me. The author argues that you already know how to code, because code is just a series of instructions. I don't really disagree: we all know what "if" and "while" mean. However, "IDE", "parse", "compile", "interpret", "execute", "invoke", and "runtime" are not really so familiar, but they are just as important for making your code do something. This article that claims that learning to code is easy starts with a "simple" code example that includes such difficult concepts as "dependency management", "static data types", and "return values".

In my opinion, you will be much better served by learning to program rather than learning to code, and there is a subtle, but significant difference between the two. Writing code is just one part of creating a program. Websites like codecademy do a great job of teaching you how to code, but you can't really apply those coding skills when you leave the codecademy website unless you learn how to program. It's a lot like trying to learn to paint using paint-by-number. You will have learned how to put paint on a brush and apply that paint to a canvas, but you haven't learned to choose paint type, choose colors, mix paints, stretch canvas, or any of the other skills you need to actually create your own painting. The paint-by-number kit has done all of this hard work for you. Similarly, online coding tutorials handle all of the hard parts for you. They give you a place to write your code, set up an environment for you to execute, and give you a place to see the results. Without these foundational skills, you will never be able to create your own programs. If you can never create your own programs, what's the point of learning to program?

When I taught myself to program, I was often frustrated because I was trying to learn to code without learning to program. To this end, I am writing a book that teaches the the foundations of learning to program.

Don't just learn to code; learn to program.