Bicycling and Coding

JBoss hired some new guy who's off adding new methods to a Java interface in a point release of their product. This is because they had no generic expansion point to add information ("meta-data" as it's called) to the existing implementation. Pretty much every coder knows that in an incremental release of a product, you don't change your Java interfaces because any change can break existing customer code.

I pointed out some months ago that adding a generic meta-data interface is a good idea, but maybe I just confused all of them by pointing out that you could also more efficiently internally represent and consolidate the flags in a bit fields. For example, many desktop computers are 32 bit, and you could have 32 attributes represented in a single byte, which turns out to be 32 more space efficient than using a byte per attribute, though a bit harder to code for. So, in my mind my suggestion was a "two-for-one deal", as my friend Kevin Steffa likes to say.

Good design is like this: You have to know what to put in, but most importantly know what to leave out. And this brings me into my talk about cycling.

I was at Perfect Wheels a few months back and a friend (customer?) of Larry's was in and I was in my bicycle. He was intrigued by the Ritchey Break-Away on the wall, and I helpfully offered to let him ride mine. The one on the wall was geared as a fixed gear and mine as a 10×2 speed. He said, I assume jokingly, that gears "confused his mind" and implied that my (in my view) minimal road bicycle was somehow overly elaborate.

I didn't have a strong rebuttal. I got his point.

My old friend Mike Bloch once talked about, on some hike so many years ago, how certain members of Swiss army rode bicycles that didn't have gears. I was rather incredulous and couldn't imagine why the country of the "Swiss Army Knife" wouldn't have a military that would issue bicycles with gearing to climb up mountain passes. Having ridden a fixed gear myself up some fairly steep hills, I understand now that it's quite possible, and not as arduous as it sounds, and additionally for those in the army would be a fair bit more dependable, with less moving parts and a stronger chain. People on the front lines don't want their chain to break or fall of. (I still don't know if his story was entirely true or an urban legend.)

As to computer parts: Most keyboards have dozens of keys even a hacker like me don't need or use: Hackers now can have their own minimalist 60-key keyboard, one with no letter markings. I would get one, except I use a laptop not a desktop computer. The cheapest keyboards, ironically, have the most buttons. For $3 online you get 109 keys with web browser navigation buttons or "media" keys, though I imagine most people with them don't ever use them. The aforementioned blank keyboard retails for $267.53.

And to bring this discussion back to the JBoss coder: He didn't intuitively understand that the existing meta-data functions and new ones were related, so he didn't see any purpose in generalizing. His approach was along the lines of extending a 109-key keyboard by adding new keys. My suggest approach was trying to design features under the 60-key paradigm, by suggesting along the lines of "Leave the existing keyboard alone and add new features with a specialized device." The analogy doesn't fit perfectly but maybe many non-coders who design things can see the difference.

Read and post comments | Send to a friend

About eliasross

Blogging before the word "blog" was invented.
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s