Analogies and use cases can help demonstrate _why_ something is useful, but can also obfuscate concepts.
Analogies and use cases can help demonstrate _why_ something is useful, but can also obfuscate concepts.
I was 12 when I picked up a "Head First Java" at the library. The first chapters on for loops and variables were a breeze, but after a few more the book started a new program of loosely analogizing various function specifiers to real-world ontologies; all against the background of a writing style that emphasized that programmers can also write (and poorly photoshop) in a "WILD & ZANY STYLE THE KIDS WILL LOVE'. Yes, I'm starting to remember the trauma now: "Vehicles and Cars" or 1-Stripe Zebras vs Zebras-with-many stripes vs a Zebra with a stripes attribute...
I had no problem with a for loop to print "FUGAZI SUX" 99 times, but the book wasn't communicating how these concepts were important to making a nontrivial program in Java; which I desperately wanted to do so badly.
A bit later, I downloaded a book about writing computer exploits, which was very basic and very direct. Strangely, dealing with computers at this extremely basic level of stored instruction pointers, buffer overflows and assembly language actually let me gain the skills required to be an "actual programmer".
There is nothing strange about that. People learn in different ways. For me the Head First books were a great alternative to the scores of dry "here is fact 1. And here is proof for fact 1. Here is fact 2. Here is proof for fact 2." books, which bored me to death and didn't help me with learning.
What you are describing is a problem I see with a lot of people who learn programming. They want to apply what they have learned in a way that is different from a few modified example. When they learn python, after chapter one or two, the most common question is: but how do I build a GUI because the command line is very foreign to them. People often don’t have enough patience, or motivation to learn a whole book and not be able to do something remotely useful. I’m glad you got into it by learning something that really interested you with computers (unfortunately this is really hard these days because everybody I know either wants to program GUIs or Games).
I know some who got into programming by writing Minecraft plugins. That allowed them to apply what they learn to something really useful and fun. But I also like Apple’s approach with Swift. Children get immediate graphical feedback of what they have written. It’s certainly not something that teenagers have a lot of fun with (because “it is silly”) but children might really enjoy learning that way. Websites are probably another good example. Writing working JavaScript and html is really easy these days and a website is useful for a lot of people.
A class is not a car, you don't explode your car when you go off road, create a SUV using the base of the car along with what's in the trunk, then do it back again when you reach a road.
Analogies are a terrible way to teach. Both dogs and cows are mammals with 4 legs and a tail, but you will have an interesting experience playing catch with a cow and trying to milk a dog.
I only learned what a class is and why it matters after writing a bunch of C spaghetti code trying to keep track of special_fn_for_strings, special_fn_for_ints, special_fn_for_big_ints, etc. You can teach that way quite easily if you have more than a week to do it in.