4 ms·
The problem here is that that "a-ha!" moment is completely fallacious and not actually helpful. You think you've gained some deeper insight, but any attempt to
by czx4f4bd 4y ago
The problem here is that that "a-ha!" moment is completely fallacious and not actually helpful. You think you've gained some deeper insight, but any attempt to apply that understanding is all but guaranteed to result in pain and frustration. The mental model that OOP objects map directly onto real physical objects plagued me for years, because I could not understand how I was supposed to translate it into real code.
I finally broke through it after being forced to write a ton of enterprise Java, which helped me come to realize that classes and objects are useful units of abstraction for encapsulating related sets of data and behavior, as well as finally grasping the idea of composition and the utility of things like dependency injection, but I could've avoided years of pain if someone had actually explained that properly with concrete examples of useful object-oriented code. Since then, I've seen the same conceptual misunderstandings over and over from beginners and all of it comes down to the fact that these inane `Cat extends Animal` examples are simply wrong.
> When you've never written a line of code in your life, abstract things like "network protocols" and "file I/O" and "ImageDisplay" (which is neither an image nor a display) are confusing, and so frustrating, and so not useful for teaching a complete novice.
The solution here is not to teach them something that dooms them to even more frustration and confusion in the future. Also, if someone has never written a line of code ever, why are you teaching them OOP? If someone can't yet grasp concepts like network protocols and file I/O, OOP is literally not useful to them. It's like teaching someone calculus when they haven't even learned algebra yet. Start with the basics and then build up from there.
- glowingly 4y ago> It's like teaching someone calculus when they haven't even learned algebra yet. Start with the basics and then build up from there. I mostly agree in principle with the idea of building up a foundation. Going right into the deep end without decent guidance may leave one with horrible heuristics. However, (IMO) a crawl->walk->run abstraction does not always work well. I hate to say "it's case by case," but pedagogy is not easy. Algebra, IMO, should be taught either near or with its uses (modern calculus being one of them). Otherwise, one may be learning a bunch of abstract concepts without much reification.
- czx4f4bd 4y agoYeah, I actually had a similar thought as I wrote that, but I was too lazy to come up with a better analogy. I guess a clearer analogy would be "trying to teach someone to differentiate a function when they don't know what a function or a variable is". I derinitely agree pedagogy is hard. I have many thoughts about how the pedagogy of programming is deeply broken that are far too numerous to drop in an HN comment. I would say I'm not arguing for a purely linear approach so much as making sure there's actual conceptual understanding at each phase of the learning process. Teaching OOP before someone really grasps programming well enough to actually need it feels very premature, but there are lots of elements of it that can be sprinkled in throughout the learning process.