When I introduce OOP to high schoolers, I go straight to this word "object" and link it with the word "thing" in the ordinary sense of the word.
Objects are not meant to be learned as an abstract computer science idea, but as an adaptation of ordinary language, trying to make reasoning about the real world expressible in a computer language. The challenge is not unlike the one faced by the logicians at the turn of the last century, looking for a "propositional calculus" but with the added notion of "executability" (the idea of a self-executing logic was there from the beginning, as appreciated by Ada vis-a-vis the Babbage Engine). Etymologically, a "thing" is actually a Scandanavian meetup of some kind i.e. a thing is a meeting of things, which is apropos of a recursive, fractal, "all the way down" subject such as particle zoo physics. So what are some paradigm "things" we can sink our teeth into (idiom): * Atoms (already current in high school -- I'm thinking to sync with whatever else they're learning) * Animals (everyone loves dogs and cats and taxonomy applied to "kingdoms" is a perennial trope in our science culture) * Polyhedra (probably my most controversial suggestion, but my bridge to geometry: figurate and polyhedral number sequences ala OEIS, coordinate systems, vector spaces... the rest of high school math. With Atoms I might just go with a namedtuple and circle back later with a corresponding @dataclass. With Animals I have the opportunity to subclass Animal into Dog, Cat and usually Snake classes. But start with Dog, evolve it, then move some of its functions to the parent Animal class (e.g. eat) when needing a Cat. With Polyhedrons I have V, F, E (topological features inventory) e.g. for subclass Cube that'd be 8, 6, 12. However Polyhedrons are complex objects, definable with radial vectors from a center and surface edges as vector pairs, with faces as rings (literally, cycles) of edges. This gets us into relational tables territory i.e. serves as our bridge to SQL. Evolving Notebooks: https://nbviewer.jupyter.org/github/4dsolutions/elite_school/blob/master/ObjectOrientedProgramming.ipynb Related Youtube (by me): https://youtu.be/muqwC9wvYXM PORTLAND Advice to Summer School Teachers 45 views Jun 23, 2021 Kirby
_______________________________________________ Edu-sig mailing list -- edu-sig@python.org To unsubscribe send an email to edu-sig-le...@python.org https://mail.python.org/mailman3/lists/edu-sig.python.org/ Member address: arch...@mail-archive.com