Category: Sci/Tech

Apps as containers (by )

As I have mentioned before, it annoys me that many applications try (subtly or otherwise) to appear as the 'containers' of your data; they are both editors of a particular type of object, and a browsing/management interface for that type of object. The insidiously widespread case being applications that have 'Open' and 'Save As' menu items that pop up mini filesystem browsers, only showing the types of documents that application cares about and hiding others.

Read more »

Is it normal to want to assign every object you own a serial number, then keep a database? (by )

I've been doing some systems work in a rack recently that uses redundant systems. Two optical fibres come into to two switches which are connected to two routers and two load balances, and every server has two or more network interfaces (since there's internal and external VLANs).

So there's rather a lot of cables in there! Since the spare length is all neatly bound into a bundle, finding the other end of the cable you're looking at is a bit of a pain.

So I'd like to number each cable, label each end of the cable with its number, and add cable numbers ot the "what's in what port of which switch" spreadsheet.

Most cable marking systems, however, have to be applied before the plugs are attached to the cable - since they involve a sleeve that goes over the cable. This isn't good, since I want to label existing cables.

Hunting about online, I found these folks who do a nice line of markers - including the PC range of snap-on markers for existing cables. Lovely!

They've sent me a pack of samples, so I can experiment to see what fits best on my cables:

Partex PC40 cable markers on a CAT5 UTP patch cable

...and it looks like PC40 is the best size for CAT5 UTP.

Big Voltmeter (by )

My mate Seth brought me back a lovely big AC voltmeter from India, where the power distribution systems tend to reflect an earlier, more exciting, time where things arced and crackled, and everything was made of Bakelite.

Anyway, it's meant to mount on a panel, and the rear of it just has two exposed screw terminals. So I had to do a bit of work to make it usable.

Firstly, I obtained some crimp terminals - a nice set with eighteen different kinds, including rings, spades (male and female), forks, and butt splices in three different sizes.

Anyway, I really wanted it for the ring terminals, which would securely attach to the screws on the back of the voltmeter. So upon returning to home, I went to Maplin and obtained a large enough box, then spent a pleasant hour or so in the workshop with my father in law drilling holes in the box so that I could mount the voltemeter on it. We also scraped away some paint from the inside of the mounting holes, exposing the bare metal, so that I could attach another ring crimp terminal to the mounting bolt as an earth connection. Better safe than sorry!

The end result is a nice box with the voltmeter mounted on it, with no exposed live metalwork, and a standard mains plug on the other end so it can monitor my mains voltage. This is a pretty useful tool, since we do get power cuts and brownouts and so on quite often out here, and the lights often change brightness at random...

Big Voltmeter

As I write, it's reading a bit over 230v, while earlier, it was reading more like 225v. At some point I'll ask Sarah to turn the shower on (our biggest load) and we'll see how much the voltage drops - because I know the lights usually dim when the shower comes on 🙂

CSS (by )

I read this interesting article, which I found via reddit:

Lexical File Names in Plan 9 or Getting Dot-Dot Right

I found I liked the styling. At first I'd assumed it was a PDF, since it looked like the output of TeX or Lout, but it was suspiciously in a web browser rather than a PDF viewer.

"Oooh," I thought, "I wonder if the CSS they used for that is freely licensed? I'd quite like to use it to give my own writings that academic feel, so that people trust them uncritically, thus advancing my world domination plans."

But upon viewing the source, I had a nasty shock - every element was individually styled with its own style= element. Ugh. Looked like something had autogenerated it, most likely from something intended to be turned into a PDF. The result looked lovely, but was implemented terribly.

So I decided I'd sharpen my decidely rusty CSS skills a bit by cloning it properly.

The end result isn't a perfect copy, but looks good enough for me, and I'd like to share it if anybody else wants it. Here's a sample of it in use. And feel free to download and copy the CSS, subject to the nice license at the top.

C (by )

I spent a lot of time programming C in my youth. I went through the canonical route; BASIC on an 8-bit home micro, moving up to Pascal then C when I managed to obtain access to implementations of either. At the time, conventional wisdom was that C was the best language about; the easy access to the underlying model of memory as an array of numbered bytes allowed the programmer to write efficient code to perform low-level data processing operations. The mantra was that there was a tradeoff between expressive power and safety; languages like Pascal made it harder to shoot yourself in the foot, at the cost of preventing you from doing interesting things.

But, with the advent of an Internet connection, I gained access to non-mainstream languages, and my explorations of the wider world of programming language technology began. I still dabbled in C or C++ from time to time, when the situation demanded it, but never on very complicated projects.

Recently, though, I've been working on a large C project. And I've found that I'd quite forgotten just how horrible it is in comparison to the languages I've been using recently...

Read more »

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales