Archive for October, 2007

Interesting information from Google trends

Saturday, October 27th, 2007

I was waiting for our designer to show me some htmls so in the meantime I thought of ‘browsing’ Google Trends
I looked at the home page for couple of minutes thinking how can this be helpful, after looking at the listed examples first thing that caught my attention was “Tip: You can compare searches by separating with commas.” and I clicked on “music, fashion, sex“. Ok, so I saw a big graph and the searches per region. India was at number six but what was interesting to see was the orange bar. Indians are googling way more for word ’sex’ than anyone else in the world. It instantly made me think if searches on google are indication of people’s interest then I can find other interesting information for eg.
- Which country is most likely to be shopping online? Gift, shopping US, UK, Australia
- What sells more jewellery, clothes, flowers? - clothes.
- What about India? - Flowers. And guess what punjab is on the top.
- Which country might be having most Java programmers. India and Bangalore on top.
- Which is more common java, .net, php, ruby, python. Java wins by clear margin and again India and Bangalore
- Which place in India might have most struts programmers. Noida and Pune.
- Mysql more famous or postgreSQL Mysql
- Where are most people searching for jobs? India, UK
- Most Kerala people are looking for matrimonial sites.
- Some obvious ones India, Pakistan searches most on cricket and US, Canada on baseball

I couldn’t make sense to following searches.
- Why is India searching for India?
- Also ‘outsourcing’?
- What could this mean? startups

GlassFish Auto Deployment and Hot Deployment

Tuesday, October 23rd, 2007

There are several ways to deploy a GlassFish application. To speed up development/debuging we need a way to instantly deploy web applications. One of the ways is to use hot deployment feature, another lesser known feature is ‘directory deployment’. You simply point GlassFish to your development directory and let it pick up and deploy application from there. No packaging and re-deoploying hassles. The catch is whenever you want to re-deploy your application you just need to ‘touch’ a file called ‘.reload’ which should be present in your web folder.
Following is the command and directory structure you can use.
–|myproj
–|–|src
–|–|web
–|–|–|WEB-INF
–|–|–|–lib
–|–|–|–classes
–|–|–|–web.xml
–|–|.reload

GLASS_FISH_HOME/bin/asadmin deploydir full_path_to_you_web_folder

If you are using Eclipse or NetBeans make sure that they put the class files in web-inf/class folder after compiling.

Evaluating / Comparing NetBeans and Eclipse EE for Java EE development

Friday, October 19th, 2007

Although we are ‘big’ Eclipse fans and have been using it for many years for everything (PHP/symfony, Java, XUL, HTML) and have even contributed plugins but we decided to evaluate NetBeans to see if it gives any extra features that might help/speed up development for our forth coming Java EE project.
Technologies we are going to use in our application are:

Preferred IDE requirements:

  • CVS integration
  • Integration with GlassFish - so that we don’t have to leave the IDE to deploy etc
  • Should support debugging of web application
  • Support for profiling
  • XML/JSP editor
  • Context sensitive help and auto completion for tags

We are comparing
NetBeans 6 Beta 1 and Eclipse 3.3 Java EE

Creating a new web project is pretty straight forward. Both IDEs create more or less same directory structure only difference being the location where Java source files are stored. Eclipse keeps them under src where as NetBeans keeps them under src/java.
Next thing I wanted to do was import (share) my project to CVS. Found it more user friendly in Eclipse although NetBeans was equally straight forward.

JSP/XML Editor
NetBeans editor is lot more advance and friendly.
Editing Web.xml in Eclipse
Editing web.xml in NetBeans

Other differences
- In Netbeans you don’t have to click on ‘fast views’ just mouse over brings the window.

- Can’t easily change destination of compiled class files in NetBeans. We wanted to try directory deployment feature of GlassFish so that we don’t have to create .war every time, this required us to compile and put the class files in WEB-INF/class folder. This setting is pretty straight forward in Eclipse whereas you have to change projects.properties file in NetBeans. (Or it was not easy to find how to change it via UI)

- One of the biggest inconveniences was not having auto import while writing Java Code. Eclipse will auto import a class if you use it (Ctrl+space) but in NetBeans you have to manually add imports. There is fix imports also but thats an extra step.

- Eclipse UI in general is more user friendly. As an example ‘output console’ had a title bar and then some tabs. Each of these tabs are (or at least look) like individual windows with separate x (close) buttons. Its very natural to double click on the title to maximize it, hence you would try to double click on title ‘GlassFish v2′ but it will not do anything. You will have to double click on the bar above it ‘Output’. This is understandable but not ‘really’ as expected. On the other hand eclipse is pretty straight forward.
NetBeans console windowEclipse console window

- Eclipse kept on crashing (giving out of memory error) on my colleague’s laptop which has 1GB RAM, this happens when he tries to run GlassFish from Eclipse. Trying to run GF outside of Eclipse doesn’t crash it. This is actually a show stopper, or he needs to upgrade RAM

- I couldn’t figure out how to auto compile and auto deploy application on NetBeans. Every time you change a class file you need to ‘build’ and ‘run’ or ‘deploy’ on the other hand Eclipse will compile and deploy automatically on save. On the other hand auto deploying can also become a problem when application size grows. But this made it very smooth on Eclipse to build/test.

We also evaluated how to create a project so that it can be opened in both the IDEs so that we can either switch or let programmers choose whatever they want. There was no ‘huge’ difference of features or one IDE helping a LOT. On the other hand as we are comfortable with Eclipse shifting on NetBeans can be counter productive as we have to learn/get used to the new IDE. We know that we will need NetBeans for debugging and profiling but development will be faster with Eclipse using directory deploy and .reload feature of GlassFish.

Visualizr - Yahoo! Open Hack Day Bangalore, India

Tuesday, October 9th, 2007

Over the weekend we went to the open yahoo! hack day at Bangalore ….and what……

Hack Day - visualizr

Here are the ideas we thought of

  1. A service which will take your favorite blogs, your linked in profile or/and your favorite articles as input and create a mash-up of articles you might be interested in from Amazon or images from flickr or events from upcoming. Will also try to make a guess as to what kind of person you are.
  2. Visualizr, what we initially called as pic-story and the one we finally built.
  3. Travel Helper - Give us your travel dates and cities you are visiting and we will tell you what are the events happening during that time on those places and we will also show you interesting pictures from flickr taken in those cities so that you can decide what you want to do if you have free time.
  4. Tell us what you want to buy and we will give you all the relevant information. for e.g. items from different shopping sites, review sites, news, flickr etc
  5. Pictorial how to? Give us step by step procedure of creating or doing anything and we will return the same how with pictures to understand better.

Creating visualizr was fun and we really like the idea as it could actually be applied in lots of things like

  • Make your own cards
  • Build an ad campaign
  • With more comprehensive image access a new way of communication
  • Evolve as a How to tool? Ask 10 questions and see how Images can answer for you
  • May give a whole new way of learning difficult concepts
  • Or just brighten up your day

So what are you waiting for, go check it out visualizr