Archive for category Internet

Conwitter – Twitter Google Chrome Extension

We have released a twitter extension for google chrome. Conwitter is still in alpha stage, however it’s currently usable and available via google chrome extension gallery.

Compared to other twitter clients, conwitter provides two main features :

  • Realtime Updates – You can enable twitter streaming API option in conwitter. This will ask twitter servers to push new tweets the client rather than pulling them in a time interval. In other words, new tweets from your friends will appear instantly as soon as those are published.
  • Conversation Style – Can you remember how many times you had to click on in-reply-to link to see what the tweet is about? We are hoping to solve that problem by introducing a new interface where all related tweets are displayed as one conversation. When new tweets arrive, it’ll be appended to the conversation and marked as new. Look at the screenshots below

Tags: , , , , , ,

Reject IE6

If you have ever created a simple web page, you know that IE6 should be banned by law. Here is a very simple wordpress plugin to reject IE6 and inform the users.

This is using the jreject jquery plugin. The wordpress plugin simply uses the wordpress hooks to insert jquery plugin into your theme.

Download Here

Tags: , ,

Browser Wars 2.1

We all know the historical story of first browser war between Netscape and Microsoft. Microsoft ended it by crushing Netscape into pieces, for the time being. Microsoft controlled over 95% of browser market. Netscape had nothing else to do, but to back off – but they took a shoot on their way back to home : They open sourced their code.

A small group of people, also known as hackers, formed a small foundation called “mozilla” and started hacking. As a result, they released “Firefox” in 2004. That was the beginning of second browser wars. Although Firefox mainly started it, It wasn’t a two player game this time. Apple was the other player. It was not easy to fight from the scratch. So, Apple forked the KHTML rendering engine and create Webkit project and the Safari browser. This war bought the life to many amazing technologies – Web 2.0 has emerged during the war. Yet, the war is not finished yet. Firefox is catching up with the market share with it’s newest release, Firefox 3.0 forming Guinness records.

Upto this point, the war was about new features, and the memory usage of browsers. Then, in September of 2008(yes, this month), Google turned the flow – they released one of their secret projects, Chrome. Like Safari, chrome is also built on Webkit, but Google has rewritten the javascript engine from scratch. This new engine, V8 is several times faster than the current script engines used in other browsers. Eventhough, Google released Chrome first, highlighting V8 and it’s speed, other projects have been also working on their own javascript optimizations. This is the beginning of Browser Wars 2.1.

So, this weekend I did some test runs on those engines. Namely, SpiderMonkey used in Firefox 3.0, TraceMonkey used in Firefox 3.1 and SquirrelFish Extreme used in Webkit. Unfortunately, Google hasn’t released the Chrome for linux yet – so, I wasn’t’ able to run accurate tests on V8 – but I’ve used a VM just to checkout the results anyway.

There are several javascript benchmarking tools available such as Sunspider, Dromaeo, and V8 benchmarks. If you do a little search on the internet, you’ll find tons of sites with benchmarking new engines using those. So, I decided to write few simple javascript functions based on commonly used techniques and benchmark them. These tests are further away from perfect, but it’ll give a rough idea.

Following graphs show how many of times the given function can be executed within one second. Each test has been run for 10 times and the mean is taken – Bigger is better.

Note : V8 tests have been run under a VM, you should technically ignore them.

Dom Create

function dom_create() {
	for ( var i = 0; i < 100; i++) {
		var d = document.createElement('div');
		d.innerHTML = "whatevertest";
	}
}

Dom Append

I wanted to append the ul to document but firefox(both 3 and 3.1) crashed.

function dom_append() {
	for ( var i = 0; i < 100; i++) {
		var x = document.createElement('ul');
		x.appendChild(document.createElement('li'));
	}
}

Update Inner HTML

Note : only function is measured, ‘var garbage = ….’ line is only called once before starting the benchmark.

var garbage = document.getElementById('garbage');

function dom_inner_html() {
	for ( var i = 0; i < 100; i++) {
		garbage.innerHTML = "<div>this should be some large string</div>
<p>with html elements</p><ul><l>>this</li><li>is</li>
<li>a</li><li>list</li> </ul>" + i;
	}
}

Get Element by ID

function get_element() {
	for ( var i = 0; i < 1000; i++) {
		var d = document.getElementById('garbage');
	}
}

Conclusion

(Chrome is not considered in this section, you can give it the benifit of doubt and come to your own conclusions)

As you can see, SquirrelFish Extreme has got an extreme boost over almost everything, except innerHTML updates. Tracemonkey wins the innerHTML updates from unbelievable margin. Both dom based techniques and innerHTML updates are used heavily in ajax based applications. For the time beign, SquirrelFish Extreme seems to have won the overall speed race.

However, browser is not just javascript and rendering. One of the strong features of Firefox is it’s huge number of extensions and the XUL interface which makes the life easier for extension developers. When you combine that with the current market share of Firefox, Firefox will rule the web for next few years.

Script

You can get the html file I used to benchmark from here. The benchmarking functions are taken from John Resig’s benchmarking quality blog post.

Tags: , , , ,

Greasemonkey script for highlighting google results

Each individual on internet have their own browsing habits. For example, I have seen lot of people type the web address directly in the search box instead of the addressbar(If you look at the top searched queries, you can see yahoo.com, etc).

One of my browsing habits is to look for wikipedia articles. If it’s a movie, I look for imdb. So, instead of spending 1/2 seconds to go through results and analyze site address, i decided to write a simple greasemonkey script.

You can grab the script from here. If you have your own list of sites, you can simply edit the source(greasemonkey provides you a simple interface) and change the “sites” array.

Tags: , , ,

The Python Challenge

You might have already read my blog post about deathball riddle. Few days ago, I started doing another internet riddle, but not like deathball, this is a programming riddle. It’s python challenge.

You might not familiar with python, but this is definitely a really good way to learn the language. When, I started doing this, I only knew few syntax in python.. But after finishing several levels, I learned about some really good ways of using python – or I can say the art of python.

If you don’t know about python, It’s not a dead language or not a useless language. It’s quite powerful scripting language, which also have GTK bindings. Many of the novel linux apps are written in python. Gentoo emerge is a very good example.

Tags:

Get Adobe Flash playerPlugin by wpburn.com wordpress themes