The Bunch of Grapes
A Blog in the Liberty of the Savoy
Sunday, August 31, 2003
11:46 AM
Once in a while we like to have a sausage bbq at work. The guy who always grilled 'em left a while ago. I volunteered for the job. Grilling sausage is easy, right?

Right. But after it was done, I tossed the coals into the dumpster and - hee hee - it seems that can start a fire. The fire truck came to put it out. I will never, ever live this down at work. I am a very stupid person.
Thursday, August 28, 2003
3:34 PM
I got an account with mailblocks.com today, mostly because they seem to be implementing a spam-blocking challenge/response system almost exactly the way I imagined it should work.

Embarassing story, actually: a few months ago I got really excited when I "thought up the idea" for challenge-response systems like this for spam blocking. (Including the idea of having throw-away accounts for dealing with amazon.com and the like.) I have since been forced to conclude that (a) I didn't think of it first, dumb-ass, and (b) I wasn't paying much attention to what was going on in these areas. I guess I can get some solace from at least "independently" inventing this idea. (Although I had heard about the little self-contained quick Turing tests that lies at the heart of the system, and it could be argued that the whole idea is obvious after that.)

Anyway, I'm excited to be trying it out. My new email address is over there on the right. Drop me a line and see if it works.
1:39 PM
Corel Acquisition by Vector Now Complete. There ya go. Bastards.
9:58 AM
Hmmph. Oracle throwing that error seems fairly reasonable. I'm trying to Delete from or add to a table, and one of my clauses figuring out what to delete or add calls a user function which refers to the contents of that table to determine its results. So things are, at best, rather nondeterministic. SQL Server doesn't seem to mind, but I suppose I'm actually kind of glad Oracle pointed out this issue to me.
9:18 AM
Oracle Error of the day:

"Table FOO is mutating, trigger/function may not see it."

Mutating! Should I call in Professor Xavier for consultation? Maybe my table will get a really cool power, like "supercolumns" or something. More as it develops.

(By the way, I'm not using any triggers, but the query triggering the error does in fact involve a user-defined function, so this error probably isn't spurious, just annoying.)
Wednesday, August 27, 2003
3:30 PM
Yesterday I received in the mail three DVD collections: The Simpsons Season 3 (yes, I already have 1 and 2) and Futurama Seasons 1 and 2. Normally I'd say collecting DVDs for a TV show is a sucker's game, but every good geek knows that The Simpsons and Futurama deserve constant rewatching. We watched three of the Futurama episodes (the first two and the first Xmas episode - my favorite.) Then we watched 'em with the commentary track on. A better commentary track than most. They got the guy who does Bender taking part. What more do you need? Plus, Futurama looks great on the DVD.
Monday, August 25, 2003
10:53 AM
I cleaned a little more on Sunday. Kitchen: clean. Coffee table: not bad. End table: Spotless. Dining room table: Spotless. This is pretty good for us. I have faint dreams of a clean bedroom. Wife's clothing collections have been grouwing into full-blown stalagmites, though, so I'm not optimistic.
Saturday, August 23, 2003
2:42 PM
A major housecleaning always sounds so simple in your mind. Like some sort of phage, I'm going to tear through the house from one end to the other, leaving a path of wholesome sterility and uncluttered flat surfaces in my wake.

I started in the kitchen. That went well enough. Into the small dining area next. OK, I was starting to accumulate a pile of displaced items, refugee debris with no well-defined place to go. What to do? The garage!

A little while later, knee deep in the pool of empty cans and bottles that is the back of our garage, I found the dead rat. The housecleaning had turned ugly.

I tried to dispose of the rat myself, I really did. But I couldn't touch it, and I couldn't put on gloves and touch it, because I'd still essentially be feeling it, and I couldn't manage to pick it up with a big wad of newspaper well enough to stuff it and the wad into a plastic bag. Eventually Wife had to do it for me. That's what wives are for. Well, in this relationship.

As if to atone, I did clean up an awful lot of rat droppings out of the garage. That wasn't quite so bad, since I've had pet mice and this didn't smell much different. Still, it was depressing to discover for certain how completely disgusting our garage is.

That's housecleaning for you.
Thursday, August 21, 2003
3:03 PM
The company I work for is mere days away from being wholly owned by These Seven People. The shareholders voted for it yesterday and it's being rubber-stamped by a Canadian Court today.

I guess it's a good thing. It could be a good thing. I don't feel like it's a good thing.

I'd feel a lot more confident about it being a good thing if our senior management were kicking and screaming against it. But they're all for it, and that makes me suspicious. Bastards, all of them.
Tuesday, August 19, 2003
4:10 PM
While I'm on the subject of things not to do, never user MFC's DoDataExchange() / UpdateData() / DDX_XXX stuff. (I need not even mention the horrors of DDV_XXX, do I?) We're all goaded into this awful mechanism by MFC's wizards, and all it ever does is create really bad spaghetti code in the end. Replace the pile of crap with the following techniques:

Have an OnInitDialog() function which sets the initial state of your controls. Use such methods as

CWnd::SetDlgItemText()
CWnd::SetDlgItemInt()
CWnd::CheckDlgButton()

If you have any control subclassing you'd like to do, do this here as well. Declare a member variable of the Control class, and from OnInitDialog() call

m_Variable.SubclassDlgItem(IDC_XXX, this)

It is not neccessary to subclass every control in your dialog. It is quite safe to, as needed, call GetDlgItem(), cast the CWnd * result to pointer to the correct MFC control class (like CListBox*) and then call through the "helper" members of the control. All of these members just end up sending messages to the control window. This practice is in principle unsafe (since you don't really have a CListBox instance at the other end of that pointer, just a CWnd) but I have yet to run into any trouble doing it and the convenience, for me, outweighs the danger.

Continuing on with how to avoid DoDataExchange, then, declare yourself a virtual void OnOK() and take care of doing whatever you want done when the user hits ok from there. Set output member variables, if you like, though that practice is often a little hokey as well. Use functions like GetDlgItemText() and IsDlgButtonChecked() to find out the state of controls. Don't forget to call CDialog::OnOK() if you actually want the dialog to be dismissed.

Finally, write message handlers as needed. In the handlers, refer the state of the dialog's controls - not to any input or output member variables. They should no longer be caching the controls' values at every step.

Often, you'll find you don't need the member variables at all. The dialog itself can find out what it needs from other parts of the system when it comes up, and do what it needs to do when it is closed. No "dialog data" member variables means less redundant data and surprisingly clearer code.
3:55 PM
Do not ever, ever attempt to write professional software in VBA. Preferably not in VB either, but I'm willing to let that one slide in some circumstances.
Sunday, August 17, 2003
7:16 PM
Yesterday, Boy and I went to Oregon's first Krispy Kreme store. It's a few blocks north of Clackamas Town center, in that area of town some might call "Hell, but with worse traffic." This was my first Krispy Kreme experience. (Not Boy's though.) This Krispy Kreme is said to have broken all previous store records.

The line took 24 minutes - not too bad I suppose, as long as you looked upon the occasion as an event, rather than, say, as the purchasing of doughnuts, in which case 24 minutes would be a tad excessive. But there was a pleasant festival atmosphere in the air, and they had the line snaking through an air-conditioned tent full of Krispy Kreme merchandice, so it wasn't unpleasant. The lineup of cars for the drive-through window was particularly awe-inspiring. They has a whole big gravel lot reserved for them, with six lanes of traffic and at least three people guiding traffic.

So, how were the doughnuts? I'll restrict myself to reviewing the "Krispy Kreme classic doughnut," since that seems to be their pride and joy. It's good, but nothing revolutionary. It's a yeast-raised doughnut, made with a quite small amount of dough and allowed to rise prodigiously. This accounts for the light and airy texture of the doughnut. They may also cook it a little less than people are used to, but I can say for certain that the dough itself isn't all that gooey and doesn't literally "melt in your mouth" as I've heard a few times. Once they glaze it it does get pretty gooey in fact. For me, a little too gooey until it's cooled some, maybe half an hour later. But it's good hot off the line, too.

So it's a light raised doughnut, freshly fried. It wouldn't be hard to make ones as good at home, I think, but they are a step up from Dunkin' Donuts and a giant leap from Supermarket donuts. But I think Krispy Kreme really needs to be evaluated on a non-culinary level. As a cultural phenomenon it is a little inexplicable but a lot of fun.
Saturday, August 16, 2003
2:38 PM
My wife is a QVC addict. What disturbs me about QVC is that when they're selling something I understand - cooking supplies and computers - I can tell they're generally ripping you off. So I have a hard time imagining that isn't also true for the things I don't understand - jewelry and clothing.

Case in point and the reason I'm bringing it up: today's "Today's Special Value" is a laptop from Compaq/HP. Since I'm in the market, I paid attention. It looked like an OK deal. Then I went to the QVC website, looked up the specs, and priced THE EXACT SAME LAPTOP (Plus a leather carrying case I'm pretty sure is similar to the one they're shipping it with on QVC) on www.compaq.com.

QVC's claimed "retail price": Upwards of $2100.
QVC's stated regular "QVC price": Upwards of $2000
QVC's "Today's Special Value" prive: $1696 (+ $30 shipping and handling)
Compaq's price, on their web site, as of today: $1499, after mail-in rebate (Free shipping and handling)

Both give you a 30 day return period. QVC does have a four-payment "Easy Pay" plan. If that's worth an extra $230, then I'm a red baboon.

How does QVC get away with this sort of fraud? From their ludicrous "retail price" claim to the statement on their web site, "The LOW price of $1696.00 is available today only until 11:59 p.m. ET, while quantity remains," they are foul cheats every step of the way.
Friday, August 15, 2003
8:14 AM
So Wil Wheaton's had me thinking about how few times I've ever come in contact with celebrities. In fact, other than attending scheduled performances or appearances of one kind or another, I can only think of one time in my life.

The year: 1991. The place: a movie theater in Manhattan. The occasion: Seeing Defending Your Life with my Grandma. The celebrity: Penn, of Penn and Teller. He's the big one, the one who talks, if you don't happen to be a Penn and Teller fan. (I was.)

After the movie, I stood right next to him for a minute while we both waited for people to come out of the restroom. Should I say something to him? If he was a stranger, I wouldn't. But wasn't he a stranger? I certainly was to him. Would it be fair to presume his celebrity gave me certain rights, made us de facto acquaintances? Maybe he'd think I was cooler if I didn't say anything. Uh, huh.

I didn't speak to him. I regretted it a little, but what could I have said that would have any meaning? Well, twelve years later, I finally thought of what I should have said:

"You look familiar. Aren't you Doug Henning?"
8:01 AM
So I guess the power's out in Ottawa. Which you might think wouldn't affect me since I live in Oregon. Ha! Your ignorance is my bliss. I actually work for a company dumb enough to have us using a mail server on the other side of the continent.
Thursday, August 14, 2003
10:50 AM
John called me a geek because I went to see Wil Wheaton. I have obviously been acting way too cool around him if he thought that calling me a geek was some sort of insult.
8:08 AM
A picture of Will Wheaton at Powell's. Sure, who cares, right? But the important part of this picture is that right under the book he's holding, in the gray and yellowish shirts, are me and my wife. If we'd planned that photo, we couldn't have had out heads cut off by the book any nicer!
8:02 AM
Last night my wife and I went to the Beaverton Powell's to see the Patron Saint of Blogging - Wil Wheaton. He was doing a book reading and signing. The reading was good, but the mob was too big for us to wait and have a book signed.

Back when it first aired, I fell in with some Trekkies/ers and became a huge fan of Next Generation. Wesely, of course, I hated. Also Troi and Beverly Crusher. And Riker, more so pre-beard. Geez, what was there to like about that show?

No, seriously, in hindsight I think the magic came from Gene Roddenberry. No Trek since Next Gen has been very watchable for me at all. Berman and Braga have destroyed a glorious thing.

That's what was nice about Wil's appearance - he seemed to feel the same way. I even think he might know how much Wesely sucked. But he was proud to have been a part of something so good. In hindsight, anyway.
Wednesday, August 13, 2003
3:09 PM
That recipe of mine, turns out, isn't vichyssoise. Vichyssoise' got leeks, not onions, and you don't carmelize them. Also, it's usually served smooth and chilled. Here's Julia's recipe. I think I'd describe mine as a marriage of vichyssoise and french onion soup.
9:15 AM
My internal laptop debates continue. I'm almost willing to dump my Windows XP requirement and get a Mac. But then I find out that they don't make a Google Toolbar for the Mac version of ie. Now I'm sure Apple's new Safari browser is all that, but I like what I like. And I like ie with the Google toolbar.

Aside: ie's been getting a lot of flack lately for being mired back in the 20th century as far as browsing goes. This largely seems to mean that it doesn't support "great new features" - usually referring to tabbed browsing. I for one think SDI is actually a better way to go for browsers; I'm perfectly happy switching windows with the task bar and don't want to sacrifice ANY unneccessary real estate to let me switch some other way.
Tuesday, August 12, 2003
10:43 AM
Brilliant.
9:10 AM
I like cooking, and I'm pretty good at it, most of the time. But those forced to eat my food sometimes seem a little concerned by my utter disdain for recipes. Sure, I subscribe to and read Cook's Illustrated religiously and try out a good number of recipies too, but it's far more exciting to fly blind. That way you don't have to share the credit if something comes out good.

With that in mind, I present: Cheap Onion and Potato soup. It's probably just a regular old vichyssois, but I wouldn't know. It came out amazingly good. Amounts are guesses.

1 Large Onion, sliced thin
2 Medium White potatoes, cut into 1 inch jullienes
1/3 Cup ham, sliced medium-thin and cut into small squares
1 cup chicken stock
A good bit of Herbs Du Provence, crushed to a powder in a mortar and pestle
Butter

In a large pot, carmelize the onions with the ham, a tablespoon of vegetable oil, and two teaspoons of white sugar. (To carmelize, saute on medium-high heat until the onions soften, then turn down to medium and stir forever. This is important! This labor makes it good. Without this kind of work, it's just onions and potatoes! Anyway, you keep at it until the onions are a deep deep brown - but if you get any charring or crisping of the onions, your stove is too hot.)

Add the potatoes and the herbs du provence. Stir for a little while, until the potatoes start to stick to the pot. Add the stock a little at a time, scraping the bottom of the pot. Add water to cover. Cook, covered, stirring occassionally over low heat until the potatoes are tender and the soup is creamy. Off-heat, stir in a lump of butter. Salt and pepper to taste.
Monday, August 11, 2003
4:10 PM
I've started hankering for something I've never before had a hanker for before: a laptop computer. (Bet you were thinking it was a piece of cheese.) Let's see, a wish list:

- Under $1500
- Under 7 lbs
- Over 14 inch screen
- Windows XP
- Built-in wireless networking
- 20 gig drive, 256 or 512 MB RAM
- No chintzy looking speakers. I'd rather not see the speakers. If it only had a headphone jack, that'd be OK.
- No stupid "internet" or whatever-else buttons taking up real estate
- Solid construction
- Some style. It would be nice if it looked more like a piece of consumer electronics gear than a dull black laptop. Yellow or red would be cool.

If it wasn't for "Windows XP" and perhaps "Under $1500," I'd definitely be thinking Apple portables. But I've invested too much time in my life making myself comfortable under Windows to make the switch.
9:36 AM
Earlier I asked where I got the fool notion of taking a Baltic cruise. I just remembered the answer to that question. Patrick O'Brian's The Surgeon's Mate. One of the best in the Aubrey-Maturin canon, in my opinion. Then again, I'd say the same for at least five of the others: Post Captain, HMS Surprise, Desolation Island, The Fortune of War, and The Letter of Marque. So if we only look at the first twelve books (The Letter of Marque is twelfth), six of them are favorites that I couldn't choose between - a pretty good ratio I dare say. Stopping at the twelfth out of twenty may be unfair, but during my current second read-through of the series, I'm not sure it isn't the right thing to do. The Wine-Dark Sea, 16th, is ok, but overall I'm not too thrilled with the work after the twelfth. But I should emphasize that up until then it is the most lingeringly gratifying literature I have ever encountered.
9:07 AM
Another Property Page factoid: there's no good way to give focus to the control you want to when the page comes up. Microsoft basically acknowledges the problem and proposes a hacky work-around in
knowledge base artice 148388. Short version: In OnSetActive, POST some custom message to yourself and in the handler for that message, set the focus. In English, "set the focus a little later, ok?" I wouldn't be so grousy about this if only you could just directly post a WM_SETFOCUS message to the control in question. But of course there's no such thing as WM_SETFOCUS; SetFocus() is an API, not a message. Using a User or Registered message for this nonsense is so inelegant...

UPDATE: In ComCtl32 5.8 (You get that if ie 5 or greater is installed, by the way) there's a new Property Page notification message: PSN_QUERYINITIALFOCUS. Another workaround may be to simply post a WM_NEXTDLGCTL message to the control in question, which acts a lot like SetFocus(). I'll do that.

UPDATE2: Posting a WM_NEXTDLGCTL message in OnSetActive seems to work like a champ. Here's the code to post the message from MFC:PostMessage(WM_NEXTDLGCTL, (WPARAM)GetDlgItem(IDC_CONTROL)->GetSafeHwnd(), TRUE); The TRUE LPARAM says "give that control the focus", as opposed to the next control after it.
Saturday, August 09, 2003
8:40 PM
I've recently got the fool notion in my head that it would be fun to go on a Baltic cruise. Where did this come from? It's like some crazy disease.

Firstly, I'm not sure I'd enjoy being on an ocean liner for a week or more. I spent three days once on an Alaskan ferry (OK, this is such an unfair comparison I can't even tell you) and just about went crazy.

Secondly, the Baltic?? I couldn't just stick to the Caribbean or South Pacific? What's wrong with me?

1:16 PM
Ever watched World Poker Tour on the Travel Channel? Way more entertaining than it oughtta be. Just one game after another of Texas hold'em - but they show you everybody's hole cards. So you can sit back and cackle as the players bet the wrong way... or, more often, be amazed at how they somehow manage to bet right. Tells? Psychic powers? Random luck?
Friday, August 08, 2003
7:07 PM
I'll be damned. It looks identical in Netscape.

See, back in the day, when the web was young and men were still men, I used to have a little web page. And you couldn't go getting all fancy with markup and live to tell the tale across browsers, not without a lot of fidgety fix-up work anyway. So when I uncorked some of this newfangled CSS mojo for my blog template, I was expecting the same sort of thing.

Standards are for the weak and coddled. I'm shamed for my internet.
4:55 PM
Updating my Blogger template is proving dangerously addicting. I'm sure by now I must have something that looks great in ie, but causes Netscape to vomit showers of sparks before crashing. I'll have to check someday.
1:18 PM
When Schwartzenegger throws his hat in the ring for California governor, I should be able to come up with the Total Recall and Running Man semi-hemi-demi-jokes myself. But no, I had to read about it in the paper. Shame on me, shame on me.

I am curious though - if 500 people decide to run (which could happen), do they arrange the names in alphabetical order? If they do, will Californians be good enough at spelling "Schwartzenegger" to find him in the list? "Let's see, S... um... H? W? Where the heck is he? Maybe I'll just vote for this A. Abbeson guy..."

Also, are you allowed to change your name to, say, "Arnold Schwartzanneger" and declare that you want to run?

I suppose if I were - God forbid - a Californian, such issues might take on some import. Fortunately for me, I can laugh at the whole spectacle. Secure in the knowledge that unlike another hack actor from California, Arnie can never, ever, be President.

Unless if they amend the constitution. Shudder.
Thursday, August 07, 2003
3:27 PM
More Windows Property Sheets dumbassyness:

They have an API off of CPropertySheet called SetFinishText. (It's just a wrapper for the PSM_SETFINISHTEXT message.) This does two things:

1. It changes the text on the Wizard's "Finish" button to text of your choosing. This seems like a good thing to be able to do.

2. It hides the Back button. ?! It's documented to do so, but they forgot to document why the hell you would want it to do that. Oh well.

Workaround: SetDlgItemText(ID_WIZFINISH). Of course, ID_WIZFINISH is only declared as part of MFC. (Maybe ATL has a definition too.) It's not like it's an official part of the Windows SDK or anything rational like that.
11:30 AM
I'd actually heard about the light bulb in a fire station which had been burning for a hundred years, but I'm surprised at the existential frission I feel looking at the live Web Cam for the damned thing. Maybe it's the tension in the air as the page prepares - every thirty seconds - to refresh itself. (Split infinitives are cool.) What if it isn't still lit?! Or maybe it's just the idea that this light bulb was first turned on in the early days of Teddy Roosevelt's first term. I'm not sure. But there's something important there.
Tuesday, August 05, 2003
1:53 PM
Hey, there's thunder outside. It hasn't rained here in six weeks. Cross your fingers.
1:42 PM
If you want a Wizard in windows just wide enough to hold the buttons at the bottom, can you do it? Not easily. For no apparent reason, Windows enforces a big ol' minimum width on Property Sheets with the wizard style. The work-around? Resize and move the window and all its controls in OnInitDialog. Thanks.
Monday, August 04, 2003
4:35 PM
I'm not sure if I learned anything new at work today. Just creeping along with the Oracle stuff, and playing (too much) Mario Golf. I made the mistake of bringing the Gamecube to work; now we have three consoles in the "game room." (Why did I put that in quotes, I wonder? It's obviously a game room.)
8:21 AM
What's funnier than monkeys? Outsourcing your engineering to monkeys, I guess: Primate Programming(tm) Inc.
Saturday, August 02, 2003
9:49 PM
Saw Whale Rider today. It was good, flawed, interesting. The girl who stars in it is an arresting young actress for certain.

There's a store in Pioneer Place II that's pretty much just an Oakley store. (PDX Gear.) I never even knew they had Oakley-branded clothing. I got two shirts. Their sunglass selection was enormous.

Got Mario Golf: Toadstool Tour for the Gamecube. Looks great so far, if you liked the original. The best thing about Mario golf is the fast pace. No load time between holes. No setup time between shots. Well-done.
Friday, August 01, 2003
9:04 PM
Kento has a blog too. But his sandwich knowlege is profoundly lacking. We went to pick up an order at Wu's for dinner, and I wouldn't let him wear the new hat in the car with me. Maybe he can pull it off, maybe not, but I'm not going to be in the car with that hat.

Kento's other issue is that he uses Netscape. Netscape 3 was a good product. Netscape 7.1 here seems to want to cover every inch of my screen with toolbars. Face it, Microsoft won the browser wars.

Man, I'm negative. I better find something positive to say. Um... I love popcorn!
2:30 PM
Oracle's java-based SQL*Plus worksheet is, nicely speaking, a piece of fuck. I'm trying some freeware called SQLTools. I've only used it for a few minutes overall, but am deleriously happy so far.
2:24 PM
Oracle also doesn't support SQL Server's intuitive SELECT TOP n FROM ... ORDER BY X syntax. Some workarounds are suggested in this FAQ Page, but I've decided to go with the road of least resistance and just omit the few "TOP 1"s I have, while hoping I don't pay too much of a performance penalty for just looking at the first one since I'm using dynamic cursors.
1:29 PM
Michael showed me something really cool - what an "amazing" job babelfish does of translating Chinese text. Here's an example: (Some text from a random Hello Kitty webpage.)

Home station? ? Circulation of commodities speed? Quick? Each? The friend guarantees grasps? ? ? Quick? ? . // home station? ? ? ? ? Class? ? ? ? ? Must grasp newly? ?

It's like your own little haiku generator.
1:25 PM
Oracle 8 doesn't support the JOIN keyword or syntax in SELECT statements! (Oracle 9i does.) Stunning.
Archives
07/01/2003 - 08/01/2003
08/01/2003 - 09/01/2003
09/01/2003 - 10/01/2003
10/01/2003 - 11/01/2003
11/01/2003 - 12/01/2003
12/01/2003 - 01/01/2004
01/01/2004 - 02/01/2004
02/01/2004 - 03/01/2004
02/01/2005 - 03/01/2005

“Striving to be a more perfect geek since 1970”

email:
bunchofgrapes@mailblocks.com
(Challenge/response guarded: If I've never heard of you and you mail me, you'll have to prove you're a human before I'll see it. Think of it as a fun game. Whee.)

What is the Liberty of the Savoy?

Friend and co-worker's blog