Vim search Dash →  August 27

I use MacVim as my editor and Dash as my documentation browser. They’re great. Also, Dash has the best nag-screen mechanism I’ve ever seen.

If you use them, too, I wrote a bit of Vim script to make looking things up about 0.5 seconds faster each time. Imagine, all that productivity! Just position your cursor on the word you want to look up, leader-d, and the script will try to search the right docset in Dash based on the filetype you’re editing. E.g. for JavaScript files, I have it configured to launch js:term in Dash, which searches both the jQuery and JavaScript docs for that term. (Source: a great tip from Kapeli himself. Herself? Itself?)

I’d love to hear suggestions on how to generalise this, without manually adding docsets each time. I tried passing in the filetype to Dash as the search term, but got tripped up by some asset files in Rails that Vim thought were ERB…

Nick Farina has a conversation with Eclipse, Xcode, and Sublime Text 2.

Khan Academy does Computer Science, courtesy of John Resig, creator of jQuery. His blog post goes into some detail about the pedagogy they’ve adopted and the technology behind it.

Looks promising! Reminds me a little about how I was introduced to programming through the Logo Turtle and mucking around with DOS QBASIC games like Gorillas. We’ll see if we can try these exercises out with students at some point.

  XVim →  August 12

Great stuff: an Xcode plugin for Vim keybindings, customisable with a .xvimrc file. Actively maintained! (So far.)

Jeff Atwood went and set fire to the Internet a couple of days ago:

The “everyone should learn to code” movement isn’t just wrong because it falsely equates coding with essential life skills like reading, writing, and math. I wish. It is wrong in so many other ways.

This point feels a little stretched to me. I’m not sure where Atwood is getting these “coding is as important as reading/writing/math” vibes from, but why isn’t there a place for coding in schools beyond the core curriculum? Put another way: why exclude Computer Science / programming from that seemingly arbitrary list of auxiliary subjects that we make our schoolchildren learn over their 12 years of pre-university education?

The general populace (and its political leadership) could probably benefit most of all from a basic understanding of how computers, and the Internet, work. Being able to get around on the Internet is becoming a basic life skill, and we should be worried about fixing that first and most of all, before we start jumping all the way into code.

This part makes perfect sense. However, what he proposes here doesn’t have to be at the exclusion of teaching more people programming, yes?

Here’s a response, by Zed Shaw of Learn Code The Hard Way:

I wonder if he’s going to tell his kids they shouldn’t learn to code when they want to become just like Daddy? Probably not. He’ll gleefully run over and show them how to code and tell them it’s so much fun and that they should all do it and it’s the best thing ever! But, of course, your kids shouldn’t learn to code, and you shouldn’t, and your friends shouldn’t, just Jeff and his kids should.

I do think Shaw’s taking a bit far when he cites resentment as Atwood’s motivation for telling people not to learn how to code, but then, running a (very good, supposedly) programming education website could do that to your perspective. Both articles make good points, but I’d recommend Shaw’s to anyone feeling a bit deflated after reading Atwood’s.

An interesting argument: that calculating devices are now ubiquitous, and math should focus on computational problem-solving instead of drilling and memorisation. An example the author cites:

Computer languages allow students to transform ideas into action. Here is a simple rule that a math teacher might describe to her students: If the number is greater than 9, carry the 10’s place; otherwise add the number to the bottom row.

The solution for this can be expressed as a simple if/else statement:

if (number > 9)
    carry += number / 10;
else
    bottom += number;

There are, as expected, plenty of opposing views in the comments, but it’s good food for thought. Also noteworthy: the comments aren’t completely stupid. Not-completely-stupid comments! On the Internet! WHAT IS THIS WORLD WE’RE LIVING IN

From the blog behind the “Invent Your Own Computer Games with Python” book:

“[For] the casually interested or schoolchildren with several activities competing for their attention, programming concepts like variables and loops and data types aren’t interesting in themselves. They don’t want to learn how to program just for the sake of programming. They don’t want to learn about algorithm complexity or implicit casting. They want to make Super Mario or Twitter or Angry Birds.”

We’ve actually found that our students are usually quite happy to spend lots of time making silly console-output programs, like printing a pyramid of asterisks. However, the intro programming courses we’ve conducted have been for a fairly self-selected bunch.

The book is available online for free, and it certainly looks like a great instructional resource.

CS learners starting with web programming

January 27, 2012  |  Tags: ,   |  

On his blog, Kent from Anideo has started writing about transitioning from PHP/Rails programming to developing iOS apps. He writes very candidly and it’s a great read, both for web developers looking to dive into iOS, and for anyone teaching introductory programming.

I say the latter because Kent’s perspectives on compiled languages really surprised me (and, perhaps, other programmers who didn’t start with web programming). In this post, he tells us how, prior to doing iOS development, he had no idea what header and implementation files were. Worse, he couldn’t find much helpful information on the web, even on Stack Overflow.

Perhaps it’s a generational thing — many computer science majors before Kent probably cut their teeth entirely on compiled languages, and transitioning to web programming should have come pretty naturally to these folks. Going the other way, however, could seem very strange, even to a seasoned web programmer like Kent. (This could also explain the paucity of good information on SO, assuming that most contributors there are old and cranky enough to be all “WTF? You don’t know what .h files are?”.)

This trend doesn’t look like it’s going away, what with Codecademy, CS101-class and John Resig at Khan Academy all pushing JavaScript as an introductory language. I can’t really tell what Udacity is teaching first, but their CS101 topic, “Building A Search Engine”, seems to hint it’s probably not C (unless they’re really asking students to build Google from scratch, in which case sign up now!).

What do these developments mean? Probably not much to the field — “native” programming isn’t going away, and many more like Kent will figure their way into it — but for programming education, teachers may need to adjust quite a few assumptions about “what students already know” and “what to teach first”. There could also be a market for web-to-compiled textbooks. Oooh. (Watch as I proceed to fire up iBooks Author, fully aware that I’ll close an empty document in a few days.)

Microsoft has jumped onto the free-to-play bandwagon with its latest game, a text-driven adventure called Visual Studio 2010. The innovative new game marries the traditional interactive fiction text adventure with its arcane commands and exploration with the free-form, open-ended gaming pioneered by the likes of SimCity.

A follow-up piece to the previous link, which argues for digital literacy over coding skills:

Digital literacy means the the skills and confidence to take an active role in engaging in networks, and in shaping and creating opportunities – social, political, cultural, civic, and economic, and we shouldn’t be collapsing these broader rights into the relatively narrow concerns of computing science as a curriculum area.

Article via Fraser Speirs. Mildly surprising, to me at least, is his strong support for the argument raised in the link article, given that he’s a programmer and Computer Science teacher. This piece of his on “technology for subjects not traditionally well-served by technology” may serve to explain why, but I’m still trying to digest all of this.