February 25, 2007

Transition Period!

My blog and site are going through a change! It has been long since i have done major "look and feel" to both. For history i am going to put what my blog looked like before change and will later update this entry to reflect the new changes. Lets see what i can come up with ;)
I am also thinking of changing the template.. either i will come up with my own template or get one that's freely available on the net!

February 24, 2007

Online Task Manager

Todoist is an interesting Web-based task manager which is worth looking into. It comes with a very simple and fast interface. I am really impressed with the functionality it provides. Its ability to nest sub-lists, and track projects with multiple actions is very interesting feature. Apart from these features another important feature is the keyboard shortcuts (which we all look for) and can slice and dice your tasks by date.

What drew me to this web application even though you can find many such web and desktop application is its clean interface. Ease to use – from signup to working! The signup is very simple with just the email address and password. On logging in you are provided with the simple interface I was talking about. Initially you need to create project and by default you will have a project named: Learn Todoist. Going through this itself will make you familiar with the feature set of the application. When adding items to the “to do list” you have the option of setting priorities , format text, links etc and you can also reorder the items by simply drag and drop!

For me Todoist is yet another web application that Google should look forward to acquire! ;)

February 21, 2007

Yahoo Pipes! What is it?

According to Yahoo their pipes product is defined as “Pipes is a hosted service that lets you remix feeds and create new data mashups in a visual programming environment.” So, what is this product all about? How good is this product? What opportunities does it give? Let’s have a closer look and find out.

The basic idea behind pipes is to get feeds from different sources like Yahoo, Google, Digg etc, and present it in a better, useful way to the user. What pipes can do now is assemble personalized information from different sources and output the result as standard RSS 2.0. Since the result is RSS 2.0 you can subscribe to and read your pipes in your favorite aggregator. The big advantage is the user can not just assemble information from different source but can filter, analyze the content to get what he need. You can also create pipes that accept user input.

Yahoo has built the pipes out of their YUI and the interface is good. They have made it quite simple for the users to create pipes and get their job done. Another interesting part is that you can share, edit others pipes! So you can learn from what others have made already or if you are lazy just click on “Save a copy” ;) Creating your own pipe can be done in few minutes. All you have to do is specify an input which can be from a feed, flickr, yahoo search etc. Your input can also be taken from a form i.e., text box, data, location, numbers etc. Once you have your inputs you need to process the data that is input! Pipes provide Operators that can filter, truncate, loop through, sort and much more. Final the output of the pipe is provided to the user.

I just tried making a simple search pipe and did it in less than 5 min flat! Definitely pipes were not made to do simple search but that was my first yahoo pipe! I recommend yahoo pipes you all those who relay on feed and have lot of sources.

February 09, 2007

Dynamic loading of Java classes

Dynamic loading of Java classes at runtime provides tremendous flexibility to you application.
Especially when you are developing complex applications. In java dynamic loading of class is achieved by calling the forName method on the class java.lang.Class. Majority of you must have come across Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") when you did JDBC programs! But what happens behind is not usually told or our curriculum do not go that deep. In this article I will explain how to dynamically load a class and execute it. Lets take a small example:

public class Sample {

public static void main(String args[]) {
System.out.println("Hello World running...");
}
}

Now compile this and let’s try loading it dynamically. Our main program will load this Sample.class dynamically and execute it. Thus we should have the “Hello World running…” displayed!
Lets look at how to load a class and execute it:

import java.lang.reflect.Method;

public class MyLoader
{
public static void main(String[] args) {

boolean mainFound = false;
int i;

try {

Class cl = Class.forName(args[0]);

Method methods[] = cl.getMethods();


for (i=0; i<methods.length; i++) {

if (methods[i].getName().equals("main"))
break;
}

methods[i].invoke(null,new Object[] { args });

} catch(Exception e) {
System.out.println("The exception occured!:");
}
}
}

The java application we want to run is passed as a parameter to Myloader. The program loads the specified class using the forName() method.
An important thing is to find the main method and execute it. To find the main method, we first get all the methods using the getMethods() method. And finally to execute the method, we use the invoke method.