Hero of Alexandria

A little under two millennia ago1 there lived in the Egyptian city of Alexandria a Greek mathematician and inventor named Hero2, and he was a total badass who invented things that you probably thought came way later, and come up with mathematical tricks that we still use to this day3.

Inventions

Illustration of an aeolipile, showing a heated sphere or cylinder of water spraying steam in two different directions, causing it to rotate.
If you know of Hero’s inventions because of his aeolipile4,known as “Hero’s engine”, I’ve got bad news: it was probably actually invented by his predecessor Vitruvius. But Hero did come up with a way to use the technique to make a pneumatic temple door that automatically opened when you lit the fires alongside it.
Hero is variably credited with inventing, in some cases way earlier than you’re expecting:
  • automatic doors (powered either by pressure plates or by lit fires),
  • vending machines, which used the weight of a dispensed coin to open a valve and dispense holy water,
  • windmills (by which I mean wind-powered stationary machines capable of performing useful work),
  • the force pump – this is the kind of mechanism found in traditional freestanding village water pumps – for use in a fire engine,
  • float-valve and water-pressure based equilibrium pumps, like those found in many toilet cisterns, and
  • a programmable robot: this one’s a personal favourite of mine because it’s particularly unexpected – Hero’s cart was a three-wheeled contraption whose wheels were turned by a falling weight pulling on a rope, but the rope could be knotted and looped back over itself (here’s a modern reimplementation using Lego) to form a programmed path for the cart
Illustration showing mechanism of action of a fire-powered automatic door: heated air expands to displace water into a vessel whose now-increased weight pulls ropes wrapped around two wheels which pull open a pair of temple doors.
It’s just headcanon, but I choose to believe that the reason Hero needed to invent the fire extinguisher might have involved the number of “attempting to make fire do work” inventions that he came up with.

Mathematics

If you know of Hero because of his mathematical work, it’s probably thanks to his pre-trigonometric work on calculating the area of a triangle based only on the lengths of its sides.

But I’ve always been more-impressed by the iterative5 mechanism he come up with by which to derive square roots. Here’s how it works:

  1. Let n be the number for which you want to determine the square root.
  2. Let g1 be a guess as to the square root. You can pick any number; it can be 1.
  3. Derive a better guess g2 using g2 = ( g1 + n / g1 ) / 2.
  4. Repeat until gN gN-1, for a level of precision acceptable to you. The algorithm will be accurate to within S significant figures if the derivation of each guess is rounded to S + 1 significant figures.

That’s a bit of a dry way to tell you about it, though. Wouldn’t it be better if I showed you?

Put any number from 1 to 999 into the box below and see a series of gradually-improving guesses as to its square root6.

Interactive Widget

(There should be an interactive widget here. Maybe you’ve got Javascript disabled, or maybe you’re reading this post in your RSS reader?)

Maths is just one of the reasons Hero is my hero. And now perhaps he can be your hero too.

Footnotes

1 We’re not certain when he was born or died, but he wrote about witnessing a solar eclipse that we know to have occurred in 62 CE, which narrows it down a lot.

2 Or Heron. It’s not entirely certain how his name was pronounced, but I think “Hero” sounds cooler so I’m going with that.

3 Why am I blogging about this? Well: it turns out that every time I speak on some eccentric subject, like my favourite magic trick, I come off stage with like three other ideas for presentations, which leads to an exponential growth about “things I’d like to talk about”. Indeed, my OGN talk on the history of Oxford’s telephone area code was one of three options I offered to the crowd to vote on at the end of my previous OGN talk! In any case, I’ve decided that the only way I can get all of this superfluity of ideas out of my head might be to blog about them, instead; so here’s such a post!

4 If the diagram’s not clear, here’s the essence of the aeolipile: it’s a basic steam reaction-engine, in which steam forces its way out of a container in two different directions, causing the container to spin on its axis like a catherine wheel.

5 You can also conceive of it as a recursive algorithm if that’s your poison, for example if you’re one of those functional purists who always seem somehow happier about their lives than I am with mine. What’s that about, anyway? I tried to teach myself functional programming in the hope of reaching their Zen-like level of peace and contentment, but while I got reasonably good at the paradigm, I didn’t find enlightenment. Nowadays I’m of the opinion that it’s not that functional programming leads to self-actualisation so much as people capable of finding a level of joy in simplicity are drawn to functional programming. Or something. Anyway: what was I talking about? Oh, yeah: Hero of Alexandria’s derivation of square roots.

6 Why yes, of course I open-sourced this code.

× ×

The tape library robot that served drinks

This is a repost promoting content originally published elsewhere. See more things Dan's reposted.

This is an IBM tape library robot. It’s designed to fetch, load, unload, and return tape media cartridges to the correct bay in large enterprise environments.

One fateful ‘workend’, I made one serve drinks.

It went back into prod on the Monday…

In a story reminiscient of those anecdotes about early computer science students competing to “race” hard drives across the lab by writing programs that moved the heads in a way that vibrated/walked the devices, @SecurityWriter shares a wonderful story about repurposing a backup tape management robot to act as a server (pun intended) of drinks.

×

The Back Button

How did I get here?

While lying in bed, unwell and off work, last month, I found myself surfing (on my new phone) to the Wikipedia page on torsion springs. And that’s when I found myself wondering – how did I get here?

Thankfully, there’s always the back button: famously the second most-used bit of your web browser’s user interface. So… how did I come to be reading about torsion springs?

An anniversary clock, using a torsion pendulum, so-named because it only needs winding once a year.
  • I got there from reading about torsion pendulum clocks. My grandmother used to have one of these (an “anniversary clock”, like the one above, and I remember that I used to always enjoy watching the balls spin when I was a child).
  • I’d followed a link from the article about the Atmos clock, a type of torsion pendulum clock that uses minute variations in atmospheric temperature and pressure to power the winder and which, in ideal circumstances, will never need winding.
  • Before that, I’d been reading about the Beverly Clock, a classic timepiece that’s another example of an atmospheric-pressure-clock. It’s been running for almost 150 years despite having never been wound.
  • This was an example of another long-running experiment given on the page about the Oxford Electric Bell, which is perhaps the world’s longest-running scientific experiment. Built in 1840, it uses a pair of electrostatic batteries to continuously ring a bell.
The Oxford Electric Bell experiment. It’s batteries have lasted for over 160 years, but I have to charge my mobile most nights: what gives, science?
  • I got to the Oxford Electric Bell from another long-running experiment – the one acknowledged as the world’s longest-running by the Guinness Book of Records – the University of Queensland Pitch Drop Experiment. Running since 1927, this experiment demonstrates that pitch is not solid but a high-viscosity fluid. A sample of room-temperature pitch in a funnel forms a droplet about once a decade.
  • Earlier, I was learning about the difference between the different substances we call tar. Traditionally, tar is derived by baking pine wood and roots into charcoal, and collecting the runoff, but we also use the word “tar” to describe coal tar (a byproduct of coke production) and bitumen (viscous, sticky crude oil).
  • I took the initiative to learn about those differences after reading about the name “Jack Tar“, an Empire-era slang term for a sailor in the Merchant Navy or Royal Navy…
  • …which in turn was linked from the similar article about “Tommy Atkins“, a term for a British infantryman (particularly in the First World War), which has an interesting history…
  • …to which I got from the “Doughboy” article. The Doughboys were members of the American Expeditionary Force during the First World War.
R.U.R. – “Private Robot” – loads an artillery piece.
  • Finally, I got to that first Wikipedia article while, when reading an article on The Paleofuture Blog, I wondered about the etymology of the term “doughboy”, and began this whole link-clicking adventure.

It’s fascinating to work out “how you got here” after an extended exploration of a site like Wikipedia (or TV Tropes, or Changing Minds, or Uncyclopedia – and there goes your weekend…). Thank you, Back Button.

I just wish I had a Back Button in my head so that I could “wind back” my wandering thought processes. How did I end up thinking about the salt content of airline food, exactly?

× × ×