So I get this email from some nice person at the University of Cape Town, South Africa – appearently another Dean Peters with a similar gmail addresss submitted a resume for a tutoring position.
Wanting to soften the blow of the now disappointed teacher once eager to the real (and published) Dean Peters, I decided to offer up some humor about how the ‘D’ mile commute may be a bit to costly. However to pull this off, I needed to calculate the value of ‘D’ — the distance between Cary, N.C., USA and Cape Town, ZA.
Now I’m not going to speculate which came first, nor who ‘borrowed’ from whom, though I must say I’m amazed at the similarities between the two. In fact, when I saved-off the code between the <script/> tags, then ran a UnxUtil named diff, I found the only difference occured at lines 466 where one version rounded off the results using the Math.floor method, and the other didn’t. Fancy that!
So what’s the point, besides not being able to sleep because of the stress of my new job? With some work, I think the ‘global’ script in question could be easily expanded to include the simple calculation of (km / 750) to also provide the user with estimated time between the distances.
In other words, a good tenet of ‘Defensive Design‘ is: when possible, automatically calculate values for the users instead of making them do it for themselves, e.g. 17.05 (let the reader understand).
Especially when said user is busy trying to calculate the time and distances traveled for a summer mission trip. No, I’m not going to South Africa … though I wouldn’t mind — but I figued some of you other good folks out there may be planning a trip abroad and could use the info.