Showing posts from February, 2017

Debugging jQuery Code for dummies

At least some of us might have learnt jQuery the hard way.

As it has been said for a long time, the best way to understand jquery or any other code is to read through code written by other people. jQuery is unique because it uses html and css flags to make things happen.

Debugging jQuery code is sometimes not easy, even with some experience. This is because, parts of html and JavaScript code are linked together by a id or a class.

Steps to debug jQuery
I will try and explain the steps by way of a html and jQuery code example below.

Find the trigger word
You see, buttons or links are created with id or class and the id and class names are then used to trigger activity.

In one part of the code, there will be something like


There are events that trigger an action. The event may be on an input field, a list box a submit button or something else; and the event may be a change in the field, a click on a field, a mouse over action, a mouse out action and other such events.

Locate the trigger …

The Secret to a Better Life

Is there any one thing, which if we do, we will have a better future?
I would say "Yes, there is".

BE STILL! Do nothing!
Essentially, we are all spiritual beings, who are here for a reason. We are given a chance to live life in a manner that benefits us and others.

As we see, each one of us experiences life differently, based on our past experiences, our past acts done out of anger, humility, love, greed and so on.

But, because of our limited knowledge of the universe and its workings, we are happy during good times and during bad times complain that God is being cruel to us for no fault of ours.
What we fail to realize is that whatever experiences that we are going through in our life, it is all the result of an accumulation of past activities; ours, our ancestors and our society. It has been called many names from ancient times, but for the sake of better understanding, we will call it Causal action.

The Buddha Story
You must have heard about this story about the Buddha. He used …

Why is there so much suffering in the world

If God is real then why is there so much suffering?
How can there be a God who can allow all this atrocities to happen?

These are the kind of questions that arise in most minds, whether they follow any of the world's religions such as Christianity, Buddhism, Islam or other religions or atheism or neutral in their belief.

The philosophical answer to this is that it is the destructive actions of humans that caused it. Then, the reactions of humans to the ills happening to them perpetuates it.

The top executive is concerned with macro issues
The logical answer to this is that assuming there is a God, He is not coming down to help you out of a fix, in the same manner that President Obama or whoever is your head of state, is not going to come down to you and help you out of a fix.

The top person never addresses micro level problems; their focus is at the macro level.

We are responsible for our actions, nobody else
Next, whatever problems that we are in, are the result of our past actions. This…