Thanks for surfing with a better browser. Please consider changing your web browser.
February 22, 2005

uControl, DoubleCommand, key mapping, and Mac OS X 10.3.8

At work I plug a Microsoft ergonomic keyboard into my PowerBook (and an IBM three-button-and-scroll-wheel mouse, and a ViewSonic LCD display). The Microsoft keyboard has the Option and Command keys backwards from what my hands know from many years of conditioning on Apple keyboards.

For the sake of this post, there is nothing in the world more annoying than switching my control keys. In fact, I have whined about conflicting keystrokes before. uControl to the rescue -- it lets you remap keys to where they belong.

Unfortunately, the update to Mac OS X 10.3.8 last week introduced the first breakage I've ever suffered from an OS X upgrade -- it broke compatibility with uControl. BAD BAD BAD. I immediately checked for an update to uControl -- no joy. So I Googled for an alternative and found DoubleCommand.

DoubleCommand has the virtue of working with 10.3.8 which was critical for me last week. I might even slightly prefer its interface. But uControl can apply its key mapping differently to different keyboards. So when I'm plugged into the Microsoft keyboard at work, it swaps the Option and Command keys, but if I type at the PowerBook keyboard, the Option and Command keys stay where they're supposed to be. By contrast DoubleCommand has only one map which applies to both keyboards. So either the map is correct for the Microsoft keyboard or for the PowerBook keyboard but not both. I've had to toggle the keyboard map twice-a-day. DoubleCommand's interface is simple enough to make this just three clicks in the control panel, but twice-a-day is a pain.

Happily, I checked uControl again tonight to find an update released for 10.3.8. HOORAY! I'm back to uControl!

Posted 10:45 PM | Comments (0)
February 18, 2005

Python, Java, C++: One step forward, two steps back

This rant is a cleverly disguised thank-you note to bivio. I'm lucky to work for a company that prefers dynamic languages.

For one of our customers, I'm wrapping a C++ library with python. As a recovering java geek working in python is a step forward. But much of the work is actually in C++. Two steps back.

I've used many, many different languages starting with Apple BASIC and wandering through pascal, HyperTalk, Excel & Word macros, AppleScript, AutoLISP, DOS batch files (shudder), Turing, MacPerl, Tango, bash, TCL, Python, PHP, perl, Java, and JavaScript roughly in that order. (We'll just overlook the xml-ish languages like JSTL, Ant, and Jelly.)

Very few of those languages require an explicit compile step: Pascal, Turing, Java. Java was my first introduction to a build environment. Every other language I've used has been interpreted and dynamic. C++ introduces a whole new level of pain in the build step.

compile and build considered harmful

This is now my favorite sales pitch against compiled languages: the build process is a huge timesink which brings marginal value to the resulting software.

Working in C++ means working with make just as working in Java means working with ant. But people don't write their own Makefiles, they run a configure script. They don't write that either. That gem of a shell script is generated by a collection of things called autotools. autotools includes aclocal, autoheader, autommake, autoconf. autoconf is a shell script, the rest are perl scripts and the whole mess depends on a pile of m4 macros. All these C++ programs are depending on sh, and perl, and m4 for their assembly.

THAT'S WAY TOO MANY MOVING PARTS!! TOO MANY LAYERS OF CODE GENERATION!!

Here's a simple news-flash. Any sufficiently ambitious program in any language needs another program to build it. USE A DAMN PROGRAMMING LANGUAGE FOR YOUR BUILD! I suggest perl or python both of which are probably already installed on your computer.

Of course if you write your build in perl or python, you may get hooked. You might even decide to just write your program in perl or python and spare yourself the build problems altogether.

Aw, who am I kidding? What most of us are really writing is resumeware anyway and these days resumeware isn't written in perl nor python. (Oops. I probably wasn't supposed to tell. ;-)

*eric, the Java programmer, slips into a dream...

So now instead of this to build your Java project:

% ant -f my-build.xml build

You type this:

jython my-build.py build

Hmm... I wonder what maven would look like re-written in jython...

Posted 07:12 PM | Comments (0)
February 14, 2005

Comments are broken

Comments have been broken for months. Please email your comments to blog-comment@dobbse.net. Be sure to include the url of the post on which you're commenting. I enjoy when people politely disagree with me, or when they add something I didn't know. I also appreciate being corrected. What I don't appreciate is anything spam-like -- advertise on your own blog, not mine.

Why are my comments broken? A bit before Elliott was born someone launched what looked like a denial-of-service attack on my site via the Movable Type comments exploit. The comments all had links to nonexistent domains -- apparently random strings of characters. I changed the permissions on the comments cgi file and haven't had enough time to repair the damage.

I started to re-implement my comment moderation system so that the comments don't even get into Movable Type's database until I approve them. I have grown tired of deleting comment spam but it hasn't really been high enough volume to justify the extra software development until this DOS attack. Unfortunately for my blog, spending time with Elliott and Sarah is a lot more fun than hacking my new comment moderation system.

Someday I'll get the comments working again and maybe post something about the implementation.

Posted 09:57 AM | Comments (0) | TrackBack (0)
February 13, 2005

Life-changing technology

I've been a downhill skier for about thirty years. I don't often brag about it because I don't think I'm as good as I should be after so much time. My performance has been all the more disappointing having lived most of those thirty years only an hour or so away from world-class skiing. I don't really have much of an excuse.

Friday may have been the best ski day in my life. It is certainly the best day in a decade or more. A little background is in order. My ski boots are probably twenty years old. My skis are more recent -- maybe ten-year-old 203 cm Elans. For those of you who don't know, that's old-school. I'm way overdue for some new gear. On Friday I followed through on my new year's resolution to demo something more modern.

At Mary Jane, when you rent demos they let you change skis as many times as you like. I started with the K2 Crossfire, and the Volkl Supersport Five Star, and the Rossignol B2 Bandit before lunch. I took one more run on the B2 after lunch and switched to the K2 Recon. All of 'em were 181 or 182 cm long, except the Recons which were shorter -- 172 cm I think. Quite a change from the 203s I'm used to.

The short story is that shaped skis are going to change my life. I was a completely different skier. I'll have to try a few more models before I settle on my next pair of skis. But of the four I tried on Friday I'd definitely choose one of the K2s.

The K2 Crossfire was a fantastic place to start my day. I was beside myself with how much fun they were. On the groomed runs I was carving like a veteran snowboarder would. I didn't quite get to the point of laying my hands or shoulders on the snow through the turns, but I was pretty close. I don't think I've ever felt anything like it. Effortless carved turns. It was a thing of pure joy.

Then I took them in the bumps and found myself about twice as far down the hill before my legs started to burn. I couldn't believe I had just skied so far through the bumps without pausing to catch my breath or my balance. Nor could I believe how much more aggressively I was skiing. In my 203s I basically panic when I get going as fast as I was in the Crossfires. I start to loose control and sit back and brake with my poles and various other ugly displays. On the Crossfires, I was all over the bumps. I was skiing so much faster than I do in my 203s but never lost control. I only stopped for the sweet burn in my thighs. Pure joy.

The Supersport Five Stars were nowhere near as much fun for me. I couldn't ski fast enough for them. Even in the relatively modest crowd on Friday, it was too crowded to let those things loose. I did get one open run to let 'em fly. They were full of zoom! Really, really stable and very fast. But at slower speeds they were a lot like my 203s -- kinda sloppy on the groomed runs and too stiff in the bumps.

The Rossis were pretty much the opposite of the Volkls. They were too mushy to carve on the groomed runs, but quite fun in the bumps. I knew they weren't for me, though. Not after the tasty carving Crossfire.

It was the end of the day when I got into the K2 Recons. They were described as the sister ski to the Crossfire -- a little wider turning radius and probably better in the trees. I took a quick groomed run and then a long trip through the bumps. I was pretty exhausted from a full day of skiing and nevertheless had the best bump run I can remember.

"Any sufficiently advanced technology is indistinguishable from magic." On Friday I put on a different pair of skis and it completely transformed my skiing. I was finally skiing like someone who'd been doing it for thirty years. Magic.

Posted 11:09 PM | Comments (0) | TrackBack (0)