“PL-Detective: A System for Teaching Programming Language Concepts”, Amer Diwan, William M. Waite, Michele H. Jackson, Jacob Dickerson2004-12-01 (, ; backlinks)⁠:

The educational literature recognizes that people go through a number of stages in their intellectual development. During the first stage, called received knowledge or dualism, people expect knowledge to be handed to them by authority figures (thus “received”) and think in terms of black and white (thus “dualism”). Our experience indicates that many computer science students are at this first stage of learning.

To help students move beyond this stage, we describe a system and strategy, the PL-Detective [MYSTERY], to be used in a Concepts of Programming Languages course. Assignments using this system directly confront students with the notion that they can create knowledge via interactions with the PL-Detective and that discussion with students (rather than asking the instructor) is an effective way of learning how to reason.

We present experimental results that show that the PL-Detective is effective in helping students move beyond the stage of received knowledge.

…The current version of the PL-Detective exports 7 interfaces, each of which controls the semantics for a single aspect of Mystery. [Order of evaluation, short-circuiting in logical expressions, pass by value/reference, lexical scoping, type assignability, type equality, type of operator]

…When a student probes the system, the probe may or may not compile successfully (eg. syntax error). If it compiles successfully, it may or may not run successfully (eg. type-mismatch error). In the case of an unsuccessful compile or run, it is important to provide output that is useful to the students but is not so detailed that it solves the mystery. For example, imagine an assignment where students must discover whether Mystery uses static or dynamic scoping. Giving an error at compile time that a variable is undefined or out of scope would give too much information to the student about the semantics of Mystery. To address this situation, the web-based user interface for the PL-Detective delivers all error messages (except for syntax errors) at run time even for errors detected at compile time.

7. Preliminary Results: Our prior results based on ethnographic observations8, 15 indicate that computer science students prefer to work alone and when forced to work in groups they often divide up the task between the group members.

To get a preliminary sense of whether or not the PL-Detective was effective in getting students to collaborate we surveyed a Fall 2003 course. The instructor left the room while an outside researcher distributed and collected the survey. The students knew that the instructor would see only summaries of the survey results (ie. they were assured confidentiality). Each student filled out the survey separately from his or her group members. The class enrollment was 95 students and students worked in groups of 3 (and occasionally 2), which they formed at the beginning of the semester.

The results of the survey strongly suggest that the PL-Detective is helpful in getting students to collaborate. For 30 groups, all members said “we do all the assignment together all the time”. All members of one group indicated that they did not work together but segmented the assignments. There were two groups whose members gave inconsistent responses. Many of the students filling out the survey noted that they thought the PL-Detective was “cool”.


[HN student experience:] In college, my programming languages class used a [Modula-3-esque] language called Mystery (I believe created by my professor), which was configurable. Assignments would be like “write some test programs to figure out whether the language is configured to use pass-by-value or pass-by-reference”. And there were a bunch of other knobs that could be turned, and in each case, the idea was that we could figure out the knob’s setting by writing programs and seeing what they did.

I loved this, both as a teaching aid, and as an eye-opener that programming languages are just an accumulation of choices with different trade-offs that can all go different ways and result in something that works, perhaps a bit better or perhaps worse, or perhaps just a bit more toward or away from one’s own personal taste.