Archive for the 'Javascript' Category

Speed Testing Chrome for List Processing

Monday, September 8th, 2008

What are we testing?
As Rich Internet Application development progresses, more and more developers are moving towards the functional programming capabilities of JavaScript.
First Order Functions, Closures, Macros and Lists are becoming a mainstream method of development.
When you can tell the computer how to do it, rather that listing what it needs to do, it becomes much [...]

Performance Testing in JavaScript

Saturday, August 16th, 2008

Fast pages and quick load times are key factors to keeping visitors on your site.
If you make them wait, they will leave.
So the speed of your JavaScript applications is crucial.
Fortunately, it turns out that JavaScript applications are ripe for performance optimization.
This requires a strong testing framework… enter JSTR.
String Concatenation Performance
A simple example of the type [...]

A ‘foolish’ new tool for Javascript

Thursday, August 14th, 2008

I have been dying to shout about this…
instead I have been waiting very patiently…
BUT now it is time to SHOUT!
JSTR(Jester) is out of the box!
JSTR is the first ‘Browser based’ (ie:Cross-browser ):

Testing
Benchmarking
Optimization

tool for javascript.
With both import & export of Test-Sets, as well as auto-generated URLs, JSTR lets you easily share your code with everyone else, [...]

Timing is everything

Saturday, July 19th, 2008

Here for your delight.
A simple way to track timing in Javascript.
// TIMESTAMP Function
function timestamp(){return (new Date()).valueOf();}

// TIMER Function, wraps timing arround function call
function timer(f){
  var t1 = timestamp();
  for(var i = 0; i < 1000; i++){
    f();
  }
  var t2 = timestamp();
  return t2-t1;
}

// The function to test
var testFunc = function(){
  var v = [...]

Setting an Exclusion Cookie for Google Analytics with a Bookmarklet

Friday, July 18th, 2008

I have been doing a lot of work on my reading software website recently. This has played havoc with my Google Analytics reports.
So I set about looking for a way to block my own hits from the results. Having done a good search for up to date techniques, it seems that a cookie and a [...]

onDOMLoad: Faster javascript for faster pages with a cross browser version of DOMContentLoaded

Tuesday, May 6th, 2008

I have been quite entertained by all the recent talk about page loading speeds, optimization and profiling (eg: YSlow), so I decided to wrap up one of my functions into a usable form for you to dissect.
I call it, onDOMLoad.
Go and have a look at the demo of onDOMLoad.
onDOMLoad is a wrapper to the code [...]

Byting the hand that feeds you…