Home | World beyond imagination | draghuna@iit | Works | Pictures | About Me & Contact   
   
:: W o r l d  B e y o n d  I m a g i n a t i o n ::.  

The space where I try to reach the world beyond imagination. Tighten your seat belts!!! The Journey begins.

 
::Hello Chicago and Fall 2007 ::.  
December 30, 2007,

Hey people, I am blogging now after a long time! Now, as everyone knows, I am at Chicago to purse my long time planned goal – Masters in Computers. After some 3 years of corporate life, I am taking a break. Now back to life with books and classrooms!!! Lots of good things have been happening in my life for the last 4 months and I didn’t express my feelings over them to the world.

So this post is going to be a quick recap of what is happening in my life recently!!

First thing, my long awaiting process of getting my graduate college admission and my student visa to US. Probably, many don’t know that I was planning to get into Canadian Graduate School. I, somehow, felt Canada would be right for me and was doing lot of research over me. But again, I had open mind over the country as the education gained and the future is the most important factors for any student. From January of this year, I started getting admission offers from both American and Canadian graduate schools. Later, when it came to finalizing the school, I opted for Illinois Institute of Technology at Chicago with my future and education in mind. Funny part would be shuffling of the cards played by God among my very close friend Karthick and myself. I made my decision over American School where in I was planning for Canadian and vice versa to my friend Karthick :) … That’s destiny, my friend!

After finalizing the destination of next two years of my life, the most important thing for me, rather I would say for any international student, is Visa. Doing your homework on finalizing the school is not everything. Even, you have to put lot of effort on Visa too. Again, you have lot of online resources which could help you through all the steps right from required documents, booking visa date till how to present yourself in the visa interview. My mom and dad came down to Chennai from Patna to spend last few days with me before I travel to US for a long term. My parents pretty well knew that I won’t return home till I complete my education. So my mom and grandma cooked all the yummy foods for me! Folks!!! Seriously, really yummy foods. These are the best days. You can demand a lot and every required mouth watering dishes would be presented right in front of you ;)

Once I got my visa, I had to resign my job. I miss my friends at my work place. They were too good with me. Love you folks!!!

I was on a Tamil Nadu tour to visit all my loved ones. I covered all of my relatives' places in Chennai on my road trip with my mom. Later, I travelled with my mom and my twin bro to other places in Tamil Nadu. Again, I took advantage of awesome welcome by my aunties and uncles.

Most awaiting day has come! My dad, mom, bro and other closed ones came to airport with me on my travel day to Chicago. Interesting thing was that my friend Srinivasan from my office … ok, I got to say my ex office… was on his on-site trip to Boston. So I made him to travel to paris with me and from Paris we would be catching our respective flights. Aaaah! Guess everyone had a good sleep during the long flying hours. Paris climate was really good and it reminded my UK trip though. At Paris airport, few of my body spray and shoe spray were been disposed. My bad! I didn’t know that I am not supposed to be carrying a liquid of more than certain quantity in hand bag. After another long journey, I was at Chicago airport. Good for me, I landed safely. My dad’s friend’s son, Arun came to receive me at O’hare – Chicago Airport and from there, I caught a taxi to my on-campus apartment. I reached US! To be frank, I wasn’t that excited. Donna why! But I wasn’t. Yup, it was strange feeling though. Probably, my UK trip would have been one of the reasons. I am sure, US has stocked a lot of interesting things for me!

My graduate student life at an American University has begun. Orientation, new friends from various countries, highly qualified professors, good neighborhood, Michigan Lake, Chicago downtown… everything were interesting. Got to accept, there has been lot of activities going on in the campus. Best thing I did after I came here was that I got into Facebook, an online social network. All the activities in the Campus would be posted at my university network in the Facebook.

Regular activities for me for the first semester would be attending classes, exams, assignments, projects, lab meeting, cooking food on Mondays, making friends, online movies and lately got habituated to animes!!! That too, I will watch only in Japanese. Definitely, I would create another post on my anime world later.

Another interesting thing is that I have to do cooking for every Monday – Veg & NonVeg [depends]. I never cooked meat before and so, I started doing my experiments. I have been testing my results over my roomies! Surprisingly, they have been giving positive feedbacks.

When you talk about the weather in Chicago, first two words – wind and snow! If it is a windy day, we could see few thin people floating in the sky. If it is snow, you can’t see anything except white. Two headlines in the news channel – "Snow Storm today!" and "because of heavy snow, there are n number of road accidents!"

But seriously, one has to admire the first snow fall!!! It was really an awesome feeling. It was exactly on Thanks Giving day when I saw first flurries of my life. Wooow!!! They were really gorgeous. After few days, the most awaiting guest made its pleasant visit!! It snowed in the Chicago. When I got up in the morning, all I could see was white, white and white. Everything was turned into white. Everything is pure and divine. I was able to see few of the students came out with joy and started their snow fights! I heard that it would snow till February. So it is going to be simply great winter for me.

Yet another new experience for me would be witnessing hailstorm. It happened well before the flurries on the thanks giving day. Again, as usual, it happened when I was at my room. Suddenly, I realized that it was hailstorm. I was too excited and opened the window. I felt the ice dashing over my hand. It was bit painful but worth to feel the fresh ices straight from the sky. It was simply gorgeous. Right after the two minutes of hungama, two beautiful rainbows gave its presence. Astonishing!!!

Hmmm I had two guests here in Chicago. One was my ex-colleague, Sindha and other was my uncle Ganesh. I met Sindha at O’hare and had a good office talk. Well Ganesh uncle came to my university with his friends. We were on the lake shore drive and had peep over Chicago from the Sear’s tower – 97th floor.

After coming here to this university only, I came to know that there are almost 10 -12 people during their masters from my undergrad college. One of them is Pandian and he was my batch mates in my undergrad. Oh ya, I forgot to mention about my childhood friend. Even my very old and very good child friend, Ankita, is doing her masters in this university only.

Parties!! … I was on a Mid Night cruise at navy’s pier organized by my university. Good one. Gambling, dance floor, food and it was one full masti!

I spent last weekend with my undergrad friends Pandian, Arun and Bhuvana. Arun was here from South Carolina on his few days trip to Chicago. Saturday, we have been to Ice Skating, Millennium Park and dinner at an Indian restaurant Hema’s kitchen. Sunday, we were at Museum of Science and Industry and National Treasure II. Then on Monday, we had a trip to Aquarium. Ice Skating was the best of the weekend. Indeed an awesome experience!!! I have done roller skating before but Ice Skating bet it.

Hmmmm … what else??? I believe I covered almost all. Now, I am trying my level best to spend my winter break wisely. Trying to do some learning work done before my next semester starts which would be January 22nd 2008. Love you mom, dad and bro and miss you a lot!!!!! Hugs to all of my friends at India!

 
:: Faster than light! ::.  
May 13, 2007,

Today, I slept by 5am and got up by noon. It was good sleep with lot of interesting dreams floating in my mind. After some television and my heavy lunch, I was lying on my bed for a while and left my mind for free thinking. I observed that my wall clock was showing the time wrongly. It was 10:30 am in my clock. Probably its battery would have been dying out. Well, it made me to think that I have wasted my time and it is 2 pm. It would be really great if the clock was right and it is actually 10:30 am. Probably for which, I guess I have to travel against the time to regain the time.

Hmmm ... interesting thought though, lemme continue my imagination and proceed further. What should I have to do in order to get it done? Simple! Catch a flight and fly towards west. But dude! It takes more time in traveling. A super fast flight would be the ideal solution for this problem. Ok! Let us do some serious thinking here. Whether we can gain time more than 24 hours and use it wisely. Yup! It is possible. How about we begin our day at east most part of the earth and complete our 24 hours and then from there, we will use our super fast flight to travel to west most of the earth and complete the day there. ;) isn’t amazing! I would say Wooooow for having approximately 48 hours in a day!

Time Vs Human

Just think, if we can make it happen, then for sure, everyone can double their productivity and Earth would be growing twice its current pace. It would be very interesting if it happens that way. We can find people working in different country and stays in different country. Probably, the west & east would be financial & industrial hubs and center of the earth would be residential. On the lighter part - person staying in Singapore would say "Honey, I am back. Got caught in traffic in Europe!" Yup, each one would own a private super fast flight just like car of our current era. We would be having highly advanced technology facilities and pollution free world. Oh ya! Earth would have facilities in different planets to accommodate the growing population. I guess, for vacation, people would be making trips to Pluto and various other planets and these trips should take a day or two to make it.

You might be thinking about terrorism and cooperation between the countries. I would say, by then, every individual would be named as a citizen of earth and group under human race. There would be one democracy. Every country would be working together without any mental variance. There wouldn’t be one currency and one language. It doesn’t mean people would forget their culture. They would be preserving their culture as how it’s been happening nowadays. What would be the occupation of the citizens by then? It should be pretty much the same. The only difference would be the scope of their work. It would be more advance and high tech.

Who knows whether my imagination would come true or not! But somewhere deep in my heart, it says YES! Let’s keep growing and improve humanity.
 
:: Cricket 2007!!! ::.  
May 12, 2007,

Hey People, with end of the world cup, I have removed the match tracker from my homepage. Hope, everyone had good fun during the World Cup 2007. Well, it was kinda disappointing for me as Indian Cricket Team walked away from the Caribbean without the trophy :( ... Anyways that’s the Cricket all about - winning and loosing is part of the enjoyment. Now with more crickets coming up, I know that you, all cricket fans, would be really excited and looking forward to it. Oh ya ... India won the ODI series against Bangladesh ... yup the same team who took away Indian cricket team all by shock in the World Cup.

Well well, there is gonna be an African Vs Asia cricket tournament held this June. Watching best of Indian, Pakistan, Srilankan & Bangladeshi players in Asian XI team would be feast to the cricket fans. And the best part is that it’s gonna held in Chennai, India (atleast that’s what I heard)... probably I gotta get my tickets booked. Then comes the India tour to Ireland & Northern Ireland … gosh!!! If it was last year, I will be in one of the Ireland stadium and cheering for the Indian Team. Not to forget about the 20-20 world cup planned for this September. Let’s hope, India does some magic over here.

Indian Cricket Team,
we would really like to have you as the world’s top ranked cricket team. All the best for 2007! Lets forget the past ... future is in our hand!
Cricket Batsman
Post from the tracker in the homepage:
:: ICC Cricket World Cup - West Indies 2007::.
Sixteen Team fighting for a gorgeous cup @ Caribbean. Sixers, boundaries, dives, catches, square drive, off break, leg spins, googly .... damn, I love this game!!!
 
:: Skateboarding, Snowboarding, Sandboarding ... Hmmm whats up with Footboarding!!! ::.  
April 30, 2007,

Skateboarding, Snowboarding, Sandboarding ... Hmmm whats up with Footboarding! Oh ya, I am writing this for all the people, who didn’t visit India or some of the countries where footboarding is very usual. Of course, don’t carry on with this statement. You can’t find footboarding in all over India.
In one of the discussion with my friends @ UK, we were discussing about the Indian Traffics. I almost forgot to tell an existing activity ... Foot Boarding. If you ask any of the College student or ex-college student the question ... What is fun thing you can think when it comes to Bus? Everyone would say in chorus, all about the foot boarding. It is as equally fun as the risk involved in it. Ok, enough of suspense; lets know what exactly it is and how to master it.  
Usually, most of the regular buses don’t have any doors at passenger entry & exit. The youth usually hang over at the foot steps of the bus. Sometimes, people have to do because of the over crowd in the bus. Generally, you can find almost 6 to 7 foot boarders on each doors in a very crowded buses, literally, standing on the thumb finger of one of their legs and one arm holding part of the bus (Sometimes, you have to manage with just fingers of your one hand). Along with fun & heroism, comes a great responsibility – withstanding the weights of the people standing in the stair case while the bus is turning. The real experts – the gods of foot boarding … you can find them hanging over the windows of the bus with their legs hanging over in the air. You can see them hanging as long they want and if they feel boring and can’t able to place a finger of their legs in the foot board, they always opt for climbing over the window. :) Oh ya, I have seen many experts do that. Of course, you would get scolding for doing that from the public.

Now, it is time to get expertise on foot boarding. To be a good foot boarder, you gotta be a person with good arm strength & running stamina. It’s all about getting into a running bus and getting down from a running bus safely. When the bus starts from the bus stop, you should start running along with bus. After reaching few distances, try to hold a bus comfortably and then jump into the bus. The experts would try to place the tip of legs very firmly. Anyways, you would find people giving you space to keep your foot and if you slipping off, they would tend to pull you in with scolding. Well, scolding is part of the learning. So, no worries! Amateur should try with slow speed and empty buses. They can try get into the bus or get down from the bus when the bus is moving very slowing. With experience, they can try with high speed and crowded buses.

So, to state,
"Experience is directly proportional to Speed of the bus & Crowd in the foot board."

Some simple tips which you gotta keep in mind, while getting down from the bus, run along with bus till you can control your speed and slow down. Don’t keep your legs stiff as it would hurt you. Be very careful when you try the front door as they are very risky when compare to back door. Another fact you got to calculate is the height of the first foot board from the ground level. There can be some bus with high and some with low foot boards. If it’s high foot board, you gotta build some air while you jump into the bus.

You might be thinking that why one should try these if there is so much of risk involved. Answer is simple - Fun, Heroism, Grab very quick attention of crowd and of course Gurls ;) Com’on every college goer would like to grab attention of girls.

Behind the scene, the credits go to the bus driver. He has to drive very carefully as he has to keep the foot boarders in mind while driving closely to some other vehicles.

However, Governments are playing their roles by instructing how dangerous it is to indulge in these activities. They have been introducing more buses on the busy tracks and also they are introducing closed buses.

  As said before, be careful. Safety First, Fun Next. If you can’t expertise, enjoy by watching others do the tricks!!
 
-:Wanna be a DJ? Wanna be a RJ? Wanna own your own Radio Station? - How to setup Radio Station::.  
April 08, 2007,

I was on a week off and was wondering how to set up a radio station within a network or to host in the internet. It would be really kool to have our own radio stations with our name on it. Wooow!!! That’s impressive. So first thought that was running in my mind was “How about creating streaming software? Well, it can be a very primitive Radio Station … and hmm … I can do it with Java or Flash”. But later I made up my mind to try out for existing tools first instead of creating one.

Well, the typical network radio station works as below:


Radio Station Setup

There are three roles in setting up a Radio Station: Server, Source & Listeners.
Servers: The ones who receive the audio streams from the Source and broadcast them to the Listeners.
Sources: The ones who create the audio streams and push them to the Server. RJ & DJ play their creative role out here.
Listener: The ones who register to the server for the audio streams. Musiz Lovers freaks out here.

After knowing about architecture, let’s start our dig for radio tools. Based on my quick search, I found two free radio station servers – Icecast and SHOUTcast . They are very popular and highly voted. They provide support for various players like Winamp, Real player, VLC, Windows media player and others. As far as I read, I understood that if it is Linux, vote for Icecast and if it’s for Windows, go for SHOUTcast. However, I would suggest you to go through the respective websites to know more.

With Windows in mind, I have gone for SHOUTcast. So going forward, I would be talking about SHOUTcast and how to set up the server and source. To talk about the SHOUTcast, it is the product developed by the Nullsoft Inc., the maker of the famous player, Winamp. The site www.shoutcast.com provides very detailed information on its product and is well documented.

Software Required:
  1. SHOUTcast Distributed Network Audio Server (DNAS)- www.shoutcast.com/download/serve.phtml
  2. SHOUTcast source
  3. Winamp player
Setting up Radio Server:
  1. Install the server
  2. The installation package comes with both GUI & Console interface. For ease usage, let’s go for GUI.
  3. Once server is been setup, one can edit the server configuration by clicking “Edit Config” and I guess others are self explanatory.

SHOUTcast Distributed Network Audio Server

The “Edit Config” button pops up the config file for the server. Just make sure that your port for this server doesn’t clash with other in your machine J. The server also provides restriction over the number of listeners. Just play with other config values. Read the “readme.txt”. It was really informative.

That’s it. You got your server running. Top of it, the server also provides the web interface of its server.

SHOUTcast Distributed Network Audio Server - Web Interface

Setting up Source (DJ! Hit d Musiz): This is the interesting part … again its simple. We gonna seek the help of Winamp. All one have to do is setup the Source plug-in to winamp. Got some screen shot for you. Well if you see, you have option for giving the server name, port & the source password (you could find it in the Config file of the server). On the other end, you could a fancy name for your station, your station URL, Genre and many more.

The Encoder section provides you the facility to define the bandwidth. CPU usage of the DNAS is very low and I guess one can broadcast 24kbps on a single 300 MHz processor to over 600 listeners.

Moving forward, the input section provides the interesting feature – Switching between the inputs; Yup, from winamp (i.e. music) to sound card input. You can switch to sound card and you can host your program. Just make sure have a good mic with you and enjoy talking. Just a quick note… I was facing an issue while shifting the input mode when my music is being played. So the work around is to pause the current song and then you do the shifting of the input mode. However, other tools also hold plug-in for it to be a source to the SHOUTcast servers. There are some fancy & professional RJ tools out in the market which can help you to tune your RJ skills.

Source - Connection & Yellowpages

Source's Encoder and Input

Setting up a listener: Last but not the least, if you are the listener who wants to have good time hearing to mind blowing music being played @ your favorite stations, all you have to do is to play the play list been offered @ these servers. If you could scroll up to the web interface screen shot, the internal web interface provides a link “Listen”. It provides a “.pls” file and the listener has to play it to tune into the station.

Nullsoft's Winamp


That’s all what I got for you all DJs, RJs & Musiz Lovers! Watch out for more interesting stuffs lining up.

 
-: 10 Commandments for Java Developers ::.  
March 22, 2007,

Folks, I received a forward mail with the below article from one of my friends & I found it to be really useful. Go through the below article and refresh your Java Basics.

10 Commandments for Java Developers
By Aleksey Shevchenko
June 12, 2006

There are many standards and best practices for Java Developers out there. This article outlines ten most basic rules that every developer must adhere to and the disastrous outcomes that can follow if these rules are not followed.

1. Add comments to your code. – Everybody knows this, but somehow forgets to follow it. How many times have you "forgotten" to add comments? It is true that the comments do not literally contribute to the functionality of a program. But time and time again you return to the code that you wrote two weeks ago and, for the life of you, you cannot remember what it does! You are lucky if this uncommented code is actually yours. In those cases something may spark your memory. Unfortunately most of the time it is somebody else's, and many times the person is no longer with the company! There is a saying that goes "one hand washes the other." So let's be considerate to one another (and ourselves) and add comments to your code.

2. Do not complicate things. – I have done it before and I am sure all of you have. Developers tend to come up with complicated solutions for the simplest problems. We introduce EJBs into applications that have five users. We implement frameworks that an application just does not need. We add property files, object-oriented solutions, and threads to application that do not require such things. Why do we do it? Some of us just do not know any better, but some of us do it on purpose to learn something new, to make it interesting for ourselves. For those who do not know any better, I recommend reaching out to the more experienced programmers for advice. And to those of us that are willing to complicate the design of an application for personal gains, I suggest being more professional.

3. Keep in Mind – "Less is more" is not always better. – Code efficiency is a great thing, but in many situations writing less lines of code does not improve the efficiency of that code. Let me give you a "simple" example:

if(newStatusCode.equals("SD") && (sellOffDate == null ||
todayDate.compareTo(sellOffDate)<0 || (lastUsedDate != null &&
todayDate.compareTo(lastUsedDate)>0)) ||
(newStatusCode.equals("OBS") && (OBSDate == null ||
todayDate.compareTo(OBSDate)<0))){
                    newStatusCode = "NYP";
}

How easy is it to figure out what this "if" condition is doing? Now imagine that whoever wrote this code, did not follow rule number 1 – Add comments to your code.

Wouldn't it be much easier if we could separate this condition into two separate if statements? Now, consider this revised code:

if(newStatusCode.equals("SD") && (sellOffDate == null ||
todayDate.compareTo(sellOffDate)<0 || (lastUsedDate != null &&
todayDate.compareTo(lastUsedDate)>0))){
                        newStatusCode = "NYP";
}else
if(newStatusCode.equals("OBS") && (OBSDate == null ||
todayDate.compareTo(OBSDate)<0))
{
                        newStatusCode = "NYP";
}

Isn't it much more readable? Yes, we have repeating statements. Yes, we have one extra "IF" and two extra curly braces, but the code is much more readable and understandable!

4. No hard coding please. – Developers often forget or omit this rule on purpose because we are, as usual, crunched for time. But maybe if we had followed this rule, we would not have ended up in the situation that we are in. How long does it take to write one extra line of code that defines a static final variable?

Here is an example:

public class A {
           public static final String S_CONSTANT_ABC = "ABC";

           public boolean methodA(String sParam1) {
                     if (A.S_CONSTANT_ABC.equalsIgnoreCase(sParam1)) {
                                 return true;
                     }                      
                     return false;
           }
}

Now every time we need to compare literal "ABC" with some variable, we can reference A.S_CONSTANT_ABC instead of remembering what the actual code is. It is also much easier to modify this constant in one place rather then looking for it though out all of the code.

5. Do not invent your own frameworks. – There are literally thousands of frameworks out there and most of them are open-source. Many of these frameworks are superb solutions that have been used in thousands of applications. We need to keep up to date with the new frameworks, at least superficially. One of the best and most obvious examples of a superb widely used framework is Struts. This open source web framework is a perfect candidate to be used in web-based applications. Please do not come up with your own version of Struts, you will die trying. But you must remember rule number 3 – Do not complicate things. If the application that you are developing has 3 screens – please, do not use Struts, there isn't much "controlling" required for such an application.

6. Say no to Print lines and String Concatenations. – I know that for debugging purposes, developers like to add System.out.println everywhere we see fit. And we say to ourselves that we will delete these later. But we often forget to delete these lines of code or we do not want to delete them. We use System.out.println to test, why would we be touching the code after we have tested it? We might remove a line of code that we actually need! Just so that you do not underestimate the damage of System.out.println, consider the following code:

public class BadCode {

           public static void calculationWithPrint() {
                        double someValue = 0D;
                        for (int i = 0; i < 10000; i++) {
                                     System.out.println(someValue = someValue + i);
                        }
           }

           public static void calculationWithOutPrint() {
                        double someValue = 0D;
                        for (int i = 0; i < 10000; i++) {
                                     someValue = someValue + i;
                        }
           }

           public static void main(String [] n) {
                        BadCode.calculationWithPrint();
                        BadCode.calculationWithOutPrint();
           }

}

In the figure below, you can observe that method calculationWithOutPrint() takes 0.001204 seconds to run. In comparison, it takes a staggering 10.52 seconds to run the calculationWithPrint() method.

 

(If you would like to know how to produce a table like this, please read my article entitled "Java Profiling with WSAD" Java Profiling with WSAD )

The best way to avoid such CPU waste is to introduce a wrapper method that looks something like this:

public class BadCode {

            public static final int DEBUG_MODE = 1;

            public static final int PRODUCTION_MODE = 2;

            public static void calculationWithPrint( int logMode ){   
                        double someValue = 0D;
                        for (int i = 0; i < 10000; i++) {
                                     someValue = someValue + i;
                                     myPrintMethod(logMode, someValue);
                        }
            }

            public static void myPrintMethod(int logMode, double value) {
                        if (logMode > BadCode.DEBUG_MODE) {         return; }
                        System.out.println(value);
            }

            public static void main(String [] n) {
                       BadCode.calculationWithPrint(BadCode.PRODUCTION_MODE);
            }

}

String concatenation is another CPU waster. Consider example below:

public static void concatenateStrings( String startingString ) {
             for (int i = 0; i < 20; i++) {
                         startingString = startingString + startingString;
            }
}

public static void concatenateStringsUsingStringBuffer( String startingString ) {
            StringBuffer sb = new StringBuffer();
            sb.append(startingString);
             for (int i = 0; i < 20; i++) {
                           sb.append(sb.toString());
             }
}

In the following figure you can see that the method that uses StringBuffer takes .01 seconds to execute where as the methods that use string concatenation takes .08 seconds to execute. The choice is obvious.

 

7. Pay attention to the GUI. – No matter how absurd it sounds; I repeatedly observe that GUI is as important to the business clients as functionality and performance. The GUI is an essential part of a successful application. Very often IT management tends to overlook the importance of GUI. Many organizations save money by not hiring web designers who have experience in design of "user-friendly" applications. Java developers have to rely on their own HTML skills and their limited knowledge in this area. I have seen too many applications that are "computer friendly" rather then "user friendly". Very rarely I have seen developers that are proficient in both software development and GUI development. If you are this unlucky Java developer who has been assigned to create an application interface, you should follow these three rules:

1. Do not reinvent the wheel. Look for existing applications that have similar interface requirements.

2. Create a prototype first. This is a very important step. The clients like to see what they are going to get. It is better for you also because you are going to get their input before you go all out and create an application interface that will leave the clients cold.

3. Put the user's hat on. In other words, inspect the application requirements from the user's perspective. For example, a summary screen can be created with paging and without. As a software developer, it might be temping for you to omit paging from the application because it is so much less complicated. But, from the client's perspective, it might not be the best solution because the summary results can hold hundreds of rows of data.

8. Always Prepare Document Requirements. – Every business requirement must be documented. This could be true in some fairy tale, but it is far from that in the real world. No matter how time-pressed your development is, no matter how tight the deadlines, you must always make sure that every business requirement is documented.

9. Unit-test. Unit-test. Unit-test. – I am not going to go into any details as to what is the best way to unit-test your code. I am just going to say that that it must be done. This is the most basic rule of programming. This is one rule that, above all, cannot be omitted. It would be great if your fellow developer could create and execute a test plan for your code, but if that is not possible, you must do it yourself. When creating a unit test plan, follow these basic rules:

1. Write the unit test before writing code for class it tests.

2. Capture code comments in unit tests.

3. Test all the public methods that perform an "interesting" function (that is, not getters and setters, unless they do their getting and setting in some unique way).

10. Remember – quality, not quantity. - Do not stay late (when you do not have to). I understand that sometimes production problems, urgent deadlines, and unexpected events might prevent us from leaving work on time. But, managers do not appreciate and reward their employees because they stay late on regular basis, they appreciate them because they do quality work. If you follow the rules that I outline above, you will find yourself producing less buggy and more maintainable code. That is the most important part of your job.

Conclusion
In this article I covered ten critical rules for Java Programmers. It is not merely important to know these rules, it is also important to follow them. Hopefully, these rules will help all of us become better programmers and professionals.

About the Author
Aleksey Shevchenko has been working with object-oriented languages for over seven years. He is now implementing enterprise IT solutions for Wall Street and the manufacturing and publishing industries.

 
-: Java  Swing - Best Practices Websites ::.  

March 21, 2007,

I got few best practice sites on Java Swing for you folks. Few weeks back, I posted the below links to my team for their references.

  1. Wiki for Java Swing:
    http://swingwiki.org/

  2. The below site holds best practices for Java as a whole which includes Swing too.
    http://www.javapractices.com/index.cjp

  3. Audio – eLearning Presentation
    "Professional Swing: Creating Polished Apps, Part 1/2" by Ben Galbraith
    "Professional Swing: Creating Polished Apps, Part 2/2" by Ben Galbraith

  4. JFC architecture
    http://java.sun.com/products/jfc/tsc/articles/architecture/index.html

  5. Look and Feel:
    http://www.javootoo.com

  6. If you still want to learn more then do check out the External Link in the below page.
    http://en.wikipedia.org/wiki/Swing_(Java)

  7. For queries related to Java 1.4, refer our rescuer
    http://javaalmanac.com

  8. I just found the link but need to go through further to comment on it.
    http://www.onjava.com/topics/java/Java_Design

 
-: Gandhigiri - Lage Raho Muna Bhai::.  

March 19, 2007

“Bhole tho … aapu bapu ka bahut badaa fan hai!!!” Yes I am talking about the movie Lage Raho Muna Bhai!!! The movie is based on Gandhigiri– the principles of our Father of Nation Mohandas Karamchand Gandhiji. The movie is truly inspiring and makes sure that it awakes the inner Gandhigiri in every individual. Basically, I would like to highlight few of Gandhiji’s principles and other thoughts that have been portrayed in the movie. You would be thinking "why he is writing now?" Very simple I watched the movie yesterday only. and I really liked the way by the movie has portrayed Gandhism.

To start with, let us go through the favorite hymn of Mahatma Gandhi.

Raghupati Raghav raja Ram, patit pavan Sita Ram
Sita Ram Sita Ram, Bhaj pyare tu Sitaram
Ishwar Allah tere naam, Saab ko Sanmti de Bhagavan

Translation:
Lord Rama, Chief of the house of Raghu
Uplifters of those who have fallen, (O divine couple) Sita and Rama
Beloved, praise Sita and Rama
God or Allah is your name
Lord, bless everyone with wisdom

 
 

The spirit of 2nd Innings House – Old age friends spend their second phase of the life by playing in Frontfoot at their old age. The Grandpas have strict rules in their house. No sad stories about their past should be discussed in 2nd Innings House and it’s just the fun & joy in this house. It’s the new life which they are living and each one of them has a wish list which they would like to do before they leave to heaven. I guess, all old age viewer of the movie would like to change their living too after seeing the 2nd Innings’ policies.

After the promise made to his crush, Munnabhai reads lot of books on bapuji continuously for three days without proper sleep and food. As a result, he gets to see our Mahatma Gandhiji for his eyes only. His psychiatrist tells it’s a Chemical Locha and because of which he can see an illusion of Gandhiji. But munna doesn’t believe him. He feels the presence of Gandhiji and follows Gandhigiri.

In one of the scene, after his extensive studies over Gandhiji, Munna goes to his love’s house (2nd Innings) to give a talk about Gandhigiri to the Old members of the house. He is been give a problem that a young lad has broken hand of the Gandhiji’s statue and the old man doesn’t know how to explain to the lad. Bhai seeks Gandhiji for the solution and Gandhiji tells in his own fashion – Give a stone to the boy and ask him to break the entire statue of Gandhiji, every statue in the entire world, remove every pictures of Gandhiji from every wall, destroy every building with Gandhiji’s portray & name. If you want to keep Gandhiji, then keep him in your heart. That’s when Munnabhai gets emotion and tells about the situation in India. He ends with “If bapu was here now, he would say that though the country is ours now, but our people are not”.


 
 

The movie also highlights about Gandhiji’s principle Satyagraha - Speak only truth and Live with Pride!! Walk in the path of truth ness. Gandhi's definition of Satyagraha relied on three basic tenets: satya or truth, implying openness, honesty, and fairness; ahimsa, meaning physical and mental non-violence; and tapasya, literally penance, in this context self-sacrifice.  Gandhiji in the movie makes a statement - Tension nah leene ka bapu hai nah!!!

Apart from the Gandhiji’s principle, one of the other important lessons is that one should never forget one’s personal life at any cost. After all, they are the one who really care for you. It was been highlighted well by organizing a birthday party for an old father by making his son to realize the important of the father. One of the fun parts in the movie is that marriage at the age of 60s in Goa!!!  Dreams and love can never be destroyed. The lovers reunite after 50s and get married at Goa was really a lovely picturisation.

Gandhiji also states that following Gandhism is not that easy but the results are 100% fruitful. On hurting some body, one has to convey his apologies to the other. It’s always easy to hurt but it needs lot of courage to seek forgiveness. Along with that Munnabhai explains Gandhiji’s principle Non-Violence act to his friend Circuit that if enemy hurts you, just smile. And if he slaps your face, then show your other cheek. If the enemy hurts you, don’t charge at them. It hurts his dignity and as a result, he would try to harm more. But, if one shows love to his enemies, his respect for you increases in his heart.


As the story line goes Munnabhai’s friend Lucky Singh puts Circuit & Munnabhai into jail for protesting against lucky for a good cause [To get the 2nd Innings bungalow which Lucky got from the old persons illegally]. Circuit gets heart broken as they would loose their reputation sent to Jail for such a silly things. That’s when our Munnabhai explains Circuit about the famous Salt Satyagraha. Though Gandhiji went lot of times to jail due to Salt Satyagraha and other events, the beliefs for his truthful thoughts increased day by day.

Gandhigiri goes on Air – Munna challenges his friend Lucky Singh that he would cure Lucky Singh with Gandhism [Non Violence & peaceful protest] and thus, force him to hand over the 2nd innings bungalow to the rightful owners - the old dwellers. Munna tries to solve various problems by strongly following Gandhism and referring Gandhiji. In his first call in the radio station, a guy seeks solution for his problem. He had lost all of his dad’s money in Stock Market and doesn’t know how to repay his dad. He, in fact, planned to commit suicide. The hero provides solution by asking the person to notify the problem with true facts to his dad. It might cause temporary psychological impact on the other person but if you explain it properly and work hard to resolve the issue, the problem can be eradicated with ease. Always try to reduce expenses and work hard to succeed says Gandhiji in the movie.

In order to provide a solution to a caller, our Gandhiji in the movie makes a very practical statement: One can judge a person by how he behaves with person who is low ranked than him. An old headmaster gives the next call to Munnabhai in his radio program. The headmaster puts his problem to bhai that the pension community is excepting bribe of Rs. 5000/- and the poor headmaster was not getting his pension for last 3 years. Munnabhai comes with a brilliant idea my implying Gandhigiri. The headmaster goes to the corresponding officer and start removing his spectacles, his bag, his belt, his cap, his shoes, his shirt, and even his pant one by one and stated their prices. Now with all these items, the old man demanded for the pension. The officer stopped the old man by further removing any of his clothing and quickly approved his pension. This was one of the best scenes in the movie.



To stop Munnabhai’s protest against his friend Lucky, Lucky blackmails him that he would reveal Munnabhai’s true identity to the heroine that he is not a professor and where in he is just another gangster. Gandhiji explains him to imply Satyagraha and he should tell everything to her. Gandhiji states his personal experience of stealing the Gold from his dad as an example. He explains that upon stealing from his own dad, he was feeling very low and was guilty for his action. But he was not having courage to talk to his dad and to request forgiveness for the same. So, that night, he wrote a letter to his dad on his action and also mentioned that he would ever never commit any crime in his future. Gandhiji’s dad cried after reading his son’s letter and slept. Admit & Convey your mistake and take action in order to never repeat again solves many issues.

Stress Reliever – The movie also gives a very good tip on how to relieve the Stress. The secret tip is to close ones eyes and go to some good Flash back which brings happy memories. This would bring smile in your face.

Climax comes with yet another case study where a bride is been rejected because of her honesty on her horoscope mismatch. Munnabhai tries to prove how people blindly follow the astrology & horoscope where in they don’t have beliefs in themselves. He also adds if Gandhiji would have been living in this world today, he would have felt really bad by seeing all the week hearted people. There is no respect for the person who speaks the truth.

Finally, after all the happy endings, Gandhiji speaks to the audience with comedy stint as below.
Though, I have been killed long time back but my principles & beliefs won’t die just because of the three bullets. Generations changes but my thoughts will be causing chemical locha in some brains [smiles]. It depends upon you who have to decide whether you want to give a thought over my thoughts.
 
 

At the end of the day, it’s a very good comedy movie with lovely hit numbers. The movie has delivered the idle substance of the movie “Gandhigiri” in an extreme discipline manner. Friends, It’s a must watch movie!!!

 
 
-:T h a n k  Y o u  f o r  s m o k i n g::.  
December 23, 2006,

I watched the movie, Thank You for smoking, last week. The movie is just an average movie. But a lot has to be taken from the movie. Apart from the story line, the movie teaches how important is argumental communication. The hero of the movie just survives with his excellent communication skill. The lead actor in a job to defend the "defense-less" corporations was a perfect case study which highlighted the importance of this skill.

 
This website is developed and managed by Dinagar Raghunathan