Learning programming: the deep end of the pool

Computer Science Prof Zack Kurmas writes about the challenge of teaching introductory programming:

> I believe that expecting a student to learn to program well enough to study Computer Science in a single 15-week course is almost as absurd as expecting a student with no instrumental musical experience to be ready to join the university orchestra after 15 weeks. There are, of course, musical prodigies that can handle this challenge. Likewise, there are many “natural born programmers” who learn how to program with very little apparent effort.

Kurmas makes some very good points: that almost every other college programme has some basis of preparation in a standard high school curriculum, hence creating a much steeper learning curve for CS; that CS education could be better modelled after a foreign language learning framework; and finally, that he might just not be very well-suited to teaching intro CS, as a “natural-born” programmer.

This post was linked from Steve Losh’s response, which is also a good read for CS students and educators. Losh provides an interesting analogy about the difficulty of learning programming and dancing:

> The first plateau of programming is the syntax and the first plateau of dancing is footwork. The bad part about this is that dancing when you only know footwork or programming when you only know syntax isn’t much fun. You can’t do all of the most interesting things that make these skills so rewarding.

Escalating enrolment in Computer Science

Prof Eric Roberts on how the intro CS courses at Stanford have surpassed even pre-tech bubble numbers. He notes that the students coming in seem different this time round:

> The students who are now inflating the ranks of CS106A are, it seems, deciding to take a computer science course as a way of bolstering their credentials before they emerge into a weak economy. Most have majors in other areas but recognize, probably correctly, that having programming skills will likely increase their chances of gaining employment in their own field. A surprising number of those students, however, once they get into our introductory courses fall completely in love with the material and continue on to double the size of the downstream courses in the curriculum.

I didn’t take many CS courses back in the day, but I have great memories of being part of the CS106 course assistant team. After having planned and taught my own intro programming curricula, I’m now even more impressed by how effective CS106 was, with its engaging assignments, well-planned structure and overall strong pedagogy. I’m glad more students are giving this course, and computer science, a shot.

The courses are available online for free, if anyone’s curious.

DFLL plugin update: now supports “Press This”

The Boring Backstory

On Tuesday, I read about Justin Blanton’s Slugger+ WordPress plugin, which allows you to set your post slug by entering your desired slug enclosed in [slug] tags, e.g. [slug]this-is-my-slug[/slug]. I wondered if I could adapt my Daring Fireball Linked List plugin to do the same, i.e. if someone entered, [dfll]http://yjsoon.com[/dfll] somewhere in their post, the plugin could find the URL and set the custom field link to it.

So I tried implementing this, and I was stalled when I ran into a problem. Apart from posting it on the WP forums, I emailed Justin to see if he had any ideas. Coincidentally, he had been working on the same feature, and he’d also run into the same problem! I went off for work, and a few hours later, Justin emailed to say he’d solved the problem, and he released his CF Setter plugin the next day.

After CF Setter was released, I decided not to replicate its functionality in my plugin. (If you’d like to use that feature, go take a look — you just need some minor adjustments to get it to work with my plugin.) Instead, I thought I’d try and adapt Justin’s code to solve another problem: posting using WordPress’s built-in “Press This” bookmarklet. Shawn Blanc had put up a customised version of the bookmarklet’s code a while ago, but I was never comfortable with editing core files, what with automatic upgrades and all.

New Coolness: Link from Post Content

So, long story long, a few hours and a lot of painful regular expression writing later, the new DFLL plugin supports “Press This” by extracting the link from the first anchor tag in the post content.

Here’s how you use it: First, turn on the setting in the options page. Next, on any page you’d like to link to, just click the “Press This” bookmarklet, and the following will pop up:

Screen shot 2011 03 31 at PM 08 15 13

Click on the end of the first line, press enter (be careful not to delete the period!), and type whatever comments you’d like. The plugin will automatically grab the URL in the first line, set it to the linked_list_url custom field, and delete the entire first line for you, preserving whatever you’ve entered into the rest of the post content. Ta-da! Linked list item!

If you’d like to use this with the MarsEdit bookmarklet, you can customise the Attribution preference as follows:

Screen shot 2011 03 31 at PM 08 25 09

More details are on the DFLL plugin page, which I’ve linked to thrice already in this post. Many thanks to Justin Blanton for his plugins which both inspired and laid the foundations for this feature.

Questions and comments? Look for me on Twitter or through the contact form.

Old counters

I received an email from Facebook a couple of weeks ago, telling me to update my Facebook apps (Bond Counter and NS Counter) because they called some functions which would be deprecated.

I haven’t been keeping track of developments in the Facebook API, but looking through the changes, I realise Facebook is no longer allowing apps to put themselves on user profiles as little boxes. This move makes sense given the new profile, but renders my apps slightly useless, because they were intended to show off your counters to the world.

I put off making any changes until today, which is apparently the deadline for any changes, because (a) there are too many other more interesting things to work on right now, and (b) I really don’t like looking at my old code. I was even tempted to just pull the plug on the two apps, but then I saw that each still has “monthly users” (20 for Bond Counter, 150 for NS Counter), whatever that means.

So now the two apps are severely crippled — you can see your bond/NS counter from your own app page, and you can still compare counters with friends, but that’s about it. I don’t have the time to figure out how to do an application tab, which is apparently the wall box replacement, but this is good enough for anyone who really still uses these apps.

I also realise now I didn’t write about my bond having ended in August! Well, it did, and I no longer need Bond Counter. Making this little app, and seeing it spread, was really one of the highlights of my indentured service, though.