Monday, 18 January 2010

On Upgrading - or "what were they thinking?"


My desktop machine at home has had creeping software sickness for a long time. It was new about 4 years ago and has gradually got less and less likely to succeed at any given task. Visual Studio crashes quite often, which I've never seen anywhere else. Google Earth kind-of runs but is pretty much unusable. And so on. I've no idea why these things happen, there's no logical reason why software should wear out, but it seems that it does.

I resisted Vista for all of its sorry lifetime, wisely as it turned out. But everyone seems to be saying nice things about Windows 7, so I decided it was time to upgrade. At the same time I decided to swap the 250 Gbyte hard drive for a brand new 2 terabyte one. Not that I have anything that will use up that much disk space, but 250 GB was getting full.


The machine is something called an HP Media Center. It was a distress purchase, my previous machine had scrambled its hard drive and I had exactly 10 hours to get something important done, so I just rushed out to Fry's and bought what they recommended. Until now, I'd never had any reason to take the covers off. When I did, I found that the hard drive was totally, utterly inaccessible, hidden inside the machine, and mounted vertically (rather than horizontally as usual). No normal screwdriver could access any of the mounting screws. I tried undoing various other things, but nothing gave access to the screws. Eventually I figured I could just put the new drive loose on the floor of the box. But, since I don't give up easily, I wondered how the factory had ever managed to assemble the machine. More on that later.


So, having swapped the drive cables over to my brand-new, unformatted 2 TB disk, it was time to install Windows 7, which I had (legitimately) on a USB memory stick. (As an aside, in about 1994 I worked on one of the very first video-on-demand projects, at DEC. Part of the system was a 1 TB drive farm, which occupied four full-size racks. Of course the whole project was more than a decade ahead of its time, and flopped completely).


Since I had a new disk, I actually wanted to do an install from scratch. But still there is a great mystery here. Microsoft built Windows 7 because the adoption rate of Vista was so low - I've seen estimates of 20%. Yet you can only do an in situ upgrade from Vista. So if you're one of the 80% who never moved from XP, you're out of luck. Or rather, Microsoft is, because that's who loses money if people don't upgrade. XP is a perfectly fine system, I would not have upgraded but for my "software wear-out" problem. Most not-very-technical users will be completely put off by the complication of a from-scratch installation, followed by reinstalling all of their apps, and in all probability just won't bother. So what was Microsoft thinking when they made this decision?


So, I booted from the memory stick, Windows 7 started and everything seemed fine. Then it put up a screen asking me which disk I wanted to use. When I selected my new drive, I got an error, "cannot create system partition". That's dumb, I thought, surely a from-scratch installer should be able to partition and format a disk? Still, I was able to rig things up so that I booted from the old system, with the new disk connected. That way I could format the new disk from XP. Then I restarted the Windows 7 system again. The same thing happened.


It took a lot of frustration, much bad language, and a lot of googling before I found the solution to this. It turns out that since the early days of Vista, the installer has not been able to cope with having more than one drive or partition visible to it. If it does, it gives this misleading error message which gives absolutely no clue as to the problem, and which will certainly stop most people dead in their tracks. Yet MS had at least a year to fix this, preferably so installer could handle multiple connected drives, but failing that at least to give a better error message. Once again, what were they thinking?


Once I had this figured out and unplugged everything except the target drive, everything went fine. The system installed remarkably quickly, and subsequent reinstallation of all my apps went smoothly too. It took quite a while for further problems to emerge.


Meanwhile, I hadn't given up on the disk mounting problem. I picked up various tools - stubby screwdriver, offset screwdriver - from my local TrueValue, but none of them could get all of the hidden screws. Finally a trip to Fry's got me a tiny ratchet offset screwdriver with interchangeable bits. Using that, and a lot of missing flesh from my hands, I was able to remove the drive and install the new one. Still I wondered how on earth they did this at the factory? Then by chance I tidied my office and found the original hardware manual for the machine. This revealed the secret latch which allows the whole drive bay to be dismantled and removed. Of course it is much easier that way, but there would be no way to identify the secret latch without the manual.


Windows 7 ran smoothly for a while, but then I ran into a very odd problem. Double clicking on certain system-ish folders gives the message "Access Denied". Now, I am the only user of the machine, and of course have Administrator privilege, so what is going on? I tried changing access rights, but of course since I didn't have access in the first place, that didn't work. Finally, some extensive googling found a way round this, which involves going into the deepest depths of "advanced options" in the security screen, and changing ownership of the parent directory. It's at times like this that Linux is so attractive - although the commands are arcane, it is always reasonably easy to figure out what is going on. With Windows, it's either easy or next-to-impossible. The dumbed-down user interfaces give you few alternatives when things are partly broken.


So now, my new system seems to be working fine, and does very nearly everything my old one did. (There are still a few things to reinstall). One mystery is a system-created "shortcut" (i.e. softlink) which points to itself. This confuses Explorer no end, but since I have no idea what the folder is for, I daren't delete it. I also still haven't managed to find the cache directory for IE8 - I've found one of them, but only some files show up there. That's another mystery.

Saturday, 9 January 2010

Divisumma 24

It's arrived! My circa 1960 Olivetti Divisumma 24 electromechanical calculator has arrived from Italy. It's in good condition although so far I haven't got it fully working.
First a little background. When I was about 17 (a long time ago!) I worked one summer at an advertising agency doing analysis of some surveys. For this I was equipped with a Divisumma 24. This was, for its time, an amazing machine. It could not only add and subtract, but also multiply and divide, for numbers up to 12 digits. It was very compact, unlike most such machines, and also a very nice piece of industrial design. It fascinated me, and I was especially intrigued as to how it worked. I wrote to Olivetti, and they kindly sent me a green booklet describing in complete detail how one of the simpler machines - just an adding/subtracting machine - worked. A while later I wrote to them again, thanking them profusely and practically begging them for information about the Divisumma. Obviously my letter went to someone else, because this time I got a reply more-or-less accusing me of stealing the book and asserting that Olivetti would never, ever, under any circumstances, give such information. So that was that.
I still have that little green book, and a few weeks ago I took it out of the bookcase and re-read it. I was as intrigued as ever about how the Divisumma worked. A lot has changed in 40 or so years - Olivetti no longer really exists, for one thing, and nobody has used mechanical calculators for three decades. So with Google's help I discovered this source for Olivetti manuals, and a great many others too. A few days later a parcel showed up with seven volumes of green-covered manuals, and I started reading. It's not that hard to understand how it works, but what is truly mind-boggling is that someone was able to design it. Even allowing that it was a process of evolution from simper machines, it is still extremely impressive. Unlike software, which has some structure to it, these are three-dimensional puzzles, where two completely unrelated functions that just happen to need to do something at the same time, can share the machinery. (For example, the mechanism that arranges double line-spacing for totals just happens to be in the right place to reset a lever that controls the way the registers engage for memory operations).
Of course reading these manuals just whetted my appetite again. A bit of searching showed someone in Italy who had one to sell. I paid about $150 for it, but of course the postage - even surface mail - nearly doubled that. And this week it arrived. The seller had done a super job of packaging, including a wooden framework to protect the machine inside the box. It was complete, apart from one minor knob on the keyboard, and the power cord. It even had a roll of yellowing paper.
I rigged up a power cord for it (don't tell the safety nannies about this) and plugged it in. Unfortunately, it didn't work - one of the keys was jammed, and the motor just ran without anything happening. Not really a surprise, but a bit of a disappointment. So then it was off with cover. That comes off surprisingly easy, no screws, just a couple of toggles.
The insides of the machine are in remarkably good condition. There was some fluff around the keyboard, but no rust or damage. All the metal parts seem to be cadmium plated, which means they look the same as the day they were assembled.

I need to say something about the manual, too. The Olivetti technical manuals are also works of art. Every tiny aspect of the machine's operation is described in great detail, with beautiful engineering drawings for every page showing the various levers, bridges, pins, racks, springs and so on - just those relevant to the current description. Once you've digested that, they also include complete instructions for assembling a machine from scratch. The numbering of the parts is consistent through the seven volumes, so once you read in chapter VIII (as befits an Italian product, much use is made or Roman numerals) that lever 73 is key to some particular function, whenever you see lever 73 later on, you know exactly what it does.

So with the help of the manual, I was able to figure out what was jammed, and unjam it. And the machine worked! Well, briefly. For about fifteen glorious minutes it would add, subtract, multiply, divide, and move numbers to and from the "memory" . Even the 30-year old ribbon worked, well enough to read anyway.
But then disaster struck. I started a divide, but instead of the usual kerchunk-kerchunk of the running machine there was just a faint hum, the horrifying noise of the stalled motor. I unplugged it and tried a few things, and eventually it unjammed. Phew! But then I realised things weren't working right, and when I looked, I realised that disaster had struck. Right in the very heart of the machine, a frame had got twisted so badly that it had let a metal rod fall out. This was a totally inaccessible place, without completely dismantling the machine. I was mortified. Just when things had been going so well (I had never really expected the machine to be working), and now, just so much scrap metal. I could almost have wept.
I studied the manuals again, and very carefully, removed the paper roller and associated bits and pieces, saving all the parts in little plastic bags. There was only one problem - a circlip which in the time-honored tradition flew across the room. Luckily I found it easily. That gave me access to the mechanism, from above. Then the real fun started. I found that I could just get a pair of tweezers between the individual elements of the register, and that way I could hold the rod in more or less the right place to insert it. But actually getting it into the holes at either side of the frame was another story. Let's just say it took a long time. Finally the trick was to hold everything in place with wire (actually green garden wire, which gave a certain rusticity to the whole operation). After several hours I had it back in place.
Very carefully I turned the machine over by hand. It seemed to work correctly. But then I discovered how delicate these machines really are. Just like an exceptionally old wine, which is wonderful when opened but undrinkable within ten minutes, so it seems that my early success with the Divisumma was not to last. Every operation revealed some new misalignment or jam, and when that was fixed, another one showed up.
There is really a lost trade and craft here. Back in the day when these machines were commonplace, every town had numerous little back-street workshops, where bent-backed mechanics in brown coats would pore over them when they jammed or refused to work. I'm sure it was a common occurrence. In the few weeks I was using the Divisumma all those years back, it jammed once and had to go for repairs. Probably every machine was in the shop every few weeks. "Oh yes," the brown-coated old guy would say, "looks like the returbitating cam has shifted again, just move it a bit and tighten up the unflurging spring while I'm at it..." and the machine would be as good as new... for a few more weeks.
Anyway, my Divisumma definitely needs some more tender loving care before it will be dividing again. It's a wonderful piece of engineering, and I'm very lucky to have it. It's certainly something to fill those long winter evenings!