getting into programming

Jan 2, 2015  

I saw an ad for Codecademy1 in the footer of some web page, and immediately had mixed reactions. I’m all for making programming a basic skill alongside reading and writing, but the focus of these “bootcamps”2 seems to be vocational web development3.

This is finegreat for people who really want to do that and until now lacked a way to acquire these skills in a focussed manner. But I’m worried that this will replace what computer science or programming mean to a whole generation of kids4.

(Note: to be fair, there are bootcamps which are exceptions to the rule5, that focus on a wider array of skills)

While tweaking web pages might offer an instant gratification that can be sufficient for most people, I hope there are lots of kids who’d like a bit more “hard core” approach. In the past, I have always believed this path to best consist of C followed by Python followed by Scheme.

This is still a great way to proceed, but I now think I have a better prescription: replace Scheme with one of Racket6/Common Lisp/Clojure/Haskell7, and replace C and Python by a single language: Go.

The more I think about it, the more I am convinced that Go is an excellent way to learn programming. It fulfills the requirement of “learning about the machine” (since it’s syntactically similar to C, but safer) and being quick to develop and iterate (as in Python, it’s very easy to install external libraries, build, run, fix, run again, etc)

I’m thinking here of a 10-year old kid (ok, a 10-year old kid who wants to learn). There’s stuff like Scratch8 and Logo9 for younger kids, and various programming tutorials aimed at slightly older kids, but what’s the best way to target this kid? I think it’s by getting him/her to play around with (1) some flavor of unix, and (2) learn Go. Both are free.10

There’s never been a better time to get acquainted with the nuts and bolts of computers – you don’t even need to get a real one! These days major “cloud providers”11 have some “free usage” tier, and an easy way to register for a single VM12.

The best part about using a VM instead of a “real computer” is that you don’t have to worry about crashing it, or otherwise doing anything irreversible. Reached a dead end? No problem, delete the VM and re-provision it.

Which brings me to the second part, using Go. The Go playground13 makes an initial introduction dead simple, but getting up and running locally is just as straightforward. The syntax is very simple and it’s easy to bang out lots of code and immediately see it working. (also, one of things a kid won’t have to learn with Go? makefiles!)

A question that remains is “what exactly to do with Go?”, to which my answer is “simple text-based games”.

So yeah … this is the train of thought I’ve been carrying about for the past few days. BTW … it’s New Year’s Eve, so happy new year!14

  1. [return]
  2. See this exhaustive list for a “30,000 feet” overview) [return]
  3. E.g. “Deep Dive Coders” features HTML5, CSS3, Github, javaScript, jQuery, Apache, MySQL, php, while “Makers Academy” features Ruby on Rails, HTML5, CSS3, Javascript, jQuery, Git, Agile and Lean (whatever “lean” means) [return]
  4. By which I mean ages 9 to 90 (!!) [return]
  5. E.g. “Fullstack Academy” – though I’m not sure if the name necessarily means what it does, since “Refactor U” promises Full-stack JavaScript, Node.JS, HTML/CSS [return]
  6. Which I think of as “Scheme + useful libraries” [return]
  7. A contentious choice indeed; more on this later(!) [return]
  8. [return]
  9. [return]
  10. as in speech, and as in beer [return]
  11. hate that term, but I don’t know what else to use [return]
  12. and even the smallest droplet on DigitalOcean, which is more than enough for this purpose, has a monthly price that’s about the cost of a Venti Frappucino [return]
  13. [return]
  14. Although – thoughts like these are similar to New Year’s resolutions, which means you need to consider the possibility that this entire post was conceived in a spirit of naive optimism.¯ [return]