Designing for unit tests (by )

I'm writing a unit test for a bit of code that connects to a server. The bit of code has parameters - hostname, username, password, and details of what to fetch from the server.

The thing is, the infrastructure it's placed in expects it to store the password in encrypted form. It has to use a separate component that contains a hidden master key to decrypt the password when it's required, and to encrypt a new password given to it.

Also, since the application will be fetching lots of different things from different servers, it quite reasonably has a 'host' abstraction that can be referred to by lots of data collection modules; it keeps a central list of hosts, and my component is passed a Host object.

But when writing a unit test for my component, this is a pain. The way the central list of hosts and the crypto component are accessed involves going through a 'session' object that also has lots of things like listening sockets, database connections, and much other complexity afoot.

Read more »

Baby photos (by )

From an old family photo album, some pictures of me as a newborn have appeared, on a visit to The Mill:

Montage of Alaric as a newborn

They're dated April 1979, so would be less than a month after my April birth.

Who'd have thought, then, that one day I'd be bringing up my own baby in this place? 🙂

EmDrive (by )

A British chappy claims to have built an reactionless engine, the EmDrive - I just read about it in New Scientist today, so threw up the Wikipedia page about it.

Any physicists around here who are able to do the maths and see if his claim (that a truncated-conical resonant cavity full of microwaves will experience an asymmetric photon pressure due to the group velocity of the waves changing as the local diameter of the tube varies, thanks to some relativistic effects) holds water?

And if it does, what becomes of conservation of momentum?

Accessing a Domino server from Java (by )

For a project, I'm having to write some Java code to talk to a Domino server.

Finding any references on how to do this is a BIG pain, so for posterity, here is what I've found.

Read more »

Lead-free soldering (by )

In the UK right now, just about every electronic component, PCB, or whatnot is being labelled RoHS Compliant.

In particular, this means that Maplin, the only local place I can just drive to to pick up electronic components and tools, is now only selling lead-free solder.

Read more »

WordPress Themes

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