Category Archives: programming

maphilight: image map mouseover highlighting

I just released
maphilight, a jQuery plugin that turns image maps into wonderful graphical masterpieces.
Image maps aren’t so popular any more, for some strange reason. So a quick definition: an imagemap is an <img> with the usemap attribute, pointing to a <map> that describes polygons that link places within that image.
This sprung from me [...]

Fixing sortForce in jQuery’s tablesorter

jQuery has a
table-sorting plugin, part of their
official UI project. It’s quite a nice table-sorting library, handling the common cases, with options making it configurable to suit many people’s needs.
However, I ran into a problem when using it in a project. The documentation and the functionality don’t quite line up.
It has an [...]

Practicing JavaScript with Dilbert

I
discovered that there was a
flash widget displaying Dilbert archives in color, back to the start of 2007.
Naturally I thought to myself “aha, there must be an XML data feed somewhere in that!” Some light flash-decompilation later, I discovered that I was right.
I then seized on this as a learning opportunity, and wrote [...]

How to generate PDFs from XML using Apache FOP in Ruby on Rails

The title is a bit of a mouthful. Sorry.
Before we begin, I present the caveat that this code should not be used on a production system. It launches a java runtime for every single request, which would cripple you. This would need (a) output caching, and (b) some sort of persistent
FOP [...]

Thoughts on Ruby on Rails after one day of work

I started looking at
Rails (leading to
my talking about scaffolding) because I wanted to try writing my next work-project in it.
I don’t know about others… but I hate learning a language/framework in isolation from a project. Writing an insipid tutorial project that I don’t care about doesn’t involve me, and so I don’t [...]

Rails 2.0 Scaffolding

I’m learning
Ruby on Rails starting with 2.0. This is occasionally problematic, as it was only released a few days ago, and the tutorials are still all for 1.2.
So, to help others, something not mentioned in
the release notes, which causes errors if you’re following
the official tutorial.
Scaffolding has changed.
The 1.2 way was to [...]

Niche WoW news

* NEW - freeSlots, bagType = GetContainerNumFreeSlots(bagIndex) — Returns the number of free slots in a bag, and the type of items that can go in the bag. For bagType, 0 means any item can go in the bag.
* NEW - bagType = GetItemFamily(itemID | “name” | “itemLink”) — When used with a container, this [...]

git

I just watched
Linus Torvalds talking about git, the distributed version control system he wrote.
What struck me here is that several times in this talk he was asked by Google employees variations on the theme of “why should *we* use git?”, and he didn’t have a compelling answer. His statements boiled down to “we [...]

FicWhat?

As an amusing personal idiosyncrasy I run a fiction archive called
FicWad. (I believe much Katamari Damacy had been played just before the name was chosen.)
I call this idiosyncratic because I don’t use it myself. I’m not, generally speaking, a fanfic-reading sort of person. I run it because my wife wanted to [...]

Python whitespace doesn’t matter

If you have some programming experience then there is one particular feature of Python that is likely to turn you off.
Whitespace matters. Indentation is significant.
This comes as a shock to many people who are used to it being meaningless. Most languages in common use designate code blocks with braces ({ … }), or [...]