Life

Digiweb pull their thumbs out and activate my DSL

Published · 1min

After three months of trying to get broadband off them, first satellite and later DSL, I’ve finally got Digiweb to activate my DSL.

This all really should have been done a month ago, but until today, they’ve kept putting me off, giving excuses like “we’re waiting on …

Coding

How Syncope Works

Published · 4min

[Note from 2020: Syncope eventually ended up as AFK]

Here’s how Syncope, the kinda-but-not-really-a-framework I mentioned before, works. It’s really just a library with a bunch of canned request lifecycles. Those are the only parts of it that vaguely resemble a framework. It’s made to be as …

Meta

Things that suck about this site

Published · 6min

My vitriol isn’t just reserved for others. No, I’m quite happy to lash out at myself when it’s appropriate. There’s a lot of things I really don’t like about the code I wrote to drive this site. I thought it’d be good to get …

Life

Weight

Published · 4min

[Update from 2020: This post is mean. I appear to have been very angry at myself when I wrote this. It looks like it turned into an exercise in beating myself up. Some of it did come true: I got up to 105kg a few years ago, but managed to …

Screeds

Irreducible Complexity? Feh! Think Sufficient Robustness

Published · 4min

I promised myself I wouldn’t get involved in this rubbish again, but I can’t help myself: I’m just a glutton for punishment.

Why to people persist in bandying about the old trope of irreducible complexity? Orson Scott Card in an article on the eighth of this month …

Coding

XP and Big Design Upfront

Published · 1min

Joel Spolsky posted on his site about several instances where where he needed to modify the Project Aardvark (Copilot) Functional Specification.

It was all fine, and stuff I agree with myself, up until close to the end where he wrote:

I can’t tell you how strongly I believe in …

Coding

A Java HTML Scrubber

Published · 2min

In preparation for possibly adding a WYSIWYG editor to the site—mainly because people don’t seem to read the formatting instructions—I’ve written the best part of a HTML scrubber to ensure that the HTML markup returned from the poster’s browser doesn’t contain anything dodgy and …

Coding

Demystifying the GridBagLayout Layout Manager by Peter Haggar

Published · 1min

This is an excellent explaination about what must be one of the most puzzling parts of AWT/Swing development: the GridBagLayout layout manager.

The original was an MS Word file. I converted it to LaTeX for my own use, but I think others might find it useful too. I redid …

Coding

Memoization in JavaScript

Published · 2min

About a fortnight ago, I was poking around the copy of Perl sitting on my laptop. I came across Memoize.pm. Having read the article that inspired it a few years back, I thought I’d take an attempt at implementing something to do the same in JavaScript.

Memoization is …

Coding

The World’s Simplest (decent) PHP Templating Engine…

Published · 1min

…is PHP, so why not use it?

function include_view($view, $vars=null) {
    # Start buffering the generated text.
    ob_start();

    # Process the view.
    if (!is_null($vars)) {
        extract($vars, EXTR_OVERWRITE | EXTR_REFS);
    }
    include("views/$view.php");

    # Grab the generated content and clean up.
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}
Coding

My C++ wrapper for the Expat XML parser

Published · 1min

Last year when I was writing Orpheus, I knocked out a C++ wrapper around Expat to make using it easier.

It consists of two classes. XMLParser is the Expat wrapper and sets up the event handlers and automates setup and teardown of the parser itself. XMLEvtHandler consists of a set …

Coding

The DOM HTMLFormElement Interface Should Have a getElementsByName() Method

Published · 1min

While useful on the HTMLDocument interface, getElementsByName() would be much more useful if it was included in HTMLFormElement interface. Every time I want to look up elements by their names, it’s usually on form elements rather than the document as a whole. Come to think of it, I don …

Gaming

The so-called Dungeon Siege II ‘Beta’

Published · 2min

Beta, my ass! When exactly did the words ‘demo’ and ‘beta’ get mixed up? Back in the old days, a demo version was an incomplete version of the game, given out to drum up interest in the end product, whereas a beta version was a complete version of the game …

Voting

Are surpluses in STV a pointless complication?

Published · 2min

Triggered by this post on Bram Cohen’s blog, I posted up this reply. I think I’d better outline what I’m talking about.

Ireland uses the Single Transferrable Vote for just about everything, including by-elections and presidential elections. However, it’s always struck me that the concept of …

Tech

Dumb Terminals and Windows Remote Desktop

Published · 3min

I’m spending a lot of time connected via Windows Remote Desktop to an external network so that I can do work on their machines.

So here’s a question: are there any IT departments out there that are using this to give their users old-style dumb terminals so as …

Coding

Fixing JavaScript memory leaks for good

Published · 3min

Note

I’ve edited this down a little bit. A snapshot of the original post is here.

I’m a fan of unobtrusive JavaScript and I’ve strove to make my JavaScript code as unobtrusive as possible for years now.

However, I discovered something about IE a while ago when …

Coding

Detecting broken images with JavaScript

Published · 2min

Note

A cache of the original can be found here.

I hit an annoying problem with a project at work. It’s not my fault, there’s nothing wrong with the code, but sometimes things will happen: people will delete images out of the backend, not upload the image they …

Projects

Restarting Mocha

Published · 3min

While Sage is the closest I’ve ever got to an RSS aggregator I actually liked, it’s still not right. There are just too many things about it that irk me somewhat.

I’ve tried so many of the blasted things and a few things have been confirmed for …

Books

More new books: The Scar and Describing Morphosyntax

Published · 1min

Sales are great. I picked up a copy of China Miéville‘s The Scar in Hardback for next to nothing!

Also, Waterstones finally managed to source a copy of Describing Morphosyntax for me. I placed an order for it two months ago, and it only came on Friday. This is …

Coding

I want StringTemplate for PHP

Published · 1min

Ever since reading Terence Parr’s Enforcing Strict Model-View Separation in Template Engines (PDF), I’ve wanted something like StringTemplate for PHP.

Maybe not something exactly the same, but a templating system that would perform similarly as far as the person developing the templates would be concerned, but the coder …

←   newer continue   →