JS tablesorter

I was adding reports to an application and wanted a quick way of sorting the data based on multiple columns, without having to write lots of backend code to do so. Using a JavaScript solution also meant that the re-ordering would be more responsive, provided the dataset wasn’t too big.…

SQL RAND() gotcha

I was using RAND() in an INSERT statement, using values SELECTed from a different table. I assumed that RAND() would be executed for each row from the SELECT statement, but instead I discovered it is only executed once per query. Simple gotcha. INSERT TableName (ColumnA, ColumnB, ColumnC) — RAND() is…

JavaScript minimisation

An important part of any web project is to minimise your JavaScript, reducing loading times from downloading the scripts to the browser. We were using Packer for .NET, which supports modes for packing (compressing the JavaScript into a packed function, which then needs to be run on the client to…

Code highlighter

First step is to get a good code syntax highlighter for the blog, to make excerpts easily readable. After looking at a few I’ve settled on Syntax Highlighter ComPress for now, which uses Alex Gorbatchev’s Syntax Highlighter script, supporting a variety of languages, and includes a WordPress control for the…

Introduction

I’m a software developer based in London, and this blog is simply a repository for all those problems I’ve encountered that I’d like to record the solution to, so next time I hit them, I’ll know where to look. Feel free to look around, and hopefully you might even find…