*[A transcript of the
SIGCSE 2008
conference:
Table of Contents]
*

In studying student performance on the 1988 AP exam, Reges found that performance on a small set of "powerhouse questions" was inordinately predictive of success on the exam as a whole, and of those five one stood out as most predictive. This question offers evidence in support of Knuth's speculation about "getting" assignment. Here it is:The other missing concept that seems to separate mathematicians from computer scientists is related to the 'assignment operation' :=, which changes values of quantities. More precisely, I would say that the missing concept is the dynamic notion of the state of a process. 'How did I get here? What is true now? What should happen next if m going to get to the end?' Changing states of affairs, or snapshots of a computation, seem to be intimately related to algorithms and algorithmic thinking.

What a fun little question -- so simple, but with layers. It involves assignment, but also sequencing of operations, because the temporary result ofIfbis a Boolean variable, then the statementb := (b = false)has what effect?

- It causes a compile-time error message.
- It causes a run-time error message.
- It causes
bto have value false regardless of its value just before the statement was executed.- It always changes the value of
b.- It changes the value of
bif and only ifbhad value true just before the statement was executed.

This is something folks in CS education think a lot about, but unfortunately we in then trenches teaching intro CS often don't apply what we know consistently or consciously. Whether we think about it or not, or whether we act on it or not, students almost certainly bring a naive computational model with them when they enter our courses. In the world of math and CS, we might refer to this as a naive operational semantics. How do variables work? What happens when anThese questions seem to test whether a student has a model of computation; whether they can play computer in their head.

Stuart reported that many of his students thinkpublic static int mystery(int n) { int x = 0; while (n % 2 == 0) { // Point A n = n / 2; x++; // Point B } // Point C return x; }Is(n % 2 == 0)always true, never true, or sometimes true/sometimes false at points A, B and C?