Archive for the ‘Musings’ Category

Of Patterns, Probabilities and Palindromes

Monday, January 26th, 2009

We discovered an interesting little problem last week. Interesting, that is, if you enjoy Maths a little more than is healthy. I was interested because what seemed to be a random problem when it should have been consistent, turned out just to be a random problem.

So here is what was happening. Our Sitewatcher was randomly showing a few sites returning 404 (page not found) errors. This was curious, because it was requesting the home page, and this page was certainly not missing. As it happens, there is a tiny weeny glitch with a couple of sites in that they will return a 404 code on the home page if the number 404 features in the query-string. This doesn’t happen in normal circumstances, but as cache:false was being used with jQuery, it was appending a random number to the request.

So here is the question. What is the probability of the number 404 occurring in a random 10 digit sequence? Not so trivial. Particularly because the number is itself is a palindrome. It can overlap itself, causing the number to appear as often as 4 times, making the calculation a little tricky.

We reckoned, by rough estimations, for it to be 1 in ~125, but no doubt a serious mathematician can enlighten us.

5 short iPhone stories

Thursday, November 27th, 2008

Not original, but here are 5 short stories revolving around my iPhone. This isn’t meant as an iPhone glorifying article, but a collection of examples illustrating the cleverness of such devices.

I was up in London catching up with friends and enjoying the Great British Beer Festival, which was good fun. Happened upon Facebook, and started chatting to a friend I’d met over the summer, while climbing Kilimanjaro. Ended up going for sushi together the next day, had a marvellous time. Funny how things turn out.

I was at a friends house party, things were still warming up, and the guy with the tunes hadn’t turned up. Instead of faffing with laptops and playlists, we just fired up the Last.fm app, picked an artist and started a radio station. Not high quality, but plenty good enough and dead easy.

As server admin at Headscape, it’s sometimes my unfortunate responsibility to tend to a poorly server out of hours, particularly if it’s a production box. Often, a system restart is all that’s required, but this means firing up a remote desktop connection. Handily, I can VPN to work and remote onto a box, even over 3G. VPN on the iPhone is surprisingly easy.

Recently while in Brighton, we decided on going to the cinema. Flixter movies does an excellent job at finding cinema times of nearby cinemas (and providing trailers – could you ask for more?). Then by hitting the map location, find route -> by bus, we had all the info at our finger tips. Google took care of making sure we got to the cinema in time, and clued us all up on the busses home again.

While at Future of Web Apps earlier this year, I joined the rest of the email-addicted crowd, inseparable from work. Handy for my boss. However, the power was in using pdaNet / Netshare to have access on my MacBook in the evenings. One must question the wisdom of replying to urgent requests at 1am after rinsing a free bar, but it all worked out.

I’m not obscessed with my iPhone, I don’t need it or cry when the battery dies. Its just a nice little gadget. I do however compulsively check the app store for the latest new toy, and am regularly impressed with what I find. It seems it’s still new enough for developers to be excited / inspired / payed generously to build for.

5 reasons not to choose

Tuesday, November 11th, 2008

I’m a .NET developer, that’s my job. I work with Windows Vista, it’s convenient for building .NET applications. At home I have a MacBook, and use OSX 10.5 (Leopard). Why do I do this? It’s not just because of software or compatibility, even though these are good reasons, they just don’t make for interesting reading.

1. Ignorance hurts only ourselves

Because although we all have our preferences, ignorance hurts only ourselves. As convenient as it would be for the whole world to switch to a single perfect OS, or at least the best available, it just ain’t practical, or sensible.

2. Opportunity

Clever chaps who can still program in assembly languages are never short on jobs, if anything their prospects increase as their skills become rarer. Large companies with an existing code-base often can’t afford the time or resource to rewrite systems from scratch to keep up with the latest trends in programming.

While Vista tends to frustrate me, so does Leopard from time to time. We learn to deal with it. If I decided, as so many do, to pick an OS and announce that all others confound me, I’d be limiting my career, my skills, and my friends.

3. Versatility

I’m in 2 minds over this one. On the one hand consistency helps us work faster, on the other hand versatility keeps our brains ready for change. And change is good. I rarely have a problem with Ctrl+C / Cmd+C, or with the location of close window buttons, my brain seems to happily switch contexts. Most people work hard to carve patterns and routines into their minds, and resist change like the devil. Change necessary, it is good to learn to deal with it.

4. Competition

Everyone knows competition is good, it drives business. As long as I don’t directly work with either Microsoft or Apple, I can happily encourage the use of both. While building GetSignOff we found competing products inspired us, and spurred us on to build a greater product.

5. Make friends & Alienate people

I love being able to talk knowledagbly with Mac fans and Windows fans alike, despite often being accused by both sides as a traitor. Making friends is great, and ridiculous comparisson based arguments are fun, being a regular on both sides of the game makes life more interesting. And life just ain’t worth it if it ain’t interesting.

What does everyone else think? I’m not the only one, why do other people? Other than, ‘I have to’, of course.