Archive for the ‘JavaScript’ Category

Javascript Testing

Wednesday, September 1st, 2010

I had a new experience (for me anyway), someone approached me with offer of reviewing a new Javascript book that Packt recently published called “Javascript Testing“.

I guess this is mainly a way of promoting ones book, but it’s been a while since I actually read anything new on Javascript, since Douglas Crockford mostly has this business down in terms of the core language itself these days. But a book about testing sounds interesting to me, because while I have always loved the core language, JS has often had rather mediocre tools in my eyes, and will be interesting to see what the book offers up in this area.

On an unrelated note, I can add that while I rarely update this blog, I do run a rather useless twitter account which I attempt to spam with inane stuff as much as possible, as is the custom!

Javascript ghost debugging

Wednesday, July 22nd, 2009
Boo

Recently, I tried to use jQuery, as a way of dynamically loading all the scripts that a certain page requires. Instead of utilizing script tags in the header section, using a simple $.getScript("script.js"); loads the same code, what’s more, this code is loaded asynchronously, which helps improve loading performance. The only problem is that loading scripts this way, makes them unavailable for debugging.

Debugging dynamically included script files presents some special challenges on it’s own. The primary being that that the web is basicly not a structured enviroment, like a folder on disk, and references to files and/or code is can be very intermittent.

(more…)

JavaScript date string formatting

Tuesday, July 15th, 2008

Date string formatting is very brutal in JavaScript, which probably has the worst built in library in relation to the distribution this language sees. So a long time ago I whipped up a script file, for doing just this. I always though PHP’s date function looked very nice, so I decided to model my function upon that.

(more…)