Object Oriented Programming: Creation

Sunday Ikpe
3 min readAug 7, 2016

--

I’ve had to introduce a few people to the concept of Object Oriented Programming. Every time its been fascinating — having the experience of watching them try to wrap their heads around it. Being that I like to teach, I’ve always thought of easier ways of communicating the concept.

Programming itself is about creation and I found after a while that in the part of the world where I live, where there are few agnostics, when the word CREATION is mentioned the first thought is of God — the ultimate creator. Lets drill it down one notch. Christianity/Judaism and maybe Isalm, which I honestly know little about, have reference to the original story of creation as recorded in the first book of the bible which is Genesis (the book of beginnings).

In the books first 2 chapters God creates the heavens and the earth which for all intents and purposes represent for man the beginning of all things tangible or objects. When we take a closer look at the first 2 chapters a few things begin to emerge and the concept of Object Oriented Programming manifests as the approach to creation. Lets explore.

In the beginning God created the heavens and the earth and the earth was without form and void and darkness was on the face of the deep…

Therein is the introduction and the chapter proceeds to describe the things God created. It gets interesting for our purpose from verse 11 where He creates the vegetation and sets the rules for them — every fruit tree bearing fruit of its kind. In verses 20 to 25 animals are created in the sea, air and land. It gets more interesting in verse 26 were God decides to create man in His own image and likeness, ergo, another creator. The first thing I’ll point out here is contrary to popular belief by bible readers God did not create the man in the masculine gender first, but made man both male and female on the same day, not one out of the other but male and female created He them and He blessed them and said…

What has been described so far gives is the picture of the world we live in today and the first verse of the second chapter of Genesis concludes that God’s work was finished.

Thus the heavens and the earth were finished, and all the host of them. And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.

A few verses down and the first bible “contradiction” is seen.

These are the generations of the heavens and of the earth when they were created, in the day that the Lord God made the earth and the heavens, And every plant of the field before it was in the earth, and every herb of the field before it grew: for the Lord God had not caused it to rain upon the earth, and there was not a man to till the ground.

Back to OOP. God takes time to define classes without actually instantiating them. Much like an architect describes the plan of a building without creating even a prototype. However that plan would serve as a mould to ensure that within the allowable limits each instance of of an object initialized from the class already defined would be identified as a member of that class. Also, no object can exist except its class is first defined.

The concept of inheritance is also illustrated in the instantiation of the male and the subsequent creation of the female taken from the side of the man or in OOP terms the class for the female was derived from the class of the man and instantiated as Eve.

Over time I have found that people of faith who could relate with this story tend to grasp the concept faster and more wholistically and tend to be able to abstract faster and more profoundly.

--

--