| Never change your Timezones |
|
|
| 05:04pm 22/03/2007 |
| |
OK - a *lot* of technical computer nerd speak ranting to follow.
If you are in IT - it's probably quite interesting, and more than a little alarming. If you are not - it will be boring as bat poop.
OK - here we go.
First some background. Western Australia decided late last year to implement daylight savings for the first time in several decades. This would start on the 3rd December 2006 and run till the 25th March 2007, then from the last Sunday in October 2007 to the last Sunday in March 2008.
As this was only legislated on the 30th November, there was no time for Microsoft to correctly produce a patch for this change to it's operating systems - so we all had to make do and mend. Which we did - there are facilities in all the Microsoft O/S's to do this. Fair enough.
Microsoft finally got around to producing a 'proper' patch for this in late February this year. This patch is known as KB931836. More on this later.
Now, consider a .NET Framework 1.1 application, written prior to the country you live in having Daylight Savings. This may well be coded to send Date information to a Web Service (on a remote machine of course) - for some purpose - say storing your date of birth.
Now let's get technical. When your .NET Framework application sends said date data to the WebService - this is what happens:
1) Your date - that you think is the 15th November 1972 - is quite likely actually 15th November 1972 - 00:00:00.
2) Your date - to be transmitted over SOAP to the Web Service - is converted to UTC. This makes the transmitted data 14th Novemer 1972 - 16:00:00.
3) Your date is reassembled from UTC back to local time on the Web Server - making it 15th November 1972 - 00:00:00.
4) The Web Server then saves your happy date of birth back to the database, throwing away the silly 00:00:00 - making it 15th November 1972.
All looks great doesnt it. But think. This relies on Steps 2) and 3) using the same interpretation of your timezone. Now here's the rub. What if your client thinks there are 9 hours between your timezone and UTC. Hmm Now we have:
1) As before start with 15th November 1972. 2) Date converted to 14th November 1972 15:00:00 3) Date converted back to 14th November 1972 23:00:00 4) Date saved to the database as 14th November 1972.
OOPS. You are a day older. Save again and you are another day older. And another and another - each time you send the data back to the server you lose a day.
OMFG.
OK - picture your average large organisation. It 'patches' it's Web Servers at agreed intervals - in a heavily controlled manner - so it plans to apply KB931836 at a good moment - say some time in April. But Microsoft put this patch on it's update list on the 19th February. Any XP machine with 'Automatic Updates' set on will apply it then.
*repeatedly headdesks*
How much data could you damage do you think in the month or so between the 19th February and now.
I leave consideration of other Date/Time data and how it gets damaged to the reader.
*is not planning on getting any sleep any time soon* |
|
| |
|
Post |
| |
| Coincidences, and fate |
|
|
| 11:46am 28/02/2007 |
| |
I was, as one does, for some odd reason exploring my footprint on Google the other day. Don't ask me why (I can't clearly remember the reason). I just was.
Anyway I found quite by accident a posting announcing sadly the death of a very close online friend, fellow Everquest player and mentor of mine - Morrigu, or Meg in real life to us (Peg to her family). It saddened me a bit the memory - back then I felt quite close to her - but the thought passed as they do, and I moved on.
On Sunday night, I was playing Vanguard (a game chimera148 normally frequents and I witness), and another character PMed me. The character's name was Morrigu. I was *stunned*. I PMed this person back saying how spooky I felt seeing the name, and asking how she came accross it. The response surprised me even more.
Apparently this person had come accross Meg in Spain (where she was working to help set up a regional Accident and Emergency network), and had been following her's and mine online writings for some period. She'd come to like the milieu we talked about - and wanted to join in - but had heard that Meg had passed away. She'd got involved in online gaming, had slowly gathered together a collection of online friends, many of whom I had shared with Meg in the olden days, and adopted Meg's online character name as a kind of tribute. She'd looked for me at times over the intervening years on Everquest and other online games, but not seen me up till that day.
Anyhow, after conversing for a short while, I logged off and pondered long and hard about the strangeness and sadness of some things, and how different a person I was now to then. It made me resolve to change a few things - something which will hopefully come to pass over the next few months.
An interesting story - but it has an even odder post script. I was telling a friend of this interesting turn of events, and how it had made me pensive this morning and perhaps turned my mind a bit in ways in which I wont go in to now. I pondered as I spoke about the day the Meg had passed away, and I heard of it - but I couldn't remember the day - or the time.
R.I.P. Margaret Danforth, friend, confidante, mentor and beloved puppet master of Morrigu the Red Hand. Taken from us, sadly, 25th February, 2001.
Under the wide and starry sky Dig the grave and let me lie. Glad did I live and gladly die, And I laid me down with a will.
This be the verse you grave for me; "Here he lies where he longed to be, Home is the sailor, home from sea, And the hunter home from the hill."
|
|
| |
|
Post |
| |
| Where do all the Pools Go? |
|
|
| 08:00am 11/01/2007 |
| |
|
music: Radiohead: Hail to the Thief
|
Here's an interesting one for you.
Each morning for the last couple of years I have driven in to work. It's always between 6.30 and 7.30am ish.
On Beechboro Road, which runs North/South from near me towards the city, I invariably pass a couple of Swimming Pools. Not in gardens mind (it's all bush there), but on the backs of trucks. They are all headed the same way, North towards where I live. I'm only on that road for about 15 minutes.
Now I live in a fairly affluent suburb (31deg 47' 30.79" S, 115deg 58' 03.28" E if you are a Google Earth nut - it's the house on the corner), but it's not like every house has a pool. We dont, yet. And it's not that big a suburb either.
We are the only suburb that you would go up Beechboro Road with a pool for, so where are all the pools going? There must be hundreds, nay thousands of them all gathering somewhere, if my little 15 minute sample of traffic on that road is at all representative.
And therein lies the rub. Sampling, while apparently simple, can be a tricky thing.
Of course my sample 15 minutes between 6.30 and 7.30am is NOT representative. You see, a Swimming Pool on the back of a truck is not something that you can cart about any time of the day. In fact, in Peak Hours, they are BANNED from city roads. Also, installing em is pretty much an all day job, so you want to get started on it early. So - the pools all have to be in place, ready to install at their destination by 7.30am in the morning. This means my sample 15 minutes is probably only representative of that last period before 7.30, so there's probably only a handfull that move up the road in that period.
And what about my statement of 'invariably'. Now a Pool on the back of a truck is a bloody great thing, and your mind is hardly going to miss it, but does my mind *really* notice when I don't see one? It's early in the morning mind, so if nothing remarkable actually happens on the drive, would I even remember. I strongly suspect that I only remember that part of the journey when there *is* something remarkable like a swimming pool on it.
So there you go. Some points to think about on Sampling. More on this IT related to follow . . |
|
| |
|
Post |
| |
| Generating Alpha Keys |
|
|
| 08:26am 08/01/2007 |
| |
Here is an interesting little thing I had to do in an Ingres Stored Procedure a while ago.
Basically I had to generate an increasing Alpha key of limited size in Ingres Stored Procedure language, which is fairly limited in scope.
What I did was maintain an Integer Key (similar to what you would get from an IDENTITY column in SQL Server), then convert it to an Alphanumeric Key.
Given:
pv_alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /* Things to be used in your key */ pv_alphalength = length(pv_alphabet) /* For MODing */
Then a 2 character key would be:
pv_alphaKey = charextract(pv_alphabet,int4(pv_number/pv_alphalength) + 1) + charextract(pv_alphabet,mod(pv_number,pv_alphalength) + 1));
This works in generic form for any alphabet, and key length. |
|
| |
|
Post |
| |
| Tall Poppy Syndrome - and misunderstanding of motives |
|
|
| 11:17am 05/01/2007 |
| |
|
music: Nine Inch Nails: Pretty Hate Machine
|
An interesting discussion has been getting started at work this morning through email.
( Series of edited emails )
The debate will undoubtedly degenerate into name calling shortly.
We see these debates all too often in our industry, about Wintel/Mac, Windows/Linux, Open/Close Source etc. Hell I remember BSD/ATT arguments from years ago.
It seems to be quite a habit in our industry to assume that anyone who is not 'us' is somehow imperfect/bad/out to get us and that our 'camp' somehow has no faults at all.
I must admit I used to be part of it when I was younger, but now I'm pretty much tired of it all.
As Developers I am pretty sure we all want to do the best job we can do - this industry is brutal on slackers and they get weeded out pretty quick. Why cannot we accept that the majority of people in our industry that we don't deal with directly - even those in the big corporate giants - are actually driven and striving for the same goals that we are? |
|
| |
|
Post |
| |
| Happy New Year |
|
|
| 06:27pm 02/01/2007 |
| |
mood:  groggy music: Draconian - The Burning Halo
|
A bit belated, but Happy New Year everone :).
I had a pretty quiet XMas holiday, with the 10 days off marred a little by injuring my back (long and old story) assembling Megabloks castles for my boy on XMas Day.
I'll put piccies up shortly into the album (of the fun bits, not the dodgy back) when I've sorted out the good ones, and when chimera148 lets me anywhere the machine with the piccies on it.
*sighs at the lot of the Vanguard widower*
( Click here for obligatory resolution list )
As for the new year, I'm starting up with a second client over the next few weeks (Tourism WA), which will be an interesting diversion from TAFE WA, my main contract for all eternity it seems.
Other than that it's more of the same, though I will try harder to prevent anyone from getting the Cube until I fly over in December.
*is kidding really* |
|
| |
|
Post |
| |
| Big Nights Out |
|
|
| 07:22pm 18/12/2006 |
| |
mood:  exhausted
|
With XMas rapidly approaching, the chimera beast found it's social calendar getting quite full, and for once this weekend they got to actually both be in the same place at the same time.
Friday night, I had my work's XMas Pub Crawl (which I as usual organised). Pretty much more of the same for me. Though the folks on it swear they had an excellent time - I was a bit over it already and did a bit of a Cinderalla act early. Lesson Number 1: Don't organise two big functions on adjacent days.
Saturday night however both chimera148 and chimera245 had a magical calendar alignment together with a sleep over baby sitter. This allowed them to get gothed up and go out for a night of dancing, drinking and glum rock.
After a quick stint at the Castle where we unfortunately we didn't really get to see much of the Heavy XMas event organised by local band Deadlock, and a slightly longer warming up session at the Court Hotel, we finally moved on to our eventual destination - the club SIN.
It's your usual run of the mill alternative club, dark, dingy and loud, and filled with more corsetry than a Moulin Rouge dressing room. There we danced away several hours to a collection of favourites from all eras. Once again chimera148 proved she is the only one who really has what it takes in the attraction stakes by pulling a nice goth girl, which she kindly steered in the direction of my friend Nathan. Lesson Number 2: Dancing for 4 hours in badly broken in DM's will leave you with nasty blisters.
Highlights of the night included the Adultshop (no linky there for the minors) XMas party happening at the Court, scaring people off the dance floor when both my requests of Bauhaus' Lagartija Nick and Minsitry's NWO got played within half an hour of each other, getting mauled insanely by chimera148 to Nine Inch Nail's SIN [Yes dear the shirt will mend], and polishing off two Absinthe cocktails without falling over.
Unfortunately at the end of the night, my friend Brad's companion Fern got her drink spiked by an_unknown_creepy_dude_001 (most likely GBH - we await the test results). Thanks to some carefull shepherding and support by the boys nothing untoward happened - but it just goes to show - even in a place you know well you cannot always be safe. Lesson Number 3: [a serious one] Even in a place you know - watch your drinks.
Ho hum, a week to recover before the XMas festivities start. I wonder if these blisters will heal by then. |
|
| |
|
Post |
| |
| Puzzling |
|
|
| 10:55am 07/12/2006 |
| |
mood:  amused
|
As all those who actually know about this journal already know most likely, I am one of the victims of the whole Perplex City phenomenon.
This is an Alternate Reality Game oriented around various forms of Puzzling.
Before I got into PXC, I was interested in another fiendish set of Puzzles online which go under the general title of NotPron. I happened to click on a linkie today and saw that the site appeared to be intact, and made my way back up some of the levels.
These puzzles are a bit more techo than PXC (for us IT types), but are huge fun in a fairly masochistic sort of way. Well worth a look.
Beware when googling though (some of the puzzles require it), for there are alas extensive spoiler sites out there.
Finally, the following story tickled me pink on the BBC in a quiet moment this morning.
*sighs*, trust me to lower the tone to that level. |
|
| |
|
Read 2 - Post |
| |
| Everything has to start somewhere |
|
|
| 10:54am 28/11/2006 |
| |
mood:  intimidated
|
OK.
Time to get started. Hmm, this is hard.
You wouldn't believe that I baulk not at going into bat with some errant College Manager about adherence to good Database Design guidelines, but when it comes to setting up my own Blog I'm all at see.
So, in the usual style of the seasoned developper, the first thing I am going to do is ignore both the tutorial and the manual, and see how right royally I can bugger this up.
Everything is bound to be downhill from there :P |
|
| |
|
Post |
| |
| *awakens* |
|
|
| 05:58pm 13/11/2006 |
| |
Looks around sleepily, greeting the community |
|
| |
|
Post |
| |
|
|
|