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](http://stevelosh.com/blog/2011/05/on-learning-and-teaching/), 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](http://see.stanford.edu/see/courses.aspx) 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+](http://hypertext.net/projects/sluggerplus) WordPress plugin, which allows you to set your [post slug](http://wordpress.org/tags/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](http://yjsoon.com/dfll-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](http://wordpress.org/support/topic/adding-a-custom-field-from-content_save_pre-filter-through-xmlrpc?replies=2). 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](http://hypertext.net/projects/cfsetter) 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](http://codex.wordpress.org/Press_This)” bookmarklet. [Shawn Blanc](http://shawnblanc.net/2009/08/wp-linked-list-plugin/) 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](http://yjsoon.com/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](http://www.red-sweater.com/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](http://yjsoon.com/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](http://twitter.com/yjsoon) or through the [contact form](http://yjsoon.com/contact).

Old counters

I received an email from Facebook a couple of weeks ago, telling me to update my Facebook apps ([Bond Counter](http://apps.facebook.com/bondcounter) and [NS Counter](http://apps.facebook.com/nscounter)) 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.