Saturday, December 22, 2007

Do Not Fear With OOP

When I first started learning how to program Java, I was left totally confused about this whole "object-oriented" thing. What books I had explained the concept poorly, and then went straight on to advanced programming tips. I felt frustrated and lost. Not being particularly math-oriented, I needed a good analogy to help me understand the nature of Java.

I have created this brief tutorial not in order to be an exhaustive Java resource, but rather to introduce readers to the concepts of object oriented programming in a way that is non-threatening. If all goes well, we'll have you all in pocket protectors before the end of the hour.

There are three different levels of this tutorial, coded by color. Green is for those readers who want the most basic introduction. It is targeted at those who are unsure what object-oriented programming is, and could use a good analogy to make things clearer. Yellow is for those who want to be able to understand object-oriented programming just enough to be able to read and follow it, but are not yet ready to learn the intricacies of coding Java. [Jump to a site with darker yellow.] And finally, the third level, red, is for you daredevils who want to be able to program in Java, but just want to ease into it slowly.

In short, the green text gives a "plain English" version of the code that would be necessary, the yellow uses that English in a way that more closely resembles the format of code, and the red is the actual code that would be necessary for the program to work. Readers of all levels are encouraged to skip between the colors to deepen their understanding. Finally, although this tutorial operates mostly through analogy, innuendo, and intrigue, those words that appear in boldface are the actual terms used by Java programmers (ooooh!), so try to remember them as you go along.

No comments: