Code written for courses at Carnegie Mellon University (unedited - not examples of best work).