Thursday, 29 July 2010

Are We Gluing Coffee Pots? - and Lots of Randomness


My latest parcel of purchases from Greece arrived the other day. This consisted of:

Detective Novels - Two novels by Giannis Maris. He was Greece's answer to Agatha Christie, writing stories prolifically in the 50's, 60's and 70's. His detective is Captain Bekas.

An Audiobook - I've never ever listened to an audiobook, so this is an experiment. The book itself is apparently a classic of early 20th Century Greek literature.

An old Dictionary - This was published in 1969, and is a dictionary of the old formal Greek that was abolished in the 1970s. It might be useful for reading older non-fiction works, though to be honest I mainly got it because I like dictionaries.

The Greeklish Dictionary - This isn't actually a dictionary, but a rather strange book consisting of modern idiomatic Greek phrases literally translated into English. I managed to find some of them (including "Are we gluing coffee pots?") in dictionaries, though you really need to come across them in actual use to understand them properly. Others, such as "Shit high and gaze", I have no idea about.


I was up until 4am last night (or should I say this morning?). Not because I was busy looking up strange Greek phrases, but because I had discovered a random web site. Appropriately named random.org, it is a site that provides randomness. It's run by a computer scientist at Dublin University, and it's the ideal place to go if you want to roll dice, toss coins, pick cards, generate lottery tickets, or run prize draws or electronic gambling (depending on which authority regulates your business).

It all started in 1997, when Mads Haar connected a $10 radio to an old Sun computer and started playing static through it. The radio was deliberately not tuned to any station and had to be cheap because the more expensive models tend to filter out the static. Contrary to what Windows users might believe, computers aren't very good at being random, since they're designed to behave in a predictable manner. If you want your computer to run games where real money is involved (or strip poker), then the last thing you want is any kind of predictability.

These days, he's got six radios and much more powerful servers, and is able to generate the equivalent of 18,000 coin tosses a second. If you go onto his site, you get a million bits free, and a daily top-up of 200,000 bits (up to the million bit limit).

I got the site to shuffle a pack of cards for me. This used up 335 bits. Of course, I then had to do some calculations to work out the least number of bits you need to do such a shuffle. Wouldn't you? I came up with 226, and then spent more time when I should have been sleeping trying to work out what they're doing that uses 335. Actually, if you keep shuffling it uses different amounts - other shuffles produced 322 and 401.

It's only now that I've written all this down that I realise two things. One is how sad all of this makes me sound, and the other is why the reality of computer shuffling might not work like the theory. At which point I'll have to leave this fascinating tale. I've got a card shuffling program to write.

"We'll say them", as they say in Greek...

Monday, 26 July 2010

Chrome Surfers, Blue Teeth, and Document M of the Building Regulations

I don't know if any of you remember Mosaic. It was one of the first browsers, back in the days when the web was just starting. In the days when men were men and wrote web pages in raw html. Before applets, javascript and flash. People didn't used to say "the web", but "Mosaic", as in "I've put my home page up on Mosaic".

What things were like before Mosaic

Things have come along way since those pioneering days, less than twenty years ago. Mosaic was superceded by Netscape, and then by Firefox, which introduced us to the joys of tabbed browsing now copied by all of its competitors. And even though much of the web's content is still the same, i.e. text-based, it is surrounded by flashing whizzy graphics.

And things are getting flashier and whizzier. Over the last year or so, my favourite news websites have gone from simple, fast-loading pages to Flash City, with tickertape and ever more annoying adverts. It got to the stage where I was finding it tedious to use them because Firefox would take forever to render them, especially if I opened multiple tabs.

I decided it was time to try something different, so I downloaded google's Chrome browser. The difference was instantly noticeable. The same webpages now load much faster, and the browser rarely hangs. Chrome doesn't have as many features as Firefox, which is a good thing. The problem with software is that it gets more and more clunky and difficult to use as they add more and more features. Chrome is much newer, and so hasn't got to that stage. Yet.

I've only been using it for a few days, but so far it seems to work fine. It even has a porn mode, for anonymous browsing. I've not tried it, but I'm told that people who are married find it useful. For buying that surprise birthday present, obviously.

Now the web is back to being almost as fast as it was back in the old Mosaic days.

Still on the subject of new technology, I took Helena to get a bluetooth USB adapter the other day. She wanted to transfer photos from her mobile phone to her laptop. Argos were selling them at half-price, i.e. under a fiver, so we got one and tried it on my Ubuntu netbook.

Like the web, wireless communications have also come a long way since the first Marconi wireless networks.

Nowadays they can get all this on a USB stick.

As far as I'm concerned, bluetooth is Voodoo black-magic, but Helena knew what to do, and we managed to get a photo off my phone and onto the computer. "Now disable bluetooth on your phone, before anyone tries to get into it.", she advised. I was impressed by her security-conciousness. Apparently the children all use bluetooth to transfer pictures and music in the playground. And for malicious purposes too, it seems.

This is the photo. It was taken on a recent visit to a local restaurant.

Notice the position of the hedge

We were sitting outside, and Helena suddenly looked over at the carpark. "That's awful!", she exclaimed. I turned round and looked at the two disabled parking spaces. "There should be enough space for the driver's door to open fully. How else will someone in a wheelchair get out? That goes against Document M of the building regulations."

I've checked, and sure enough, Part M of the UK Building regulations states that there should be 200m of hatched out space on the driver's side of every disabled parking space. As well as 200m at the back. It's amazing what useless information gets into children's heads. She's not interested in a lot of the more "academic" school subjects like science or maths, which has led me to question how she plans to earn enough money to look after her dad in his old age. How much do building inspectors earn, I wonder?

Wednesday, 14 July 2010

Hypertension

The Story So Far...

During a routine medical check, they discovered that my blood pressure was too high. I pointed out that to the nurses they shouldn't have been squeezing my veins so hard with that thing they wrap round your arm and pump full of air, but they weren't convinced. They extracted some blood, which you might have thought would help ease the pressure, but it didn't do any good. Eventually they decided I should see a doctor.



At the Doctors


Doctor: Says nothing, but looks expectantly at his patient.

BOV: They say I've got to see you about my high blood pressure.

Doctor: checking his patient's blood pressure: Hmmm. 160/88.

BOV: Waits.

Doctor: Yes. Yes. Well, that is rather high. Why is that?

BOV: You're the doctor.

Doctor: Yes. Yes. Hmmm. It was okay in 1998.

BOV: They say that I'm drinking too much and that I'm not getting enough exercise.

Doctor: What do you drink?

BOV: Alcohol.

Doctor: No, I mean, beer?

BOV: Beer, wine whisky, anything really.

Doctor: Anything you can get your hands on?

BOV: No, I didn't mean... I'm not an alcoholic.

Doctor: Hmm.

BOV: Look. I'm worried that I'm on the verge of death. I'm sure I'm about to have a heart attack.

Doctor: Yes. Yes. I can see that you are.

BOV: Clutches his chest and stops breathing.

Doctor: I mean, I can see that you're worried. You needn't be, you know. Clicks on the computer. Your risk profile isn't that high. Though they're underestimating your blood pressure. Clicks again. Is there any history of heart disease in your family?

BOV: They all died of heart attacks in their 50s.

Doctor: Oh dear. Yes, that's not good. It raises your risk by 50%. Clicks again. Yes. Yes. Here, you see? You've got about a 15% chance of having a heart attack in the next ten years.

BOV: 15 Percent??? That's the same as a turn of Russian roulette!


Doctor: I'm not sure what a bullet in your brain does to your risk profile. Clicks. Well, cut down on your drinking and come back in three months. If it's still too high we'll give you a pill.


So, I've swapped the demon drink for sparkling water laced with lemon juice. My body is responding to the lack of alcohol by making my sleep patterns even worse than usual. However, I'm still alive, which is something, and instead of worrying about my heart I'm now trying to find out what an overdose of citric acid does to you.