Skip to content

The Red Rocket and The Dangling Else

Thu, 29 Aug 2019, 08:28 PM (-06:00) Creative Commons License

There was a cartoon on the screen at the front of the room. It was a hand-drawn thing, the sort I use a lot in class. The ground was green. The sea was blue. The rocket was red. … Yes. There was a rocket. What else would you use for a visual aid if you’re trying to illustrate real world applications of “order of algebraic operations”?

And then there was some code on the screen. Pseudocode to illustrate the point I was trying to make. An if-statement with a dangling else that made the code ambiguous in a glaringly obvious way. 

These were what they call a “hook”, something to get their attention. It seemed to work.

“Mister,” one of the kids in the back of the room said. “Did you really do this stuff?”

I paused and then said, “Yes. Yes I did.”

© jumpingfish by David Hasan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License