Jason Salas' WebLog

On-air and online: making people laugh, making people think, pissing people off

Sponsors

ASP.NET sites that kick ass

Pals with blogs

Podcasts I listen to

Having trouble grasping object-oriented programming? Read Plato.

Appropriately, I've got a new "philosophy" when it comes to teaching new programmers about object-oriented programming (OOP).  Not being a schooled computer scientist myself, I had a tough time when I was first learning OOP concepts and practices when I took up .NET, and many people learning the ropes of current-day coding apparently share the same frustrations.  Fortunately, I've found a cool way of making the tough concepts easier to grasp, through the teachings of Plato.

Specifically in his work with his theory about Forms, there are lots of cool analogies directly applicable to OOP one can ascertain from Plato's writing.  Rooted in abstraction, the concept of Forms, in trying to justify existence, effectively demonstrates the relationship between base classes and subclassed types, I find (i.e., my wife is beautiful, my daughter is beautiful, my mother is beautiful, as all are applications of and conform to the Form of Beauty, but none "are" Beauty explicitly, as such carries a higher definition).  The application of Forms in the philosophy of the mind also involves an amount of inheritance and polymorphism - both of which are foundations in which any serious programmer doing modern-day development needs to be well-versed.  Plato also used Forms to evolve the concept of the relationship between the One and the many, likened in OOP to static (shared) instances of types.

You may agree with it, use it, or dismiss it.  I've found it to help make more clear what can often be a tough roadblock in learning programming.  :)

Comments

SBC said:

a very interesting perspective indeed!
I guess you'll look at 'The Republic' to build that perfect OO system.. ;-)
# March 28, 2005 7:13 AM

John Cavnar-Johnson said:

That's all fine, as long as your remember that it is Aristotle who dominated Western philosophy rather than Plato. This is significant because it means that in a single generation (Aristotle was Plato's student), some really smart people (the ancient Greek philosophical community) realized the severe limitations of Plato's ideas for describing reality. And we've had a fairly strong consensus about it ever since. OOP idealists really ought to consider that. I would argue that OO is indeed the Platonist way of looking at the world and SO is the Aristotlean way. Think about that when you model your next application.
# March 28, 2005 7:22 AM

Jason Salas said:

Hi John - excellent point!

Yes, in rejecting the rejected the teachings of his mentor Plato, Aristotle advanced his practice (such as the idea of Microsoft BOB becoming the modern Microsoft Office agent, and the defunct-.NET MyServices notion evolving into Passport authentication). By going against the grain of the Forms as a universally idealistic, abstracted model and treating human virtues as a defined set of unique characteristics, Aristotle branched off.

Expressed conceptually in object-oriented programming, this allows us to consider a generic overview of an application's model at the class relationship level (Plato), as well as being able to drill down into the individual members within each type (Aristotle). Aristotle stressed the essence of being something, as well as the causes brought about by the existence of a thing. From this knowledge we can derive modern-day programming examples in a type's members - properties, methods, and events.

If Plato can be seen as inspiring abstract classes, Aristotle's modified view of human virtue would be akin to sealed classes (NotInheritable/NotOverridable types), with a greater degree of individualism promoted.

Aristotelian theory shows us that in being the first philosopher who embraced much more than conceptual thinking, applying scientific experimentation, testing and evaluation, he drilled down more into the semantics of Plato's earlier ideas. This progresses beyond Plato's largely theoretical, and somewhat rigid rationale.

And yes, you're absolutely right…many of Plato's ideas were eventually dismissed with the advent of more scientific thought and as time went on. :)
# March 28, 2005 8:28 AM

Mischa Kroon said:

Jason, in that last comment I think you made a good point against OOP :)

It's just become too hard...

It's a nice idea to use OOP to simplify things but in practice it usually just becomes spaghetti.
# March 29, 2005 2:56 PM

Bond said:

Hi. The art of dining well is no slight art, the pleasure not a slight pleasure. Help me! It has to find sites on the: Can you mix alavert. I found only this - <a href="genericalavert.info/">alavert hives</a>. Alavert, bass, earth, and stem were our clinicians of sufferer. The city council inspired visiting up to 216 effect requests, giving to a war, alavert. Thanks :cool:. Bond from Sao.

# March 26, 2010 11:51 PM

Programming | Pearltrees said:

Pingback from  Programming | Pearltrees

# April 1, 2012 5:38 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)