New toy: mp3 player

CNMemory mp3 player

Just got my latest toy, a little solid-state mp3 player. It comes with no memory, but has an SD slot so it's infinitely expandable. SD is insanely cheap and getting cheaper all the time, so that's great. Pretty good for £13!

Now I'll just have to do some script hackery to automagically convert Ogg files to mp3 and copy them across, so I can quickly get music ready for my daily cycle commute.

What did we do before eBay?

Just bought a broken laptop of the same model as mine. It's apparently working but has broken screen and no keyboard. I bought it solely for parts as the little cable between the motherboard and screen on mine is stuffed. To buy this part from official channels would end up costing more than the laptop is worth, whereas this cost next to nothing.

The other bonus is I'll get to work out how to pull the sucker apart without destroying my working laptop.

Weekend of Ubuntu

I spent the weekend tweaking the Ubuntu install on my new laptop and installing Ubuntu on my main desktop. It's very very slick, and unlike Knoppix the power save modes on the monitor actually work. This never really worked on my desktop.

What I need to get going now is my new Iomega Ditto Max drive for backup. It only cost me a fiver, so I'm not too upset if I can't get it going. However, it supposedly works but the documentation for ftape is really crappy.

Ubuntu is fantastic

I scored a nice laptop this week, though it has a problem with the screen and the cable connecting to it. Hopefully I can repair that. It's a PII 300, so quite a nice machine and very compact and light.

I installed Ubuntu on it last night. This is my first real install of Ubuntu, previously I've only played briefly with the live CD.

I have to say I'm well impressed. They've really thought through what's needed for ordinary end users and everything Just Works<tm>. Truly a Linux distribution ready for your Mum.

Bloody Oracle bollocks

I've just spent most of the morning helping our DBAs install the Oracle client software on a freshly installed Debian box. Why, oh why, do you need to run some dodgy Java GUI installer to install a fscking database client? Why can't they give, say, a statically compiled binary? A shell script? ANYTHING but this!

Doing the installer in Java just makes the dependencies that much greater. And the Java stuff seems to rely on quite old versions of everything, including C++ libraries and GCC. How dumb.

Sure, Oracle don't formally support Debian as a platform but even on their "supported" RedHat platform you have to jump through hoops to get the thing installed. Why?

Yay for Microsoft!

Say what you will about their (lousy) software, Microsoft make great hardware. On Wednesday my eight-year old Microsoft Natural Keyboard finally died, the Enter key stopped working. So I ordered another one.

These keyboards are fantastic because they've put useful ergonomic keyboards into the affordable price range. Previously you had to shell out serious bucks to get something that didn't destroy your wrists. With these puppies, you can get that for £12.

How long did something take in Perl?

Some things in Perl seem very obvious to the gurus but aren't terribly obvious to us mere mortals. I'm writing scripts for work to automagically publish our docs, so I'm trying to work out how long each document takes to publish.

This uses the Time::Duration module to convert the epoch seconds that Perl uses into something humans can read. It's adaptive to give something meaninful, so "66666666" returns "2 years and 42 days" while "666" returns "11 minutes and 6 seconds". If you want full precision, there is also the duration_exact function in that module.

use Time::Duration qw(duration);

# Record the start time, in epoch seconds
$starttime = time;

# Do stuff
...

# Record the end time, in epoch seconds
$endtime = time;

# Subtract the start time from the end time
$difference = $endtime - $starttime;

# Convert the seconds to something humans can read
$duration = duration($difference);

print "The process took: $duration\n";