Software

You are currently browsing the archive for the Software category.

ZX Spectrum Photo Frame

Heath Robinson would be proud of this one I think – a digital photo frame constructed from a ZX Spectrum, an old portable TV and an audio cable linked to a Linux box which is the source of the actual pictures. Here’s how it works:

Read the rest of this entry »

Update: For the latest version and up to date documentation, please see the project page.

I got a sudden overwhelming desire to have a wiki, so I decided to set up a MediaWiki installation alongside WordPress. By the time I’d installed it I’d forgotten why I wanted the wiki in the first place, so instead I started looking for a way to integrate the user authentication systems between the two.

Read the rest of this entry »

APNG is a backwards-compatible extension to the PNG format that handles animation – a modern day, less klunky equivalent of the much abused animated GIF. A pea is a vegetable. Or is it? I am saying no, the pod is a fruit, and the pea itself is a seed. Feel free to argue amongst yourselves.

A short film about peas

The above won’t work if you’re using Internet Explorer (stop doing that), and possibly not if you’re one of those Apple types either, though I’m not sure.

Update: I’m told this actually crashes Aurora, Midori and Kazehakase. I can’t help but wonder if that’s exploitable.

Regular visitors (I’m being a bit optimistic using the plural there) will notice that this site has been smartened up a bit. Here’s what’s changed:

  1. Switched to the Tarski WordPress theme. Very easy to do. A bit of customisation was required, but because of the way the theme has been built with hooks in place, I was able to create a plugin to do the things I needed instead of having to modify anything.
  2. Dropped the ‘blog.’ from the domain, although all old links should redirect nicely.
  3. Integrated a Gallery installation.

The last part was the trickiest, and more importantly the most pointless, so that’s what I’m going to talk about…

Read the rest of this entry »

So you followed all my tips in the first installment, but you’re still worried that your code might be maintainable? Here are some more:

  1. Forced to fix a bug? Don’t worry, you can reintroduce it a couple of releases later, as long as you remembered not to add a regression test for it.
  2. If you must document code, don’t take the opportunity to explain WHY it’s doing what it’s doing. Just describe the obvious. Learn from the masters at Microsoft:
    // Initialize the column to '0'
    ColumnToSort = 0;
    // Initialize the sort order to 'none'
    OrderOfSort = SortOrder.None;

    No, really, that’s not made up – see for yourself.

  3. If you have to generate a lengthy SQL statement, avoid any kind of formatting of the code that might make it readable. Instead, cram it all on one line such that you can only see a small part of it at once.
  4. Avoid unnecessary timezone calculations by living on the Greenwich Meridian and only testing your code when DST is not in effect. Or preferably not at all.
  5. Threading is your friend. Find obscure ways to make sure your functions are not re-entrant. When reports of random failures come in from production environments, simply say you can’t reproduce them.
  6. Carefully read any coding standards that apply to your project and commit them to memory – otherwise there is a risk you might comply with part of them by mistake.
  7. A multidimensional array is a fine construct for storing your tabular data, but only if you refer to all your columns by numbers and don’t document them. Better still though, is a comma-separated list of pipe-delimited strings. For bonus points, use a delimiter that only rarely occurs in the actual data.
  8. Use floating point numbers for your currency calculations.
  9. Although cluttering up the code is normally a worthy cause, don’t waste your time validating user input. Rely on bug reports to find out the interesting effects of the ‘unexpected’ things they entered.
  10. Refactor. Because you feel like it.

This is a quick and dirty utility I put together for my own use, but maybe someone else will find it useful. It can take a project from a local Code Co-op installation and recreate the full history as a Bazaar repository.

Read the rest of this entry »

A quick guide to getting Laconica up and running on Debian Etch using PostgreSQL as the database. The starting point for all this is a clean install of the netinst version, with no additional software selected during the install. Everything here is done as the root user.

If this all seems a bit long-winded, that’s because it is, but I thought it was better to cover everything from a clean install. In theory you should be able to follow this to the letter and end up with a working Laconica. Corrections will be gratefully received.

Read the rest of this entry »

Deathstar

A sorry and tedious tale of hardware failures in a world where technology and frozen peas collide.

I got up this morning (or rather I was dragged up by Mia, as usual, at an ungodly hour) and the first thing I noticed as I wandered past my office on the way to the bathroom was a horrible silence where the happy whirring and grinding of a dust-filled fans and creaky old hard drives should have been.

Read the rest of this entry »

Update: For the latest version and up to date documentation, please see the project page.

feed2omb is a simple tool that takes input from Atom or RSS feeds and posts updates to the open microblogging service of your choice. It should also (though I’m not going to try it) quite happily post to Twitter.

The feed reading is handled by Mark Pilgrim’s excellent Universal Feed Parser so it should be able to deal with any feed you throw at it. On the posting side, you can send the updates to open microblogging services such as those based on Laconica – this includes Identica.

Read the rest of this entry »

Note: This plugin requires WordPress 2.7 or later. (Although see below for other options)

One of the more irritating aspects of WordPress, at least from a feed subscriber’s perspective, is that minor edits cause the last-updated date to change. The knock-on effect is that the post will find its way back to the top of an atom feed causing readers to see it again. Not the desired effect if you are, for example, correcting an insignificant typo, updating a moved link or adding a category, and even worse if you were to reorganise categories and thus blitz your poor readers with a whole batch of old posts all at once.

This plugin provides the answer, by adding a ‘Minor Edit’ checkbox when you’re editing a post. If you tick the box, the post’s last-updated date will be left alone. If you leave it unchecked, things will happen as normal. It’s that simple.

Read the rest of this entry »

« Older entries § Newer entries »