Sample Code Bazaar

Sample code bazaar refers to the creation and maintenance of live, organized, searchable, student-accessible sample code libraries. Students access the sample code using the same tools and processes that they would encounter elsewhere --- they must learn to interact with a source code repository or they are unable to look at examples nor do their work.

The primary student activity surrounding sample code bazaar , in addition to viewing, downloading, and trying examples presented in class, is the creation of "derived works" from the sample code. Assignments consist of downloading a sample program, making a specified change to it, then submitting the new version.

With appropriate support from a hardware/software platform, this process can be completely automated: submissions can be modeled as patches so that the original sample code remains untouched, compilation occurs upon submission to detect invalid code, and unit tests may be run against the code that does build to determine overall correctness. If these components are in place, students not only experience a workflow very similar to modern industrial software development, but they also receive prompt, quality feedback on the correctness of their work.

While the "learn-by-example" nature of sample code bazaar would likely be used primarily in lower-division courses, the constant, live availability of sample code libraries remains useful at any level.