Craft 13

Beautiful Code
Ka-Ping Yee

For this final part of the course, your team will review another team's project.

Here's what I'd like you to do for next week:

  1. Read and understand the basic structure of the code in the project.
  2. Draw a diagram summarizing the main parts of the program and how they go together. (A paper drawing is fine; please just scan it in.)
  3. Choose any unit (function, method, class, module) of the project with at least 30 lines (not counting blank lines or comments), that you feel could be improved, and polish it. That is, add or edit documentation if necessary; change any names that you think are unclear; rearrange the code to make it more readable and concise. (You can also choose a few units that add up to at least 30 lines, if you like. But please don't choose lots of tiny fragments: no single unit should be less than 10 lines long.)

And then do this for the week after:

  1. Decide on one (fairly modest) feature to add to the program. Send me e-mail describing what you want to add. Then add it.

You are allowed (and encouraged!) to consult the original authors of the program with questions to help you understand what is going on. However, the original authors are not allowed to write any code for you; you must make the modifications yourself.

In class next week and the week after, we'll do review presentations. For your presentation:

  1. Present your diagram, and give a five-minute overview of the code in the project.
  2. Present a before-and-after comparison of what you polished, and explain why you made the changes you made.
  3. Present the feature you added, and explain what you had to do to add it (unless your presentation is in the first week).

Submit your diagram here. Any image format that shows up in a web browser is fine.

Submit the original code you chose, before polishing.

Now submit the code you chose, after polishing.


Log in to submit this assignment.
This assignment is due on Monday 28 April at 6 pm. You get a bonus if the assignment is submitted at least 24 hours early.