Jonathan Cardy

Blog

Jonathan Cardy

News
Simon & Ian Tense semi-final as spectators look on, enthralled The inaugural Scott Logic pool competition took place last night, kicking off with 12 brave entrants comprising 6 developers, 5 new graduates and our intern Dean. It was a marathon session in a league format; a total of 66 games...
Tech
Up until now I have found the term "anonymous" pretty confusing in the context of JavaScript. In this post I'll explain how to define anonymous functions, what "anonymous" means, and what uses these functions have. The ECMAScript specification does not have any mention of the term anonymous, so in a...
Tech
OK, this is a little behind the times since I'm talking about jQuery 1.3.2 - but it may be useful to someone. Today I was working on a project which had some time ago been upgraded from jQuery 1.3.2 to the latest version, and shortly after, a bug was raised....
Tech
In this post I am going to look at the similarities between jQuery Deferred and Microsoft Reactive Extensions, and supply code which will convert between the two. Although Deferred and Rx have vast differences, there are some similarities which one may wish to take advantage of. For those who have...
Tech
At the weekend I published a CodeProject article titled "A Collection of JavaScript Gotchas". The target audience is JavaScript developers and also any other developer who might have an interest in JavaScript. I think it covers pretty much all of the wacky features that give JavaScript a bad name. [caption...
Tech
Update: I have summarised this series of blog posts in a CodeProject article, available here. In this series of posts I showed a sweet way to use Web Workers to improve performance on browsers that support them, without impacting performance on browsers that don't, by using jQuery 1.5 Deferred objects...
Tech
In the previous post we set up a Web Worker helper function that allowed us to create a worker file, and call it using code like this: $.work({file: 'primes.js', args: { from: 1, to: 100000 }}).then(function(data) { //Worker completed successfully console.log(data); }); Now, wouldn't it be nice if you didn't...
Tech
The .NET Task Parallel Library is a great advance in parallel programming for the .NET framework. It lets us easily run an anonymous method in another thread without any worries about the actual thread creation. A Task object wraps up a piece of parallel code, and provides a notification of...
Tech
The Web Workers API is currently a draft HTML5 specification which defines an API for running JavaScript in a background thread. In this series of blog posts I am going to investigate the practical use of Web Workers. In this first blog post I want to look at the performance...
Tech
Back in the day, processors had a single core and clock speeds increased steadily every year. This meant that although writing multi-threaded code for a single CPU gave some performance improvements (since single-core CPUs usually try to execute multiple threads), it was hardly the top of any developer's list of...