Archive for October, 2008

Bloomberg by Bloomberg

October 14, 2008

A while ago I finished reading Bloomberg by Bloomberg. It’s a book about the history of Bloomberg narrated by Michael Bloomberg himself.
It’s a frustrating book, sometime I felt I don’t want to read it anymore. The main problem is Mike’s style that seems a hard sell of his company and himself ultimately. It’s also full of pride reflected in the style, well deserved pride, but still, frustrating when reading it in a book. People want real content not marketing blah blah.
Anyway, he’s making some good points about software development in the financial services. And one thing he mentions is the “agile” methodology that they used at Bloomberg, emphasizing shipping products on time, even if they’re not perfect, even if they have to cut down features, and from there on, working in quick iterations.
It’s how the banking industry in general works. First because the business wants tangible results. Second because bonuses are paid annually.

It’s the model to be followed by all entrepreneurs I think. It was the same model followed by Microsoft.

OO in Javascript

October 10, 2008
framework.graphics.object = function(id)
{
   this.name = "object";
   this.id = id;
};

That’s a “class”. To create an instance of that, you do the usual:

  var myObject = new framework.graphics.object(1);

In order to emulate an inheritance hierarchy, Javascript has this special property called prototype. You can set the prototype of an object to any other object. Object, not class. That’s a bit unusual from an OO perspective.
So it’s not proper OO, it’s an emulation of OO. It relies on the way the Javascript engine resolves properties and methods.
When you do: object.property1 or object.method1() Javascript looks in the object and sees if there is a local property and local method. If there isn’t one, it checks the prototype, then the prototype’s prototype until either the name is resolved or the chain ends.
It takes a bit of getting used to, but it’s still a very useful way of reusing code.