Category: Sci/Tech

Alaric’s projects for this year

This year's going to be pretty busy with settling into the new home, but I have a few projects.

  1. Finish the ring casting I nearly finished before the move. That's a priority.
  2. Resurrect my aluminium foundry. In particular, it's our bronze wedding anniversary, so Sarah's going to design a pattern for a sundial, which I will cast in Aluminium bronze, a nice alloy that I can make myself from my scrap aluminium and bits of old plumbing...
  3. Continue with minor stuff on Ugarit, but as a milestone, build the distributed storage backend, which will rock.
  4. Work on my wearable computer project. No specific milestone for this, as it's currently a long drawn out research/prototyping phase as I sort out many details.

Wish me luck... I usually suffer from "all my weekends getting eaten up", but as my New Year's Resolution has been to spend at least one day every two weeks doing something fun with my children, I'm going to be booking weekend days in my calendar in advance through the year for that and my own projects. Before they get filled up!

Ring casting

A friend has asked me to cast her some silver wedding rings. So I am adapting my aluminium casting experience to silver...

The thing to use for silver moulds is cuttlefish bone, which is soft enough to easily carve into shapes, but can withstand the heat of molten silver. For a single pour, at any rate.

In order to get a repeatably round shape of the correct diameters for the two rings, and so I can quickly carve new moulds if my pouring fails so I can try again, I decided to make boring tools that carve ring shapes of the correct diameters.

The boring tools

As you can see, they're made from nails, hard soldered together, and ground to a cutting tooth at the end. The central spike goes down a guide hole I drill in the cuttlefish in advance.

The tool needs to come down exactly perpendicular to the flat surface of the cuttlefish (made by sawing one side off and then sanding it flat), so I made a special jig to hold them:

Cuttlefish bone in the jig ready to be bored

Then it's just a matter of fitting the tool in a chuck and bringing it down. I first tried rotating the tool by hand, but the result was a bit rubbish, so I bit the bullet and just turned the Dremel motor on, which produce a quite perfect circle.

Cuttlefish bone in the jig ready to be bored

The cutting jig

Pour two mould in the cutting jig

I made a couple of moulds, each with a matched flat cuttlefish to go on the other side. I had to carve channels for the silver to flow in by hand, using a screwdriver for rough gouging and a craft knife for the finer parts.

The silver was heated by blowtorch, in a refactory cup called a scorifier:

Preparing for pour one

But first I had to prepare the silver I was given - in the form of a coin, which I felt a bit bad about sawing in half:

The silver (back)The silver (back)

Sawing the silver into two piecesThe silver, cut in half

I melted half of the silver and poured it into the first (roughest!) mould:

Pour one

When I cracked it open, it seemed I'd not used enough silver, but everything had otherwise gone well:

Pour one mould opened - not enough silver

So I pulled the incomplete casting out, crushed it up, and added the other half of the silver, and gave the second mould a go. Here's a picture of it with the channels cut, before I clamped it:

Pour two mould

I put it all together and got ready for some melting:

Preparing for pour two

But this time, as soon as I started pouring, the silver suddenly froze on me, so hardly anything went into the mould:

Pour two failed due to insufficient temperature

It seems that the larger mass of silver wasn't heated up quite as far as the first pour had. I need to rearrange my firebricks to make a better forge to heat the silver in, so heat loss is slower, I suspect...

Hall effect sensors

At the Bristol Hackspace this evening, I powered up a Hall sensor.

The Allegro A1321 takes a 5v supply and outputs 2.5v - plus or minus 5mV per gauss of magnetic field in the sensor.

It turned out that small magnets don't produce many gauss, so I added a 741 op-amp with a gain of about 100 to get more useful output voltage deflection!

Here's the experimental setup:

Allegro A1321 5mV/G hall sensor and a 741 op-amp

WIth no nearby magnets, we read about 3v:

Quiescent: 3v

But with a very nearby magnet, we get a large deflection, which drops as we get the magnet many cm away, but is still significant:

Magnet brought very close Magnet a few cm away Magnet many cm away, still showing a reading

Clearly we still get significant readings a good distance away, and the nonlinearity isn't too bad; it doesn't max out with the magnet very close but still varies many cm away.

For my next trick I'll make a few of this circuit on some veroboard and hook the outputs up to an AVR with several ADCs that I have lying around, and try comparing the results to measure position (and maybe orientation?) of a magnetic probe...

Motivation

When I was a child, I had a lot of technical books lying around. My grandmother was a science teacher and my grandfather was an engineer, and lots of their old books lined my shelves. And alongside them, I had a lot of science fiction, too. And from all this, I learnt that technology could be used to extend the abilities of our frail bodies, to do amazing things...

I was an avid reader. I read all the books I could lay my hands on, and used to raid the libraries for more whenever I could. The fact that correctly arranged bits of various materials could, given the right inputs, enable you to fly, or communicate over long distances, entranced me... I designed everything from computers to deep-space colonisation programmes. But all I did was design them; I had a few tools, but not enough to build anything interesting. Most of my building efforts went into building further tools to try and bootstrap myself to greater things. I made a simple CMOS bus analyzer, and some power supplies and things like that, but even the cost of components was prohibitive. How could I build a robot if I couldn't afford motors, large enough batteries, and all the chips required to get a working computer?

And so, my initial enthusiasm with the wonders of technology was dulled, and replaced by a kind of cynical weariness. I could design something awesome, and imagine all the steps required to build it in arbitrary detail, but I couldn't see a way to make it anything more than a dream. My room filled with books, and notepads packed with diagrams, but no awesome pinnacles of technology.

The one area I could press on with, of course, was software. Once you've got a computer, you don't really need to spend more on it to make as much software as you have time for. I found that writing applications was rather tedious, though. Software engineering is a new, immature, field; it is still at the stage where extensive manual effort is required to make the simplest thing - and the situation was even worse programming in Pascal for MS-DOS in the early 1990s. To write an application you needed to write your own user interface and data storage and memory management and all that stuff. I set off to write a spreadsheet in the hope of making money, but quickly found that redesigning the operating system was much more fun - applications, to be honest, weren't all that interesting when I realised that the very foundations I had to build them on (programming languages, standard libraries, operating systems, the lot) were unbelievably shoddy; perhaps once I'd fixed them, application development might be less tedious...

So I disappeared off down a rabbit hole of researching computer science. I still wrote software, but it was mainly prototypes and experiments, never anything that would be useful in its own right. I wrote applications as coursework for my A-level in computing, of course; and I ended up writing a library of low-level hardware drivers for DJGPP that I released into the public domain in the mid 1990s, as a spin-off from some other project, but my main output, again, wasn't useful finished software, but designs.

I was worried that this meant I was lazy. The effort required to do the "boring bits" of finishing something just didn't appeal to me; when presented with a problem, I could design an awesome, exciting, solution in half an hour, but implementing that design would take weeks, during which several interesting new problems to solve would turn up. Was this some personal failing, that I lacked the stamina to finish anything? I loved designing things, but it also weighed heavily on me that I was all talk and no action.

When I first got a job writing software, I was worried that I would be afflicted by the same laziness, and have trouble motivating myself. As it turned out, I was OK; I found that writing software for other people was easy, as I'd get to see them looking all happy when I presented them with a finished solution to their problem. This provided all the motivation I needed to keep my nose to the grindstone.

But when I was spending my time writing lots of pointless code to work around the deficiencies of POSIX or SQL or something, I couldn't help myself from thinking about how I'd build these underlying bits of infrastructure if I could. I'd already accumulated a fair amount of ideas in the past; I'd been collecting them together under the umbrella of ARGON, an integrated design for an operating system, clustered fault-tolerant virtual machine, programming language, distributed database, and other related bits of infrastructure that I feel would make a much better basis on which to build applications than the current big ball of mud.

And yet I wonder why I waste my time designing something that would cost millions to implement, and which would be doomed to fail in an operating system market dominated by well-entrenched existing players. I feel I'm doomed to design things that can never be built, going all the way back to designing spacecraft as a child. And yet, it's the one thing I'm really passionate about. Whenever I have a spare moment to think, I'm usually designing something.

I've tried to make a career of this by focussing on "software architecture", as the activity of designing software is currently known. And I've managed to move away from being paid to design and build apps, towards the infrastructure projects I crave (such as databases). That's not always been a great thing; at GenieDB, I had to avoid thinking about the one big vague area in the ARGON design, the distributed database TUNGSTEN, in case of conflicts of interest with my employer. Now I work for an analytical/retention database company, and analytics is an area that I don't feel compelled to make part of ARGON (but I need to be a bit careful about the retention side, as I think that support for archival storage is woefully inadequate in modern software systems).

Not that I've been entirely unproductive in terms of working software, mind - there's a few tools I've built to solve my own problems; Tangle is a tool for documenting cabling and networks, that I wrote to help myself with some contract work I had looking after a moderately complicated hosting setup. The Eye of Horus is a monitoring system I built for keeping an eye on my own servers. I wrote banterpixra to help myself learn Lojban. I'm working on Ugarit, a backup/archival system based on content-addressed storage, to improve that woeful support for archival storage on my own servers. But none of them are anything like the kinds of grand ideas I conjure up on a daily basis, despite being the result of many days' work.

As the title of this blog post suggests, though, I struggle with motivation. My dreams are so far beyond my own ability to execute them that even building things like Ugarit can depress me as the slow pace at which software is built shows just how unreachable my goals are. It's even worse these days, as I have to fit looking after two children and a disabled wife around being the sole wage earner; there are sufficient tasks that only I can do that my "free time" boils down to Thursday evenings (except lately, as I've been having to spend those house and mortgage hunting) and the odd hour or so in the evenings once the kids are all in bed (as I am writing this now, an hour and a half after I'd have ideally liked to be in bed). I really wish I had more time to myself, but when I do get time, do I spend it designing wonderful things that nobody will ever build, or actually making trivial things that those with more time and energy could do much better?

Pass The Conch

In The Lord of the Flies, the children (marooned on an island and working out how to organise themselves to survive) develop a technique for managing debate: they use a conch shell as a token to represent who currently holds the floor. Without the conch, you can't talk; you have to wait your turn.

Cut to the Real World of Commerce and Industry: in various places I've worked, there's been a number of shared resources which can only be used by one person or agent at a time. Mainly, these have been testing servers - if you are doing performance analyses, or looking for timing-related bugs, you can't have anyone else running jobs on the same server as you, or they'll compete for resources and interfere with your results. Or perhaps there's only one "data area" of some kind, and two attempts to use it at once will lead to catastrophe.

This is usually handed by asking around the office or in IRC: "Is anyone using X?", hoping that anybody who is is still around (as opposed to too busy doing something to notice the request, or leaving a job going while out to lunch). Because of the unreliability of this system, and the inability to integrate it with automatic systems that need to claim resources (such as automatic test systems), I have often wished for a software tool to manage it. Which would, naturally, be called "conch".

Here's my feature wishlist:

  • Network-based. A central conch server tracks a set of conches, accessed via a Web interface or a direct protocol. The direct protocol should have a command-line client for scripting, and be trivial to write native client libraries for in programming languages.

  • Authenticated. No need for super security, but we want to keep out casual mischief-makers, so require authentication to use the server; to enable easy integration with other workflow apps, support htaccess files, "trust the upstream proxy" (eg, accept HTTP auth usernames and ignore any passwords sent), or running an arbitrary shell command to validate a username/password pair. It might be used across the public Internet, so allow for SSL wrapping the connection. The command line client should, by default, use the username and password from ~/.conch or prompt for them (and save them in ~/.conch) if not specified.

  • The ability to create or delete resources, to claim a currently-free resource, to release a resource you hold, or to "force" the release of a resource that somebody else holds (if they forget and go home, etc).

  • The ability to list the status of a resource, to list the resources held by a specific user, to list the resources held by yourself, to list all users with resources held, and to list all resources.

  • Fine-grained access control (per-user rights limitation) might be handy, but probably not useful for the first draft.

  • An IRC bot might be cool - at least for logging resource claims/releases and commands to list current state; maybe for resource claims/releases as well, if users are either trusted by nick or authenticate via a private message.

If this doesn't already exist, it should be easy to build (something could be knocked up with awful and sql-de-lite in a day or two, I bet!)...

WordPress Themes

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