DevCamp Bangalore 2

Posted on Tuesday, March 31, 2009 by Anuj Mehta



April 11, 2009 106pm : DevCamp 2 at ThoughtWorks, Bangalore
DevCamp is an un-conference by the hackers, for the hackers and of the hackers. I had attended the DevCamp last year and it was really nice and very informative. You get to meet some of the best minds of the industry there.



This hCalendar event brought to you by the hCalendar Creator.

Bleed India - No tension. Don't vote in election

Posted on Wednesday, March 25, 2009 by Anuj Mehta




Today I came across a wonderful site called BleedIndia. The site has witty remarks on lazy people like me who keep complaining about our bad politicians but don't do their basic duties of voting.

See the hilarious manifesto of Pappu Raj -- manifesto

Word cloud of my blog

Posted on Friday, March 20, 2009 by Anuj Mehta




Tag cloud taken from http://www.wordle.net/

Google calendar

Posted on Wednesday, March 18, 2009 by Anuj Mehta




Very often it happens that I register for some event like a BOJUG meet. The event is supposed to happen after 2-3 weeks and by the time the day for event comes I just forget about it, also many times it happens that one of my friends birthday is on weekend and since I don't have internet connection in my home and hence I can't access Orkut where I see birthday reminders so I forget to wish some of my friends (and sometimes parties also).

You see I was in terrible position but Google Calendar came to my rescue. It has set of nice features but the best thing that I like is I can get notifications/reminders through SMS which comes handy when you don't have internet access. Now I have added all the events that I wish to attend in the calendar, through Orkut I have added birthday's of all my friends to calendar and I get notification through SMS about the events and birthday's.

Congress party 'Jai ho' film

Posted on Monday, March 16, 2009 by Anuj Mehta

Destination Moon

Posted on by Anuj Mehta




It is not a question of whether we can afford to go to moon. Is the whether we can ignore it?
-Dr. K Kasturirangan, Former Chairman, ISRO


Over the weekend I read a nice book “Destination Moon” which celebrates the success of Indian Space program. In lucid language it describes in layman words the significance of space program in general and the Chandrayaan-1 project in particular. The book is divided into 7 chapters. Here is the brief description of first 5 chapters




Chapter 1 digs into the history of Chanrayaan-1 project with its inception in 1999. On 11th May, 1999 there was a function in New Delhi to commemorate one year of Pokhran-2. This function was attended by a number of scientists, academia's (and of course by our ministers and member of parliaments). During this function Dr. Nair gave the usual presentation on the success of Indian space program except for a noteworthy announcement that India is now capable of sending a mission to moon. Next day it was headlines in Indian express. Also this chapter explains the rationale behind this mission. Indian space program has long focused on using technology to solve the problems of country like for improving the way of communication, using satellites for getting better knowledge of natural resources, weather conditions etc but this mission marked as the starting of a new era and there was more focus in uncovering the mysteries of the deep space and dedicated efforts towards research. The mission was focused in unraveling the mysteries of formation of moon, as in the future moon will play a major role as humans try to settle out in other planets.


Chapter 2 focuses on moon and Indian ethos. Moon has long been part of culture since it was discovered by Galileo with his telescope. It has been part and parcel of our life be it in form of poetry, songs, mythology, stories etc. None of us can forget the good-old Chandama dur ke

Chapter 3 digs into the history of various missions to moon especially taken by US and USSR during the cold war era.





Chapter 4 celebrates the success of Indian Space program. It talks in detail about the capabilities of the launch vehicles: Polar Satellite Launch Vehicle (PSLV) and Geo-synchronous Satellite Launch Vehicle (GSLV), Indian Remote Sensing (IRS), the INSAT series of satellites. These advancements in space technology helped in improving communication, spreading education to the remotest parts of the country through the INSAT satellites, remote medical procedures through telemedicine and the list goes on.






Chapter 5 focuses in details of Chandrayaan-1, India’s maiden mission to moon. This mission is concentrated on getting detailed information about the topography and the natural resources, look for presence of water on earth as earlier exploration discovered the presence of Hydrogen and others. Chandrayaan-1 has 11 payloads with 5 from India and rest all from other countries. It tells about the role of each payload.

To summarize it is a nice book written in very simple language and gives a good insight of the Chandrayaan-1 mission.

Reverse Engineering: Creating UML diagrams with existing code

Posted on by Anuj Mehta

Very often it happens that whenever a new person joins the project the seniors gave him/her the design documents of the project and in most of the cases they tell “Hey there has been lot of changes in the original design and the class and sequence diagram that you see in this document is obsolete” and the poor chap has go through the arduous task of going through the source code to understand the design. This is a common problem in every project and but fortunately the reverse engineering feature of Netbeans comes to our rescue using which we can create UML diagrams of an existing code. Let’s look at a small example

I had defined an abstract class Person


abstract public class Person
{
protected String name;
protected boolean haveBrain;

Person(String name)
{
this.name = name;
}
protected abstract void display();
}



There are 2 classes SoftwareEngineer and Farmer which extends the class Person


public class SoftwareEngg extends Person
{
SoftwareEngg(String name)
{
super(name);
haveBrain = false;
}

@Override
protected void display()
{
System.out.println("Hi dude I am a Software engineer");
System.out.println("Name: " + name);
System.out.println("Do I have brain? " + haveBrain);
}
}




public class Farmer extends Person
{
Farmer(String name)
{
super(name);
haveBrain = true;
}
@Override
protected void display()
{
System.out.println("Ram ram bhaiya!");
System.out.println("Name: " + name);
System.out.println("Do I have brain? " + haveBrain);
}
}



Also I had created a Factory class that returns an object of Person


public class PersonFactory
{
public static Person getPerson(int ch, String name)
{
switch(ch)
{
case 1: return new SoftwareEngg(name);
case 2: return new Farmer(name);
}
return new Farmer(name);
}
}



Finally there is a class called PersonImpl that has the main method


public class PersonImpl
{
public static void main(String[] args)
{
Person per = PersonFactory.getPerson(1, "TheDude");
per.display();
per = PersonFactory.getPerson(2, "Ramlal");
per.display();
}
}



Steps for generating UML diagrams

1. I am using Netbeans 6.5. Go to Tools --> Plugins and in the Available plug-ins search for “uml” and install the UML package and restart the IDE.

2. Once the IDE restarts right click on the Project node (in the Project navigation tree) and select “Reverse Engineer” option. A new node -Model will be created and you will see something like this in output/log window

Begin processing Reverse Engineering


Parsing 5 elements

Analyzing attributes & operations for 5 symbols

Resolving 5 attribute types

Integrating 5 elements

Building the query cache.

================================
Task Successful (total time: 2 seconds)


3. Now the project navigator looks something like this




4. Now right click on sub node reverseengg (“reverseengg” is the package name of my original project) and select “Create Diagram From Selected Elements…”, a new dialog will pop up and you can select any diagram. For this case I will select Class diagram and boom! we get a nice class diagram showing the relation between various classes


Fighting robots

Posted on Monday, March 09, 2009 by Anuj Mehta

A cool video of robots fighting

A picture is worth a thousand words

Posted on Friday, March 06, 2009 by Anuj Mehta




The picture exactly describes my situation :)

Internet the way I see

Posted on Monday, March 02, 2009 by Anuj Mehta

What is common between Facebook, YouTube, Flickr, LinkedIn and Twitter? Well easy to guess, they all are social networking sites which focus on building online community where people share their interest and activities. In Facebook people create their own profile and share their interests through various online communities, YouTube and Flickr are videos and image management and sharing sites, LinkedIn is a business networking site where people create their profile but unlike Facebook the profile contains mainly details about educational background and their profession and use it for serious business networking. Lastly Twitter is a micro-blogging service. In past few years a trend can be observed that majority of data is user generated i.e. information is “by the people, for the people and of the people”. Compared to the era of 1990’s where there were relatively few information producers and a large number of consumers, the situation has changed now and there is lot more focus on an individual, people try to project themselves either through their profiles in Facebook, LinkedIn or by having their personal Weblogs. Thus now there is a personal space for everyone on web.

Let’s see one more aspect of web. It is a vast ocean of information. Currently most of the information on web is represented using natural language (like English, Russian, Hindi, etc) or using graphics multimedia etc. This information can be processed by humans as they can easily form association between disparate forms of data even if they use different terminologies. However the same task is difficult for machines, it is difficult for them to make sense from say an image, draw analogies or to combine information from heterogeneous sources and make associations among them. There are several tasks which involve tedious work of finding, sharing and combining information on the web; it would be nice if such tasks can be automated i.e. performed by machines (intelligent agents).

For ex: Consider an automatic reservation system. The system should
1. know about my preference
2. build up knowledge using past
3. combine the local knowledge with runtime services
• airline preferences
• dietary requirements
• calendaring
• etc

For making these tasks automated we need a way in which data should be possibly combined, merged on a web scale, there should be some data that describes other data; machines should be able to reason about the data. To make this happen we need a way of defining semantics of the information and services on the web. This concept of making data on web more meaningful is generally referred to as Semantic Web.

To conclude following trends can be seen
1. Greater focus on an individual
2. Semantic web




I did search of "Semantic Web" on Google trends and here is what is shows