Thursday, November 27, 2008

It's crappy

This is a recurring thing that crosses my mind every so often, but I rarely express it...

When one uses the bathroom, the general sequence of events is:
1. Remove the intervening pieces of clothing.
2. Perform the necessary eliminatory activity.
3. Put the displaced clothing back where it belongs.
4. Wash hands.

The thing is, occasionally I'd really like to wash my hands before pulling up my pants. There ought to be a sink, or wet-wipe dispenser, or something in the stall.

Monday, November 24, 2008

Bad code

I'm a software engineer by trade, which means that occasionally I get to look into really old code that someone who quit years ago wrote (sometimes to make it do something that it wasn't designed to do in the first place, but that's another post), and I often find things that make me want to laugh and cry at the same time. Other übergeeks will understand this because they've gone through it too.

What follows are some examples that I've recently seen. I'll attempt to translate from geek to English as needed. All these were written in VB6.

If SW = True Then ...
This is like saying "If it is true that you are going to the store..." It's simpler to say "If you are going to the store..."

Delimited = FreeFile + 5
"FreeFile" is a function that gives you an available file handle number N so you can open a file with N and later read from or write to that file using N. Apparently the programmer decided that N plus 5 would be better. This is the equivalent of being told that parking space 11 is open and proceeding to park in space 16, even if another car is already there!

If IsNull(drs!TaxID) Then
   ...
   If IsNull(drs!TaxID) Then
    ...
   End If
Else ...

Translation: Check if tax ID is empty; if so, check it again! I left out some intervening code in this one, but it didn't change the TaxID in any way.

If InStr(ProviderName, "NULL") And Len(ProviderName) = 4 Then ...
If the thing contains the text "NULL" (a four-letter word) and the thing is only 4 letters long, then isn't the thing "NULL"? This should have been just If ProviderName = "NULL" Then ....

Wednesday, November 19, 2008

How Obama got elected

A quick quiz. Of the four major-party candidates in the recent presidential and vice-presidential election, which one:

1. Has a pregnant unmarried teenage daughter?
2. Committed plagiarism in a campaign speech?
3. Received a wardrobe worth over $150K from his or her political party?
4. Claimed to have campaigned in 57 of the United States?
5. Was unsure how many houses he or she owns?
6. Won his or her first election by having the opponents removed from the ballot?

I'm willing to bet that you had no trouble at all answering the odd-numbered questions and were less sure about the even-numbered ones.

Former talk-show host, author, and documentarian John Ziegler examines this phenomenon in his in-progress documentary "Media Malpractice: How Obama Got Elected"; see www.howobamagotelected.com for more details.

His hypothesis is that the media in general exhibited a bias in favor of Obama, made manifest by suppressing news harmful to the Obama ticket and emphasizing news harmful to the McCain ticket; his method was to survey 12 Obama voters on topics such as those above. The results are shocking but unsurprising.

Now, I'm a math nut, and I'll be the first to tell you that 12 people do not a statistically valid sample make. John Zogby did one better by duplicating the poll in a scientific manner, and came up with similar results concerning Obama voters:

Four of seven could not identify the party that controls Congress.
Five of seven did not know that Biden plagiarized in a campaign speech.
Five of six did not know that Obama had his opponents removed from the ballot.
Six of seven knew that Palin received the $150K worth of clothes.
Fifteen of sixteen knew that Palin has a pregnant teenage daughter.
Six of seven "knew" that Palin said she could see Russia from her house, even though it was actually Tina Fey of Saturday Night Live who said that.

The obvious conclusion is that Obama voters are ignorant about the world around them, but that's not it. The real conclusion is that those people who base their opinions on what mainstream media tells them are kept selectively ignorant by the media's own agenda.

Star Trek 90210

I've just seen the trailer for the new Star Trek movie, scheduled to be released in May 2009. I'm optimistic, but wary.

First of all, I'm reminded of Tiny Toons, the cartoon show featuring toddler versions of Bugs Bunny, Daffy Duck, Elmer Fudd, and so on. The movie will have twenty-something versions of Kirk, Bones, Spock, Sulu, Uhura, Chekov, and Scotty (actually, as all fans know, Vulcans age much slower than humans, so Spock may be older than that) running the ship and generally having a young-adult good time. (I wonder where young Nurse Chapel is?)

It occurs to me that Sulu and Chekov were pretty young in the original series. If this movie is a prequel, how far back is it? Do we have to see them deal with their voice changing while piloting a spaceship? Maybe Bones will actually deliver one of them in the first five minutes.

The trailer indicates that Kirk and Uhura have a love scene (no word on if Kirk's shirt gets ripped or torn off beforehand) and even shows Spock throwing a weird Vulcan punch at Kirk, which we've wanted to see for a long time. I wonder if at this young age Scotty has already acquired his taste for scotch, or if he thinks that Budweiser is the bomb.

(Somewhat off topic, I wonder what the future of beer is. I shudder to think that it might go the way that restaurants did in "Demolition Man" in which only Taco Bell survives. The acquisition of Anheuser-Busch by InBev may be a portent of things to come. Not that I drink any AB product; I only drink Guinness.)

I'm a fan, so of course I'm going to see it. I just hoping that in their quest to boldly appeal to the demographic that no Star Trek has appealed to before, they manage to remain more Star Trek and less Teen Trek.

And I'm hoping that they manage to squeeze in one of Bones' "Dammit Jim, I'm a doctor, not a ____" rejoinders.

Tuesday, November 18, 2008

Sugar-free fudge

Last year during my annual candy-making spree, a friend asked if I could make sugar-free fudge. He's a diabetic, you see, and he and that particular sugar-laden confection don't get along. I said I'd think about it, but don't get your hopes up.

The problem with sugar-free fudge is that sugar doesn't just sweeten fudge, it gives it structure. Sugar provides a crystalline framework for what would otherwise be a gushy chocolate mess, and artificial sweeteners will not do that. I know, you can buy "sugar-free fudge" at the store, but (A) they typically contain "sugar alcohols", which have their own digestive challenges, and (B) the ingredient list reads more like a chem lab than a pantry.

However, now that I'm dealing with my own diabetes, I thought I'd give it a try. Armed with some basic everyday food items and a smattering of food chemistry, I came up with:

Diabetic Fudge

1 8-oz bar of baker's (unsweetened) chocolate, chopped
3/4 cup of heavy whipping cream
1 tsp vanilla
32 packets of Splenda

First, the disclaimer: This is not a Hershey bar. This is some pretty strong stuff. If you don't like the bitterness of dark chocolate, don't go near this. You can see from the ingredient list that it doesn't have a lot of anything else to get in the way of the chocolate.

Step 1: Melt the chocolate. Do this without heating the chocolate any more than necessary; I put in the microwave for 10 seconds at a time until I just start to see some of it melt, then stir it over a low double boiler. The reason for the minimal heating is that the fat in chocolate (cocoa butter) crystallizes in different ways at different temperatures, and the crystals you want to keep (the ones that make chocolate firm) are toward the high side. Look up "tempering chocolate" for more on this phenomenon.

(Incidentally, it's possible that for this particular application, this business of carefully melting the chocolate is bogus; it's just that I automatically do this for chocolate work. I'll try just melting it for the next batch.)

Step 2: Mix together the cream, vanilla, and Splenda.

Step 3: Stir the cream mixture, a bit at a time, into the chocolate. The chocolate will change from a smooth liquid into a muddy paste; that's what happens when the oil in chocolate and the water in cream get together, and it's OK.

Step 4: Line a loaf pan (get the sides too) with foil. Scrape the fudge goo into the pan, smooth it out, and let it cool. (I put it in the fridge, then let it warm to room temperature to cut it.) If you don't have a loaf pan, just shape it into a 3/4 inch tall slab on a piece of foil.

Step 5: When cooled, cut into bits and eat.

Was it any good? I guess so, because my diabetic friend bought most of it. Phooey.

(Update: I forgot to mention one other relevant property of sugar. Sugar is hydroscopic, which means that it tends to soak up water from the environment, and in food that means it helps tie up moisture that otherwise would let bacteria and other baddies thrive. I would guess that sugar-free fudge is therefore more susceptible to that sort of thing than its traditional counterpart. I have to guess, because I never have it long enough to find out.)

Monday, November 17, 2008

What a legacy

Here comes the Obama Recession.

That's right, we're in the beginning of a recession caused solely by Obama's threat to tax capitalism.

In just the two weeks since Obama became President-Elect, the Dow has fallen from 9,625 to 8,273. That's 1,352 points, or 14% of the total value. Compare that to the two-month period after each new President's election in the past 30 years:

President-Elect Bush 43, late 2000: Down 100 from 10,900; -0.9%.
President-Elect Clinton, late 1992: Even at 3,300.
President-Elect Bush 41, late 1988: Up 150 from 2,050; +7.3%
President-Elect Reagan, late 1980: Even at 900.
President-Elect Carter, late 1976: Up 70 from 930; +7.5%.

(Each of these is approximate, as I had to read them from graphs on http://www.djindexes.com/mdsidx/index.cfm?event=showAverages.)

The point is that the economy's reaction to Obama's election is tremendously more severe than to any other presidential election within my lifetime, and with no surprise; he has promised to disproportionately punish those who succeed, and the obvious reaction is to pull money out of the economy before he has a chance to tax it.

So how long will it last? My theory is that even assuming that Obama realizes fairly soon how destructive his ideas are, capital will not reenter the market en masse until tax year 2009 is complete, so look for things to get better in February 2010.

One big exception: It appears that firearm dealers are doing extremely well, and will probably continue to do so until Obama makes them illegal.

Wednesday, November 12, 2008

Candy for sale

So what's the most ironic thing for a diabetic to take two days of vacation to do? Make candy, of course.

And not just any candy. I'm talking about good old fashioned peanut brittle, hunks of pure sugar watered down with corn syrup and a handful of nuts. Mmm!

Every year at my church, there's an arts & crafts fair. Two years ago, me and the missus decided that we could have a go at running a homemade candy booth. I, being a math nut, whooped up a spreadsheet calculating cost per square inch and break-even price point models, and then took two days off work to set upon the task.

That year, I made two sheet pans each (!) of peanut brittle, pecan brittle, cashew brittle, english toffee with almonds, and english toffee without almonds. Each of these was cut into baggie-sized bars (which has to be done while it's cooling), bagged and tagged.

Between batches, the missus made fudge. Lots of fudge. Lots of flavors of fudge. Chocolate, chocolate pecan, chocolate walnut, butterscotch, and peanut butter. All of it cut, bagged and tagged.

We managed to sell enough of the almost 400 pieces of candy to make it worth our while, so we decided to do it again the next year and again this year. Each time, we add something to the mix. Last year it was divinity and peppermint fudge; this year we're going to try a chile pepper brittle, pecan praline fudge, and (to the delight of diabetics everywhere) a sugar-free "fudge".

So don't call me or come by tomorrow or Friday, unless you want to help.

Friday, November 7, 2008

A rare find

I had heard that a specimen has been seen in Kansas, but I didn't believe it until I saw it myself!

The once-common gasolinus undertwobuckus, formerly thought to be extinct, has been sighted in north Texas!

Experts say that despite aggressive hunting of this rare species, it will continue to proliferate.

Tree humor

This morning I heard the phrase "grandfather oak" in a commercial...

Chip Oak was a senior at Forest High and was in love with Peach, and she pined for him as well.

Shortly after graduation, they tied the knot and decided to start a grove of their own. A year later, they had a girl and named her Heather.

She grew up tall and fast, and when she was sixteen rings old Chip and Peach grudgingly let her start dating. They approved of the more upright suitors she brought home, but more and more she tended toward the seedy guys.

Then, one evening, a guy named Ash came to pick her up. His bushy hair was umkempt and he was smoking. As Heather ran to the door, Chip barked "A bois d'arc like you will not date my little girl!" and slammed the door.

Heather, her heart splintered, ran to her room. That night, she packed a trunk and ran away. The note on her bed simply said, "I'm leaving."

Months later, there was a phone call; Peach answered to hear Heather's voice. When Peach asked where she had been, she said:

"I boarded with Ash and ... and ..."

"What?"

"I'm ... carrying his sapling."

My side of the bucket

I'm considering the reality that if our President-elect does what he says he will, I will pay more in taxes.

No, I'm not one of those $250K-per-family people who will have to pay a marginal rate of 39.6% or whatever it is. (Or is it $200K or $150K now?) I'm just a consumer and investor, and thus I'm in that class of people on whom all business taxes eventually fall.

Let's assume that corporate taxes are going to be raised, which I think is a fair assumption. Kroger, McDonalds, Wachovia, Exxon, 7-11, WalMart, Home Depot, and hundreds of other businesses that I regularly patronize will be subjected to higher taxes, as will my employer. Let's say that one of these earns $5 million annually and is taxed an extra 1%. That's $50K. How do these businesses recoup this extra expense?

1) At a wage of $7.25/hr (as of July 2009), 261 eight-hour days per year works out $15,138 annual gross; add to that 60% for employer expenses (taxes, insurance, admin, vacation coverage) and you have about $25K. Thus, an employer can respond by eliminating two minimum-wage positions. Not only does this mean less tax revenue (so higher income tax to compensate) and more unemployment (likewise higher employment tax), it means longer lines for me to get my hamburger, buy clothes, cash my check, etc, which is a tax paid with my valuable time.

2) Instead of reducing headcount, they can reduce compensation. Raises can be reduced, bonuses eliminated, and benefits diminished. When my employer does it, that's money that goes to the government instead of me.

3) If lowering the HR budget isn't feasible, they can always increase prices, or equivalently lower the value of the product. Shortly after the last minimum wage increase, Wendy's got rid of the "Texas Double" (at least that's what they called it here) and introduced the "Double Stacker" or whatever they call it for the same price, but it's decidedly a lesser burger.

4) If nothing else, maybe the business pays the increased tax burden directly from profits. To rephrase, the stockholders pay the extra tax in the form of lower stock evaluations and lower dividends. I'm paying that tax, and if you have a 401K, you are too.

I really like the way that Fred Thompson put it during his speech at the 2008 RNC:

No, they're just going to tax "businesses"! So unless you buy something from a "business", like groceries or clothes or gasoline, or unless you get a paycheck from a big or a small "business", don't worry, it's not going to affect you. They say they are not going to take any water out of your side of the bucket, just the "other" side of the bucket!

Diet Dr Pepper, please?

I'm from Texas, where Dr Pepper is king. Sure, Coke and Pepsi are good for what they are, but I don't want a cola, I want a DP.

For some time now, I've preferred to drink diet DP, because (a) I don't need the extra calories and (b) it actually tastes good for a diet soda. On the rare occasion that a restaurant would have diet DP, I'd get that, and I'd get regular DP otherwise, because everyone carries it.

Now that I'm watching the blood sugar as well as the calories, I'm strictly diet soda and tea. The problem is, diet Coke and diet Pepsi are NOT good for what they are. Why are there so few places that have diet DP on the soda fountain? Almost every restaurant has either Coke products or Pepsi products, and every slot in that soda fountain is filled with a company product except for that one left for DP.

(The ones I have found nearby that do have diet DP, by the way, are Taco Bell, the combination KFC/Pizza Hut, Chicken Express, and Jason's Deli. Also, when I'm in the mood for mystery fish, the combination A&W/Long John Silvers has diet A&W root beer.)

Why in the world, here in the birthplace of DP, are there not any restaurants that sell only DP products? There's a lemon-lime fizzy drink, root beer, orange, strawberry, grape, lemonade, and even cola! The next time you want a Coke or diet Coke, try an RC Cola or Diet Rite instead. Get a Moon Pie too. A diet Moon Pie, if you can find it. Get one for me too.

Thursday, November 6, 2008

Watching what I eat

I've very recently become a diabetic.

I've suspected that I probably was one for some time; I have the physique, eating habits, and sedentary lifestyle that collectively scream "Hey you! Stop eating the Ding Dongs!" However, I also suffer from a particular genetic condition that effectively masks all the symptoms of diabetes as well as most other medical maladies. Yes, I have... a Y chromosome.

Those people who have this condition (let's call them "men") have trouble recognizing that something is physically wrong with them. They don't go to the doctor unless serious symptoms occur (like protruding bones or missing limbs), and they still stop for a burger and fries on the way.

My story starts with a bug bite of some sort on my knee. I'm not sure when it happened, but let's say that I first noticed a small inflamed bump on a Monday. I thought little of it; I squeezed it once in a while to see if it was a pimple or boil, but it didn't hurt. By Friday it was a large imflamed mound, but it still didn't hurt.

The next Monday, it hurt a little. On Tuesday, it hurt quite a bit. On Wednesday, I couldn't walk on it, so course it was at this point that I went to see a doctor. On Thursday, after a couple doses of antibiotic had failed to improve the knee or reduce the fever, I was admitted to the hospital. (Didn't I mention the fever before? Of course not. Y chromosome, remember?)

During my four days there, I received all kinds of interesting news. One, the thing on my knee had developed into a full-blown MRSA infection. Two, my blood pressure was high enough to warrant medication. (Again, something I suspected but ignored.) Three, the same was true of my cholesterol count. Lastly (and finally), my blood sugar was higher than it ought to be.

The next Monday (on my birthday, as it turns out) I left the hospital with a handful of prescriptions and a new glucose monitor. It was a week or so until I could walk without pain, and another three weeks or so until I had adjusted to the blood pressure and insulin pills.

Now, I have a healthier respect for my health. From now on, I'll be better about going to the doctor. I'm still going to stop for that burger, but no fries for me. I'm a diabetic.

Opening the can

So I'd been thinking about becoming part of the blogosphere for some time but just hadn't gotten around to it, mostly because I had yet to convince myself why I should. Sure, I have the occasional interesting story, insightful revelation, or stupid rant, but there are millions of the same out there. Does this virtual community really need one more?

Then I thought about vienna sausages. You know, those mushy pre-formed sticks of meat by-products in the little can. Someone's gotta be buying these, because not only do they keep selling them, but they have a wide variety of flavors: barbeque, hickory smoked, jalapeƱo, and who knows what else. The point is, there's an audience for everything.

The simple truth is that sometimes I crack myself up, and I can't be the only one.

It was just a couple of days ago that I decided to start, and I purposefully delayed my initial blog until after the election, just because I didn't want my first entries to be dominated by that. I'll get to my observations of the political realm, but on the way I'll touch on a seemingly random series of subjects. Food, computers, Guitar Hero, physics, TV, medicine, whatever.

More to come later. I'm in a mood for vienna sausages.