Javascript Enlightenment
Understanding the Vedic terminology in Javascript way
A few years ago, one of my gurus said “Programming is meditation”. I just saw it as a beautiful metaphor and chuckled away saying silently “may be”. Over the years, my perception and experience with meditation kept on changing and as of now it boils down to one word for me: Awareness
Lately I have been doing a lot of programming, especially in JavaScript, to the point of draining my brain, forcing me to take a few days rest.
And while I was busy coding, a side thought started seeing the code in another plane. If you ever wanted to understand the cosmic keyword like creation, atman, dharma, karma etc., then here I try to do it programmatically ☺
The beginning
Imagine I got a creative urge to programmatically do arithmetic instead of doing it myself. (I know this is silly but still for the sake of this explanation it’s OK)
A program for such a creative task will be:
( Text following ‘//’ are comments till end of line and not part of program)
// Program starts here.
( function() {
// This is the main function.
// Anything inside this bracket is part of main function
var add = function( a, b ) {
// anything inside this bracket is not part of main function but part
// of this smaller function.
var fruitOfAction = a + b;
return fruitOfAction;
// this small function ends with the above line.
}
var subtract = function( c, d ) {
var fruitOfAction = c — d;
return fruitOfAction;
}
var multiply = function( e, f ) {
var fruitOfAction = e * f;
return fruitOfAction;
}
var divide = function( g, h ) {
var fruitOfAction = g/h;
return fruitOfAction;
}
// This is the end of main function
}() );
Let me quickly explain the small piece code above briefly. Read these concepts until you are understand it before proceeding further.
Concept 1: Main Function The program starts with a ‘function’ and is closed at the last line by ‘);’. This is the main program (or main function) and it encloses all the smaller code pieces that form the part of this project.
Concept 2: Smaller Functions Each of these smaller pieces of code is inside another ‘function’ much like the original main function but this is stored into another form. In the code above we have 4 different smaller ‘function’s each of which is stored in a different form.
var add = function( a, b ) {
…
}
Think of ‘=’ as a command to store the right side content into the left side container. Here ‘add’ is a container that stores this adding ‘function’.
Concept 3: Data Input Each of these ‘function’s are followed by different data. Function ‘add’ is followed by (a,b) while function ‘subtract’ is followed by (c,d). These are the data on which the intended action needs to be done.
Concept 4: Intended Action The intended action of each of these functions are present in the code as ‘+’, ‘-’, ‘*’, ‘/’
Concept 5: Result Inside these little functions, we see a line like this
// this is in add function
var fruitOfAction = a + b;
‘+’ is the intended action that this function should perform on its data ‘a’ and ‘b’ and the result of this action (fruit of this action) is stored in an aptly named container ‘fruitOfAction’.
Concept 6: Variable The word ‘var’ preceding ‘fruitOfAction’ denotes that ‘fruitOfAction’ is a variable and its meaning is local. i.e., there are 4 ‘fruitOfAction’s in the entire program but each of them have a different content (meaning). So what ‘add’ function sees in fruitOfAction is different from what ‘subtract’ function sees in fruitOfAction. So in short, the meaning of fruitOfAction varies from place to place and hence called variable.
Concept 7: Return Finally, each of these smaller functions have a line that reads ‘return fruitOfAction’. A function after doing its job (for eg., in the case of ‘add’, the job is doing a + b) it should return the result of that job to the main function which is done by the line ‘return fruitOfAction’.
Enlightenment
Now that you have understood this little arthetic project, let’s understand the same as a cosmic project of Creation. The following concepts does not map 1 to 1 with the above concepts in the same order.
Concept 1: Adi Shakti I, Shankar, am the Adi Shakti who created this program out of the creative urge that exists in me. The urge in me created this program out of Shunya (nothing) i.e., when I started typing this program the notepad was empty (void), it didn’t even have ‘space’. In that Shunya manifested my creation, this program.
Concept 2: Param Atman My physical body typed this program, the program itself is my consciousness, Param Atman. This Param Atman is the main ‘function’ that holds all other smaller manifestations.
Concept 3: Jiva Atman The main function (Param Atman) is manifested into smaller functions (Jiva Atman) to do its work. These Jiva Atmans are given a physical form, a body to exist. While the Param Atman is all over the program or put it in other words, the program itself is Param Atman, the Jiva Atman resides insides its given body. For eg., the Jiva Atman for adding two numbers resides in the body ‘add’.
Concept 4: What Jiva Atma receives in its time period. Each Jiva Atman receives a set of data inputs or the context to work with. During the life cycle of this creation (this program, the Param Atman), the Jiva Atmas will be called as many times as needed with same or different kinds of data. So the Jiva Atma ‘add’ at one point of time will be needed to add 1 + 1 or 320498230948 + 23243 at another point of time. These varying data are the life’s up and down or various times of the Jiva Atma’s life where it either feels easy or challenging to do its work.
Concept 5: Purpose of life Each Jiva Atman has taken birth (or I have typed each of these functions) for a specific purpose. For eg. ‘add’ Jiva Atman has taken birth to perform addition. This intended action is the purpose of Jiva Atman’s existence as defined by Adi Shakti (i.e., in this case, Shankar, the creator of this program)
Concept 6: Karma Each Jiva Atma by living its life (by doing what it was intended to do) accumulates karma, the result. This karma is neither good nor bad. It’s just the result of Jiva Atma’s action. Result of (5 — 4) which is 1 is the karma. This 1 is the fruit of action performed by Jiva Atma.
Concept 7: Karma Yoga Whatever karma accumulatd by Jiva Atman is offered without any reservation to the Param Atman. This offering of the fruit of action is called karma yoga. So if we take up the above example of (5-4) as the action, the function (Jiva Atma) returns the result (karma) 1 to the main function (Param Atman).
Concept 8: Ahamkara Each Jiva Atman does its work, get its context in an enclosed body. In the program this is represented by the form ‘add’ and the opening and closing brackets ‘{‘ and ‘}’ . If this enclosure fails, the code of this Jiva Atman gets dissolved in the main function. This enclosure which protects the code of Jiva Atman to stay together is Ahamkara, self-identification. Each letter, each line of code in Jiva Atman self-identifies to its form ‘add’ so that it can stay together and be as a unit. So in essence Ahamkara is that which causes Jiva Atman to exist without merging into Param Atman.
Concept 9: Law of Karma and circle of life. As mentioned earlier, Param Atman is manifested into smaller Jiva Atman as well. However, since this Jiva Atman now has its own identify and has conciousness it also has the free will to do things on its own. The Jiva Atman has the free will to forget its context as part of the larger Param Atman and can think of itself as an isolated, independent atman.
Imagine when the smaller functions of the project no longer understand their context and think of themselves as main program and execute as such. Surely this will lead to some kind of program execution error. e.g, in the context of program, enters into an infinite loop or enters a dead lock, then the Jiva Atma forever gets caught in the form and never gets merged into Param Atman.
Concept 10: Dharma and Adharma Doing what Jiva Atma is born to do is Dharma and doing what is not intended to do is Adharma. In the ‘add’ Jiva Atma if it successfully adds the two given numbers it has done its Dharma. However, if for some reason of free will, it decides to subtract the two numbers, then it’s Adharma.
Conclusion
While you and I have the luxury of being an omniscient ‘god’ of this program by knowing every detail, purpose, dharma of each Jiva Atman (function), we don’t have the same knowledge when it comes to the Jiva Atman in our physical body.
I, as Adi Shakti, when I created the program, I had some purpose of doing arithmetic and it’s fulfilled when each of the function does it’s Dharma. And I can know whether each function does its dharma or not.
But I, as Jiva Atma in this world, not being omniscient, am yet to understand whether I need to add, subtract, multiply or divide to perform my Dharma to fulfill the purpose Adi Shakti created me for.
Email me when ShankarDevy publishes or recommends stories