Archive for the ‘Geekism’ Category

General Purpose Computers and Ropes

Sunday, May 2nd, 2010

In Foyles, I bought Digital Apollo, by David A. Mindell. It’s about the design of control systems, and in particular the interactions between astronauts, test pilots, designers and user interfaces. The astronauts at first wanted to be able to do everything manually. In the end, they accepted a lot of computer control, partly because they had some influence in the design of the systems. At least that’s what it seems like from the few bits I’ve read so far.

This is quite profound:

The digital autopilot also confirmed the decision to use a general-purpose computer in the first place and underscored the intimate links between systems engineering and digital computing. Engineers could move particular functions out of hardware devices and into computer programs, saving critical quantities of weight, money and hardware complexity. In one example, Shea nixed an expensive program to add a heat shield for the side of the command module facing the sun. With his knowlege of control systems and the digital autopilot, he simply suggested replacing the insulation with a software routine to keep the spacecraft rotating like a rotissarie, distributing the heat load around the craft. A few lines of computer code replaced a heavy mechanical structure.

The book also contains the astonishing (to me) revelation that computer programs were stored on core rope memory — where wires are threaded through ferrite donuts to represent a 1, or around to represent a 0. These ropes were threaded by hand by little old ladies, earning the ropes the nickname of LOL memory.

Temperament

Tuesday, April 27th, 2010

This is at once absolutely fascinating and terribly frustrating. I can understand what he is talking about, but I don’t think my ears are good enough to tell the difference.

Between different tuning temperaments, that is.

Some people obviously can tell, because people can sell guitars like these.

Hat tip to the person who runs the Neal Stephenson fan page on Facebook — he seems to know just what sort of articles Stephenson fans will enjoy.

Project Tuva

Wednesday, April 14th, 2010

Bill Gates went on vacation with a friend and visited a university library where they discovered Richard Feynman’s Messenger lectures on the laws of nature. They thought that everyone should see the lectures. Twenty years later, Gates has bought the rights and put the lectures on the Internet. This is Project Tuva.

It’s worth watching the introductory video in which Bill Gates enthuses about what makes Feynman such a good lecturer. The video player requires Silverlight, and has various extras such as pictures, links and text notes relating to various points in the lectures.

Thanks to zapopaul on YouTube who left a comment pointing to the project. Either I have been asleep or this should have been publicised more.

Blogging on the Train

Friday, April 2nd, 2010

I’m on the train from London to Manchester in first class with a table and power socket, and a 3G dongle plugged in to my laptop. It’s pretty amazing that I can do this at all, but let’s just say we don’t have ubiquitous wireless data *yet*.

It works — just. A lot of the time, including any time we go through a tunnel, the data disappears completely. AJAX web apps don’t always behave very well when this happens. Google Mail and Reader at least display useful error messages. Facebook often gets stuck and no amount of refreshing or clicking stop has any effect. Google Gears and similar should improve matters.

Quite often I have a green light, meaning GPRS. This is almost the same as having no connection at all.

When I have a blue light, meaning 3G, everything is pretty good. A blue light might last 3 or 4 minutes at a time if I’m lucky.

Part of the problem is the transitions between states. If you only load half the web page and have a bit of a glitch between cell towers, the whole web page fails and there is no alternative but to start again.

Obviously better data coverage will help. But I think what would be really useful is an alternative to TCP that is designed to cope with internittent connections.

I am impatient to live in a Vernor Vinge novel!

Chaos Defrost

Tuesday, March 23rd, 2010

I bought a microwave oven yesterday. Apparently they are useful for babies. Anyway, it has a button labeled “Chaos Defrost”. The user manual only says that this is for defrosting things. You can’t label a button “Chaos Defrost” and not explain the “Chaos” part! It’s too tantalising.

Thank goodness for the Internet. Apparently, random bursts of high-power microwaves will defrost more quickly and evenly than constant low power. I can imagine it has something to do with allowing heat to conduct between bursts. But that wouldn’t need chaos theory to explain it, and the randomness seems important. Unfortunately, the paper is behind a paywall.

Rainbows Begin

Saturday, March 13th, 2010

Michael Jennings used the term ‘unaugmented‘ to refer to the frightening prospect of leaving the house without an iPhone. I have an Android phone and know what he means. I usually use it to navigate to wherever I’m going.

In the novel Rainbows End, Vernor Vinge describes a near-future world in which people wear contact lenses that can overlay displays onto reality. This virtual-reality world that exists within and is composited onto the real-world is called augmented reality. In Rainbows End, people are in constant communication, receive information from all sorts of sources, and can choose between a variety of overlays on the real world that anyone can create for information or entertainment, including elaborate multiplayer games. Vinge also imagines the economic consequences of the technology. The world is awash with information and careers are built on selecting and filtering it. If you want information fast, money will buy the efforts of anyone and everyone, gathering and sifting anonymously on the network. Meanwhile, entertainment companies vie for the greatest audience shares and compete with school projects that involve creating multimedia augmented reality shared experience extravaganzas. Do you want your local high street themed like Middle-earth or Caprica?

There are a few bits of hardware that would make this sort of technology work particularly well: a wearable input device such as one that detects small finger movements or whispered voice commands for control; a wearable display such as glasses or contact lenses that can either emit an image or transmit light from the real world; and some apparatus for detecting where you are and where you are looking to some considerable accuracy.

But we are already starting to see applications that might be part of this Rainbows End future. Google Maps on a phone with GPS is a good start. Yelp adds the ability to find interesting things nearby, with user reviews and photos. Foursquare, Gowalla and BrightKite combine location with other social networking features and game aspects like rewards which can businesses can interact with. All of these are ways of gathering and sharing information, and they have open APIs that mean information can be combined in novel ways by third parties creating new applications, sometimes called mashups.

There are pure games, like Pac Manhattan, Zombies Run and ARhrrrr. There is even a real model helicopter that can fly in augmented reality.

Layar is particularly interesting. It overlays 3D graphics onto an image from the phone’s camera. It uses the phone’s GPS to know where you are, and the phone’s gyroscopes and compass to know where you’re looking. Pick from dozens of layers to overlay onto the real-world image. Mostly these are labels providing information about the real world so you can, for example, look through your phone and see nearby places that have Wikipedia articles or user reviews. Some layers put 3D objects into the real world for games, art or information.

A lot of these apps, web sites and services will come and go, but it’s starting to look very much like a large number of people in the tech industry have read Rainbows End and are setting out to make it come true.

Mobile Broadband

Tuesday, March 9th, 2010

I am trying out my new pay as you go O2 Mobile Broadband USB stick. After a few teething troubles (it turns out that a double blink of a green LED means there is no signal, and the steel framed building my flat is in is not good for mobile phone signals) it seems to work very well. On the train it is much better at coping with varying coverage than my T-Mobile G1 phone is. The phone seems to take a very long time to re-establish a connection when it is lost; the 3G modem is quick at this and happily switches between 3G, EDGE and GPRS without too much complaining.

I chose the O2 PAYG one because it has weekly and daily top-up options. I’m likely to be using it very irregularly. £2 for 500MB for a day seems fair enough when I want to check my mail while away, although it really is ridiculously expensive when you think about it, it’s better than paying £15 a month when months might go by without me using it at all.

Now it is time to get off the train. More later, perhaps.

Update: The USB modem only cost £20 and is a Huawei E160. It can do HSDPA but not the fastest 7.2Mbps speeds. But it seems fast enough. There doesn’t seem to be anything special abot these modems: they work on Macs and Linux without special software so there may be alternatives to the O2 Connection Manager software for Windows. And presumably netbooks that have integrated 3G and a SIM card slot can be made to work easily.

Mars

Friday, January 29th, 2010

A friend sent me a link to a story in the Times about Mars being in an interesting place. So I went out and took a thin photo.

moon_mars_close

Mars is definitely red.

This is how it looked on Google Sky Map on my phone. The great thing about this app is that it uses the phones GPS, accelerometer and compass to tell where you are pointing the phone. So you get an augmented reality labelled window onto the night sky.

DSC_3003

Sidewiki

Saturday, January 9th, 2010

Google Sidewiki allows anyone to annotate any web page. I think it’s been tried before, but this is Google. I first found out about it from a blog post by Frank O Dwyer, who points out that it will be very handy for commenting on blog posts on blogs where comments are suspected to be removed. Google are pitching it as a way for people to add useful information to web pages. That seems a good idea, too, especially when there is no other way to comment.

It could do with being a bit more feature-rich — threaded discussion doesn’t seem practical. Perhaps Google Sidewave would be a better idea.

Not everyone likes it. I don’t think I see a problem. It’s no different from a discussion forum where a new topic is created for every web page. It’s just that the interface is better.

Fixing My Dead Computer

Wednesday, January 6th, 2010

I took an extra day off at the start of the year to use up my annual leave and play computer games all day. I ended up spending half of the day trying to fix my PC which wouldn’t boot, and the other half playing the very well put-together Ratchet and Clank: A Crack In Time on the PS3.

What follows is a geeky but therapeutic (for me) account of how I fixed the problem with my PC over two days.

The problem: my BIOS settings had all disappeared, the keyboard wouldn’t work and Windows 7 wouldn’t boot. I don’t yet know how these two things are related.

I have no idea what is going on with the BIOS settings. Perhaps the motherboard is faulty. This has happened twice, and both times after hibernating, so I suspect there is some problem with that. I eventually found that unplugging and plugging the keyboard enough times in enough different USB sockets got the keyboard working and I could sort out my BIOS settings.

The next problem is that the disk booted to the GRUB rescue prompt. I still don’t understand why. My system disk is an Intel SSD, and I only once ever installed Linux on it when I first got it. After playing for a while I installed Windows 7 over the top. So perhaps Grub was not removed by Windows and the master boot record was corrupted leaving it the first thing to boot. I booted to an old Ubuntu live CD and used dd to look at the MBR. It contained the srting “GRUB” and nothing about Windows. Hmm.

I booted the Windows 7 DVD and tried the automatic “Startup Repair” option. It said that the partition table was missing and had fixed the problem, but it made no difference. So I tried the diskpart.exe tool using the rescue command prompt. This revealed only one big partition.

I was expecting more because I was using BitLocker to encrypt the drive. It’s possible Startup Repair doesn’t work with BitLocker and all I had achieved was creating a bogus partition table. I quickly gave up hope of fixing anything.

Enter the repair-bde.exe tool. This is a download from Microsoft but is also included on the Windows 7 DVD. It promised to be able to fix the BitLocker boot sector, but this failed with a cryptic error message about the meta-data not being aligned on a cluster boundary. I put this down to the dodgy partition table. The other thing repair-bde.exe can do is decrypt your data to another disk. Once I obtained a big enough disk, this seemed to work fine. I could now see all my files on the new disk.

Before restoring these files to my SSD, I wanted to check that Windows would boot from the disk I had restored my files to. The disk wouldn’t boot, so I used diskpart.exe to make the partition active and bootrec.exe /FixMbr and /FixBoot to make it bootable. This left me with a “BOOTMGR not present” message on boot. Booting to the Windows 7 DVD revealed a dialogue saying that problems had been detected and could automatically be fixed. But that didn’t work, so next time I tried the Startup Repair wizard again. Finally, “Starting Windows”!

Next I wanted to clone the recovered disk back to the SSD. Enter CloneZilla. Not only is it free as in speech and beer, it runs off a bootable CD, which is handy when you’re fixing PCs with broken system disks. And it is easy to use: its beginner mode is as simple as selecting source and destination disks.

Schoolboy error: the disk I’d recovered my files to was bigger than the SSD, so CloneZilla refused to clone the big one to the small one. Back into Windows 7, I thought I could use the Shrink Volume option in Disk Management to make the partition smaller. But it reported that the smallest size I could go to was 240GB — still bigger than the original disk. Aargh! Even defragmenting didn’t help, and in any case trying to shrink failed with the message, “parameter is incorrect”. The same happened when using diskpart.exe to shrink.

Then I found Parted Magic, another bootable ISO for managing partitions. This boots into a (very pretty) graphical interface that includes the GParted tool, which managed to resize my partition to 120GB with no fuss whatsoever. I have no idea why the Windows tools had to make such a song and dance about it.

Things were looking up. CloneZilla was still making a bit of a fuss, this time saying that the filesystem needed checking, probably because I had just resized it. It helpfully said that booting into Windows would solve this, and sure enough it did. Error messages that tell you how to solve the problem are always good.

The cloning took 12 minutes and then finally, mercifully, I was booting from my SSD once more. The last step was to re-grow the partition back to the full 160GB of the SSD using Disk Management, which was trivial.

Later when I am feeling braver, I will re-encrypt and perhaps try hibernating again to see if that will reproduce the problem. If the problem comes back randomly then a new motherboard may be needed. Hopefully not a new SSD though, diagnosing that sort of problem would be painful.

I will also be using my new hard disk and CloneZilla to take regular images of my system disk — I am newly converted to the idea that this is a useful thing to do.

To sum up, I was impressed with a lot of the tools I used. I was impressed that the Windows 7 rescue command prompt was so powerful. I was impressed that repair-bde.exe was included and worked so well. But mostly I was impressed with CloneZilla and Parted Magic: that two such mature and easy-to-use tools are freely available is a testament to the open source community.

Update: Re-BitLocker-ing the system disk was more urgent that I thought because Windows can’t automatically unlock other disks unless the system disk is encrypted. Because whereas Windows 7 reserves a small partition when it is installed, but the above process left me with one single partition on the system disk, the automatic BitLocker drive preparation failed. Each time I tried it, the reboot left me with the “BOOTMGR not present” message, and I had to run the startup repair wizard. The solution was to manually prepare the disk with the command bdehdcfg -target c: shrink .