home ¦ Archives ¦ Atom ¦ RSS

NMH: Good Software Experiences

After my travails with hardware falling over last week, I've actually had a pretty good week with software. Herewith, three short anecdotes.

One bugaboo of desktop Linux back around the turn of the century, was dealing with printers. That old UNIX chestnut, lpr, just didn't play well with modern printers. Today I ventured to use my network printer with my Ubuntu desktop to print out some technical papers. Suffice it to say, the printer control panel pleasantly surprised me with a two step process for configuration. In no time, I was printing out PDFs with one click. Duplex even!

Through an automated script I've been meticulously recording information regarding Flickr's interestingness for the past five weeks. The data is stored in a Berkeley DB and resulted in a 1.6 gigabyte file. Accessing the data was dog slow though. After a careful reading of the documentation, creating a new db tuned to the properties of the data, and converting the data over, I've got a db that's 1/3 the size and fast as all get out. This took the better part of an hour or two but was well worth it. Most of the time was spent redesigning the db scheme and waiting for the conversion to complete.

I have a webfeed crawler, mostly written in Python, that records all content that it retrieves. There's a fair amount of redundancy between most fetches. I wanted a way to calculate deltas between versions and simply store the deltas. After digging around on the web for various algorithms to do this, and dreading implementing any of them, turns out Python has a nice module, difflib, that fits the bill. The SequenceMatcher class is really handy. Talk about batteries included!!

© Brian M. Dennis. Built using Pelican. Theme by Giulio Fidente on github.