Below are the five most recent posts in my weblog. You can also see a chronological list of all posts, dating back to 2003.

I haven't written much yet about what I've been up to at work. Right now, I'm making changes to the sources of a set of Docker images. The changes I'm making should not result in any changes to the actual images: it's just a re-organisation of the way in which they are built.

I've been using the btrfs storage driver for Docker which makes comparing image filesystems very easy from the host machine, as all the image filesystems are subvolumes. I use a bash script like the following to make sure I haven't broken anything:

oldid="$1"; newid="$2";
id_in_canonical_form() {
    echo "$1" | grep -qE '^[a-f0-9]{64}$'
}
canonicalize_id() {
    docker inspect --format '{{ .Id }}' "$1"
}
id_in_canonical_form "$oldid" || oldid="$(canonicalize_id "$oldid")"
id_in_canonical_form "$newid" || newid="$(canonicalize_id "$newid")"
cd "/var/lib/docker/btrfs/subvolumes"
sumpath() {
    cd "$1" && find . -printf "%M %4U %4G %16s %h/%f\n" | sort
}
diff -ruN "$oldid" "newid"
diff -u <(sumpath "$oldid") <(sumpath "$newid")

Using -printf means I can ignore changes in the timestamps on files which is something I am not interested in.

If it is available in your environment, Lars Wirzenius' tool Summain generates manifests that include a file checksum and could be very useful for this use-case.

Tags:

little and large

little and large

I've just upgraded my home Network Storage box. Until now, it was very discreet, about the size of a car radio. It lived on one of my bookcases and I was very happy with it but it could only take 2.5" sized hard drives and I've outgrown what you can fit on them.

I've ended up moving to 2x4T 3.5" drives, a Coolermaster Elite 110 case and re-using the mainboard/CPU and RAM. This is hopefully enough capacity that I don't need to look at another upgrade for a few years, and the case could take more drives if I need it to.

The Elite 110 is - by Mini-ITX case terms - pretty small, but still 6 times larger in volume than the old case. In the consumer NAS market, there are plenty of appliances that takes two 3.5" drives and are much smaller than that (such as the WD MyBook Duo, or Synology DS214). Unfortunately I could not find any cases that were of this size for a DIY build. Did I miss anything obvious?

(As to why I choose DIY, that could be the subject for a future post.)

The full boring details of the build are on the NAS system page.

Tags:

a big pile of computer game boxes

computer game boxes

My brother and I found these whilst tidying up the stuff that we've left at our parent's house. What on earth should we do with them?

I have a small number of older game boxes (Doom, Doom 2, Civ 2, etc.) which I use as drawer dividers (both the lid and the 'seat' of the box), but most of these are newer designs, more like a box of cereal, with their openings at the top, so they can't be used as such. (and there's only so many drawer dividers that you need...)

This is loosely related to my stalled Amiga floppy disk recovery project, which hasn't made any progress since I last wrote about it.

Tags:

In CDs should come with download codes, I argued that CDs should come with a coupon to obtain a digital copy of the album, much like a lot of modern vinyl releases do.

What didn't occur to me at the time is that there's a difference in how we think about copies of albums that we obtain that way, versus ripping a CD. When we rip a CD, we are making a personal copy of the media. We've bought a physical "token" that represents our "ownership" of the music, and we've made a copy of that — privately — for our own convenience. If we decide to get rid of the CD, then morally we really should get rid of the digital copy, too, as we've transferred our "ownership" to someone else.

Of course we don't really own the music on the CD in the first place and in the UK it's technically not legal to make a copy, even a private copy for personal use, but that's another story.

With a download code, the situation is quite different. If you buy a record with a download code, you have (at least) two copies of the album. You don't make a second copy yourself, it has already been made. And if you decide to pass on the physical album, I don't think there is any moral expectation that you should delete your digital copy.

Tags:

boxes of CDs & the same data on MicroSD

boxes of CDs & the same data on MicroSD

There's a Vinyl resurgence going on, with vinyl record sales growing year-on-year. Many of the people buying records don't have record players. Many records are sold including a download code, granting the owner an (often one-time) opportunity to download a digital copy of the album they just bought.

Some may be tempted to look down upon those buying vinyl records, especially those who don't have a means to play them. The record itself is, now more than ever, a physical totem rather than a media for the music. But is this really that different to how we've treated audio CDs this century?

For at least 15 years, I've ripped every CD I've bought and then stored it in a shoebox. (I'm up to 10 shoeboxes). The ripped copy is the only thing I listen to. The CD is little more than a totem, albeit one which I have to use in a relatively inconvenient ritual in order to get something I can conveniently listen to.

The process of ripping CDs has improved a lot in this time, but it's still a pain. CD-ROM drives are also becoming a lot more scarce. Ripping is not necessary reliable, either. The best tool to verify a rip is AccurateRip, a privately-owned database of track checksums. The private status is a problem for the community (Remember what happened to CDDB?) and is only useful if other people using an AccurateRip-supported ripper have already successfully ripped the CD.

Then there's things like CD pre-emphasis. It turns out that the Red Book standard defines a rarely-used flag that means the CD (or individual tracks) have had pre-emphasis applied to the treble-end of the frequency spectrum. The CD player is supposed to apply de-emphasis on playback. This doesn't happen if you fetch the audio data digitally, so it becomes the CD rippers responsibility to handle this. CD rippers have only relatively recently grown support for it. Awareness has been pretty low, so low that nobody has a good idea about how many CDs actually have pre-emphasis set: it's thought to be very rare, but (as far as I know) MusicBrainz doesn't (yet) track it.

So some proportion of my already-ripped CDs may have actually been ripped incorrectly, and I can't easily determine which ones without re-ripping them all. I know that at least my Quake computer game CD has it set, and I have suspicions about some other releases.

Going forward, this could be avoided entirely if CDs were treated more like totems, as vinyl records are, than the media delivering the music itself, and if record labels routinely included download cards with audio CDs. For just about anyone, no matter how the music was obtained, media-less digital is the canonical form for engaging with it. Attention should also be paid to make sure that digital releases are of a high quality: but that's a topic for another blog post.

Tags:

Older posts are available on the all posts page.


Comments