Wednesday, May 16, 2007

Special Inline Editing Is Tricky

Special Inline Editing Is Tricky

I like the new feature in Eclipse 3.3 where you can perform a rename refactoring directly in the editor window. It seems like the Eclipse folks are experimenting with a new level of user-interface quality. Yay them.
There's still one tweak I'd like to see them make with this IDE. The Home and End keys still operate in their typical way. That is pressing Home navigates to the start of the line and pressing End navigates to the end of the line. Given that we're working within the context of a rename refactoring, I'd love to see Home and End have a different role, navigating to the start and end of the bound box. If you don't want that feature, use Home+Home or End+End to break the special use of Home and End.

I'm realizing this is a complicated problem, and it's easy to get an IDE feature like this very wrong. In the meantime, I'll log my enhancement request and give them something to think about.

Sunday, May 13, 2007

Launchy's Rough Start

I work on three machines nowdays: I run Linux for my office workstation, a Macbook Pro for my work-assigned laptop and Windows XP for my home computer (the one I share with my wife.)

When I got my Macbook Pro, my friend David urged me to get QuickSilver. I was reluctant to use it at first, now I can't live without it. And the way that I know I can't live without it is that I miss it terribly on my WinXP workstation. The Quick Launch toolbar is irritating -- who wants to remember what the iTunes icon looks like, and who can figure it out with six other icons on the Quick Launch Toolbar that also look like some sort of circle?

With that, I gave Launchy a chance. Launchy sounds like it might be the more sedate and incredibly more useful cousin of Clippy, the Microsoft Office pest. Unfortunately, Launchy promising start faded quickly. I launched it with a comfortable and predictable ALT-space. I typed "fire" to see if it had already located Firefox, but nothing appeared. I pressed escape to remove Launchy from view, which it quickly did (without Clippy's typical get-on-a-bicyle-and-ride-away fanfare.) A few minutes later, I pressed ALT-space again to find Launchy, but couldn't find it. Tsk-tsk. I figured I had somehow closed it. It didn't appear in the system tray, so I relaunched Launchy. Alt-SPACE, no Launchy. So then I decided the kill the task using the Process tab of the Task Manager. I found Launchy.exe. There it was, using 0% CPU and 11MB of memory. I tried to end the process, but could not. Launchy would not die. So where was it? It turns out that Launchy was sitting behind all other windows. That is, once I minimized all other application windows, I found poor Launchy, stiff and unresponsive, like a dead bee you find in the corner of your bookcase, grasping onto its last command from its master: "fire".


Fig 1. Dead Launchy.

Poor Launchy.

Generally this would be enough for me to abandon Launchy, but I'll give it another try because I'm willing to give the Open Source community a little more leeway, and I really am that desperate for QuickSilver.
Update: I had to do more than log out to give Launchy a fresh start -- the machine froze during log out. Very bad! One three-finger-salute and a log in later, and Launchy seems to have found Firefox. It hasn't completely blown its second chance. Good for us both.

Friday, May 11, 2007

Next Business Trip

This trip to JavaOne has had me reconsider what I need to make business trips a little easier. I hope these items are not bulky; we shall see.

A small power cord with at least two outlets.
Let's face it, you're always out of power. Carrying an extra laptop battery can be bulky. What I'd really like is a grounded cable that has no more than a six inch cord. It doesn't need any more than two outlets, but three would be nice.

With a diggie such as that, it's easy to get someone let me plug in to an outlet they are already using, or even better, make friends by letting them share my outlet! And if there is nobody to make friends with, I can always charge my phone at the same time as I charge my laptop.

A quick search found this ultra retractable power cord. It only has one outlet, but that's easy to fix with an add-on. Here's a four-in-one splitter that's a little too bulky for my taste. Actually, they've got much more; I'm sure I'll find something I like.

A small wireless hub
I'd love a small wireless hub with one additional network port. This gives me mobility where this is none, or share a network cable already in use (that's what the additional port is for). The only problem is weight. Even if the hub is small and light, it'll almost certainly need a bulky transformer. (Because this is for travel, I have a very low threshold for bulk.)

Throw in an extra, 12" RJ45 cable while we're at it.

Disposable earplugs
I had these for JavaOne, and they turned into a lifesaver -- since all the hotels were booked, there was little flexibility in my choice of rooms, so I was given a room next to the elevator mechanics. Throw two dozen of these puppies into a zip-loc bag and you're a happy sleeper.

In fact, I'm going to buy these in bulk (a hundred, say) and have them pre-packaged for my next several trips.

Of course, these babies are great for flights. Note that noise canceling headphones are not on this list - I have yet to find one I like, and I have yet to find one that doesn't survive my rugged use.

Another item not on this list, but I would recommend is a nice eye mask.

Small headphones
You know, the iPod variety. Not bulky. Functional. But most important, cheap. Ones that I won't feel about if they break, because the lifetime of any set of headphones I own varies independently from the amount of money I spend on them.

Travel size toothpaste
It's not just because of the DHS regulations that I want to bring travel-size toothpaste. They're more compact, and their use tends to be exhausted at the conclusion of my trip. I find that travel size toothpaste tubes last about four days, five if I am conservative. It makes sense to bring two tubes per trip, just to prevent a trip to the pharmacy.

Plastic envelopes
I'm going to purchase three of them, each sized to hold 8 1/2 x 11 inch sheets, each of a different color. I'll keep one reserved for expense receipts, and the other two for anything else I can think of. I want plastic envelopes rather than paper ones because they'll last longer.

Zip-lock bags
These are great for collecting whatever additional material you find: collected business cards, bottles of fancy shampoo (for the wife, I swear!) - I'm sure there's more.

Carabeaner
Wow, I finally found a use for conference swag. Sometimes you get extra crap that you just don't want to carry, like Yet Another Brand New Knapsack. Adding a carabeaner to your collection means hooking one to another.

Packing Plan
  • Create a small set of multiple travel packages with two tubes of toothpaste, zip-lock bags, 24 earplugs, q-tips, and whatever else I need.
  • Print out a list of singleton items that I need to include on every trip -- include things like the carabeaner, headphones, hub and power cords./network cable, you name it.

Thoughts on Quick Access

The new Quick Access feature for Eclipse 3.3M7 (aka CMD-3) is pretty slick. But I think it's not quite right.

There are two changes I would make:
  • Content Assist command completion If I type "comme" and the only commands left are matching on the first part of the phrase "comment", I should be able to complete the rest of the phrase. I guess I'm not exactly looking for the CMD-space type of completion, but the Emacs-style TAB completion.
  • Command parameterization: I'd like to be able to supply parameters to my commands. For instance, I'd like to have a command for "Show View", which would require you to follow with a parameter specifying the view name, either by its extension's name or id. I realize that Eclipse doesn't expose the ids to the users, and this becomes a sort of power-user feature. I'd say this is also a bit like Emacs.
You can see this is a short distance from scripting (a la, as you would guess, Emacs), which is what I really want.

Man I need to review Eclipse Monkey.

Thursday, May 10, 2007

Cribbage is awesome again

I really enjoy Cribbage. I've done a little bit of reading about strategy and so on, but basically I just like to throw the cards down and make lots of noise. My particular favorite is a variant four-player Cribbage invented by Patrick Bunch.

Rules for Traditional Four-Player Cribbage
I'm going to assume you know how to play two-player Cribbage, but you don't know how to play four-player Cribbage. Unless otherwise specified, the rules are just like two-player cribbage.

There are two teams of two players each. Teammates sit across from each other. As with traditional Cribbage, one player is the dealer. The dealer shuffles, and the cards are cut by the player to the dealer's right. The dealer deals five cards (instead of six) to each player. Each player discards one card (instead of two) to the crib. This results in four cards for each player, and four cards for the crib.

The player to the dealer's left leads the first card, and play proceeds to the left. Play proceeds like traditional Cribbage.

Cards are then scored in this order: Left Pone, Dealer's Partner, Right Pone, Dealer, Crib.

Deal moves to the left. Play proceeds.

Four-Player Cribbage, PBunch Style
Patrick introduced this variant that we'd no longer play without: In the space after the deal and before the discard to the crib, each player takes a card from his hand, and passes it across the table to his partner. A player may not pick up the passed card until he has passed a card himself. After both teammates have passed cards to each other, they can look at what they got, and discard accordingly.

So take a moment and consider some of the benefits:
  1. Every player is given an extra opportunity to make his hand work.
  2. If your hand is weak, but you have a 5, 6, 7 or 8, you can give it to your partner. In fact, we've observed that a tendency to break apart pairs in a mediocre hand can more often result in an overall benefit.
  3. Partners who pass the same card to each other can pause to see who will dump their passed card to the crib, preventing a free pair to the opponent, or ensuring an easy pair (or fifteen) for themselves.
  4. You can learn a little bit of information about your partner's hand by what he passes you.
    • Mind you, this isn't Bridge, so there's only so much you can learn.
  5. Scores tend to be a little higher than traditional four-player Cribbage, so games go a little faster.
Zach's Double Cribbage
This is a variant of the PBunch rules. Each player gets six cards. They pass two to their partner. Now, instead of dumping a card to a crib, players dump one card into one crib, and another card into a second crib, owned by the pones! This eliminates most of the advantage for being the dealing team, and you can save good cards for yourself.

The order of scoring is Left Pone, Dealer's Partner, Right Pone, Dealer, Pone's Crib, Dealer's Crib.

I haven't played this variant, so I can't really tell you if it's any good, but it seems a little too crazy for me. My one thought is that this tends in slightly lower-scoring cribs, but there are more of them. We shall see.