Sometimes a working week can be summed up into a concise and simple symbol. In the case of this week it is the comma.

Javascript is exceptionally powerful for its object literal syntax and the ability to move functions into the scope of other objects. Where once I used to complain of it giving me a black lung, now I am appreciative of its features and capabilities.

We compress out javascript down into as small a file as possible. So javascript objects which are littered across multiple modules and loaded dynamically in a development environment are compressed into just a few javascript files for production.

Browsers, especially firefox, tend to be forgiving where javascript syntax is concerned. A trailing comma in an object in firefox and safari is ok. In Internet Explorer it is not. When compressing javascript down, other issues that are fine in a raw file, such as a conditional or going across multiple lines in an if conditional, cause the page to fail as the javascript cannot be compiled by the browser's javascript runtime.

At which point it becomes a pig in a poke. Especially in large software systems with numerous teams checking in code across multiple paths, modules, packages and products. This is when the work becomes laborious and syntax checked line by line by javascript lint checkers such as jslint and javascript lint.

This week we got an operation aborted error from IE7/IE6 in our project. The issue according to Microsoft's support website was that the DOM was being manipulated before it had been loaded into the browser. It was an indirection. The issue was syntax. The lesson from this week was lint check for semi-colons, brackets and trailing commas ruthlessly in Javascript code that is going to be compressed.
Cam Riley: South Sea Republic. Freedom, liberty, equity and an Australian Republic.