New Blog!

I’ve moved this site from WordPress to Pelican. Pelican is awesome.

WordPress is written in PHP and uses MySQL to store the data needed to build each page. The good thing about WordPress is that the pages are built as they are requested. The bad thing about WordPress is that the pages are built as they are requested.

The whole database-driven dynamic page thing can slow down a site quite a bit, especially if you’re only using a basic hosting package. If like me you also install a boatload of plugins and themes to test things out the database gets full of cruft adding to more slowdowns. I experimented with various different caching plugins and they seemed to work great for a couple of weeks and then they’d stop updating the content and serve up week-old stale pages. I never found out why.

more ...

Splitting old-style JPEG encoded TIFFs

The tiffsplit program from the libtiff library does a good job of splitting multi-page TIFF files into single pages. It doesn’t seem that great at handling TIFFs saved with ‘old-style’ JPEG encoding.

It’ll produce files, and the correct number of files too, but the files are actually in JPEG format. Most image viewers won’t open them still because they’re JPEG files with TIFF headers.

Assuming you have a TIFF file made up entirely of old-style JPEG encoded images you can loop through the files that tiffsplit has exported and remove the first eight bytes to give valid JPEG files.

more ...

Windows 7 Minimal Taskbar Menu

Right clicking the taskbar in Windows 7 and selecting Toolbars and New Toolbar will let you select a folder on your computer to add as a taskbar menu. Here’s how to make the label take up less space…

more ...

Cleaning QR Codes

At work we use QR Codes. It’s a pretty recent thing. For a few clients we used to scan pages of a file and then have the scanner operator stop what they were doing to give the TIFF file a meaningful filename. Now we have the clients supply cover sheets, generated with custom software, that contain QR codes. These then get processed after scanning and before the scan of the header sheet is discarded the indexing data is decoded using ZBar through an AutoHotkey script.

A few days ago we hit a problem. We’d scanned a few thousand pages but the script was unable to decode any of the indexing data from the QR codes. Not a single page. After looking into it I found that there were quality issues with the printing of the cover sheet. I could tell that the QR code was valid because the app I use on my mobile phone could read it fine, but ZBar could not. And ZBar is what matters – I wasn’t about to sit down decoding QR codes with my phone all day.

more ...

Native Desktop Application for Subsonic

I’ve been looking for a new personal project to work on for a while and I’ve been having trouble finding something. I wanted something that I’d use myself, otherwise my interest would quickly drop. Something that ideally I would use every day. I also wanted to write something that other people would find a use for as well. And it had to be written in Python and be something completely different to anything I’ve played with before. So I’ve decided to write a desktop client for Subsonic.

more ...