Twilter
It’s definitely not called twilter, but I was sick of my text editor and felt like putting my Engineering degree to some kind of use.

It’s definitely not called twilter, but I was sick of my text editor and felt like putting my Engineering degree to some kind of use.

The ECB has a website called Play-Cricket that stores results, fixtures and statistics for cricket clubs all over the UK. My club page can be found here.
Unfortunately, in their infinite wisdom, the site developers have included a fancy piece of javascript that directs people to an “upgrade” page if you’re not using a browser they have selected as appropriate. It is possible to get around this, however, by typing in the full address: http://morebath.play-cricket.com/home/home.asp.
I sent them an email in June last year detailing the problem and asking if they could get it fixed. I got a nice reply from their Helpdesk, but so far they haven’t done anything about it. I still get directed to an upgrade page if I navigate anywhere.
It’s 2008. There is almost no reason for doing this. I’m also on a Mac. Why are you telling me to upgrade to Internet Explorer or Netscape?
From: Daniel Marks
Sent: Mon 6/4/2007 10:37 AM
To: Play-Cricket Helpdesk
Subject: Browser supportPlease, please, please fix up (or preferably remove) the Client-side browser Check from the play-cricket website.
It’s 2007, most browsers are compatible, and it’s just a horrible way of limiting your audience to people who are using web browsers that you think will work properly.
My computer time is spent on either a Mac, or some kind of machine running Linux, and I use Opera.
You haven’t considered Opera in your script, so I get sent to a ridiculous ‘upgrade.htm’ page telling me to download the latest version of Internet Explorer or Netscape (Ha! How 1998!). Sites were doing this 10 years ago!
The silly thing is that if I go directly to a page I know about (ie, if I run Safari and then browse to my teams site, copy the address, and then paste it into Opera), it bypasses the script and everything works fine. How about just removing the script? I’m sure you’ll find that zero people (or very close to zero) have a problem viewing the site, especially if it has been designed correctly against suitable web standards (which, incidentally, it hasn’t [1], but things should still work fine).
The relevant script is this one:
// Client-side Browser Check
var agt = navigator.userAgent.toLowerCase();
var version = parseFloat(navigator.appVersion);
var is_ie = ((agt.indexOf("msie") != -1));
var is_ie3 = (is_ie && (version < 4));
var is_ie4 = (is_ie && (version == 4) && (agt.indexOf("msie 5")==-1) );
var is_ie4up = (is_ie && (version >= 4));
var is_ie5 = (is_ie && (version == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5 = (is_ie && (version == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_mac = (agt.indexOf("mac")!=-1);
var is_nav6up = (is_nav && (version >= 5));
var is_nav4_5up = (is_nav && (version >= 4.5));var is_ie4up = (is_ie && (version >= 4));
//alert("agent: "+agt+"\nversion: "+version+"\nis_ie: "+is_ie +"\nis_nav: "+is_nav+"\nis_mac: ">+is_mac+"\nis_nav4_5up: "+is_nav4_5up +"\nis_ie4up: "+is_ie4up+"\nis_ie5up: "+is_ie5up);
if ((!is_mac && is_ie4up) || (is_mac && is_ie5up) || (is_nav6up)) {
window.top.location = "/home/home.asp";
} else {
window.top.location = "/upgrade/upgrade.htm";
}You should be loading
/home/home.aspfor everyone!Cheers, Daniel.
That whole thing could just be replaced with window.top.location = "/home/home.asp";
Who knows, maybe one day..
A couple of days ago I signed up with Slicehost and so far I’ve been really impressed.
I’ve been using Linux for 6 or 7 years. During that time I’ve had websites hosted with a few different hosting companies, but until now I’d never had my own Linux machine (or at least slice of a machine) online somewhere that I could do anything with.
I’m going to start populating the machine soon with various websites (some moved from other hosting, a few sites Sherry and I have been working on, a webapp or two that I’m writing in Ruby on Rails), and it’s also going to be a bit of a testing ground for other development work I’m doing.
While setting everything up there were a couple of things I had to remind myself of, including working with Apache’s mod_rewrite module.
I have one domain where I own both the .com and .net. For various reasons I want to make it so that whatever people type in, they always end up at the same place. I also want the www added to the start of the domain if it’s ever missed out (I initially wanted it the other way but it looks better with the www).
This is what I was aiming for:
www.domain.net -> www.domain.net
domain.net -> www.domain.net
www.domain.com -> www.domain.net
domain.com -> www.domain.net
I got this to work by modifying my domain.net apache configuration file: /etc/apache2/sites-available/domain.net
First I setup some aliases:
ServerName domain.net
ServerAlias www.domain.net
ServerAlias domain.com
ServerAlias www.domain.com
Next I created the Rewrite rule
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.domain.net$ [NC]
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.net$1 [L,R=301]
After saving the file and restarting apache (sudo /etc/init.d/apache2 reload), everything was being directed to www.domain.net.
Too many online stores make it hard for me to spend my money. If I have to think too much, or if there is some kind of barrier between me and the “buy” button, I’m much more likely to just give up than I am to spend the money.
This morning I went to book tickets to see Ratatouille. Odeon have a reasonable website (infinitely better than their old one), and their online booking system is easy to use and lets me to choose the exact seats I want.
But just before I can click to give them my money I have to read this:

I have to work out what it says, and realise that if I don’t tick the boxes I’m going to get spammed with crap I don’t want or need.
If I’m spending money, I shouldn’t have to opt-out every time I buy tickets. It’s unnecessary. It’s frustrating. It means I’m less likely to use the online booking system in the future.
Recently I reinstalled Windows for a friend, and in the process copied his iTunes music between machines. I gave the laptop back, but when I got home I decided that I wanted to find an application that would let him copy all the music from his iPod to the fresh iTunes install.
It was on Windows, so he couldn’t use PodWorks. I eventually found an application that looked like it might do the job.
And then I got to the order page.

That was too much of a barrier.
The “Knowledgebase” didn’t help much either.
So in the end I just gave up (it didn’t take me very long to give up) and I decided not to bother buying a license, or indeed an application, for him.
So please, if you want my money, and if you’ve got me to the point where I’m about to hand it over, don’t make it hard for me to do so!
I finally got around to ordering a What the Folk! tshirt from our What the Folk! Spreadshirt Shop
Sherry and I ordered a couple of shirts from the UK version a few months ago so we could check out the quality (obviously we were more than happy with how that turned out). However, we didn’t get anything that I could personally wear, so finally I’m going to have something else to show off my geekiness!
I went for the FOTC in Binary/Binary Solo shirt.
It took me a while to get the back of the shirt sorted (mainly because I checked it about three billion times). It reads:

After the Binary to ASCII conversion we of course end up with:
01000110 – F
01101100 – l
01101001 – i
01100111 – g
01101000 – h
01110100 – t
01101111 – o
01100110 – f
01110100 – t
01101000 – h
01100101 – e
01000011 – C
01101111 – o
01101110 – n
01100011 – c
01101000 – h
01101111 – o
01110010 – r
01100100 – d
01110011 – s
When the shirt is delivered I might even upload some action shots.