Tuesday, January 13, 2009

Teach students to write open source software

A few years ago I proposed a new course at NYU: Production Quality Software. It requires students to complete weekly assignments, conduct code reviews, write unit tests, think carefully about API design, and repeatedly iterate on their solutions based on peer feedback. Even the submission process was reworked with real software engineering practices in mind...every student gets a Subversion repository. There's no reason to use email when svn export works just fine. (And why not teach them another tool?)

To drive home the idea that sharing code is a Good Thing, and to teach them the joys and perils of open source, the final project is a contribution to an open source project of their choice.

Fall 2008 marked the third time I've taught this course. Student reviews came back positive, and the list of open source project contributions continues to grow:
If you teach software engineering, consider asking your students to share code with each other (after you've collected it) and to work on open source. Give them the satisfaction of knowing that their work is not an academic exercise, but a real contribution to a living breathing product.

If you're a student, consider doing code reviews with your peers once your assignment is over. A session with half a dozen other programmers will surely yield more suggestions than your TA or Professor (you're probably the 42nd implementation they're reading). Make it a regular habit and you'll find your code gets better with every assignment.

0 comments: