Re:Updating “101 Basic Computer Games” for 2021
by a_e_k on Sunday February 28, 2021 @04:27PM
(#26297230)
One of my favorite authors, Robertson Davies, put this idea nicely in "The Rebel Angels":
> To instruct calls for energy, and to remain almost silent, but watchful and helpful, while students instruct themselves calls for even greater energy. To see someone fall (which will teach him not to fall again) when a word from you would keep him on his feet but ignorant of an important danger, is one of the tasks of the teacher that calls for special energy, because holding in is more demanding that crying out.
It's a quotation that I often keep in mind while helping my kids learn.
Re:Updating “101 Basic Computer Games” for 2021
by fuball63 on Sunday February 28, 2021 @02:13PM
(#26296145)
Totally agree. In addition, it can just get plain overwhelming. Don't use a global, use a function -> what's a function? -> a subprogram with parameters and return values -> what's a parameter? a variable with scope existing only for the subprogram's duration -> what's scope? -> ... -> what's an abstract syntax tree?
When really they just wanted to increment the score variable by 10.
While I'm certainly no fan of spaghetti code, I think this is an important kind of experience for novices. I, for example, let mentees at work go down a wrong/weird path with their code for a couple weeks when I see bad code patterns or poor choices in algorithms/data structures in order to give us something to discuss and correct later when they start to hit pain points that I, usually correctly, predict they'll hit. I let them know that they're making their life harder, but I don't direct them to change course (some do on their own, others don't). Telling someone who's just learning how to do things the "correct" way (to the extent that there is a singular correct or a small set of correct options) doesn't give them sufficient motivation and experience to actually learn and internalize it. Often you get a kind of cargo cult mentality around the things you teach them since they lack comprehension of why those are good ideas or better ways of organizing code or whatever, or a later rejection of what they're taught because they don't understand the motivation behind it.
Also, letting them go down the path of spaghetti code or confused structures gives an opportunity to teach them refactoring techniques, which even expert programmers still have to apply to systems they develop (most people don't write perfect code on the first pass, and most systems having changing requirements which would render the perfect code imperfect if they did).