Codecademy teaches JavaScript programming through the browser: follow instructions, type in code, move on to the next step. This is similar to the (slightly more amusing) Rails for Zombies.

Browser-based code classes look promising for classroom teachers: there’s no need to install compilers or even text editors, making this environment much easier to set up in a lab. Students can also continue their work easily at home, with (some level of) instant feedback from the built-in help system.

The associated Hacker News post has some interesting suggestions, and the comments from non-programmers about the course’s difficulty can be quite enlightening to anyone trying to teach a programming course.

Making MacVim open files in vertical splits

When coding, I like to use MacVim with PeepCode’s little PeepOpen app as my auto-completing filename browser. It’s like TextMate’s Cmd-T “Go to file” functionality, and it’s awfully fast and convenient.

One problem I’ve had, however, is that MacVim’s preferences (as at snapshot 61)* only allow you to open files from other applications (in this case, PeepOpen) in the same window, a new tab, or in a horizontal split. Here’s how you set MacVim to open files in vertical splits — open a terminal, and enter:

defaults write org.vim.MacVim MMVerticalSplit YES 

While I’m at it, here’s another useful one: this link shows you how to edit mvim, the command line script to open MacVim, so that it doesn’t open new windows when called multiple times from the command line.

* There’s a pull request to make MacVim’s “open files” preference a bit more sensible: in a new window, in the current window, in tabs, in horizontal splits or in vertical splits. Hopefully this makes it into future builds, because seriously, who the hell understands “open files and set the arglist” as “open in current buffer”?