Archive for September, 2008

Investment banking shocker

September 16, 2008

Over the weekend, Lehman and Merill are both gone, one bust, the other bought by Bank of America. That’s about 5000 people without jobs in the City of London. I’ve heard of desperate calls for jobs from techies in Lehman. Some of them will find jobs with other investment banks, but I suspect a lot of them will have to quit banking and work for other technology companies. It’s not the end of the world of course…


A better review of Chrome

September 5, 2008

Javascript eval

September 4, 2008

I’ve seen a strange thing today. Mind you, things are strange just because we don’t understand them.

I was doing an eval on a JSON object:

someStr = “{ \”property\”:\”value\”};
obj = eval(someStr);

Firefox’ Javascript engine threw an exception at this point: Syntax error: invalid label. What the heck?

I looked it up online and found the solution on a blog. Replace the eval expression with:

obj = eval(“(” + someStr + “)”);

This looks weird and unexpected. In Python you can easily do an eval(someStr) and that returns a dictionary. No problem. So why the brackets in Javascript?

I started looking up the answer, but everyone was just saying that the brackets are there to work around an ambiguity in Javascript language. But what?!?

And then I found the first clue in MSDN:

Note The extra parentheses are used make eval unconditionally treat the source input like an expression. This is especially important for objects. If you try to call eval with a string containing JSON text that defines an object, such as the string “{}” (meaning an empty object), then it simply returns undefined as the parsed result. The parentheses force the JavaScript parser to see the top-level curly braces as the literal notation for an Object instance rather than, say, curly braces defining a statement block. Incidentally, the same problem does not occur if the top-level item is an array, as in eval(“[1,2,3]”). For sake of uniformity, however, JSON text should always be surrounded with parentheses prior to calling eval so that there is no ambiguity about how to interpret the source.

So, if you don’t add brackets, the Javascript engine things that the curly braces indicate a bunch of code, as in:

var a = 10;

as opposed to a JSON object. In other words, the brackets forces an expression, rather than code. And that’s because:

( { var a = 10; } )

is invalid in Javascript, whereas surrounding an expression in brackets is OK.

Testing Chrome

September 3, 2008

I have installed Google Chrome today and played with it for about 5 minutes. First impression was … ok, it looks like a minimal browser, no menus, no fluff, a sort of F11-ed browser. Unfortunately, Chrome wasn’t able to render even some of Google’s own websites. It couldn’t render properly the Google finance website. And then, from the main site, clicking on other Google Apps in their bar, would take me to a blank window each time. Loading brought me a site without all the images – particularly the main headline photo wasn’t being displayed.

So I thought enough was enough. It’s a long way ahead for Chrome at the moment, especially that Firefox 3 set the bar so high. Back to Firefox for me…

And the first screenshots…

September 2, 2008

September 2, 2008

A very “Cool a la Google” presentation of their Chrome browser.

Very interesting stuff and exciting times ahead.

Why do we need another browser?

September 2, 2008

So Google thinks there are too few browsers out there. Ask any web designer and they’ll tell you: There are too many. Testing applications on IE and Firefox is cumbersome enough as it is. Maybe that’s about to change with IE8 as sources close to Microsoft said IE8 is more compliant. The problem will not go away so easily though, as more and more people are reluctant to upgrade their MS components (see the Vista flop).

So why does Google feel that it needs its own browser? Especially that it is Firefox’ main sugar daddy.

Perhaps because the browser will be the battlefield for the next paradigm shift. Since Web 2.0 popped its over-hyped head, people started dreaming again about the Internet and started dreaming about a world where applications would run in the browser, making the underlying OS more or less irrelevant. It’s one major weakness for Microsoft. Microsoft has a near monopoly on the desktop, perhaps in the same way that once Apple had a monopoly of graphical user interfaces and IBM of personal computers. They all lost their monopolies by being complacent and not driving the market. A market leader has the responsibility of driving the market, not just milk the customers.
Microsoft managed to displace Apple, IBM and many others by being quick to market (with half baked incremental solutions) and by vapourware (announcing products way before they’re ready in order to kill off demand for competitor software). But Microsoft is now perhaps in a position whereby the only direction is downwards.
Microsoft for too long has ignored the browser market, instead of cultivating it and driving it forward as a true market leader. And that is turning against them now.

Google no doubt is very aware of this vulnerability and the new browser is their show of commitment to take over where Microsoft seemed to have left it off. Google would like to drive forward the browser market and in the process deliver a better platform for delivering web apps that can compete better with the MS Cash Cows (Office in particular). There’s a long way, but it all looks very promising. Improvements to Javascript engines made it run very fast indeed, opening the roads for applications that were not possible before. I still remember the days when a for loop in JS over some DOM elements would take 30 seconds or so. Those days are gone and the future for web apps looks great.

The questions I have are:
1. What will happen to Firefox? – I love Firefox
2. What will be Microsoft’s reaction? – will IE8 be any good? will it be any innovative or just a “me too” browser?
3. How fast is Google’s Chrome going to be compared to Firefox and IE8
4. How many Google specific features (e.g. Code gears) will Chrome have compared to the compliant browsers?