Archive

Archive for September, 2009

Teaching Computational Thinking on the Web in Just Two Hours

September 16th, 2009

Someone once said, “Never set yourself achievable goals.” I’m willing to bet he died a lonely, bitter man, and I have no desire to follow in his footsteps. However, I do have to figure out what the Software Carpentry course should try to teach scientists about programming for the web. I have to teach something: getting data from the web, and making data and useful programs accessible to others, is high on everyone’s wish list, and crucial to being a more effective scientist.

But even basic web programming would be a course unto itself. At best, there’s room in Software Carpentry for two hours of lecture and four hours of practical work. Students will be comfortable with strings, lists, loops, conditionals, and functions; they will have just met regular expressions, XML, and databases, and their grasp of these topics will still be pretty shaky. It’s hard to cover even simple CGI programming with those constraints, and morally questionable as well—there are just too many ways they could leave their machines open to compromise.

I’m tempted to introduce them to an RSS-based mashup tool like Yahoo! Pipes, but (a) it’s closed-source and proprietary (which means it could disappear at any moment, like FuseCal and so many others), (b) getting data from your own machine requires exactly those skills we don’t have time to include in the two hours (or a friendly sys admin with time on her hands). Is there an open source tool that does similar things? It’d have to be much (much, much) lighter weight than scientific workflow tools like Taverna, allow users to mix local and remote data/processing/services, and be nearly trivial to extend.  Any pointers?  Or is anyone interested in helping write such a beast?

Software Carpentry

First Gov 2.0 Class

September 15th, 2009

The first class in my Government 2.0 consulting course was held yesterday in a sauna in the International Students’ Centre.  Dave Wallace, head of IT for the City of Toronto, talked to the students about the background and goals of the city’s Open Data initiative, and then Julia Smith and Sam Heath (a pair of recovering management consultants) talked about what consulting is and how students could go about figuring out what they’re trying to accomplish this term.  The students’ first homework assignment is a pair of treasure hunts: they each have to find and describe two open government applications on the web, and two sources of interesting data about Toronto (not necessarily from the city itself). Mark Kuznicki rattled off a list of starting points for the students, which are listed below:

If you know of more, please add them in comments—the students would be grateful for your help.

Government 2.0

Help Wanted: New Version of Software Carpentry Course

September 15th, 2009
Comments Off

I’ve posted a note on the Software Carpentry blog describing how I plan to rewrite the course, and asking for help with some outstanding issues.  Your input would be very welcome.

Software Carpentry, Teaching

Videos from Gov 2.0 Summit

September 14th, 2009
Comments Off

http://gov2summit.blip.tv/posts — the hype-to-implementation ratio is higher than I’d like, but there’s still lots of good stuff here.

Government 2.0

You Can Tell It’s the Start of Term…

September 13th, 2009
Comments Off

…because I’m reduced to posting links instead of thoughts:

And some sad news: unless the Pennsylvania State Legislature acts quickly, the Free Library of Philadelphia will close its doors in less than a month.

Uncategorized

A Few More Links on Gov 2.0

September 11th, 2009

Government 2.0

New Book Project

September 10th, 2009

By the time the Seven Years War with France ended in 1763, Britain had lost 1512 sailors in action—and almost 100,000 to scurvy. What makes this ironic, as well as tragic, is that a Scottish surgeon named James Lind had shown twenty years earlier that a little lemon or lime juice every day was enough to prevent or cure the dreaded ailment. Lind discovered this in what may have been the first controlled clinical trial in history: he divided 12 sailors with scurvy into six pairs, and gave each a different treatment. Those treated with sea water, sulfuric acid, garlic, and vinegar worsened; those who received cider got slightly better, and those given lemons and limes improved dramatically.

It was more than a century before medical practitioners began paying attention to “numerical” trials of this kind in large numbers. As late as the 1950s, when Hill and Doll began tracking the effects of smoking on cancer rates, many doctors rejected the results, saying that what happened “on average” was of no help when they were faced with a specific patient. By the time Sackett coined the term “evidence-based medicine” in 1992, however, most practitioners accepted that decisions about the care of individual patients should be based on conscientious, explicit, and judicious use of current best evidence.

Until recently, this idea—that claims and practices should be based on evidence—was foreign to most software developers. For example, many programmers believe that their favorite programming language is more natural, more expressive, or easier to learn than others, but when pressed, cannot back up their claim with anything stronger than a couple of anecdotes or “but it’s obvious!”

Let’s take just one recent bandwagon: domain-specific languages, or DSLs. A recent article in IEEE Software extolled their virtues, claiming that using them improves programmer productivity. This claim might be true, but the article did not cite any data, and one could just as easily argue that DSLs actually lower productivity by increasing the cost of maintenance.

This is starting to change. Any academic who claims that a particular tool or practice makes software development faster, cheaper, or more reliable is now expected to back up that claim with some sort of empirical study. Such studies are difficult to do well, but hundreds have now been done covering almost every aspect of software development, and those that are done well are as elegant as classic experiments in physics, psychology, and other scientific disciplines.

To date, these studies have mostly been confined to academia. Most professional developers are vaguely aware of some of the results, but often get the details wrong. For example, hundreds of books, blog posts, and presentations claim that the best programmers are forty times better than the worst—or fifteen, or a hundred, or some other number. Almost none of the people repeating that claim realize that it originally came from a very small study (twelve people) run for a very short time (one afternoon) in an era of batch processing and punch cards. The reality is more complex, but also more interesting, and if people are going to base hiring and working practices on something, shouldn’t it be reality?

The goal of this book is to present the most beautiful (and important) evidence-based facts we have about software engineering. Like Beautiful Code and its successors, this book will consist of a collection of personal essays. Each contributor will pick their favorite empirical result in software engineering and explain both what we know, and why we believe it to be true. In some cases, the work they describe will be their own; in others, they will pull together the work of several people to explain how far our understanding has progressed, and what questions are still open.  Two dozen people have already agreed to contribute essays, and to donate their royalties to charity.

The book is aimed primarily at professional software developers and their managers, though it should be useful as well as a textbook for senior undergraduate students in computer science or software engineering. It assumes readers know how program, and are familiar with concepts such as agile development, the waterfall model, and so on. They are probably already reading books like The Pragmatic Programmer, The Mythical Man-Month, and Design Patterns. They may or may not attend topic-specific conferences, but they definitely read technical blogs by the likes of Martin Fowler, Jon Udell and Bruce Schneier.

If all goes well, the book will be available next summer.  We hope that it will:

  • Tell developers and their managers what we actually know about software development, and why we think we know it, thereby (hopefully) dispelling a lot of the folklore, mythology, and outright BS that plagues our profession.
  • Give readers the facts they need to make sensible decisions about what working practices and tools they ought to adopt (or discard).
  • Show people what “evidence” looks like in software engineering, so that they can hold would-be gurus and salespeople to realistic standards.
  • Provide a channel for communication between the two cultures of academic research and industrial practice, to the benefit of both camps.
  • Give students a more interesting, readable, factual, and up-to-date source of knowledge than existing software engineering textbooks.

I’m really looking forward to this one—hope you’ll enjoy it too.

Making Software

Why I Teach (Part 3)

September 8th, 2009

Back in June, a high school student contacted me by email to say that he’d like to learn more about programming. Ten weeks later, he has built this not-so-simple physics engine using Python and Pygame, and is now learning web programming with Django. I think he’s having fun; I know I am, and I’m grateful for the chance to pay forward all the opportunities and extra time that my teachers gave me over the years. I haven’t spoken to Mr. Biczo, Mr. Taylor, Mr. Dowd, Prof. Woodside, or Prof. Wallace in years, but I’d like to think they’d approve.

Teaching

Upgrading Their Plots

September 7th, 2009

Everyone who writes does so for their own reasons. I got into it because I got tired of coming to the end of an article or story and thinking, “I could do better than that.” (OK, to be honest, my friends got tired of me saying that and told me to put up or shut up.) I don’t write much any more, but I still have that reaction.

For example, Aliens 3 was on the other day. It sucked. The first two films were great, but the third just felt tired. You know what would have been a better plot? Ripley discovers that there’s a third stage in the aliens’ lifecycle, one that’s intelligent and civilized. They drop eggs on a new planet, wait for stages one and two to wipe out everything dangerous, then poof, out comes Stage 3 to give you paved roads and quantum physics and what-not. The tension in the film would be whether or not Ripley could leave her “unfortunate” early experiences behind and connect with the third stage aliens or not, which would have been very topical for an American film as communism came to an end in Europe.

And what about Battlestar Galactica? Lots of great writing in the first two seasons, but come on, the ending? They walk away from hot coffee and decent medical care to breed with Australopithecines and make us? Bah. Bah, I say, and double bah. You know what would have really rocked? If they’d found the two-thousand-year-old hulk of the Galactica in orbit around Kobold, and spent the next two seasons figuring out how it—how they—have traveled back in time, and whether the past was written in stone, or if they could change it somehow. If nothing else, it would have been a much better use of the black hole that the evil Cylons’ base was parked in front of at the end of the series…

What makes this more than just sour grapes is the prospect of actually being able to make “my” versions of these movies. Digital animation continues to go from strength to strength. Ten years from now, studios will be able to reverse engineer digital actors from old footage; not long after that, I expect technology to reach the point where dedicated amateurs can sample and remix film, just as they now do with music.

So, what would you re-write and re-make? A Terminator 3 in which Arnie plays the (human) scientist chosen to carry on with Miles Dyson’s work, and John Connor tries to stop him? What would you do first?

Writing

My Other Identities

September 6th, 2009
Comments Off