Friday, December 30, 2011

strange non linear dimensions, karma and rebirth explained


I had a strange dream yesterday night. I am not going to talk about the dream here. But when i woke out of it, i had a theory formed about other dimensions that may exist and how we go about travelling through them. In fact I had a blog entry written up right there at 4 am in my mind. Now that its close to 10 am, most of it remains dissolved, forgotten and hazy. I will try to piece them up as much as I can though. Note that this is a wild fantasy and facts and assumptions hence, will not be justified in any form
A living human consists of its body and its soul. As our soul exists inside this body, we can feel ourselves passing through the existing four dimensions. As all of us know, time is linear and we have been going through it in a linear continuous, predictable  fashion w.r.t space. This means that we always go through time in a non-erratic, continuous fashion without any jumps in between. The soul and the human body are together in this journey of three dimensions. Henceforth, when I refer to ourselves, I will be referring to our souls rather than the combination of human bodies and souls. .  When I mean 4D over here, the 4th dimension mentioned over here is time.

Now that I have made my view of existing points clear, what do we think of the other dimensions that might exist. Just because we in our current form cannot feel or see them, does not mean that they may not exist. The dream I had yesterday night was something regarding this.
Even though our human body can only see and feel only three dimensions, our soul is actually travelling through other dimensions with respect to time. Unlike time and space which are linear though, the 5th dimension (and others > 5) need not necessarily be linear and continuous. There are factors which govern our journey through these dimensions that we in our present form cannot control. Since these dimensions are something which we cannot control, see or feel, we simply fail to recognize its existence. So now, if we cannot acknowledge its existence, how can we be sure that we are travelling through them? And also, WHAT actually travels through them, if it isn’t exactly us.
My another notion over here is that our soul is aware of existence of such dimensions and is travelling through them everyday. There are various factors that governs the travelling of this soul through these dimensions. One of the factors , which I call out here (and there could be many more, some of which are time bound and others undefined/unknown) could be what we call our “karma”. As our karma evolves, our soul traverses through these dimensions (not sure how to describe this travel as there is no space dimension associated with it over here). Again note that over here, since this dimension is not linearly associated with time, the position of us in this dimension in relation to time is not well defined. As per our karma or our actions we do, our soul keeps travelling through this dimension(s) throughout our human life time. This effectively means that our conscious self has no actual control of this dimension since we travelling through this dimension is dictated by our deeds. Also, though our travel through 2-D space is reversible (we can always go back to where we started from ), we cannot travel backwards in time and also we cannot travel backwards in this dimension(s). This is uni directional, non – continuous and discrete.
For a want of a better term, lets term this dimension as a karma dimension (since I mentioned about karma..) Now that I have spoken as to how we travel through this dimension, the question may arise as to what dictates our travel through this dimension and how far we travel. As we do not have control over how we travel through time during the course of our life, we do not have control over how our soul travels through this karma dimension. Be it good karma or bad karma, we do (note that when I mean we, I mean our “souls”) travel through this dimension. Since its not linear and continuous, each karma that we accumulate, transcends us from one “point” to another in this dimension. (it’s a bit complicated. A point is not a 2d point but an accumulation of various dimensions). Our soul keeps moving along in this “direction” (not a 2D direction again.. it’s an atleast 4D+ dimensional non linear direction) and at one point of time (and I mean the actual time here) the soul has to keep moving in the 4D+ dimension in other dimensions but then the 3D interpretation ends there. i.e after travelling in all the dimensions put together, the “space” travel of the human body manifestation of the  soul ends and it has to keep moving in other directions(again note that there is no linear association with one dimension with respect to other) which our human body cannot come along. In such cases, the soul ends up leaving the 3D body and continues the further journey in other dimensions in some other form(who knows what?)  into the event horizon. We are in this scenario presented to be dead.. since our brains and body in current 3D space have stopped functioning. Our soul though continues its journey in other dimensions.
Now, when does this exactly happen.. IMO, there needs to be some sort of balance achieved in our life , with our karma and some other unrecognized factors when the end comes. For example, using the karma factor alone,
a)      Your karma dimension, you have so far travelled sufficiently enough so that the soul has to move into another world. But your time travelled in the 3D dimension is still relatively less. (you are still young)
b)      You have travelled a lot in the 3D dimension but your karma dimension still lags.
c)       A perfect equilibrium , in which you are old and your soul in the karma dimension is moving to another world.
To keep things short, in the first case, you are possibly designated to die young.. in the second case, you are old, but death still does not come to you, because you still lag behind in the karma dimension and until your soul has travelled sufficiently farther in that dimension, you soul still exists in the 4D world with the body. Such cases, are case when people live well past their old age. It is the final third case wherein when things are in perfect equilibrium, we tend to die at the perfect age, a normal comfortable death.
If you ask the question, as to how to achieve the third case in your life in 4D+ world, I have no answer.
As our soul wanders off into other dimensions , the path that it takes may cause it to interject with the 3D world again(why?) . This is the case wherein rebirth happens and our soul comes into contact again with human bodies. The plain fact that its entering the 3D world does not mean, its travel in the other dimensions has stopped or has been reset to zero. The karma portion of the soul continues its journey over various births. This may  explain why people call out “past karma” influences our present lives.

Conclusion: The concept is nothing new or radical. Some people see karma as a divine abstract thing. I have tried to align it to something else and called it as a new dimension. I have not said anything about good karma or bad karma.. Though I am sure it influences how your soul travels through other dimensions and has a say in which “direction” your soul moves and makes it come into contact with a 3D world again

Monday, October 25, 2010

Solving your ping problem from windows xp

I had been stuck with a problem wherein, i could not ping my machine from other machines in the same intranet. However, i was able to ping others' machines from my machine. After extensive googling on and off for the past two years, it finally came to be the problem identified in the following link.

http://www.softwaretipsandtricks.com/forum/windows-xp/17248-help-my-windows-xp-box-cant-pinged.html

I have a cisco vpn client with me for vpn access.. It turns out the the Options -> stateful firewall was always set to on and this was preventing for some weird reason, other machines to ping my machine. The solution, though seems simple was pretty darn hard to find!

Monday, September 27, 2010

Google squares

Google squares looks like a really nice tool for comparing or listing different options/topics pertaining to a particular subject. Just go to http://google.com/squared and enter the subject you want to compare or get more information on. Such as "application servers" or "relational databases" for example. Now you would get various options available for application servers (such as glassfish, jboss, bea, weblogic etc.. ) or for databases (mysql, oracle, derby etc.. ) Pretty cool indeed!

Thursday, September 9, 2010

"Offline" in an html5 world.

A very nice explanation of what "offline" application means in an html5 world. This explains what offline storage is, different kinds of offline storage, various implementations and how to use these techniques.

http://www.html5rocks.com/tutorials/offline/whats-offline/

Thursday, August 26, 2010

Bridge over troubled waters..



When you're weary, feeling small,
When tears are in your eyes, I will dry them all;
I'm on your side. when times get rough
And friends just cant be found,
Like a bridge over troubled water
I will lay me down.
Like a bridge over troubled water
I will lay me down.

When you're down and out,
When you're on the street,
When evening falls so hard
I will comfort you.
Ill take your part.
When darkness comes
And pains is all around,
Like a bridge over troubled water
I will lay me down.
Like a bridge over troubled water
I will lay me down.

Sail on silver girl,
Sail on by.
Your time has come to shine.
All your dreams are on their way.
See how they shine.
If you need a friend
Im sailing right behind.
Like a bridge over troubled water
I will ease your mind.
Like a bridge over troubled water
I will ease your mind.

Friday, August 20, 2010

Android scripting with python

A good article describing how to do android scripting with python. I have no idea about how to program using python. But given that this is one of the languages that you can use to code for android, may be i would just go ahead and take a look at it.

Here is the link.

OAuth and twitter. A nice article

Twitter has closed down basic authentication and started using OAuth. A nice article explaining OAuth and twitter.Over here. There are also links and resources to OAuth and what it is from the page.

Custom dojo builds

Most of us would like to extend dojo widgets/make changes to dojo code and rebuld our widgets along with rest of the dojo code. Another reason would be to optimize load times for your dojo widgets. Given that the widgets are loaded lazily, you would want to load a compressed javascript dojo file which contains all the widgets you need in a compressed format.
Here is how you could go about doing a custom dojo build.

Download the dojo source from the dojo download site. 
 Unzip it, and you should find a util directory in there. Go to util/buildscripts/profiles .
Now you need to create your own profile file which you will give it as an input to the build process.
Lets call it foo.profile.js.
It could look something like this:

dependencies = {
    layers: [
        {
            name: "customdojo.js",
            dependencies: [
                "dijit.Dialog",
                "dijit.layout.ContentPane",
                "dijit.form.CheckBox",
                "dijit.form.ComboBox",
                "dijit.form.TextBox",
                "dijit.ProgressBar",
                "foo.widget.button",
                "foo.widget.table",
            ]
        }
    ],
    prefixes: [
        [ "dijit", "../dijit" ],
        [ "dojox", "../dojox" ],
        ["foo","../../web/javascript/foo"]
    ]
}

You would notice that the contents of this file are in json format. The first thing of importance is the attribute layers.name which defines the name of the output file that is produced as a part of the dojo build process. right now it is called as customdojo.js . This is followed by a list of widgets that you want to be a part of the customdojo.js file. You should notice a couple of custom widgets too as a part of the build.
Note that the prefixes define where to find the dojo widgets specified above. They point to the directories path relative to the "util" directory. Hennce, dijit resides in "../dijit" and my foo widgets reside in the "../../web/javascript/foo".
Now , the next thing is your build command.
After you have saved the above file as say foo.profile.js, go to one level above to util/buildscripts/ and run the "build.bat" or the "build.sh" file depending on which platform you are in.

If you are in linux you could do something like

build.sh profile=foo mini=true action=release version=x.x.x optimize=shrinksafe
 copyTests=false cssOptimize=comments

This should produce a "release" directory containing the customized dojo build. You could probably also gzip your resultant output as discussed in one of the blog entries earlier.
It would be much more convenient if we actually automated this whole build process with an ant task. I'll try to talk about that in my next blog entry.

Thursday, August 19, 2010

YUI Theater

Check out this link YUI Theater. It contains some really good videos that you can watch in your leisure time on front end web application development.

Gzip javascript files

To gzip your javascript files, you can use the following ant task (you can add dependencies to your task as needed).
    <target name="gzipJavascript">
           
<gzip destfile="${destination-dir}/combined.js.gz" src="${path-to-your-js-file}/combined.js">
    </gzip>
</target>


and just invoke this from your ant task. Simple.

The output of the gzip process will now be stored in your prescribed directory. I usually store the un-gzipped ones and the gzipped ones in the same resultant directory.


The next thing you need to do is to make sure that your server can serve this gzipped content to the client. To do that, you will have to modify your server.xml appropriately (its location depends on which application server/web server) that you are using. I have been using jboss and hence i will describe what i did for jboss to be able to do it.

In your <jboss-install-location>/server/<domain>/deploy/jboss-web.deployer/server.xml

Put in the following code (the modified parts are in bold)

    <connector  port="8080" address="${jboss.bnd.address}"
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         compression="on"
compressableMimeType="text/html,text/xml,text/css,text/javascript, application/x-javascript,application/javascript"
         connectionTimeout="20000" disableUploadTimeout="true" />
Now, the next step is to include the javascript file in your web page.





If i have web/javascript/appname/combined.js and web/javascript/appname/combined.js.gz as a result of my various stages of the build process, my javascript include will look something like this




        <script src="/web/javascript/appname/combined.js" type="text/javascript">
</script>     



Note that i specify the include normally as a "text/javascript" and i really dont specify the ".gz" suffix. The application server will analyze the incoming request and if the client can handle gzipped compressed files, then it will server the gzipped files. Else it will serve the normal file.


Since javascript load is blocking call, you should notice load times reduce drastically once you do this.you can also do this compression for other resources such as your html/css files too.

Javascript optimization for web applications

There are a number ways in which you can go about optimizing your web application. This is one of the places where you could probably find the holy grail.

Javascript download time is one of the major bottlenecks for web applications. Let me explain how i managed to reduce the download time of my incredibly huge and chunked javascript files to reduce load times.


While in development stages, it is nice and developer friendly to modularize javascript into various files and folders, the load time gets really ugly when you put the app into production. Given that most of us various web frameworks/libraries like dojo, jquery, ext-js etc.. which themselves load a number of javascript files in turn depending on their usage, it is better to optimize your javascript.
Combine your javascript


This should be pretty simple. You can start off by writing a simple java class which takes in a list of files as an argument. This would then read all the contents of the files and write them out into a simple file. You could call that "combined.js". You can call this as a task from your build script such as ant

Compress the resultant javascript (minification)

The combination process just produces a huge single bulky file. This will result in reducing the number of HTTP requests for javascript files but you would still have to deal with the size of the javascript file. There are number of tools which allow you to compress your javascript files. The compression basically minifies your code in the sense that all the formatting in the code (spacing/indenting even carriage returns) is removed out and variable names are "optimized". You cannot probably debug using this compressed version of javascript. I have been using YUI compressor in my project with much satisfaction. A number of resources are available on how to perform this and hence i am not going to blog about it here. You can probably find a good article on how to use the yui compressor in your ant task over here

GZip javascript

One of the final steps you could try to do is to gzip the resulting javascript. This really reduces the size of the javascript file that is to be downloaded to the client. I could manage to compress a 500 kb(approx) javascript file to about 90 kb. I will talk about gzip process in my next blog.

Since javascript resources are one of the main bottlenecks in an application loading process (along with heavy images), the above three steps should help you speed up your application load time.

Note that you could also apply above process for your CSS files if they start to become too large or even gzip your html files if they are large enough and take a while to download.

Back with a bang.. well atleast a whimper

Its been a while since i actually blogged over here.. Not surprising given that blogging is a tedious effort requiring a lot of time and dedication over a period of time which i actually dont have. And given the fact that most of the times i am actually the only one that actually reads back my blogs, it isnt quite the motivation i need to dedicate the necessary amount of time and resources. Of late though, i think i seem to have come across a lot of exciting stuff on the internet that i share on facebook and twitter.. (hey thats the latest fad on the internet.. blogs are for grampies!) But then i find that once in a while its really necessary to record those "findings" on internet in some place permanent (nopes.. nada.. a diary wont do.. dont remember where i kept the last diary) and book marks on del.icio.us just tend to rot in the web.

This re-entry into the blog-o-sphere is supposed to record my daily accidental findings at work and other interesting things that i come across over here.. I can come and look over it later and reminisce all the greatness around rather than them being lost in stream of updates from friends and weird apps from facebook and twitter.. Lets see how it goes

Tuesday, March 16, 2010

Javascript closures

A good article on javascript closures..

http://www.jibbering.com/faq/faq_notes/closures.html

From the article..

"A closure is formed when one of those inner functions is made accessible outside of the function in which it was contained, so that it may be executed after the outer function has returned. At which point it still has access to the local variables, parameters and inner function declarations of its outer function. Those local variables, parameter and function declarations (initially) have the values that they had when the outer function returned and may be interacted with by the inner function."

Friday, February 13, 2009

Bespin -> a new way to code the web

Came across this cool Mozilla labs product. No more textpad/netbeans to code your javascript and then test it in the browser.. Write the code in the browser itself and test it..

It would be cool if it behaved like firebug + allowed to edit javascript and take a look at the changes. This is one place IMHO which firebug lacks. Since web 2.0 means lots of javascript coding and lesser amount of static html, i hate going back to my code editor, making minor javascript changes and then coming back to the browser and refreshing it.

It would be great if i could actually, like editing html and css on the fly, start editing javascript too..

Here is a link to bespin

https://bespin.mozilla.com/

Thursday, December 11, 2008

Mobile blog

So looks like i need to have mms enabled to send pics. I have a nokia m-blog acct where i upload them. I will have to see whether i can refer them from here. Otherwise i will just post a link to it

Mobile blogging

I have decided to upgrade myself in the blogging world and linked this blog account to my mobile. Hence, i should now be able to post content from my mobile to this blog (atleast thats what google says). Let me test and see how well it goes on. This would definitely be much better than having to upload photos to picasa and putting a link to it from here

Wednesday, December 3, 2008

A simple dojo based calendar

I was looking around the web for javascript based client side calendar implementations (with no server back-end) to use in one of my projects. The calendar should
- show me a daily/weekly/monthly view
- allow me to create tasks
- show me a list of created tasks on each of the above mentioned views
- click on a task to see task related information.

I came across a dojo based calendar here . It has a very simple UI but rich in functionalities. It is built on dojo 0.4 . But a link down below in the comments section is available where the user has ported the app to a 1.1 release. This should be useful for people looking around for a calendar widget with above mentioned functionalities.

Infact, i saw a post on the dojo website where it mentions that it has plans to make a complex calendar widget similar to the one above with dojo widgets. I am definitely lookng forward to such a kind of widget too..

Infact there seem to be a lot of other implementations which offer a calendara "package" (with a backend infrastructure too). A lot of them are commercial implementations but they have a very rich UI and a lot more functionality. Examples of them are:

zimbra calendar
Ultra apps calendar
Trumba calendar
zapatec calendar

and of course...
google calendar
yahoo calendar

The space time continuum

I got this into my head when i was walking towards an hotel to attend my friend's marriage. I have travelled through that particular road many times on which i was walking right now.. I walked through it five years before when i was in college, five years before that when i was in school.. would probably walk through that road again ten years down the line with wife and kids.. Each time i pass through that particular road, i always consume a particular amount of time..
This means that each time i pass from point A to point B, in a 3 dimensional space, i always consume a constant amount of time.. Even if i decide to stay at point A, i can still consume that same amount of time.. This means that no matter what i do in the 3D space, i still get to travel through time at a constant pace..

So, we can safely say that in the three dimensional space, there is a constant flow of time which we are flowing along with.. We can travel anywhere in the three dimensional space going along with the constant flow of time..

Now, if we assume that time is the fourth dimension, we can think about a few more things.. First imagine an imaginary 2-D object inside a cylinder. This object can see things only in 2-D and has an imbibed a logic which is based on 2D physics.. It can move "along" in a 3-D space (at zero height). It cannot change its position relative to the third dimension. If some one tried explaining moving "IN" a third dimension, it would also probably violate its 2-D physics..
We humans are living in a 3D space. If now, one says that some one could move along the 4th dimension (i.e time) with a different speed at which time is moving right now then, this would essentially mean that one can travel through time. This could probably be true for a 4-D creature which can imagine a 4D space and relate to 4D physics (which would be different than the 3D physics). But this would create a lot of anomalies in our space. Things like killing your father before you were born or meeting yourself a couple of years earlier and changing some of the stuff that you did earlier.

Again, the abstract thought of time flowing through space in a constant speed brings about a thought of "time warp". If we can bend the three dimensional space so that the start and end points that we want to travel to, coincide, then we can travel between these two points in zero time no matter how far apart these two points are in linear 3 dimensional space.


As one of my friend put in, these are just random thoughts that went through my brain when i was walking down the street. It does not attempt to explain any phenomena or try to prove a point about 3D/4D space.

Servlet 3.0 spec

I am not sure how many of us follow the servlet 2.5 spec, but the 3.0 spec is in the process of being implemented in glassfish v3 nightly builds.. Rajiv Mordani has more in his blog about the new features in JSR 315. Would like to give it a try some day