Rope duplication, also known as programming14 October, 2008
My demoing duties include helping first-year students with Java code. Most of them have never coded before, so it’s quite an eye-opener, and the first hurdle they face is the vocabulary. Let’s face it: outside of a particular subset of geekery,
- ‘string’ means a thin rope
- ‘int’ doesn’t mean anything much, but sounds vaguely negative
- ‘double’ means two of something
- ‘parse’ isn’t commonly understood
- ‘method’ means technique
- ‘class’ means a group of students, or maybe the quality of something
- ‘variable’ means something that is changing
So if I suggest that they “use the parseDouble method to convert the string variable to a double” it initially translates to “use the <garbage> technique to convert the thin rope which is changing to two things”. The time-honoured technique of drawing pictures of boxes to represent variables only adds to the confusion when the examples use JOptionPane input dialogs (that is, boxes that magically turn into variables). Then add in a handful of command prompt gibberish (many students have never used it, and these days why would they?) and confusion is rife.
But, gradually, pennies drop. Logic is brought into play. Variables are declared. Algebra is remembered. Indentation is attempted. Strings are parsed into doubles. Directories are navigated. Code is compiled. Assignments are submitted.
Then I have to mark them <sigh> 😉