And then here's the other nice lesson: students can learn that they don't need to know everything before they start making cool and useful stuff. The confidence that comes from knowing that is just as important (more so?) as being able to implement pyglet from scratch if necessary. The former is a skill used daily, whereas the latter -- well, consider how often in your engineering career you casually rely on the work of others to power your creation. Has anyone ever required you to write a WSGI implementation, or a framework?
That's been my experience, at least.
I remember writing this:
10 PRINT "LESSNONYMOUS"
20 GOTO 10
Seeing actual things happen was awesome. Now we have 3D games, seeing your name over and over wont enthrall, so being able to mod and extend a basic Minecraft world would be an incredible gateway.
The way to hook people is exactly like you say. Make a small change, see a huge difference. Suddenly ... YOU HAVE THE POWER!!!
10 PRINT "LESSNONYMOUS";
20 GOTO 10
Probably a jerk move in retrospect, but how can you work in a computer store and not play around with the computers?!
20 GOTO 10
There was an awful lot happening behind my very first program too. And that was the available level of abstraction. Why start kids coding something so simple when they can mess with something so powerful?
Where would games be if we didn't have abstraction?