« June 2008 | Main | August 2008 »

July 31, 2008

Presented without comment

In future, whenever someone asks me why I moved to New Zealand, this is the article I shall point to.

July 31, 2008 in Current Affairs | Permalink | Comments (0) | TrackBack

July 17, 2008

Secret origins of my programming career

Both Ivan and JD have been after me with one of these periodic personal trivia thingies.  Normally I can get away with pretending ignorance ("Blogs, you say?  The Internet, you say?") but when it's your boss and he makes a point of reminding you...  Fortunately, Sir John of Kearney has shown me the way...

How old were you when you started programming?

8.  Until then, of course, I was engaged in honest work -- up the chimneys, picking pockets, negotiating gruel quotas, etc.

How did you get started in programming?

As a poor Victorian youth, Mr Babbage (bless 'im) used me and my fellow urchins to demonstrate the principles of the Analytical Engine to the nobs.  "You pretend to be wheel number six," he'd say.  "When young Pip next to you carries the ten, you adds one to yourself, and when you gets up to ten, you lets Randolph here know about it.  Orright?  And don't let me catch you pinching the cupcakes again, my lad, or you'll feel the back of my hand."  Later he employed me in his workhouse: four burly workmen would rub my moustache against his brass pistons as what he claimed was an essential part of the milling process.  Thus was born my lifelong love affair with computers.

What was your first language?

Cockney.  Not Rhyming Cockney, of course, and certainly not your modern Visual Cockney or Jockney, the amusingly named port to the JVM.  We ran on the bare cobbles in my day, guvnor.

What was the first real program you wrote?

A map colouring algorithm.  It was actually relatively simple, because it just coloured the entire Far East pink, but in those days of the Empire, it was close enough.

What languages have you used since you started programming?

Punched cards... toggle switches... 6502 assembler...  Visual Basic 1.0...

What was your first professional programming gig?

The Kaiserbot 2000.  It was considered the gold standard implementation of a European statesman right through until the early 20th century, until we accidentally shipped a nightly build to Prussia where we had forgotten to #undef BELLICOSE.  After that we were forced to refocus our business around artillery targeting systems.

The bit that I wrote was the moustache control subsystem, which was basically about making sure that it twirled up at the ends at the correct angle.  I was proud that it was modular enough to be reusable with only configuration changes in the Kitchener-o-Matic several years later.

If you knew then what you know now, would you have started programming?

No.  If I knew then what I know now, then obviously I would have bet my shirt on Montrose for the Jubilee Cup in 1906, invested my winnings in Kodak stock, and retired to Cannes for the rest of my natural life.  Damn fool question.

If there is one thing you learned along the way that you would tell new developers, what would it be?

With today's roomy chimneys and modern extensible brush technology, a sweeping career can be for life, not just until puberty.

What's the most fun you've ever had... programming?

Writing vital customer demos in C, and checking them in under somebody else's name.

July 17, 2008 | Permalink | Comments (4) | TrackBack

July 12, 2008

Here comes the flood

Measured further down the valley from me, so the flow numbers are moot, but look how steep the spike is.


The rainfall page for the same measuring station says that today has had the highest single day fall so far this year, so hardly surprising, but still dramatic.

July 12, 2008 | Permalink | Comments (0) | TrackBack

July 11, 2008

MONIAC: adventures in analogue computing

Thanks to the wily Kirk Jackson and the, er, New Zealand Association of Economists, I had the pleasure this afternoon of seeing an unusual piece of computing history in action.  MONIAC, the Monetary National Income Analogue Computer, also known as the Phillips Machine, was an analogue computer invented by Bill Phillips (he of curve fame) to model and simulate the relationships between various economic factors.  Nothing unusual about that, except that it was invented in the 1940s... and instead of processing 0s and 1s, it processed water.  The Reserve Bank of New Zealand has one of the few Phillips Machines still around and in working order, and as part of a lunchtime session for the NZAE conference they had cranked it up and were demonstrating it.

The machine works by circulating water around a network of tanks, taps, pumps and pipes.  Values are represented by the levels of water in various tanks, parameters by opening and closing taps or moving valves up and down, and the key readouts of income and interest rates are recorded by pens moving against graph paper.  Water, of course, represents money, though demonstrator Geoff Bertram was careful to refer to it at all times as "the circulating medium."  I have to be a bit vague about what sort of things the various tanks and taps and throttles represented: explanations of the various bits in terms of private sector liquidity requirements and endogenous money supply undoubtedly made sense to the mainly economist audience but I'm afraid I struggled. Still, I gathered it was a pretty accurate simulation of the economic theories of the 1940s and 1950s; according to the demonstrator it effectively shut down a major debate of the time by convincing both sides that their arguments were actually compatible.

Of course, not being programmable, MONIAC can't be updated to reflect new factors and new economic conditions (such as globalisation).  The demonstrator did, however, relate how one lecturer used to set up two MONIACs, one representing the US economy and one representing the UK, hook up the relevant bits of piping between the two machines, and challenge two sets of students to do the best for "their" economy, so within the constraints of the model there was a certain amount of flexibility.

On the other hand, MONIAC's analogue approach still rivals the digital approach in some ways.  "It's solving nine simultaneous differential equations," noted the demonstrator.  Given the sophistication of modern numerical techniques, and the effort that has undoubtedly been poured into economic simulation and prediction, it's no surprise that the Phillips Machine has been superseded, but I suspect that ultimately the digital equivalents are just badly simulating water flow, only more flexibly and a lot faster.  One member of the audience, noting that the Phillips Machines had been used largely for educational purposes, asked Dr Bertram how he would present the same ideas now.  "I'd draw a hydraulic diagram," he replied.

This being a computer demo, of course, things did not go quite to plan; but this being an analogue computer demo, they went not to plan not through the usual syntax errors and unhandled exceptions, but instead because the bit of plastic representing the level of imports had fallen off and had to be stuck back on with blu-tack, and the export doohickey had become stuck against its housing.  Kernel fans will also be pleased to know that the Phillips Machine's ultimate failure mode is also described as "dumping," except in this case you end up with wet shoes and a massive carpet cleaning bill instead of just a nice convenient file.  "Now it sits in this bath here, and we've fitted a drain through to the outside," noted Dr Bertram ruefully.

(Incidentally, Bill Phillips was a New Zealander: connoisseurs of Kiwiana will therefore note that the use of blu-tack to hold the level of imports steady counts as Kiwi ingenuity, while the failure mode of spewing the "circulating medium," i.e. the national economy, all over the floor represents classic Kiwi ingenuity, or possibly Rogernomics.)

This highlights another interesting feature of the analogue approach: its unpredictability.  When the demonstrator was showing us "fiscal shocks" and "monetary shocks," he commented on how long the simulated economy took to react to stimuli such as suddenly injecting government investment or restricting lending.  "Sometimes they take 30 seconds, sometimes they take five minutes," depending on the mood of the machine.  Given the unpredictability of real economies, this in some ways seems like an attraction of the analogue approach. The downside? "Sometimes you'll be standing there talking about how things eventually come back to equilibrium, and everything's crashing and burning behind you."  At least when my demos tank they don't take national economies with them.

Due to short notice, I don't have any pictures, but Wikipedia does (as does NZIER at the link above), and if you're in Australia or the UK, I gather there are also kinda-maybe-working machines at Melbourne University and at the Science Museum.  There is also apparently one lost in Guatemalan jungle, so any budding Indiana Joneses of computing, now's your chance.

July 11, 2008 in Science, Software, Usability | Permalink | Comments (2) | TrackBack