I Want Your (Comments On Your) Code

At the start of term, I had my CSC301 students do a code review on the Speed Scrabble referee the TA had written. They found a handful of out-and-out bugs, and made another handful of suggestions about ways the referee could be improved. I’d like to do this exercise again in future courses, but to be fair to the students, I would first like to show them examples of what a code review is supposed to produce. When I look on the web, though, what I find is:

  • General guidelines, like Macadmian's code review checklist. Most of the items on this list could and should be checked by tools (Checkstyle, FindBugs, etc.); the rest won't mean much to students without examples of depth and scope.
  • Examples of code that's really bad (e.g., the Daily WTF), or, less frequently, really good (even beautiful ;-)).

What I need is code snippets of average quality that are 2-4 pages long (say, a couple of hundred lines), plus commentary on those aspects that can’t be checked by machines (architecture, algorithm choice, etc.). If you’d be willing to contribute a few examples, please let me know: I’d be happy to trade pizza, beer, or whatever else you need that’s cheap (including public recognition).

In the wake of posts about Shopify's support for white nationalists and DataCamp's attempts to cover up sexual harassment
I have had to disable comments on this blog. Please email me if you'd like to get in touch.