Is the Network Timeout Dead?

Computers are quite good at waiting. My computer spends a substantial proportion of its day in an idle state waiting for me to do something. It also spends time waiting for network resources, and it makes me wait too.

When I go to a webpage or request something online the computer needs to download everything it needs from a server in the cloud. This might be hundreds of miles away, and the data might need to propagate through tens of separate machines before it gets here. This inevitably takes time, and computers deal with this by waiting. What if the item can’t be found, however? I don’t mean “the item isn’t on the server” but “we can’t even find the server – it’s not answering.” This is dealt with by waiting – but not waiting too long. If a response doesn’t come back after a certain amount of time then the computer decides that it isn’t going to come at all.

This all seems quite sensible. It’s difficult to detect the absence of something at the end of your wire except by seeing whether it responds or not. This decision is complicated by the latency in the network. So we have to set a threshold, i.e. a network timeout. If the server usually takes .5 seconds to respond, and we’ve waited for 3 seconds, then it probably isn’t going to answer.

“Connection timed out” error messages via your web browser of choice are annoying, but not infuriatingly so. There are more significant problems inherent in operating systems, however. If your computer uses a logon script to connect to shared network drives then subtle problems start to develop. Usually you’d log on in a few seconds, but now a blank screen appears for half a minute after clicking the “Enter” button.

A better solution would be helpful, but it doesn’t seem likely that there is one. The network timeout isn’t dead at all and isn’t going away anytime soon. All I have to do now is figure out how to decrease it…

Posted in Computing | Leave a comment

Misinformation on the Internet

Recently I’ve been writing code to produce a database of Alumni in the University’s Architecture Department where I work. Somewhat irritatingly the servers all run on IIS which required me to learn how to talk to SQL Server with ASP. The irritating part being that I’ve only just learnt how to talk to MySQL with PHP in order to make bits of this site work (like the diary).

During this process I’ve spent quite a while looking through the Microsoft documentation available on MSDN as well as searching the Internet. It’s laborious to search through documentation when so much is available just by firing up a search engine.

For my latest project at work I’ve had to rename photographs to match details in an Excel Spreadsheet. Since I already had Excel up-and-running, I decided to use Visual Basic for Applications to write a Macro to do the job. Although I’ve been programming in BASIC for years there’s lots of API calls to learn to make Excel do what you want it to.

In my youth I had never learnt the mysteries of escaping character strings. Now in many programming languages character strings are delimited using double quotes (“). Thus to store a string one could use a command like the following:

$poem = "Mary had a little lamb."

Now let’s see what happens if we store a more complicated string. I’m going to try: Mary had a little lamb, whose name was “Flossy.” Now let’s put that in the code:

$poem = "Mary had a little lamb, whose name was "Flossy.""

Now there’s a problem. The character string starts with the first set of quotes, and ends with the second set. So our string becomes “Mary had a little lamb, whose name was “, and the remaining characters cause an error.

So I fired up the Internet, and searched for “visual basic escape quotes.” I found several solutions along the following lines:

$poem = "Mary had a little lamb, whose name was " & Chr(34) & "Flossy." & Chr(34)

That is, instead of writing the quotes as part of the string, we join them in using their character code. A little guess work (and further searching) established the proper way of doing things:

$poem = "Mary had a little lamb, whose name was ""Flossy.""

I.e. you double each set of quotes.

I suppose the moral of the tale is not to trust everything you read on the Internet, but you knew that anyway. Perhaps it isn’t such a good substitute for buying decent programming books and downloading the proper specifications.

Posted in Uncategorized | 1 Response


I was amused to have finished migrating this blog over to WordPress to read this article on Coding Horror:

I’ve been thoroughly impressed with the community around WordPress, and the software itself is remarkably polished. That’s not to say that I haven’t run into a few egregious bugs in the 2.5 release, but on the whole, the experience has been good bordering on pleasant.

Or at least it was, until I noticed how much CPU time the PHP FastCGI process was using for modest little old

I’m not alone; just do a web search on WordPress CPU usage or WordPress Digg Effect and you’ll find page after page of horror stories, most (all?) of which are solved by the swift and judicious application of the WP-Cache plugins.

It’s not like this a new issue. Personally, I think it’s absolutely irresponsible that WP-Cache like functionality isn’t already built into WordPress. I would not even consider deploying WordPress anywhere without it. And yet, according to a recent podcast, Matt Mullenweg dismisses it out of hand and hand-wavingly alludes to vague TechCrunch server reconfigurations.

Oh well, I’ve installed the caching plugin and thus won’t get stroppy messages from my hosting company about server load. Hopefully.

I’ve finally managed to make the blog page look vaguely like the rest of the site, though this was a somewhat frustrating problem. Making changes to the theme isn’t anywhere near as easy as on Blogspot.

The hardest bit was dealing with my blogroll. This is auto generated by Bloglines, as I described a while ago. Annoyingly Bloglines spits out a bit of HTML with each link contained within a <div> element. I needed <li> elements as the sidebar is built as sets of bulletted lists. In the end I managed to do the conversion using XSL Transforms. They’re neat.

Posted in Uncategorized | Leave a comment

Further reading – Godwin’s Law

Having recently discussed the strategy of comparing one’s antagonist’s actions to those of the Nazis, I was amused to notice Dr Crippen referring to a similar technique:

Over the years, I have seen far too many women who have been raped. There will be others, patients of mine, who have not sought help from me and possibly, indeed, not sought help from anyone. I have also seen some women who have had bad obstetric experiences. Sometimes not anyone’s fault. Sometimes, sadly, there have been problems with unsympathetic doctors or midwives. I have seen patients who, as a result of their bad experiences, have developed post-natal depression. I have never had a patient compare their experience to rape. A bad obstetric experience is not rape, nor is it anything like it.

In this case women are comparing their poor birthing experiences to being raped. Admittedly giving birth can be traumatic if things go wrong. Medical staff often don’t have time to explain everything going on when they try to act in a crisis. I would suggest that nothing which occurs as part of the process of childbirth could ever be described using the term rape.

One of the commenters on the post described the practice via Godwin’s Law. The law states:

As a Usenet discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches one.

Clicking on the right link yields the correct name for the practice previously described:

Reductio ad Hitlerum is a modern fallacy in logic. Engaging in this fallacy is sometimes known as playing the Nazi card.

(via wikipedia)

Posted in Uncategorized | Leave a comment

Nazi Germany: an argument technique?

Comparisons to the holocaust seem rife today. Any attack on civil liberties is compared to the way the Nazis treated the Jews. Another example crops up today via the UK’s leading anti-vaccine site, JABS (no link love, search for it yourself).

The government is considering making vaccination compulsory for children as a way of improving the current low uptake of vaccines, including MMR. The low uptake is a problem; with vaccination rates below the level required for herd immunity measles outbreaks are starting to appear again. So what does JABS have to say about this?

Even raising the issue of compulsion is the thin end of the wedge. If vaccines are made mandatory before school age even with the most liberal of exemptions (i.e. parents allowed to opt out for whatever reason) then the genie will be out of the bottle and as the Americans have discovered, exemption conditions will be made increasingly more stringent until non-vaccinators find themselves treated not unlike the Jews in the early days of Hitler’s Germany.

(via Black Triangle, emphasis mine) (note that the comment was attributed to “Scotmum,” who may well not represent the official JABS point-of-view).

Admittedly your interpretation of this may depend on your personal viewpoint with regard to vaccination, but the commenter above seems somewhat morally bankrupt. I think that making comparisons between our democratic state and a system which arranged for the killing of six million innocent people is rather poor. If I were Jewish then I could see myself becoming quite cross. Kenneth Jacobson, of the Anti-Defamation League has this to say (admittedly about a different case):

From every side, I think the use of these kinds of holocaust analogies is counterproductive, disturbing, and offensive. People who use these kinds of arguments are trying to be deliberately provocative, knowing full well that the Holocaust is the epitome of evil in the world. But I think there’s a price to be paid, in terms of the offensive element for Holocaust survivors, and it also debases the currency of genocide. It trivializes what the Holocaust was about.

(via dot earth)

Posted in Uncategorized | 1 Response

Shopping Vacuum

Recently Cambridge saw the opening of a substantial extension to the Lion Yard shopping centre – the Grand Arcade. This development features 50 or so largish shopping units as shown in the floorplan.

I was somewhat amused to wander round the arcade soon after its opening and discover that many of the units were still unoccupied. Have the developers greatly overestimated the demand of retailers for more space in the city? Admittedly the arcade opened some months ahead of schedule, but there doesn’t appear to be much change, or indeed signs of opening of these vacant units. Still, I’m sure they’ll all fill up eventually.

On the far right of the ground floor plan you can see a road named “Petty Cury.” Sadly many of the shops there appear to be closing. Clinton Cards has gone – moved into the Grand Arcade. So has Warehouse. So has another girly clothes shop whose name escapes me. If the only shops in the Grand Arcade turn out to have moved from somewhere else then we haven’t gained anything.

I do hope the current shop vacuum in Cambridge starts to fill up. Only time will tell. Perhaps a Greggs Bakery might appear as a welcome change to the current overpriced pasty shops. Perhaps the stage is set for a return of Woolworth’s…?

Posted in Local | Leave a comment


I migrated this blog in early February – now we’ve reached early April and the comment spam has noticed me. Here’s hoping that WordPress comment spam features work better than Bloglines.

In alternative news, there’s an amusing tale at theDailyWTF referring to security at the Halifax.

Not too long ago, my HalifaxATM card got deactivated because I misentered the PIN number three times in a row. So, the next day, I went into the main bank branch to get some cash from a teller.

I headed to the counter with my card in hand and some ID in my pocket. I explained the situation and asked to withdraw a few hundred pounds to carry me over until a new PIN number arrived. After taking my ATM card, she handed me a slip and asked me to sign. I did that, and she then counted out the money and gave it to me. No questions asked.

I’ve thought before that Halifax customer service leaves a lot to be desired. Maybe this will spur me on to open an account somewhere else.

Posted in Computing | Leave a comment


Despite a long round trip, and waiting a million years for some DNS settings to propagate themselves correctly, I’ve managed to migrate the blog to here, which is nice.

Over the next few weeks there’ll be some formatting changes, as I start to build a website at


Posted in Uncategorized | Leave a comment


They tell me that the latest phenomenon to hit the internet today is a blook. An online book. Not sure why the word book gains an ‘l’ - to me that implies that the word “blog” should be an online bog, which can’t be true…

Nowadays you can go straight to Lulu and upload your blook. Anyone can download it and you can even charge to make money! Hurrah! All I need now is a book and somebody to buy it.

Perhaps the most exciting feature of Lulu is the option to publish your book. That’s right, for real, actual publishing. To me this seems like one of the most useful options. Suppose I’ve a massive pdf document and I can’t be bothered to read it online. If I print it i’ll end up with a right mess of pages falling apart. So instead I can upload it and order a printed copy, hardbound if I desire, and the rates aren’t insane.

For a while I’ve had plans to try and compile a modicum of Change Ringing theory into a text. My lack of knowledge implies a selection of contributors may need to be chosen, but it’s a relief to realise that the hard job of having the thing printed is actually quite a bit easier than anticipated.

The question now is whether anyone will want to spend £40 on a full-colour 500-page ringing textbook…

Posted in Uncategorized | Leave a comment

Blog Updates

The cheeky people at Blogger have been updating their engine, temporarily breaking the beast which is Windows Live Writer. No matter, a quick journey to the writer home page, a seamless install and we’re going again.

They do tell me that it’s possible to blog from MS Word these days, though I’m quite happy with the writer so haven’t really tried it out. I don’t like editing anything other than documents with word because I like the “Print View” mode far too much. Messing around with web pages has an unfortunate habit of switching things to other views, which is incredibly annoying when I later come to edit a document.

The updates at Blogger are quite interesting. When developing applications or libraries it’s usually reckoned that changing interfaces is a big no-no. You’re free to modify the implementation of your system as much as you like, but it must talk to the outside world in the same way. Add new functionality if you must, but most importantly remain backwards compatible!

Blogger hasn’t done this – they broke Windows Live Writer, and they also broke their own Word Toolbar, leaving just the simple message:

Note: Development on Blogger for Word has been discontinued, and is no longer available for download. We don’t have plans to update it for the new version of Blogger. If you feel strongly about the loss of this feature, though, please let us know via our Feature Suggestions form. The following article applies only if you are still on the old version of Blogger and have previously downloaded Blogger for Word.

They won’t have a problem, of course – they’re offering a service people want for free. Who cares about the raft of applications which depend on the way it works? Is this just another big company trampling on the little guy(s)?

Of course keeping “the way it works” the same restricts the range of upgrades you can offer to your service. The choice to upgrade is difficult. Is it really necessary? What are the implications? I’m sure the guys at Blogger thought long and hard about this, and no doubt the upgrade will prove useful if I ever figure out what it offers…

Posted in Uncategorized | Leave a comment


I’d just like to point out that Madeira Cake is very high on the list of greatest cakes known to humanity. It manages to be luxuriously moist, proving far better than many inferior sponge cakes which generally prove to be dry and crumbly.

It’s not quite up there with Mille-feuille, of course, which combines several of life’s finer pleasures - Puff pastry, icing, strawberry jam and cream.

Posted in Food | Leave a comment


The Question of the Week on B3ta at the moment is all about personal hygiene. It’s full of exciting stories about people who smell really bad.

Unfortunately this seems to have coincided with an eczema flare up, and the great sage that is Wikipedia is advising:

The first and primary recommendation is that people suffering from eczema shouldn’t use detergents of any kind unless absolutely necessary. Current medical thought is that people wash too much and that eczema sufferers should use cleansers only when water is not sufficient to remove dirt from skin.

Interestingly this seems to be serving me quite well. Cutting back on soap has spared me from spending the morning itching, a significant problem just a few days ago. The only problem now, though, is personal hygiene.

If you happen to be walking past me any time soon and I offend your nostrils, please tell me.

Posted in Uncategorized | Leave a comment

Linux – Is it the way forward?

I’ve spent most of today compiling packages aiming to produce a bootable version of Linux From Scratch. I’ve downloaded the source and compile it on the machine to produce a working Linux OS (hopefully).

It’s quite exciting, although I’m not sure how much I’m learning just by typing in commands from the book. Two early observations are:

  • Bash is really cool. For some reason I thought that DOS was quite good, but this takes the biscuit.
  • Regular expressions really aren’t. I’ve never seen something so confusing. One day, I suppose, I might get my head round the syntax.

Meanwhile I’m still compiling away. Unfortunately, I rather suspect that the experiment will end with nothing more exciting than a blinking cursor. Oh well, it beats doing work.

Posted in Computing | Leave a comment

Student Journalism

I enjoy reading student newspapers. Not only is there no real news in Cambridge worth writing about, but most of the writing is hilariously bad and over the top. I’ve seen plenty of apologies for erroneous and unbalanced reporting – most notably for an entire front-page spread in Varsity more recently. Most of the writing is, quite literally, intellectual masturbation; I am fairly sure there must be a competition to see which “journalist” can use the longest words in their articles.

Yet at the same time as deliberately obfuscating their meaning by hiding behind verbosity (look, I’m doing it too), they completely misjudge their audience. Yes you can use long words, but you’ve over-simplified most of the issues so much that they don’t make sense anymore.

I’m afraid that was a bit of a rant, but here’s a kernel of evidence to back it up. We turn to Varsity again, January 26th issue, page 6.


Binge drinking endemic in student culture

This is written by Rebecca Lester, “Investigations Editor,” who frankly doesn’t seem to be able to investigate her way out of a paper bag. I hadn’t realised Cambridge offered degrees in “stating the bleeding obvious.”

Here’s the best bit, right there in the first paragraph:

The average Cambridge student consumes 28.4 alcohol units a week, a CUSU/Varsity survey revealed last week. This equates to nine units a night, far exceeding the recommended daily allowance of two units a day for women and four for men.

Now last time I looked, there were seven days in a week. So 28.4 units per week works out at something more like 4.06 units a day. This seems a little closer to their recommended daily allowance. Perhaps everyone’s drinking exactly the right amount!

OK, I’m not that naive. But there is certainly something odd going on, their figures don’t make sense. Additional statistical gems include:

177 – bottles of vodka drunk by the average student over course of Cambridge career

Hmm, I’ve probably had 1 or 2, but 177 sounds like complete and utter tripe. I know several people who don’t like vodka at all. Does that mean some people are drinking 354 bottles? I suspect that 177 is the number you’d get if you totalled up the average student’s drinking and expressed it in “bottles of vodka” units. Although they don’t say how big the bottles are so it’s quite hard to check.

31% of students have injured themselves while drunk

Now I’ve certainly injured myself while drunk. I’ve even come back with the odd cut and graze. I’ve also injured myself while sober. I suspect 100% of students have done the same. I admit I’m probably nit-picking on this point, but the statistic in itself is meaningless. It’d be far more interesting to know how the rate of injuries varies with sobriety. Perhaps a study for our beer-goggles scientists?

The most amusing thing about this article, however, is it’s formulaic nature. There’s nothing really very new here. We know that students drink a little more than is healthy. They always have – Byron et al. used to drink themselves silly on wine. I’m really not convinced that this subject is worth a two-page “investigation.” It’s as if our “investigations editor” sat down for three minutes brainstorming and decided to write about the first thing that came into her head.

The article is ringed by an advertisement for Jesus College’s May Ball. Ah, the great Cambridge May Ball, what more blatant excuse for a solid night of drinking? That’s what a May Ball is for. Ethical reporting indeed – if they really cared about student drinking they wouldn’t advertise balls at all. They could have at least put the advert on another page!

Now admittedly this article is rather out of date. So what’s made me write about it now? Well, it’s the fact that this week’s TCS has done exactly the same thing.

The dominance of alcohol in much social activity is hard to ignore.

Well, quite. But I don’t care, probably since I’m drunk at the time.

Posted in Uncategorized | Leave a comment

My Software Needs

Now I’ve finally installed a release copy of an operating system, I have to go through the process of installing applications all over again. Here’s a few thoughts on how my software needs have changed.

In the olden days one of the first things on a new computer would have been Winzip. This application allows you to collect and compress files using the popular zip format. I haven’t installed Winzip for a while now, though.

The first thing that’s changed is that there’s no longer nearly as much need to compress data. There’s piles of space on my hard drive. If I want to transfer a big file I burn it onto a CD. The internet is now plenty fast enough to transfer most files in an uncompressed form.

Not only that, but nowadays I’ve no need of specialist software to unzip downloaded files. Windows will do it for me – and has done since Windows XP (I think – it may be earlier). I’m afraid it means I no longer need Winzip.

Compression isn’t dead, however. These days I make far more use of free software. This often comes in a compressed format, for example in RAR form or as a Tarball.

Acrobat Reader has stayed – and is even more useful. I now save my own documents in PDF format to transfer them around. Office 2007 lets me save directly into PDF, whereas before I had used a special printer driver.

The Internet has taken a larger part in my life as well. I transfer lots of data around via FTP and other techniques, using FileZilla. I first installed this only a year or so ago, but now find it indispensible. Putty comes in useful as a Telnet client. The more things I register for online, the more passwords I have. PINs lets me keep track of them all.

Perhaps the most obvious change is in the type of software I use. Now vast amounts come free from open-source developers as opposed to faceless corporations. One day I might even find enough time to improve them or make my own.

Posted in Uncategorized | Leave a comment

More tripe in the name of science

According to the Beeb:

Scientists believe they have worked out a formula to calculate how “beer goggles” affect a drinker’s vision.

The drink-fuelled phenomenon is said to transform supposedly “ugly” people into beauties – until the morning after.

There’s even an equation given on the site to calculate your “beer goggles effect.”

A formula rating of less than one means no effect. Between one and 50 the person you would normally find unattractive appears less “visually offensive”.

Non-appealing people become suddenly attractive between 51 and 100. At more than 100, someone not considered attractive looks like a super model.

Now I think that this sounds like utter tripe. So why on earth are researchers at Manchester University wasting time and energy on this sort of rubbish?

The research was commissioned by eyecare firm Bausch & Lomb PureVision.

Aha, all becomes clear.

Posted in Uncategorized | Leave a comment

Valentine’s Day – Paper Rose Links

Some links again, I’m afraid.

Instructions to fold the standard sort of paper rose are available here and here. It’s fairly pretty and doesn’t look impossible to make (admittedly I’ve not tried it yet due to lack of paper).

Scroll right to the bottom of this page and you’ll see that there are several different roses available. Those interested in the Kawasaki Rose can find a modified version with a stem here.

Finally there’s a totally different rose at this site.

Posted in Uncategorized | Leave a comment

The downside to being a beta tester…

Somewhat infuriatingly my Beta version of MS Office 2007 has died today. It expires on 1st February and refuses to do anything anymore. I’m allowed to look at my documents but not edit them.

Oh well, £100 spent at Amazon then…

Posted in Uncategorized | Leave a comment

Link clear out (79)

From Matt Cutts:

John Walker’s Strike Out idea: I usually stop reading a document after the first misspelling.

Read the whole Strike Out article.

Posted in Uncategorized | Leave a comment

Link clear out (78)

Here’s some posts on NHS Blog Doctor about the decline of the BBC. There’s a really good summary here, with some background information here and here.

Posted in Uncategorized | Leave a comment