4 ms·
> To further sever the links to intuition, we rename the values {true, false} of the boolean domain as {black, white}. This is indeed sensible. However, you do
by knallfrosch 2y ago
> To further sever the links to intuition, we rename the values {true, false} of the boolean domain as {black, white}.
This is indeed sensible. However, you don't have to start with this and you don't have to stick with the easy {black, white}. You could rename the values to "banana" and "left" for increased, although needless, difficulty.
My proposal: Have students write a simple correct program first and then show that it still works even if you rename all "user" variables to "comment" variables. Now "comments" have a "favorite pet", but the software still works. Magic! That shows how semantics and syntax are different, plus how "stupid" computers are, even if you "tell" them "what you want."
- nullc 2y agoI was teaching an adult friend some programming-- this was someone who could program "a little"-- mostly smashing stuff copy and pasted from the internet with some brute force until it kinda worked, so I started our exercise at perhaps somewhat of a too advanced level. At some point I realized that he was ascribing all kinds of meaning to variable names and also felt totally lost at how I "knew" what to call various things. I first tried to explain that the names were just labels but he wasn't getting it. I immediately changed every single variable name to the most profane and insane random junk I could think of then showed the program still worked the same way. Making it obscene was important; simply changing from one set of reasonable names to another would just leave the impression that there were alias in the list of Magic Words. He was enlightened. From there we were able to get into what things actually were Magic Words (like language keywords)-- or close enough (variable name set by system or library code that we were using, arbitrarily set by their authors but obligatory for us users). Knowing not everything was magic made a big difference. It's not just AI that carries the risk of overfitting. Sometimes you need some "out of distribution" material to separate convention from the underlying truth.