3 ms·
> I've found myself falling into almost the exact same trap when teaching people object oriented programming for example. At least in my experience, a huge iss
by humanrebar 13y ago
> I've found myself falling into almost the exact same trap when teaching people object oriented programming for example.
At least in my experience, a huge issue in teaching OOP is that the introductory examples are not compelling examples of class design (DiagonalMatrix and IdentityMatrix are both Matrices! Dogs and Cats are both Animals!). Students don't really understand the pros and cons of OOP from those sorts of examples.
Perhaps due to this, I would attempt to do OOP by creating taxonomies that modeled the ones in the real world. It wouldn't be until into my professional career that I would realize that this is an anti-pattern in most cases.
Though OOP best practices have matured since I was in school (interfaces base classes are encouraged, deep hierarchies and reuse through inheritance are discouraged, the integration of functional programming), so perhaps things are better now than they used to be.