Chrome’s V8 has made web developers even lazier.
Developers are lazy. We are taught to be. From the beginning we’re shown how to let code do all the heavy lifting for us. This benefits not only us, but the platform on which our code ends up running. But what happens when one of the leading platforms grows significantly faster in performance than its rivals?
It’s in our nature
Simple principles like DRY encourage us to not write the same functionality twice, instead writing one method that does the work and change its behaviour/outcome by passing some parameters. We try to do as little work as possible, in other words, we’re lazy.
Now, if someone comes along and gives us a tool that runs the code we write significantly faster than what we were used to for so long, what happens then?
The beast that is V8
This is not a bad thing. It’s good that we choose the most progressive technologies and tools. The problem is that if we – for example – use too many loops in our code and Chrome moves over them like a boss, we won’t see any red flags being raised about that code. I recently saw an infographic which looked and felt really nice in Google Chrome, however, when I opened the website in Firefox, it froze for half a second while loading, animations got all choppy and scrolling was far from smooth. I can’t imagine what it was like in IE.
Not everyone drives a Ferrari
Being a developer usually means that you have a somewhat more powerful machine at your disposal than the average internet user. I notice this the most in screen size.
A website that looks tiny on my 27″ iMac, looks much bigger on my wife’s laptop. The same happens with code performance. The quad core on my iMac interprets logic faster despite running multiple applications compared to someone’s netbook.
Not to mention, with the recent explosion of smart phones and tablets, we have been fitting tiny single core processors with sometimes less than 1GHz and 256Mb RAM in to little devices that fit in our pockets. These devices simply aren’t as fast when going over loads and loads of code.
We can still be lazy, but not that lazy. We can still use Chrome, but testing code in some of the least capable browsers and using tools like FireBug to see where the heavy parts are can make a big difference for minimal effort.