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.

LOLMAO

You might have already seen this, since [mrbrown](http://mrbrown.com) linked to it on Twitter. Posting on the blog for posterity anyway:

Lolcat9dce5677436502d890d6d7281964d0c7b8ffcb58

It’s been a lifelong* ambition of mine to get a [LOLcat](http://icanhascheezburger.com) picture published**, but this will have to do for now.

\* _Mild_ exaggeration.

\** This may or may not have influenced how much I supported Joey when she adopted our ridiculous cat. Shh, don’t tell her.

DFLL now integrates with Twitter Tools

…or, another edition of “OMG SHUT UP WHO CARES ABOUT YOUR STUPID PLUGIN!!!!1”.

Anyway, I’ve updated the [DF Linked List WordPress plugin](http://yjsoon.com/dfll-plugin) again:

* Fixed RSS feed validation. Many thanks to [Michael Camilleri](http://inqk.net) for pointing this out and pushing a fix! Getting to discover blogs like [his](http://inqk.net/weblog) is one of those happy unintended results of having written this plugin.
* Added [Twitter Tools](http://crowdfavorite.com/wordpress/plugins/twitter-tools/) integration. Now you can add a glyph in front of tweets that link to non-linked-list posts, just like how Gruber does it for the [DF Twitter account](http://twitter.com/daringfireball). In addition, you can also add a glyph or text (e.g. “Link:”) in front of linked list item tweets. Thanks to [Ben Brooks](http://brooksreview.net) for the suggestion on this one.

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).

Screaming Cat

I bought a stylus for drawing on the iPad. It’s _far_ more natural than finger-painting, and a lot less tiring. Pressure sensitivity would be nice, but I don’t miss it that much.

Essence of chicken, and mini-review of Inkpad

A first experiment with [Inkpad](http://www.taptrix.com), a vector drawing tool for the iPad. Some thoughts:

* I’ve found drawing on the iPad (previously with [ArtStudio](http://www.iphoneclan.com/artstudioipad/)) to be much more enjoyable than on the tablet (as in Wacom). Drawing vectors is even better, since I can easily edit my usually inaccurate finger-painted strokes. In addition, editing control points feels a lot more natural on the iPad than on the tablet (problems with pudgy fingers aside).
* I bought the app hoping I could do my [comic](http://stupidchicken.com) on it, but I might just end up going back to the tablet. My main quibbles are that I can’t (or haven’t yet figured out how to) “pick up” a path to continue drawing it, and that the interface requires a bit too much tapping for my liking. For example, some operations (join, delete, bring forward/backward) are only accessible through menus, so I end up tapping in and out of them pretty frequently. Furthermore, switching between tools just feels like a huge chore without keyboard shortcuts, but I guess that can’t be helped on this platform.
* That said, I think the design of the app is pretty remarkable, given that I could use it to draw something without reading any instructions at all. (I also can’t find instructions now, but I could just be stupid.)

Monkeyman demands to be served

Hey! HEY! YOU! Why is my order taking so long? What do you mean, it’s not recorded? Wait, what? You don’t serve monkeys here? That’s not what your other waiter said — fine, yes, she ran off screaming, yes. But I shouted my order after her! What do you mean, no shirt, no shoes, no service?! Can you tell how much bloody effort I took to make myself look presentable with this hat?! LOOK, I EVEN BROUGHT MY OWN DAMN UTENSILS. Come on, I’m hungry, I’m willing to pay, and… hey! HEY! COME BACK HERE! Man, service here is shit.

(Done with ArtStudio on iPad.)

How to self-update Mail.app plugin compatibility

The new MacBook Pros ship with a new version of Mail.app (4.4/1082.1, vs 4.4/1082 previously). Nothing much seems to have changed except the version number, but an annoying side effect manifested when I first started the program: all my mail plugins* were deemed “incompatible” and promptly disabled.

As this wasn’t a major version update, not all my plugins had been updated for compatibility, __but__ I figured there wouldn’t be any real compatibility issues (not ones that required re-compilation, anyway). As such, I performed some minor plumbing and restored their functionality. Your mileage may vary, but here’s how I did it:

* In Finder, navigate to _~/Library/Mail/Bundles (Disabled)_.
* Ctrl-click on a bundle, and select “Show Package Contents”.
* Navigate to Contents, then open Info.plist with a text editor (e.g. TextEdit).
* Near the end, look for a <key> called SupportedPluginCompatibilityUUIDs, where you’ll see a bunch of <string>s denoting compatible Mail versions.
* For __this version of Mail__, just add this line right before the closing </array> tag: <string>36555EB0-53A7-4B29-9B84-6C0C6BACFC23</string>
* (For future versions of Mail, if you’d like to try this hack, start by looking at plugins that are already compatible. In their Info.plist files, try to identify the compatibility string to paste in.)
* Save the file, move the bundle back to _~/Library/Mail/Bundles_, and start Mail.
* WOOHOO, YOU’VE CHEATED THE SYSTEM! YOU LEET HAX0R!!! (Does anyone still say that?)

\* [DockStar](http://www.ecamm.com/mac/dockstar/), [Mail ActOn](http://indev.ca/MailActOn.html), [Letterbox](http://harnly.net/) and [MailFollowUp](http://www.cs.unc.edu/~welch/MailFollowup/index.html).