Sunday, 5 September 2010

View from the Sofa


This weekend has been lazier than most - I have hardly moved from my sofa, except for trips to the kitchen to top up on lemon infused soda water, and of course to go to bed.

I'm not ill, and nor have I broken any bones. After a busy week at work and without any childcare duties (Helena stayed at home as she wasn't feeling well), it's great to spend a couple of days doing very little.

However much rest the body gets, the mind refuses to remain inactive, so here's a list of the exciting things I've been up to. For completeness, I've also added the unexciting ones as well. I'll leave you to decide which are which.

Reading a book

I'm currently half-way through Robert Canigel's biography of the early-twentieth century Indian mathematician Ramanujan. Ramanujan had little formal mathemtatical training, and failed to get through college, mainly because they wouldn't let him drop all the subjects that didn't interest him (i.e. all the ones that weren't maths). Whilst pretending to work as a clerk (he spent most of his day working on his maths research) he wrote letters to various eminent British mathematicians, since none of the ones he knew in India could understand any of his theories. One of the Brits, G H Hardy, replied and ultimately Ramanujan came over here to study and work at Cambridge. Never in the best of health, and terribly homesick, he got ill and died at the age of 32, leaving a huge number of theories which no-one understands how he came up with, and becoming one of the most famous mathetmicians and geniuses ever.

Solving all the Sudokus

Someone in the pub showed me a newspaper article about the world's hardest Sudoku puzzle. He thought I might want to have a go at solving it. He was a little surprised when I told him that I'd go off and write a computer program to do it. After all, sudokus are soulless computer generated puzzles, unlike crosswords, and are best dealt with by technology rather than pencil and paper. Another regular in the pub loves solving them, but he had to admit defeat on this one, which I think justifies my approach.

There are plenty of programs out there to solve Sudokus, but I wanted to write my own. It only took a few hours to write, and it solved the puzzle so quickly that I've not been able to measure its speed (less than 5 milliseconds, even on my netbook). Of course, it doesn't just solve that one, but any of them. Though if that puzzle really is the hardest anyone's come up with, it just goes to show what a waste of time they are.

Running my Life from my Netbook

One problem with living on the sofa is that I'm out of reach of my computer. So I've been using the netbook that I bought the last time I was in the US. I'm not finding it too hard to type on the undersized keyboard, and I've set things up so that I can log into my desktop computer to copy files and read my email (I won't bore you with why I want to do the latter). One thing I do find, though, is that it's easy to hit the mousepad whilst typing, which isn't always ideal.

The US keyboard layout is a bit annoying as well, especially when programming. Quite a few of the symbols are in different places. I could just use a UK layout, but that gets confusing if you look down at the keys at all. I have a similar problem with my desktop, since I now have a Greek keyboard which mainly uses the US layout as well.

Looking for Regular Expression Jokes

Regular Expressions are a way of specifying patterns for searching things, mainly in text. I was sure that there must be plenty of jokes based on them, but I couldn't find any. Probably I didn't manage to use the correct regexp. Still as always, xkcd had something just as good.


Falling Asleep

I started watching the next Bond film - You Only Live Twice. Either it was boring, or I was tired, or both, but I didn't manage to stay awake to the end, so I'll have to watch the last half again to find out what happens. No doubt he saves the world. I wonder whether I'll manage to watch the remaining 17.

Getting Out More

Having read all of the above, or even just looking at the pictures, you're probably thinking "He really needs to get out more". And you're probably right. So, whilst this isn't strictly speaking a sofa-based activity, I might just make it to the pub this evening, to give a splendid finale to a wonderfully restful weekend.

I hope your weekend wasn't too hectic either.