Monthly Archives: March 2006

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!

DVD layer changes

What is it with DVD authoring that the production houses can’t put the layer changes somewhere sensible, like preferably between scenes where there’s no sound? Looking through Michaeldvd.com.au’s reviews, they note a variety of stupidly placed layer changes:

  • The Princess Bride — The layer change is at 49:58 – it is not a good layer change, because it interrupts the score, but it only lasts a moment. The R1 Special Edition has a far better layer change – it’s inside a silent black frame after Westley is knocked unconscious.
  • O Brother, Where Art Thou? — The pause is a little jarring and noticeable
  • Virus — This is during a natural fade to black, but it is still quite noticeable due to the interruption to the music.

With TV series on DVD, most authors do the sensible thing and put the layer change between the episodes. But sometimes, evidently from pure laziness, they just let it fall elsewhere.

  • The Office — For some reason, the layer change does not occur between Episodes 3 and 4 (as I would have expected) but about 3:57 into Episode 4 (Title 4, Chapter 1).
  • Some Mothers Do ‘Ave ‘Em volume 2 — This is an RSDL disc, and once again the DVD authors have inexplicably put the layer change within one of the episodes instead of between them.
  • Empires-Peter & Paul and the Christian Revolution — This disc is RSDL-formatted, with the layer change occurring at 2:30 in Episode II – a crazy and infuriating place to put it when it could have more easily and logically been placed in between the two episodes.

Given it’s a well-known drawback of dual layer DVDs, surely it’s not that hard to put the change somewhere where it won’t be noticed. Crap layer changes really destroy the atmosphere of a movie or TV show, and show up a big flaw in what otherwise is a very satisfying and popular domestic playback medium.

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.

A buncha quick stuff

EFF highlights an Australian House Standing Committee report on the US DMCA, and whether or not it should be adopted wholesale by Australia under the Free Trade Agreement.

Meanwhile there’s an open letter to the OFLC about the banning in Australia of the grafitti video game Getting Up: Contents Under Pressure. (Mind you, Metacritic only gives it a 73/100 on XBox; 70 on PS2).

OPML 2.0 is out. Let’s hope it doesn’t break OPML 1 like RSS 2 broke RSS 0.9?

The Age on the retro games boom.

Pah, this sucks. After 64 years in Swanston Street, the Technical Bookshop in Melbourne has moved out to the boondocks of LaTrobe Street near Queen Street.

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?