Archive for May, 2007

First In First Out Comparator

May 23, 2007

Here is a simple first in first out comparator I recently used.

You can use this to preserve the order of elements getting added to a SortedMap or SortedSet.

public class FIFOComparator implements java.util.Comparator
{

public int compare(Object arg0, Object arg1) {
return 1;
}

}

For more information on Comparators check out this URL – http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-sort.html

Thank You, W3Schools

May 21, 2007

I have been working on Ajax off late and obviously there has been a constant need to refer documentation on HTML DOM objects and JavaScript. One site which has constantly helped me is www.w3schools.com . It is a very comprehensive site on the HTML elements and the layout is very readable.

It even has a try it yourself Demos like this one – http://www.w3schools.com/js/tryit.asp?filename=try_nav_javaenabled where you can edit the HTML and Javascript and check how it is going to work. Very useful feature.

It also gives has a complete reference on every DOM object or Javascript built in objects that you can create.

Check out this one – http://www.w3schools.com/htmldom/dom_obj_tablerow.asp on the TableRow DOM object.

So, next time you need a Javascript/HTML DOM guide, you know where to go!

Windows Live Mail interfaces sucks

May 11, 2007

Microsoft has refurbished the look and feel of its Hotmail service after a long time. You will be redirected to Windows Live Mail interface and well.. it doesnt look good to me!

Gosh! Look at that Banner announcing ‘Windows Live’ – Now that is a waste of real estate.

It tries hard to imitate OutlookExchange web interface (which I liked a lot) but fails badly! Its also slow on Firefox and Spam filtering just isn’t there!

Verdict – No reason to migrate yet!

Accelerate Youtube videos with Speedbit

May 7, 2007

Just came across this download – SpeedBit Video Accelerator for Youtube. As the name suggests, it speeds up youtube videos so that there no breaks while watching the video.

It is basically re routes the download to its own servers where smart algorithms use multi channeling to download videos. I did find a significant improvement in video streaming using it! But sadly, its available only for Windows OS’s 😦

Firefox plugin for Javascript/Ajax debugging

May 6, 2007

Found a great plug – Firebug in for Firefox which is of great use to Javascript /Ajax developers.

Here are the features I like

1. Detects errors in HTML and the error messages are useful

2. Dynamically added HTML is shown too. – This feature is really a godsend for AJAX developers who more often than not, have to modify HTML using DOM. (For e.g. dynamically adding rows to an HTML table etc). Javascript debugging for such cases was very difficult because the normal ‘View Source’ does not show the newly added code and usually developers had to fill in alerts to identify the problem. But Firebug changes all that and we can see the dynamically changed HTML

3. Inspect mode – Pointing the mouse over the page highlights the code associated with that place and you can even modify the code.

The above 3 are the features I found most useful.

Others good features include

1. View DOM structure of an HTML

2. Measure Network activity – This is great to have if you make AJAX calls and you need to measure the response time.

This plug in has saved me hours trying to debug Javascript code and I recommend this as a godsend to all Web Developers.

UPDATE:  Internet Explorer too has a plugin for Javascript debugging. Not as feature some as Firebug but useful nonetheless. Get the plugin for IE here