Archive for the ‘Geekism’ Category

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 .

Rackspace Cloud Servers as a Web Server

Tuesday, December 15th, 2009

For a while I was finding my website slow. The host I was using, Powweb, often seemed slow at MySQL. Shopping around for new web hosts, I became aware of the concept of a virtual private server. It’s a virtual machine, many of which will be running on a computer in a rack somewhere. Unlike a traditional web host, you have complete control over your very own Linux box, but also complete responsibility for making it work.

After some surfing, I decided that Rackspace would be a fairly risk free way to try it out. They charge by the hour, so you can create a virtual machine, play with it, and destroy it afterwards at next to no cost. I’d heard of Rackspace from Robert Scoble, and they seem like a good company to deal with.

Using Rackspace
So I signed up for my account and had a ten minute wait before Rackspace phoned me up to verify I was a real person for billing purposes. Perhaps they are worried people will use their systems for fraud or spamming. In any case it was quick and the guy on the phone was helpful.

Next I created my server. The web interface makes it easy to create and destroy servers at will. You choose how much memory you want (this affects the price) and the operating system you want to use. I chose Ubuntu because I am familiar with it and 256MB of RAM because it was the cheapest option and it’s easy to upgrade if you find you need it. After a few minutes of building I had an IP address and I could log in.

Initial setup
The first thing to realise is that you are responsible for a server on the internet, so taking care of security is important. I found a handy guide and followed the recipe (or at least the bits of it I liked). It’s also important to keep the operating system up to date, a cron job can do this automatically but it’s probably worth keeping an eye on things to make sure all is going well. Somewhat reassuring is that the whole server can be backed up as a single image which is trivial to restore. Unlike a traditional web host where you have to back up your web files and MySQL database separately, this seems more straightforward.

With Ubuntu, installing the AMP bit of LAMP (Linux, Apache, MySQL, PHP) is easy with apt-get. Even phpMyAdmin is available as a package and works out of the box. I soon had my web server up and running and my Wordpress database transferred across. I spent a few days playing with webgen to update my ageing, hand-crafted HTML static web pages, and was eventually happy with the site.

DNS
The next thing was to point my domain name at my web server. DNS is something I only mess with once every few years, and at first I messed up by pointing the domain name directly at my server. robfisher.net worked but www.robfisher.net didn’t. That all the various DNS caches take *hours* to refresh doesn’t help. Eventually I figured out with a chat session to Rackspace support that I had to point my domain name at Rackspace’s DNS servers, and then configure those using a web control panel to point at my virtual server. This is really flexible as if I wanted to I could have many servers with different subdomains, or point many subdomains at just the one server.

Redirects
Another problem was that I wanted to ditch the www. part of my web address. On Powweb www.robfisher.net and robfisher.net were the same thing, but people had not linked to it consistently and Google results pointed to a mixture. So I learnt about 301 redirects and also used this technique to point to the web pages that had moved around as a result of my playing with webgen.

Memory
So everything was fine, but I noticed with Rackspace’s diagnostics that my server was swapping occasionally. In other words it was running low on memory. Now that’s not necessarily a problem, after all it’s Rackspace’s disk that’s getting worn out and they don’t charge for disk I/O. My website was still much quicker than it had been on Powweb. But I like things to work the way they should work, so I looked around for various ways to optimize memory usage. This is something of a black art but there are plenty of web tutorials. The change that made the most difference for me was tweaking StartServers, MinSpareServers, and MaxSpareServers (that site also taught me about vmstat). By running top and pressing shift and M I could see that each of about 10 Apache processes seemed to use up to 10% of available memory. My site is not so high traffic that this is anywhere near necessary, and reducing the number of processes reduced the memory usage to the point where I was not swapping at all. Wordpress pages also loaded noticably faster.

Email
Finally I noticed that I was not receiving notification emails from Wordpress. In my /var/log/mail.log file I could see, “Our system has detected an unusual amount of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 blocked.” On no! Had I been hacked?

It turns out this is a problem with cloud hosting. There are all kinds of rules to running a mail server properly, and it seems like hard work. All web addresses are on the Spamhaus PBL list by default, which is just a way of saying “I am an end user and not a mail server”. You can get your server removed from PBL, but I worried that if I didn’t maintain my mail server properly I would get on all kinds of blacklists and never get removed from them. Fortunately, it is possible to configure Postfix to send mail via another SMTP server, and it is possible to use Google Mail’s own SMTP server. For the volume of mail my web server will handle (notifications from PHP programs) this is perfect.

The verdict: it’s not for everyone but for now I am happy. I get to learn stuff about running a web server. Rackspace is the cheapest way to get a VPS that I found. The server itself is only $10 a month and because my site uses hardly any bandwidth my bandwidth charges are next to nothing. With Rackspace you pay for exactly what you use.

It’s about twice as expensive as Powweb was, but my server is now lightning fast compared to how it used to be, and I can play around with running whatever software I want on it.

Logging into it via SSH on my Android phone to check for OS updates and memory usage is extremely geeky fun.

Net Neutrality

Tuesday, October 20th, 2009

Net neutrality is about preventing people who run cables from A to B from charging different amounts to transmit different data. This is to solve the supposed problem of an ISP owned by Microsoft charging people more to download data from Apple, and situations like that.

Google and their friends have written an open letter to the Federal Communications Commission expressing their support for plans to “adopt rules that preserve an open Internet.”

Except in this case “adopt” means “enforce”, I think.

You see, I don’t *get* net neutrality. Google and friends want the Internet to be “an environment where consumers, not broadband providers, choose winners and losers”.

But by constraining broadband providers according to these rules, the government is subjugating them to satisfy the whims of others. Why does it make sense that Google and friends get freedom to freely enter into whatever contracts they want but ISPs don’t? It doesn’t.

Some commenters agree. Bone wrote:

Yeah, to heck with the companies that built the infrastructure bringing the internet to your house……….
If you regulate them too much, and they go under……….wait, they probably fall into that too big to fail category and the government will own the internet too.

Michael added:

Bone touched on exactly what I’ve been thinking. In early ‘08 I saw net neutrality as the “thing to do” to protect consumers. Recent events have caused me to re-evaluate my position. No matter who is in charge, government abuses its power. Given the opportunity our government will take control of the net in order to silence its opposition. The free market must be allowed to operate in order to assure an open internet. If an ISP behaves abusively they will lose customers to their competition.

Rajesh Shenoy agrees:

Isn’t this a little too utopian for comfort? By the same token, we could abolish toll highways too, or varying speeds according to broadband rate plan. It just isn’t very practical. There should always be differentiation towards those who are ready to pay more. *That* is freedom. *That* is a win for end consumers! I’d be very happy if broadband providers go net-neutral because of market pressures. But regulatory mandates? I’d say no.

I first heard about this when Adriana Lukas wrote about it back in 2006. She seemed to be in favour of net neutrality [Correction, I misunderstood and failed to read the bit where she wrote "net neutrality legislation is not the answer"]. The discussion on Samizdata wasn’t very informative because I think it was such a new issue back then.

I disagree on principle, because I don’t see how you can morally justify enforcing net neutrality rules.

I also happen to think that the problem of not having net neutrality won’t be such a problem. There will inevitably be choices for consumers and those who value neutrality more highly will pay more to get it. If that choice isn’t available it will either be because not enough people value it, or because some regulation is preventing new ISPs from entering the market, or preventing innovative workarounds to the problem. The solution to that is less regulation.

Frankly, if it gets bad enough, we can all put line of sight microwave links on the roofs of our houses.

Xtranormal

Tuesday, October 13th, 2009

Xtranormal is a website for making animated videos. Here’s one I made in about five minutes:

I’m sure there must be a use for this. Can I use it to make cutting political satire?

So far the best thing I’ve seen it used for is a two-part sketch about how clients treat graphic designers.

Pointless Fun With Technology

Monday, October 5th, 2009

Don't bother going cross-eyed!

Limits of Computation

Thursday, July 30th, 2009

Tim Worstall linked to an article about Moore’s Law and I ended up writing a somewhat rambling comment. The original article pointed out that it wasn’t so much technical limitations that would prove the end of Moore’s Law, but the high cost of manufacturing improved chips. Tim mentioned that an economic limit to Moore’s law would be if the cost of more powerful chips outweighed the benefits.

Now, I probably read too much science fiction, and too much Ray Kurzweil, but I’ve got some strong ideas about what the benefits of ever increasing computing power can be. For one thing, I think artificial intelligence is possible. I think the human brain is just a mechanism and that if we can learn enough about how it works we can replicate it. With enough computing power, we can write a program that works like a human brain and is intelligent and self-aware. Now that’s got immense benefits and will surely be worth immense cost.

Just imagine what you can do. For one thing, you can set your thinking machine to the task of inventing better thinking machines. Or inventing anything else you might like. Imagine a computer that can simulate 500 engineers working on designing a new aeroplane. Imagine one that can do it 1000 times faster than real-time. In a year you could have the output of 500 engineers working for 1000 years. That’s going to be a pretty good aeroplane. Everyone will be able to have their own personally designed aeroplane. It’s a bit of a silly example, but it shows how far off the limit to desire for more computing power might be.

The ability of AI to invent better AI could lead to an explosion in progress that Kurzweil describes as a the singularity. (I know Vernor Vinge invented the term but he uses it differently, to mean a point beyond which we can make no meaningful predictions of the future. But I think Kurzweil’s singularity is more interesting because I think we can imagine what we might like the outcome to be.)

Here’s the outcome I’d like: if we don’t have the ability already, we set our computer engineers to inventing Drexlerian nanotechnology: molecular manufacturing. Then we have them design tiny robots that live in our bodies and keep us healthy. The next step is to have the tiny robots interface with our brains and create a brain-machine interface so that we can, if we choose, experience virtual reality — a simulated universe of our own design. Ultimately we might not need bodies at all. Freed from physical limitations we can enjoy infinite wealth, each person a creator of universes. We can commune with our friends in Middle Earth casting spells one day and go parachuting on Jupiter the next.

I think that would be worth a lot of money. So let’s just say I don’t forsee any limit to the desire for more computing power or what people would be willing to pay for it.

But I have one worry, which Tim Worstall’s article alerted me to. What if the next generation of computers is too expensive to be worth building? How would we get to the (next+1)th generation? To double computing power, it might cost 100 times as much, and the things you can do with double the computing power might not be worth that. It would be like a flat spot, or minima, in the cost benefit curve that we would be stuck in forever.

Has this ever happened? I can’t quite think of a technological dead-end like it, but then it would by nature be an obscure technology that few would have heard of. Space flight, for example, could conceivably suffer from this problem. It might be possible to make a fortune mining the asteroids but if no-one can make money launching rockets into space it might never happen. In reality this doesn’t seem to happen: advances in space travel slowed down for a while, but then other technologies made it cheaper and now billionaires are building space-ships with only vague ideas about how to make money from it. In other words, if people want it to happen, it happens.

So while I can imagine advances in computing slowing down a lot if the economic conditions aren’t right, I can’t imagine them stopping for good. New technology in other areas will constantly change the game. And the fact that better computing makes the invention of better computing easier must be a pretty strong impetus to progress.