Friday, October 28, 2011

Object Oriented Hinduism - A Primer

I plan to teach my 19 month old daughter and soon to be born second child the roots of Hinduism. Now to do so, I believe I need to go and understand Hinduism myself. Not from the perspective of what religious bias usually forces on individuals, but to take a more scientific, pragmatic and logical approach.

Part of this understanding is to grasp the notion of Origin of life as defined in Hinduism and specifically the reason the great texts like the Vedas, Upnishads and Puranas existed. In my research, I came across interesting similarities between a software designer's approach to explaining an architecture and the thousand year old (and more) Hindu scriptures explaining the architecture of life, society and general rules of a meaningful existance. For me, reading some of these great scriptures was like reading the great works of Knuth, Booch and KNR. The basic premise of describing a system using first a model, setting boundaries of semantics and giving lucid "implementation-esq" examples is the core style of all the preceding authors I mentioned. When I set about reading the scriptures, I would ask myself the question - "Why are there so many texts? What is the relation and is there a logical explanation for their existence?"


To answer that question, we will need to understand the scriptures a little better. I will begin by discussing the scriptures, leaving the topics around the Origin to a later post. In order to understand the fundamental similarities between a software designer's approach and the Hindu scriptures it is necessary that something be said concerning the Vedas themselves, the source of our information. The root of the word is "vid" - "to know:" hence the term Veda signifies knowledge 
and it is believed that at first these books were not written, it signifies knowledge that is heard, or orally communicated.

The Vedas are not supposed to be the work of a single person, but it is believed that they were communicated to a number of Rishis or saints, who in their turn transmitted them to their disciples. The instruction contained in these writings is said to have been breathed forth by God Himself. At other times it is said to have issued from Him like smoke from fire. Sometimes the Vedas are said to have sprung from the elements. The accounts of their origin differ in form, but all agree in teaching that they were the direct gift of God to man; and hence they are regarded with the greatest veneration.

The Vedas are four in number: of these the Rig-Veda is probably the oldest, then the Yajur-Veda, then the Sama-Veda, and last of all the Atharva-Veda. Each of theseVedas consists of two main parts : a Sanhita, or collection of mantras or hymns ; and a Brahmana, or ritualistic precept and illustration, which stands in somewhat the same relation to the Sanhita as the Talmud to the Law. Attached to each Brahmana is an Upanishad, containing secret or mystical doctrine. The Sanhita and Brahmana are for men generally ; the Upanishads are for the more philosophical inquirers.

Of these Sanhitas, the "Rig-Veda Sanhita, containing one thousand and seventeen hymns, is the oldest and most important ; whilst the Atharva-Veda-Sanhita is generally held to be the most recent.

Now let's step back and understand this better. We have a set of crisp rules/ideologies that are defined in the Sanhitas as mantra/hymns. We have a Brahmana which is an illustration or rather a "clarification" of the hymns. Now for each Brahmana, there is a Upanishad which elaborate the mystical or philosophical side or in other words more contextual in nature depending on what generation of scholars are interpreting this. In software terms, the Sanhitas are Abstract Base Classes with specific behavior defined and others just highlighted. Brahmanas are more complete Base Classes that inherit from the Sanhitas. Finally the Upanishads are polymorphic Child Classes that depending on the context, implement behaviors.


To conclude this discussion some more tidbits about the Sanhitas. The Sanhitas of three of the Vedas are said to have some peculiarity. "If a mantra is metrical, and intended for loud recitation, it is called Rich (from rich, praise), hence the name Rig-Veda ; i.e. the Veda containing such praises. If it is prose (and then it must be muttered inaudibly), it is called Yajus (yaj, sacrifice, hence, literally, the means by which sacrifice is effected) ; therefore Yajur-Veda signifies the Veda containing such Yajus. And if it is metrical and intended for chanting, it is called Saman (equal); hence Saman Veda means the Veda containing such Samans. The author of the Mantra, or, as the Hindus would say, the inspired 'Seer', who received it from the Deity, is termed—its Rishi ; and the object with which it is concerned is its word which generally means a deity.

What I am trying to get to is an idea back in the days where there was a clear concept that either was given to man by Him (God) that is transcoded as a Sanhita. Now contextual understanding of this concept was left to the Brahmans who were thought to be the architects of society. The Brahmans described the Brahmanas (hence the name Brahman to those). Finally in the 5k years or so it is believed these scriptures have existed, the society changed, people changed and Hinduism included the ability to adapt to these changes by adding the contextual Upanishads that to more mere mortals were tales of example and clarity.

Isn't this how we have written object oriented software architectures and explained them to future implementors? We have defined the encapsulation, created the necessary abstractions, and left the polymorphism to future generations to take advantage of. Object Oriented huh! And would we all not agree that the issues we have with various religions in the current world are because they as not as adaptable/malleable to keep pace with current evolution of the human race? Hope this makes a bit of sense. I definitely would love to hear your feedback/



No comments: