Monday, 3 November 2014

Fasting a Testing!!

Does fasting make you weak?? or it strengthens your body?? It has anything to do with mental stability?


Wherever you are, whichever religion you follow, whatever your profession is remember this one of the golden rule "Reserve A day to brain and a day to your stomach of complete rest in a fortnight". I bet, every tradition has a statement alike. further I personally believe the first day of every fortnight should be a rest to brain, i.e, Don't try to learn anything new by intention. and 11th day of fortnight should be given rest to stomach and other digestive organs. Means a Fast. Everybody needs a rest!! so as your organs. nothing special to quote for this, but still there are some major reason to why we have to fast on the that day.

As per our Hindu religion, its called Ekadashi (meaning 11th day), It symbolizes to have control over 11 things. 5 sensory organs + 5 motor organs + Mind, to channelize towards your goal. Spiritually saying, towards God. Not eating food a complete day is the toughest thing anyone wants to do. Idea behind is, On this day whenever we think of the eating something, we forcibly made to think of God and control your hunger. This habit unknowingly builds an ability in us, and makes us to control our mind. In everyone's life there will be situation where we know that the path we are moving is not the right one but still we tend to continue same path due to the instantaneous pleasure it provide and forget the goal we want to achieve.

 Some follow fasting in the name of sankashta chaturthi once in a month. which is is also a good practice. but still I suggest to follow the above one!! :-)

And about the rest to our brain, I have not come across a specific reason why it has to be first day of fortnight yet. If anybody knows pls comment on this post or provide a link of reference.

Thanks for reading.. Happy Fasting.. :-)


Sunday, 2 November 2014

Crazy Castes

Basically what is caste.? what is its very meaning? what might be its origin!!!

Think of a situation where there are no caste system built around us.! People are busy in minding their own business.  Definitely the interest of every individual varies. Also surprisingly for some, interests matches with some others. Consider 100 people around us divided into chunks depending on their likings , say 10 groups, some group likes to Teach, some protects, some are business minded, and some likes to do service and maintenance etc. It will then become usual practice to call the group of people to which they belong by their group name.!!!

Exactly in same way the caste system originated. In olden days the group of people who were teaching good things were called "Brahmanas", one who Protected the society called as "Kshatriyas" etc.. Gradually each group divided into many sub divisions depending on the thinking and occupation they do. Now we have whole lot of castes in-front of us as every subdivisions evolved it its own way.

So basically the word "Caste" refers to what you are doing, what is your status and contribution to society. its not just caste of your father defines yours. If one follows the way their ancestor used to follow then its perfectly fine, if not then you are out of that caste. It requires a common sense and mind of acceptance.

Now the situation has come where the question of caste come only at the time of marriages!!. Its my humble request to change your thoughts on the caste system built by our ancestors. Don't quarrel in the name of castes. Understand that we are divided by thoughts. Caste is just a System, should not become an Issue.!!

Think, which is your caste!!!!!??? do U really belong to the one you are claiming to be!!?
 
Thanks for reading.. :)



Friday, 31 October 2014

Success In Bheemasena's words.

Once discussing with my colleague I raised an unusual, rather a simple question "whether you believe in god?".
He paused for a minute and replied "sometimes yes, and sometimes No!!".. Most expected answer.. but still I reacted to his reply quite unusually, I said "what!!!, why is that so??".. He replied, "whenever I ask something to him he fulfills only few of them"... I seriously felt bad!!.. and my straight forward reply was, "See dude, you are servant of god not the other way!!, may be to prove this again n again he doesn't give everything you ask for!!!".


Problem

  • Problem here is the "thought behind it". We just ask, if not fruitful we again ask, still if its not the expected one, we finally point out the god!!!. 

Solution

We forget that Actually the Result of every act is a product of effort and god grace. In Bheemasena's words,
the success is defined as a product of
    1.Goodness of the Intention.
    2.Actual Effort - you should try to reach your limits.
    3.God's Grace.
If one amongst the three is zero, the product is zero!!!


The message conveyed here is, before pointing to the god you must sincerely carry out your duty and then rest should be left to the supreme.


Thursday, 30 October 2014

Aacharagala Vichara.


Sashtanga Namaskara to whom and Why???
(steping towards to know simple reasons behind our tradition)

Meaning
  • Most superior way of saluting someone.
  • Involves Heart, Head, Eyes, Mind, Words (tongue), Legs, Hands and Knees – since namaskara (prostration) is done with these eight parts, it is known as “Ashtanga Namaskara”
  •  Two hands, Two legs, Two arms, Chest and Forehead, touch the ground while saluting.
    For ladies its just a Panchanga namaskara (Two hands, Two legs and Forehead)
     
To Whom:
  1. Supreme God
  2. Parents
  3. Gurus (Teachers)
Concept Behind It:
  • Mentally,It is an act of being extremely thankful to them, since whatever we are now is all because of them.
  • Phisically, It is an act of showing "I am no way greater than you, so I am grounding before you"
  • There are other ways to salute someone, but sashatanga refers to the most important contributors for our life.

Why,
  • To the God, Since he is the creator of this Universe & Providing every need of our life.
  • Parents, Doesnt need a reason to give I guess :-)
  • Finally Guru, Ppl say Knowledge is power. A teacher empowers us by sharing valueable knowledge, in every step of our life. Induces the thirst to more and be knowledgeable.

Note: There is a must and should rule that for above 3, the salutation must be always "Sashtanga Namaskara". For other it can be panchanga or just abhivadana.


Intention of this post is to bring it to action. Its not just for Information!!!!

Reference: Krishnamruta maharnava.

Tuesday, 6 May 2014

Java Special : String.


String in java, favourite topic to any interviewer and can be used to test your understading about java string internals.

Unlike in C/C++ java string are not just a stream of characters, instead an object of class java.lang.String.
String objects are immutable they can be shared!!
Example:
String str1 = "string";
String str2 = "string";
String str3 = new String("string");
String str4 = new String("string");


As shown in figure, the string literals will go and reside in String constant pool. Hence when you are assigning a string value to string object it will search in this space if any matching string is found, the object is made to refer same point. In our case str1 and str2.

While, if you choose to use new,  there is turnaround. It behaves as usual object creation and above figure depicts the same. Look at following equivalent expressions,

Using "==" - comparing references

str1== str2 // true, points same location in memory

str1== str3 // false, 2 different locations

str3== str4 // false

Using .equals() - comparing contents

str1.equals(str2) // true, equlas is designed to check the contents of String

str3.equals(str1) // true

str3.equals(str4) // true


what is Immutability with String?
Once a String is constructed, its contents cannot be modified. Otherwise, the other String references sharing the same storage location will be affected by the change, which can be unpredictable and therefore is undesirable.

Ex,
String str1 = "string";
str1 = "hello";

Here, instead of modifying content of str1 to hello, a new string will be constructed and str1 will be assigned with location of hello, leaving "string" dereferenced in memory.
 
why string is immutable?
  • Being immutable guarantees that hashcode will always the same, so that it can be cashed without worrying the changes.That means, there is no need to calculate hashcode every time it is used. This is more efficient.
  • Imagine StringPool facility without making string immutable , its not possible at all because in case of string pool one string object/literal e.g. "Test" has referenced by many reference variables , so if any one of them change the value others will be automatically gets affected.
  • By making java.lang.String final, Java designer ensured that no one overrides any behavior of String class.


Tuesday, 29 April 2014

Abstract Class vs. Interfaces in Java

Hi All, This time I am back with a most controversial topic among java beginners. Yes, Its Abstract Class v/s Interface.
 Most of the developers prefer using Interfaces over abstract class for the following reasons.
  1. Any Class can be modified to implement the Interface, not necessarily the hierarchical type.
  2. Loosely coupled.
  3. Interfaces enable safe, powerful functionality enhancements.
  4. Overcome effect of absence of Multiple Inheritence
With these advantages it also bring one big difficulty that "Once an interface is
released and widely implemented, it is almost impossible to change".
so Interfaces need to be designed more carefully than an abstract class.

Saturday, 8 March 2014

Installing VLC player in fedora


Any video player needs codecs to play the videos on linux, Unfortunately default installation of fedora wont provide it...

First You Need to install a codec,
  1. Get Rpm Fusion,
    • Run this command
      su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
  2. Get Livna
    • su -c "rpm -ivh http://rpm.livna.org/livna-release.rpm"
  3. Get gstreamer codec
    • su -c 'yum install gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-plugins-ffmpeg vlc'
  4. Optionally I Prefer Amarok music player, here is the command
    • su -c 'yum install amarok'
Thats It.... Vlc Should be listed under the Application Tab...