This blog has moved… Saturday, Sep 28 2013 

I have finally updated my website, and I am now hosting this blog myself at:


Wherefore Rejoice! Friday, Apr 8 2011 

Sarah and I were searching the Netflix instant queue on our XBox for “Exam” (great movie by the way) when we stumbled across the Netflix Example movies.

Check out the movie below:


It kind of feels like you are watching The Ring at first! Look out for the Netflix envelopes, moonwalk, never ending train and even some Shakespeare!

To replicate – fire up netflix on your device of the moment (even works on and search for Example. There are plenty instances of the same film (as a series of TV shows for example). Be sure to rate it 5 stars!


This is what happens when you let banks mark to model… Thursday, Aug 6 2009 

Expect google to fix this soon, but having been working on a lot of financial graphing applications lately, this made me smile:

KBC - Mark to Model

KBC - Mark to Model




WW2 Secrets – The Sound Channel Sunday, Jul 13 2008 

The History:

During World War II [1], American pilots were given hollow metal spheres to be used when their planes went down over water. The spheres, being rather heavy for their small size, didn’t exactly act as great flotation devices. So why were these pilots given chunks of metal? Well, they were told that if they dropped the sphere into the ocean, their current position could be worked out by allies in the region, and they would be rescued. However, as foreign intelligence was soon to find out, the spheres were just that – hollow metal spheres – no electronics, no radio equipment, no imbued magical properties. So was the military just playing with it’s pilots, or was there actually something to these spheres?

Well, some of the details are still kinda top secret, but with a little physics and an active imagination, it’s possible to work out how they were used. Arrgh! Scary! I just said the P word. Don’t worry, I’ll try to summarize things without delving to deep into the physics.

Simple Facts: The Ocean

  • The deeper you go, the colder it gets
  • The deeper you go, the higher the pressure

Simple Facts: Soundwaves

  • Sound travels in waves
  • These waves bend towards where the sound travels _slower_
  • Sound travels faster in warm temperatures than cold temperatures
  • Sound travels faster in high pressure than low pressure

Combining the facts:

Normally, the temperature difference of water is quite gradual as you go deeper; however, there is a zone (at around 500m) where the temperature change is quite rapid. Therefore, any soundwaves entering this area, will be bent down. Once you are past this zone, at around 1km deep, the pressure becomes the dominant effect, and sound will bend upwards.
So, if a sound originates in the sweet spot, between these two areas of bending, it gets trapped, and ends up travelling great distances. This is called the sound channel:

Sound Channel

Note, if a sound originates outside of this channel, it gets deflected somewhat, but doesn’t bend back enough to get trapped. Note also, that the lines here show the path of the wave, not the wave itself. View each line as a zoomed out version of the wave pictures above.

Keep your eye on the sphere:

So, the spheres that the pilots were dropping into the ocean were of a specific thickness that would be crushed by the ocean pressure at about 1km deep. This would cause a “ping” that could be detected by underwater microphones thousands of miles away. By triangulating the sound (kinda like how GPS works) the Navy was able to work out where the sphere was dropped and go rescue the pilot!

Implications – LOFAR:

I don’t believe it – I am about to recommend a Tom Clancy novel, The Hunt for Red October. Tom goes into details as to how the US Navy took this technology and used it to detect submarines that entered the sound channel. I’d totally recommend buying it here for those of you who have enjoyed reading this posting.

Implications – Nature:

It turns out that nature beat us to the punch. Whales have been using the sound channel for years to communicate with each other over long distance via Whale Song!



[1]Ralph Chatman (a technical editor for Clancy on Hunt for Red October) suggests that we didn’t know enough about the sound channel during World War II to have used it. Thanks Ralph for pointing this out. This goes somewhat counter to what Robert Muller suggests in his UC Berkley Course on Physics for Future Presidents; however, I am more interested in the physics rather than the history so I’ll leave it for you two to sort out who’s right 🙂

How Circuit City make their money… Wednesday, Jun 6 2007 

Inspired by this image I figured I should warn people about a scam at Circuit City.

The other day I wanted to connect my iPod to a pair of speakers I have that have a normal stereo mini jack. I was in Union Sq, so I thought I’d head on up to Circuit City – I managed to find what I was looking for – A Belkin 3.5mm audio cable. I then looked at the price tag – $21.99! Let me emphasize – this is a piece of wire with two little simple ubiquitous plugs on it! That’s almost an order of magnitude more than Belkin’s own price ($3.99) – or, as it turns out, Virgin Megastore’s price ($3.99) on the same block!

And yes, it’s the same item # – F8V203-06-APL.

Do not fall in love… Monday, Mar 26 2007 

A while back (a year or so ago), I was in a subway car in New York, and saw this brilliant replacement of the “Do not lean on door” sticker

  Do not fall in love

On Saturday night, I was on the subway with some friends who were visiting me in New York. We were talking about the silliness of all the signs in the subway, and I mentioned the above sticker, and low and behold one of my friends turns around and says “Like this one?” – Wow! It wasn’t the exact same one (the one above was on the left door, the one on Saturday was on the right door) but wow! For future reference, this sticker can be found on the L, in car 8165, on door R8.

For reference, the normal subway doors look like this:

Normal Subway Doors

Symantec virus definitions slow websites with javascript significantly Wednesday, Feb 14 2007 

The Skinny:

Anyone who has ever had to develop on a machine with a virus scanner than has “real time protection” knows the pain that it can cause. Have you ever had issues in Visual Studio where files are locked and don’t become unlocked till you restart your environment / iis / your machine? Well, in the majority of cases, it’s thanks to Symantec getting it’s grubby hands all over it.

Now Symantec are making things awkward from the other side – as a valentines day gift, Symantec have decided that they will now try to scan the content of javascript in an html document, with a badly implemented heuristic. This means that if anyone vists your website with Symantec installed, if you have a large chunk of javsacript it will pause for up to a minute while it tries to work out what the javascript is doing! This means a large portion of your client base could be seeing minute long delays as they are using your site.

Slightly more details:

It seems the key is the new statement. If your code has a lot (thousands) of new statements in a single block (e.g. pre loading rollover images / using your own custom objects to preload an array / drop down – typically done when you query a database in programming to populate some items for use by javascript) then Symantec will get it’s knickers in a twist.


imgArr[0] = new Image(“Aniceimage.jpg”);
imgArr[1] = new Image(“anotherimage.jpg”);

imgArr[2000] = new Image(“TheLastImage.gif”);

To show how ignorant they are, if you break it up into script blocks it works fine.


<script>imgArr[0] = new Image(“Aniceimage.jpg”);</script>
<script>imgArr[1] = new Image(“anotherimage.jpg”);</script>

<script>imgArr[2000] = new Image(“TheLastImage.gif”);</script>

 I’ve filed a complaint with Symantec – lets hope they take it seriously!

Popularity / Security Flaws Law Monday, Oct 2 2006 

I am sure you’ve all heard the constant “Windows is less secure than Linux / Mac” or “Internet Explorer is less secure than Firefox” flamewars going back and forth. These statements may be true – this post is not about them. It’s about what I like to call the Popularity / Security Flaw Law. Simply stated: The more popular a product is, the more likely security flaws will be found in the product.

Simple Reason: Certain types of hackers (I use this word in the hack into systems sense as opposed to hack together code) hack so that they can become “famous”. Whether that fame is amongst a “l33t” group of people who like to replace letters with numbers, or headlining an episode of 60 minutes, it all comes down to recognition. And what better way to be recognised that to infect as many systems as possible. How do you infect as many systems as possible? You target the most popular pieces of software.

Slightly longer reason: Here’s a gross simplification, but simplifications make things easier to explain sometimes – There are two major cultures of hackers out there, the “fame” hacker culture (where people hack to show off / be known / be destructive), and the “information” hacker culture (where people hack to find out information / for the challenge) . They have different heroes – the “fame” people love / envy people like Onel A. de Guzmán, while the information people look to people like Mitnik. Both people like to think they are very intelligent (and in most cases they are). However, the ones the general public / media seem to be most fearful of are the “fame” hackers who could take down entire internet economies / destroy personal computers.

Security is a complicated issue. It’s not just as simple as installing System X instead of System Y. There are a multitude of other issues, such as passwords, social engineering, physical security, user knowledge etc – Security is a process, not a product – just ask Bruce Schneier. However, the one thing that will always drive the “fame” hackers is popularity – they want to infect as many people as possible. The more uneducated users  that they can get to run their exploit, the better (or even educated users – as I am sure there was a few system admins out there that thought that the cute guy/girl from the sales team loved them). Windows and IE have a large neophyte user base – but they are moving (with people installing Firefox on their friend’s machines / recommending Macs to go with their IPods etc), and with it comes a wave of potential exploits.

My Suggesiton – People who lead the direction for Apple, Linux and Firefox should be taking security seriously now. Don’t rest on the “Oh that only happens to Windows users” – otherwise you’ll be stung like Firefox was today (how bad this really is, is yet to show itself). At the moment, I think Microsoft’s marketing agency is taking security the most seriously out of anyone – we’ll have to wait till Vista picks up before we know if the programmers are up to it 🙂

360 in a circle, 60 minutes and 60 seconds… What is so special about 60? Wednesday, Sep 20 2006 

So have you ever wondered why there are 360 degrees in a circle? Or why there are 60 minutes in an hour? or 60 seconds in a minute? Seems rather weird doesn’t it. Well, don’t worry – it’s not an evil conspiracy.

Simple Answer: Blame the Babylonians – they used the Sexagesimal system. Don’t get excited – it means that instead of using base 10 (as we do) they used base 60. You can read more about it on wikipedia.

Geek Answer: So the next question is, why 60? Well, 60 has a lot of advantages, especially before the day of calculators. The numbers 1-6 all divide nicely into it – therefore it’s easy to split a circle / hour / minute into fractions and get a whole number back (e.g. 1/4 hour is 15 minutes, and 1/6th of a circle is 60 degrees). Not only that, 10, 12, 15, 20 and 30 all go into it as well! All up, that means you get 12 factors (or easy fractions). That’s awesome. Just don’t ask them to divide by 7… (1/7 = 0.08:34:17:08:34:17: reoccuring)

Compare this to base 10, where you only get 4 (1,2,5,10) – even with 100 you only get 9 (1,2,4,5,10,20,25,50,100).

But why 60? Dustmop (below in comments) points out that farmers probably counted the days in the year long before they cared about algebra. Combined with the fact that 360 is very close to the 365 days in a year, probably lead to the number being used in a lot of primitive seasonal calculations. The Babylonians probably got the idea of using Base 60 from this even earlier origin. If there are ETs out there, I wonder what base they use for chopping up time (considering it’s unlikely that they have the same 365ish rotations per cycle around the sun) and circles (probably radians)?

Update 2009: There is a much more comprehensive explanation here:

Yes, I love technology – The key to developer productivity Thursday, Jul 13 2006 

One of the things I have learned in leading an IT department, is that developer productivity is directly proportional to the equipment that you give them. So instead of giving your CEO a new Dual – Dual Core machine with SCSI drives, think about who needs that power the most. Apart from the servers, the most expensive machines in our office are in the hands of developers – Dual 20″ wide screens, SCSI 15k drives, 4 gig ram, Extreme Edition Dual Cores, etc etc. Also, they have full control over those machines (no “you need to be an administrator to install this” here)

Why give them faster machines?

  • They need to run services locally (IIS, CMS, SQL Server etc etc) – these hog memory
  • They run all kinds of weird and wonderful applications
  • They need to compile large amounts of code, and fast
  • The quicker they can test a piece of code, the quicker they can fix it
  • If their machines are still responsive while performing a complex query, they can still do other things, as opposed to twiddling their thumbs. If that happens to be reading or all the better – keeping up with technology is what makes being a developer fun
  • They won’t get frustrated, leading them to leaving the “zone” / disrupting their “flow”
  • Occasionally, for fun, they play games – let them. It’s great for teamwork and communication. In fact, pretty much everyone here has Nintendo DS lites and we challenge each other during lunch time.

The key, to keeping costs down, is to get them desktop machines instead of laptops. Desktops? That’s so 90’s I hear you cry. But desktops provide a lot of good things:

  • You can leave them on all the time
  • They are much cheaper 
  • They are easy to backup (centralized)
  • They won’t be dropped
  • They won’t be stolen
  • They won’t be lost

What about working from home? Well, most developers have their own machines at home, and for the ones that don’t, we have a few loaner laptops. Instead of getting people to develop on their own machines / laptops, we get them to terminal into their machines at work (GoToMyPC / VPN & Terminal Services). This way they have all the files they need, and the performance on their desktop machines.

I also strongly recommend putting your dev machines on their own GB network, so that interacting with source control / other services is extremely fast.

If your developers are not complaining about going home to their slow machines, then I strongly advise getting them faster machines now!

Next Page »