Author Archives: Josh

CityLink eTags to be used for a reverse-toll

There’s a proposal to have Melbournians use their CityLink eTags for a reverse-toll on public transport by a economist-type guy from Melbourne Uni. I can just see homeless guys making a living by taking sackfuls of eTags around the city on trams while their owners are at work, to make the day’s commute in to work and back again net-free.

It’s an attempt to address the free rider problem of vehicular road use; he’s also proposed that the charging should be demand driven – so road tolls are higher in peak hour, and might be free in the middle of the night. But we have a crude version of this proposed roaduse charge already – it’s called fuel excise. Cars idling in traffic jams keep burning petrol, and thus their owners paying tax, as an added bonus, SUVs/4WDs burn a whole lot more of it. If you want to hike the charges up, I’m all in favour of, say, tripling the excise on fuel. That should make public transport more attractive – especially as there won’t be homeless guys with sacks!

Stupid fat USB drive

What is it with USB keys and ports? I’m pretty sure there’s a standard about the physical dimensions, yet there are plenty of computers my Stupidly Fat 256Mb Lexar JumpDrive won’t plug into (I’m looking at you, Compaq/HP) due to lack of clearance. I have to tote a cable around with me to ensure it plugs in.

In other news, some guy’s made a Lego USB JumpDrive 256 MB… although why you’d do that is beyond me.

Dr Watson bites arse

I had a program that was crashing at the customer site, but not in any way I could reproduce back at the office. I wasn’t able to load up a dev environment on the affected box, but someone had the bright suggestion of running Dr Watson (DrWtsn32.exe), and checking out the stack trace. As we all know, if you know your codebase well enough, you can almost explain a crash just by where it happened.

So I created an exe with debug symbols and optimizations removed, and waited for the crash. The DrWtsn32.log contained, amongst other things, the dump of the thread that caused the program crash:


*----> Stack Back Trace < ----*

FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0100F9E8 00438172 01010460 0100FBE0 0100FB00 00D85698 !<nosymbols> 
0100FAF4 0048DD45 01010460 0100FC54 0100FBFC 00D85698 !<nosymbols> 
0100FBEC 004C3DBE 0106D028 00000114 0100FC60 0100FC64 !<nosymbols> 
0100FC54 004C3C17 00D8AFC0 00000114 0100FD60 0100FD70 !<nosymbols> 
0100FCDC 004CBDE9 010101F0 00000110 0100FDE0 0100FD70 !<nosymbols> 
0100FD60 004C6FC5 010101F0 00000110 0100FE44 0100FDF0 !<nosymbols> 
0100FDE0 004B63BD 010101F0 00000110 0100FEEC 0100FF00 !<nosymbols> 
0100FE50 004B61B6 010101F0 00000110 0100FF7C 0100FF00 !<nosymbols> 
0100FEEC 004B5C9C 010101F0 00000110 00000001 000001FB !<nosymbols> 
0100FF7C 1020BFD2 00D84058 000001FB 00130178 00D85698 !<nosymbols> 
0100FFB4 77E8B2D8 00D85698 000001FB 00130178 00D85698 !beginthreadex 
0100FFEC 00000000 1020BF20 00D85698 00000000 00000008 kernel32!lstrcmpiW 

Which added nothing to my understanding of what went wrong, beyond it happened at some point after the thread started. Great. Did I mention I’d done a debug build – the kind with all the symbols compiled in? Anyway, I figured switching to the binary output (which I understand is like a unix core file) may provide further explaination.

The format of the binary output from Dr Watson is lost in the mists of time. I had to go to an NT4 server install CD (you have to love the pack-rats who keep the German Server version of NT4 ©1999!) to locate the two necessary files for working with the user.dmp file it generates. The files are DUMPCHK.EXE and DUMPEXAM.EXE.

Running DUMPCHK.EXE gives a little output

C:\...\RetailGateway>dumpchk user.dmp

Filename . . . . . . .user.dmp
Signature. . . . . . .USER
ValidDump. . . . . . .DUMP
MajorVersion . . . . .5
MinorVersion . . . . .0
DirectoryTableBase . .0x0000014c
PfnDataBase. . . . . .0x00000004
PsLoadedModuleList . .0x00000018
PsActiveProcessHead. .0x0000009a
MachineImageType . . .NumberProcessors . . .7528
BugCheckCode . . . . .0x00001f65
BugCheckParameter1 . .0x000000a0
BugCheckParameter2 . .0x00000040
BugCheckParameter3 . .0x00001ca8
BugCheckParameter4 . .0x00d6df65

ExceptionCode. . . . .0xc0000005
ExceptionFlags . . . .0x00000000
ExceptionAddress . . .0x0045b4a9
ExceptionParam#0 . .0x00000000
ExceptionParam#0 . .0x00000000

At which point I got this dialog: DUMPCHK barfs reading the user.dmp file from Dr Watson
“Oh well,” I thought, “I’ll just head on straight to examining the dump, rather that checking it.” Unfortunately, DUMPEXAM.EXE wasn’t on my side. All I got was:

C:\...\RetailGateway>dumpexam user.dmp
unsupported processor type

Which is useless. Which is the sum value of the binary dump from Dr Watson. And, in this case, all of the output from Dr Watson.

Play School dumps clock with Big hand, Little hand

Monday morning I discovered that Play School has dumped the clock with Big hand, Little hand. I was running late to work, and while Owen was being breastfed Play School came on, and I overheard the presenter reading out the time. No more Big hand on this, Little hand on that.

I remember that some kids got analogue clocks quickly when we learnt in grade 3, and others just didn’t get it. My dad has always said that digital clocks aren’t an appropriate way to measure time, especially in a wrist watch or wall clock – because that’s not the kind of time you’re interested in – 19:37 is actually half past seven, or maybe a bit after half past – the precision is false/meaningless precision.

Oh, and in case I’ve been misleading you, the hands are now called Long hand and Short hand; clearer to the kids because the hour hand, whilst shorter is also stubbier, which could make one think it was larger. And no longer in this day and age is shorthand as common as it once was, so the risk of confusion there is reduced. And in a subsequent viewing of Play School (I’ve been home sick – stupid baby), they were back to Big and Little, so perhaps the presenter misspoke.

Oh well, time marches on…


While we’re here, a little tip: time should only ever be stored and (inter-system) communicated in UTC. If you’re designing a database that has time fields, for The Love of Sweet Merciful God store the time as UTC, regardless of the hoops involved in adjusting to that time zone. Because, when it comes to query, and you’ve got to start allowing for the fact that when daylight savings ends there are two 02:17s – and one came before the other; in addition you have the difficulty of knowing if the time on the clock was wound forward/backwards correctly – Australia has so many states with different time zones, and a propensity to diddle around with when the changeovers are meant to happen. Whilst effective, it is not desirable to use the “solution” one company I worked for went for – shutting all the machinery down for an hour when the clocks rolled back (especially given this was at the peak of processing for the day, not some idle time – and I mean business processing, not running the computer centre!). And figuring out when something happened in one time zone, compared to another, is a nightmare if all you’re storing is localtime; but equally, getting comprehensible output is tough if you’re not storing localtime alongside UTC. Here endeth the lesson.


Thursday night I had a dream – no, stick with me, this is relevant and interesting. Anyway, for whatever reason I had to build an analogue-to-digital clock converter, out of Lego. Now, I know how I did it in the dream, and on reflection, it would have worked. As a hint, I used Lego Mindstorms (in the real world I don’t earn enough to own, or for that matter to have ever touched, Mindstorms).

How would you construct an analogue-to-digital clock converter out of Lego?

Binary Output

Last night Owen started experiencing the symptoms of his first cold, which prompts me to talk about communications with babies. Newborn babies have only one output mode: screaming. Communicating with the world is a somewhat limited experience when joy, fear and hunger are all exhibited using the same mode of operation. From observation, crying may mean:

  1. Please feed me.
  2. I need to burp.
  3. I’m cold.
  4. I’m tired, please put me to sleep.
  5. I wish my nappy to be changed.
  6. The { toy | valuable object | fragile object } that I can’t reach – give it to me. Now.
  7. No, not that one, the other one.
  8. I’m bored. Amuse me.
  9. Ow, that really hurts.
  10. Carry me / lift me up.
  11. Holy crap! Don’t let that happen again! Are you listening?

Often, context will allow distiction between these options. It’s like a computer system saying “Something went wrong.” I’ve seen computer systems, particularly embedded ones, behave in a similar way. Often through design. Like, if they give you one red / green LED, then you’ve got green – all is good, red – not so good. You might get away with blinking them, and maybe even combining them to form orange, but there’s only so far you can take that (“Hmm, 600ms blink rate – that must mean that ethernet port two has a receive failure – because a 650ms blink rate would mean RAM failure”). That BIOSes doing their Power On Self Test use the PC speaker to report error codes prior to the video system coming online, I think the maximum number of beeps you’d get out of that was eleven… better pay attention and count them out. And a lot of Common Object Model errors are along the lines of “COM didn’t work because something failed”.

Interestingly, often babies don’t care too much that you understand them. They’ll keep on with the output, secure in the knowledge that you’re doing everything you can to determine what it is that they’re trying to say. And servicing one system fault may merely unmask another – a wet nappy may be followed by the need for a feed.

Screeching may also mean:

  1. This is great fun.
  2. Ha! You found me!
  3. Look at that guy, he’s funny.
  4. Hello, toy. You’re red.

The point being, the obviously inferior nature of binary output means it’s replaced as soon as possible by something else. Talking, outputing to screen, COM+, whatever. Oh, except COM+.

Cathy and I want to increase the output vocabulary of our son by using Baby Sign Language, mainly as a way of avoiding the expected trantrums: apparently, kids can sign much earlier than they can talk – like, children of deaf parents are signing from six weeks of age. Most excellently, I got given a book on the subject for Christmas, and joy-of-joys it was Australian made, so rather than American Sign Language, it was filled with AUSLAN, meaning it will have some use as a language outside on family communication (6500 Aussies – my perceived use rate is higher, because I work on St Kilda Road – home of the Victorian College for the Deaf). I’m seeing some comprehension from him, but I’m yet to see him generate any signs. Having re-read the Wikipedia article on the subject, I’m going to try to sign with Cathy when he can see us. I’ll let you know how this little experiment turns out.

Elevator ‘close’ button

In the building where I’m currently working, I think I’ve found the first “close doors” button on an elevator that actually does something.

I might have come across one other elevator where the close button causes the doors to close. I’ve heard that it’s always put there, but not hooked up to anything – to provide psychological relief while waiting – to give the occupants a sense of control. Is this true, or are the door close alogorithms such that pressing the button normally has no effect?

I am not alone in considering the door close algolrithms. Apparently having a door close button that works is considered a feature by some lift manufacturers.

The User Interface on elevators is highly variable and most questionable.

And another thing: what’s this fascination with refurbishing elevators, with the shiny mirrors, the inlaid wood panelling, halogen downlights and computerised displays featuring today’s weather forecast – but an ongoing inability to tell which floor they’re on, nor operate in a manner that even the occupants of the elevator can tell is an efficient journey-planning mechanism?

Are elevators something that has preoccupied our readers’ attentions? Do they wish to rant?

Maintenance nightmare

Unmaintainable Plumbing - kids, don\'t use silicon sealant to hold plumbing in place
Houses need maintenance, it’s just a fact of life. Things wear out. But programmers are not alone in creating artifacts without thought for the subsequent fixing of the going wrong of things.

Take a look at this tap. This tap is copper, as you can tell by the oxidation. Inside it is a washer that, as a function of how many times it’s been opened and closed, now needs replacing. This is normally a simple matter of turning off the water supply to the house, unscrewing the tap body, popping out the old washer and slipping in a new one. But if the plumber or whomever followed in their footsteps decided to make things more watertight by the liberal application of silicon sealant, you’re in for some fun times digging it all out so as to be able to get a spanner onto the bastard of a thing.

The plumbing all through my spacious bathroom continues in a similar vein.

One of the shower taps can’t be removed with a spanner because it’s too deeply recessed into the wall. So deeply recessed that the tap had to be extended out so that the cover could screw on. But rather than extend the tap out via a pipe extension, the tap was extended out with a thread extension. So, joy of joys, I can’t change the cold water washer.

Part of the house maintenance was to install a Residual Current Device, a saftey switch. This protection extends to the spa bath’s pump, which is how we found out the pump has a leakage problem – switch the pump on, and the whole house is plunged into darkness. Should be a simple matter of locating the pump, determining where the unit has degregated, and replacing it. If, say, it was externally mounted. Which it isn’t. I believe it’s mounted under our bathtub, in the cavity between the tub and the wall. There is no way to access this area, not via a removable panel or anything of the ilk – the whole lot has been tiled in. Which tile should I remove to get to the unit? The left hand side or the right? No one knows. Naturally, there are no spare tiles to replace any that get broken in the search. For all I know, the pump may be under the floorboards, but the bathroom’s just about as far as you can get from the underhouse access trapdoor, and I haven’t gotten up the courage to go looking for it yet. If the pump’s not under there, I hope there is under-floor wiring that will give a hint as to the location of the pump – but I’m not holding my breath.

What home maintenance nightmares have you seen as a function of poor design?

Gosh-darned tabbed browsing

There’s one downside to tabbed browsing: double clicking the Close Tab button (on the right hand side of the tabs) closes two tabs. D’oh!

If you’ve ever fallen into that trap, try undo tab close.

Also, big improvement in Firefox 1.5: dragable tabs.