If there are no examples that are simple enough for this, the student has not yet advanced to the point where they will understand the issue.
If there are no examples that are simple enough for this, the student has not yet advanced to the point where they will understand the issue.
Exactly this.
My least favorite method of teaching is when they dive into a tutorial or example which has nothing to do with the actual problem.
E.g. when I was independently trying to learn how to code in high school (before my CS program in college), I was using some C++ book that started with a 'Hello World' program. I had no idea what the context for 'Hello World' was and why computer programs need to 'print' stuff. It was just a world of confusion. I remember working through it and not being satisfied at all. Why did I care that my terminal was telling me 'Hello World'?
On the other hand I had amazing CS professors in college who would introduce their course with the real-world problem its solving and the ideal end-state of mastering that area of coursework such as writing a programming language or creating optimal algorithms.
Then, instead of saying “there are these atomic locking primitives that we can use,” he asked the class for suggestions about how to make sure the two threads don’t stomp on each other’s updates. For about a half hour, someone would suggest a new way to place an if statement, and he would show how the “lock” would be defeated if contexts switched in such-and-such way.
Finally, when the whole class was thoroughly convinced that it wasn’t possible, he introduced atomic locking primitives.