
Anything that interests me finds place here. Software dominates my interests and hence a good part of this blog as well.
Saturday, January 24, 2009
Friday, January 23, 2009
Confusion are not just within me...good to know that :-)
“Among other things, you’ll find that you’re not the first person who was ever confused and frightened and even sickened by human behavior. You’re by no means alone on that score, you’ll be excited and stimulated to know. Many, many men have been just as troubled morally and spiritually as you are right now. Happily, some of them kept records of their troubles. You’ll learn from them - if you want to. Just as someday, if you have something to offer, someone will learn something from you. It’s a beautiful reciprocal arrangement. And it isn’t education. It’s history. It’s poetry.”
- J.D. Salinger, The Catcher in the
Wednesday, January 21, 2009
Running a Single JUnit test class in maven
mvn test -Dtest=StudentServiceTest. Details
Monday, January 19, 2009
APIs in Java Interfaces
No access specifiers in method signatures specified in Interfaces. Implementation qualifiers like “final” not to be included in arguments. Details follow.
A close shave
“What might have been” causes you to be sad because you are comparing yourself with how good things would have been had you been successful.
Your comparisons can determine your happiness
The bronze medalist is happiest because he compares himself with those who did not get any medal.
The silver medalist is not as happy because he compares himself with the gold medalist. Happiness is a function of who you compare yourself with.
Secret of happiness is mild contentment not extra-ordinary happiness
People who are have extra-ordinary happiness also experience extra-ordinary sadness. Details
Friday, January 16, 2009
Strange are Madoff's ways
The $50 Billion Ponzi scheme fraudster was investigated thrice by the SEC and they could find nothing wrong with him. Strange world this.
U.S. not the country with most cars person....surprise!!!

Interesting facts these:
There are more cars per person in
Thursday, January 15, 2009
Wednesday, January 14, 2009
Listing all check-ins on a specific day
The following SVN command lists all check-ins on a specific day(s).
> svn log --revision {20090113}:{20090114}
------------------------------------------------------------------------
r4900 | bsubburu | 2009-01-13 16:54:12 -0700 (Tue, 13 Jan 2009) | 1 line
XYZA-2823. Implemented blah blah blah
------------------------------------------------------------------------
r4902 | jweight | 2009-01-13 17:28:38 -0700 (Tue, 13 Jan 2009) | 1 line
XYZA -2823. Increased blah blah blah
Friday, January 09, 2009
Nice talk on India, Pakistan conflict
http://fora.tv/2008/11/20/Neil_Joeck_The_US_And_Pakistan_Next_Steps
Thursday, January 08, 2009
Treatment (yesterday and today) of Mr Ramalinga Raju - a glaring example of how assuming we are
I have always felt that we Indians are very assuming. If somebody is successful in creating of perception of being good the first few times then he is good for the rest of his life and vise-versa (If we get a perception of somebody being bad the first few times then he is bad for the rest of his life).
Till yesterday Mr Raju, for the Indian media and Indians in general, was a super here of India Inc. Because we bought into his image promotion. We bought into his false-hood (or public relations as it is called to give it legitimacy).
Something like the size of a Maytas acquisition needed to wake us all up and smell foul. Now we start the journey to the other side. Mr Raju the evil of corporate
Till yesterday Mr. Raju was, actually, a liar. To us, He was a super hero of corporate
I am no big fan of Mr Raju. In fact I do not know much about him. But my point is our (the Indian society) treatment of him brings out the flaw in our attitude.
Wednesday, January 07, 2009
Why use @Override annotation
If a method is annotated with @Override but does not correctly override a method (in one of the super-classes or interface), then the compiler will report an error. So this is a means to use the compiler to enforce your idea that the methods overrides some other method.
E.g. of a startElement() method exposed in ContentHandler.
/**
* ……
*/
@Override
public void startElement(
final String uri,
final String localName,
final String qName,
final Attributes atts
) throws SAXException
{……
Tuesday, January 06, 2009
BidiMap
This Map can be looked up by both the key and the value WITH the same performance. The catch is that the values should also be unique. Which is expected as the values become the keys in reverse lookup.
A simple example:
import org.apache.commons.collections.BidiMap;
import org.apache.commons.collections.bidimap.TreeBidiMap;
public class BidiMapDemo {
public static void main(String[] args)
{
BidiMap map = new TreeBidiMap();
map.put("
map.put("IN", "
map.put("
System.out.println(
String.format(
"Lookup by Key. key: %s Name: %s",
"US",
map.get("US") // returns "
)
);
System.out.println(
String.format(
"Lookup by value. Name: %s Key: %s",
"
map.getKey("
)
);
}
}
Output:
Lookup by Key. key: US Name:
Lookup by value. Name:
Monday, January 05, 2009
Indian deep space network
Sunday, January 04, 2009
java and sax xml programming basics
Notes:
Sax exposes a org.xml.sax.XMLReader interface which must be implemented by all XML parsers. xerces implemented this interface in the org.apache.xerces.parsers.SAXParser class.
The first step is to create an instance of XMLReader. So
package test;
import org.xml.sax.XMLReader;
public class SaxRead1
{
public static void main(String[] args)
{
XMLReader reader = null;
}
}
Next to create an instance of SAXParser and assign it to XMLReader reference. So
package test;
import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.XMLReader;
public class SaxRead1
{
public static void main(String[] args)
{
XMLReader reader = new SAXParser();
}
}
SAX call backs:
