The Cyclic Life of Code

The cyclic life of code technique reflects the longevity of code in the open source world. Any student-submitted code, from isolated exercises to term-length projects, becomes a permanent part of the computer science program's repository. This code feeds back into the sample code bazaar or test infection techniques as sample programs, implementations against which unit tests can be run, or on-going projects for incremental improvement or refactoring.

Another variant of this technique involves "continuity of code" across courses. Since all student submissions are stored permanently, code that a student wrote in freshman year may be revisited in later years. For instance, a student may design and implement a grammar in a programming language course then generate code for it in the subsequent compiler construction course. Implementations of small utilities like partitioning, merging, permutation generation, and game state evaluation in early courses can be used in subsequent advanced algorithms or artificial intelligence classes. Separation of concerns can be taught hands-on by asking a student to implement a graphical user interface for a text-based program written in freshman year. Algorithms written in a sophomore data structures course may be "presented" with a Web interface in an Internet course during junior year.

Revisiting their own old code may give students a greater appreciation for proper documentation and structure --- after all, if they have issues with re-assimilating their own code a year (or less) later, what more if the code is inherited by someone else?