Sunday, November 26, 2006


From Brad Appleton's great work on design patterns:

This is the Visitor object extending its hand saying "please accept me polymorphically." Then the visited object responds by invoking the proper visitTypeA method of the visitor, and passing itself as a parameter back to the visitor. This is the visited object extending its hand back to the visitor, shaking its hand, and saying "Yes, I polymorphically accept you; Now you may polymorphically operate upon me."
Most confusing pattern ever... I'm not sure I'm ready to polymorphically operate upon it yet. Gotta love that last anthropomorphically self-descriptive quote, though!

This chap builds a nice real-world-outside-coding analogy of the pattern; it seems much easier to grasp them via non-computing analogies (although that taxi company Visitor metaphor didn't help me at all), at least for a newcomer to patterns like myself.

Wednesday, November 15, 2006

Firefox 2... yeah?

Two things that might be helpful to note:
  • In linux, plugins are now stored on a per-user basis it seems, at ~/.mozilla/plugins.
  • The old backspace to go back in history (rather than by your last scroll - why the hell would I want that instead...?) behaviour can be restored by navigating to "about:config" in the location bar and changing the browser.backspace_action key's value from 1 to 0. Don't need to restart the browser after, either...
I have one major quarrel with it though - it crashes if I let it use SCIM, an input method installed on my system. Firefox seemed fine, although it was crashing on some pages (e.g. wink, a unix/windows screencasting utility), which prompted me to install the new major version... but I have to hack around it by telling it to use xim instead, which means I can't directly enter Chinese text, for example (which is something I do like to do occasionally...).

Sunday, November 05, 2006

that feels bette-NGGGHGHHH!!...

Poxy back muscle spasms! I went to bed last night, feeling fairly healthy, reading for a couple of hours with my arms protruding from the covers and almost freezing off. Upon wakening, I noticed to my chagrin that my lower back was throwing waves of tight pain up my spine and usually out my mouth as a loud grunt. Since then, I've spent the day trying to keep my head balanced directly atop my spinal column without leaning in any direction to try to stem the sequence of really unpleasant muscle spasms.
When they do hit, they arrive as a subtle twitch and rapidly rise in amplitude, becoming painful enough to elicit a yelp and arching my back completely before fading away. With concentration, I can sometimes react and scale the wave down to a lesser impact, but still enough to shake me brutally. The onset of a spasm can be triggered by an imbalance in my upper body weight - something as simple as raising one arm.
I've had exactly this problem before - maybe sitting on my ass most of the day isn't helping.