teaching machines

From * To Javascript

Educators must contend with students’ prior knowledge of a subject. Sometimes the prior knowledge is advantageous—but not always. What we “know” may be wrong or incomplete. The same is true with programming languages. When learning a new language, you must contend with the baggage you bring from other languages you know. Suppose you are C […]

No Ternary, No Problem

While waiting around in a Peruvian airport, a friend I met at a conference was playing a boolean logic game I’ve been working on. On one level he wanted to use a ternary operator to model a shape that behaved differently depending on which half of the 10-by-10 game board you were on. He wanted […]

Precedence vs. Evaluation Order

I’ve been working on a little computer science learning game called Rator Vaders. Complex expressions drop from the sky, and the player has to fire at the highest precedent operator and evaluate it. This process continues until only a literal value is left, which can be sent to the Big Bit Bucket in the Sky […]

Identifiers Starting with Numbers

I was skimming through an introduction to a new programming language and ran across the familiar rule that identifiers in this language must start with a letter or underscore. Because I’ve been feeling a bit subversive lately, I wondered what would happen if this rule went away? What if identifiers could start with a number? […]