January 3, 2011

The Beginning and the End (but not in that order)

I have a Favorite TV Show of All Time. What I mean by this is that when asked to name my favorite show, ever, I can respond immediately. No reflection is required. As surely as I know that my favorite ice cream flavor is Mint Chocolate Chip, or that my favorite super hero is Spider-Man, I can tell you my favorite TV show: Six Feet Under.

I saw every episode of every season, in order, as they were broadcast, beginning in the summer of 2001.

Almost. I missed the pilot episode. I did not see it rebroadcast. I did not buy the DVDs, did not ask if friends had it, did not even Netflix it. From time to time I’d wonder why not, but there it was.

Tonight at about 7:58 PM, while browsing the programming guide, I noticed that HBO Signature would be showing an old Six Feet Under episode at 8 PM. Yes: the pilot.

For me, the final episode of Six Feet Under also happens to be the Best Series Finale of All Time. When one considers the conclusion of M*A*S*H* and Newhart, that’s saying something — even more so because the first two-thirds was good, but not great. By the end, though, I was crying.

And the pilot? A tour de force. I’m no John Boehner, but damned if I didn’t cry again. To be fair, the ground was well prepared: I was intimately familiar with the show’s characters before they were introduced. Still, most of the shows I have come to enjoy failed to hit on all cylinders until midway through the first season, and sometimes later. Mixed metaphors not withstanding, Six Feet Under hit the ground running. All the elements were there, the themes introduced, the seeds planted, in place from the outset. Alan Ball clearly had a vision.

Happy New Year.

Posted by cradle at 9:23 PM | 2 Comments

December 24, 2010

Christmas Eve

At the intersection of New Hampshire Avenue and East-West Highway this evening I learned a horrible truth. What becomes of Christmas trees that are not sold by late Christmas Eve?

They are heaped upon a burning pyre, their ashes sent skyward to a god who, perhaps, savors the pine scent of unsightly, unloved conifers filling his nostrils.

A burnt offering on Christmas. The pagans are smiling.

Posted by cradle at 10:45 PM | 3 Comments

November 27, 2010

True Story

This morning I called the Rancocas Nature Center to see whether they still sold a particular type of bird feeder, a small adapter that screws onto an inverted 2-liter soda bottle. The volunteer checked that they still did, discovered there was only one left, and set it aside for me.

When I arrived at the nature center this afternoon the volunteer, an older gentleman with a bald head and a white beard, was helping another customer. While waiting I browsed through the book section and then took a gander at some of the wildlife in the back room, including a beautiful black rat snake that repeatedly flicked its long, forked, black tongue at me. What a tongue.

When I returned to the shop section the volunteer was still helping the first customer, but upon seeing me he pulled the bird feeder from a drawer and placed it on his desk. "This must be for you!"

"Do I look like the person who called earlier?" I joked.

"No, you look like somebody who would use a plastic bottle as a bird feeder."

Posted by cradle at 3:45 PM | 3 Comments

October 15, 2010

Upon Heading Home

There is something sad about dusk on a clear autumn day.

Posted by cradle at 9:03 PM | 1 Comment

October 7, 2010

Marmot

I can state categorically that you have in your life seen no better picture of a marmot:

marmot_sh.jpg

Wikipedia user Inklein is the Annie Leibovitz of marmot photography.

Posted by cradle at 10:51 PM | 2 Comments

August 19, 2010

Powershell Annoyance

I want to love Powershell. There is much that is cool about it, and it is certainly beats batch files or (gag) VBScript. I'm a beginner, and perhaps I'll eventually learn to accept its quirks, but I bump into annoyances frequently enough that Powershell and I are still just friends.

What frequently happens is that I get excited about a cool new concept or feature, but some detail of the execution mars it. I may post more later about a script I've been trying to write, but for now here is a simple example.

Users of bash and other Unix shells will be familiar with the $? variable. It stores the exit status of the last command executed. Generally a value of zero means "success", and anything else indicates an error of some sort:

    $ ls modlist.txt
    modlist.txt
    $ echo $?
    0
    $ ls nosuchfile
    ls: cannot access nosuchfile: No such file or directory
    $ echo $?
    2

In the first case, because the ls command succeeded, the value of $? is 0 . In the second, the value of $? is 2, indicating an error. This is not very helpful at the command line, but when writing a script you might use it to branch depending on whether a command succeeded or not (though there are more concise ways to accomplish that).

In Powershell, exit statuses aren't puny integers: They are full-fledged objects, of type ErrorRecord. And instead of automatically saving just the last one, there's a ring buffer array with the last 256 (by default) error objects! The most recent error is stored in the first element of the array (at index 0):

    PS H:\> dir nosuchfile
    Get-ChildItem : Cannot find path 'H:\nosuchfile' because it does not exist.
    At line:1 char:4
    + dir <<<<  nosuchfile
        + CategoryInfo          : ObjectNotFound: (H:\nosuchfile:String) [Get-ChildItem], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

    PS H:\> $error[0]
    Get-ChildItem : Cannot find path 'H:\nosuchfile' because it does not exist.
    At line:1 char:4
    + dir <<<<  nosuchfile
        + CategoryInfo          : ObjectNotFound: (H:\nosuchfile:String) [Get-ChildItem], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

    PS H:\> $error[0].CategoryInfo


    Category   : ObjectNotFound
    Activity   : Get-ChildItem
    Reason     : ItemNotFoundException
    TargetName : H:\nosuchfile
    TargetType : String



    PS H:\> $error[0].TargetObject
    H:\nosuchfile
    PS H:\> $error[0].Exception
    Cannot find path 'H:\nosuchfile' because it does not exist.
    PS H:\>

As you can see, I tried to dir a non-existent file, and this generated an ErrorRecord which was stored in $error[0]. I can go back and examine the properties of this object, like CategoryInfo, TargetObject, Exception, etc. Neato. So far, so good.

Before I continue, you need to know that PowerShell also supports tab-completion of property names (kind of like IntelliSense), another great feature. So I can reference a property name with the first few characters of the name, press the <TAB> key, and the PowerShell interpreter will finish it for me:

    PS H:\> $name = "David"
    PS H:\> $name.le     # Press <TAB> here ...
    PS H:\> $name.Length
    5
    PS H:\>

It even gives me the canonical capitalization. Well done, PowerShell. But having grown accustomed to this tab-completion, it's only natural that I would try to use it with $error[0]. Recall that $error[0].Exception is a perfectly legal expression: this is the value of the Exception property of the object stored in $error[0]. But if I type $error[0].Exc<TAB>, nothing happens. Even worse, if I then finish typing it by hand, I find that there is no Exception property anymore!

    PS H:\> $error[0].Exc    # Press <TAB> here ...  no auto-completion :^(
    PS H:\> $error[0].Exception     # Fine, I'll type the extra six characters msyelf.         
    PS H:\> $error[0]

What happened? Everything's gone all crazy! Let's see what's in $error[0] now:

    PS H:\> $error[0]
    Unable to find type [0]: make sure that the assembly containing this type is loaded.

Now I'm really confused, because I can't tell whether the error message is simply the display representation of the ErrorRecord object stored in $error[0], or whether that error message is about the $error array itself. I'm pretty sure it's the former. Going back through the $error array, I eventually find my nosuchfile error at index 2:

    PS H:\> $error[1]
    Unable to find type [0]: make sure that the assembly containing this type is loaded.
    At line:1 char:10
    + $_val=[0] <<<<
        + CategoryInfo          : InvalidOperation: (0:String) [], RuntimeException
        + FullyQualifiedErrorId : TypeNotFound

    PS H:\> $error[2]
    Get-ChildItem : Cannot find path 'H:\nosuchfile' because it does not exist.
    At line:1 char:4
    + dir <<<<  nosuchfile
        + CategoryInfo          : ObjectNotFound: (H:\nosuchfile:String) [Get-ChildItem], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

So not only doesn't tab-completion of property names work when indexing array variables, but it appears to silently generate an ErrorRecord object which is then stored in the $error array. Perhaps there's a very good reason why it has to be this way (if so, let me know), but it's quite annoying.

Long story short: don't try to tab-complete $error array properties. I recommend assigning $error[0] to a new variable (like $err), and then working with that:

    PS H:\> dir blargh
    Get-ChildItem : Cannot find path 'H:\blargh' because it does not exist.
    At line:1 char:4
    + dir <<<<  blargh
        + CategoryInfo          : ObjectNotFound: (H:\blargh:String) [Get-ChildItem], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

    PS H:\> $err = $error[0]
    PS H:\> $err.Exception       # Here tab-completion will work
    Cannot find path 'H:\blargh' because it does not exist.
    PS H:\>

Then you can use tab-completion to your heart's content.

Posted by cradle at 12:52 PM | 1 Comment

July 15, 2010

Lamp-locked

While walking through the Math building rotunda this afternoon I looked up and in the lamp hanging directly overhead saw more than a few dead moths.

And at that moment I wondered: If augury is divination through the the observation of bird flight, what do we call predictions based on the patterns formed by dead moths? "Heteroceramancy" becomes entangled somewhere between my tongue and teeth whenever I try to say it.

Posted by cradle at 8:47 PM | 3 Comments

July 5, 2010

Kristol vs. Kristol

You may have heard that William Kristol has called for Republican National Committee chairman Michael Steele to step down after the latter's comments regarding the war in Afghanistan. I will be saddened if Steele takes this advice, as his mouth is the gift that keeps on giving.

I doubt Kristol realizes how much he shares with Steele in this respect. I listen to Fox News Sunday primarily for the entertainment value Kristol provides during the panel discussion. Here he is on yesterday's program confirming his position on Steele in response to a question from guest host Major Garrett (cue spit-take):

And I think one thing as a Republican I think Republicans can be proud of is that we don't politicize foreign wars ...

And here is the same William Kristol a few minutes later, in his very next comment:

And [Obama will] have to win [the war in Afghanistan], unfortunately, over the doubts and opposition, almost, right, of almost two-thirds of the Democratic members of the House who voted late last week for a timetable to get out, which is really astonishing.

Nine Republicans voted against the president on this. Like 165 or something supported the president. A hundred sixty-five Republicans supported the president and General Petraeus in the attempt to win this war. Sixty percent-plus of House Democrats said, "No, Mr. President, we just want to get out."

Congressional Democrats seem never to have met a war that, when it gets tough, they don't want to get out of.

This is, presumably, an example of a Republican proudly not politicizing a foreign war. To quote Jon Stewart, "Oh, Bill Kristol, are you ever right?"

Posted by cradle at 1:13 PM | No Comments

January 21, 2010

Walking

This week I've taken up walking to work. It's about 32 minutes each way, and a little under four miles round-trip. WolframAlpha tells me I'm burning over 500 Calories (that's kilo-calories for you Europeans). I hope to keep this up until hay fever season starts. It's enjoyable, saves money, and must be good for the environment.

What do I do while I walk? Sometimes I think. If I pass another person, I think about whether I should say "Good morning!" But instead, I do not. I wonder what they're thinking. Probably that I'm a ne'er-do-well. I want to tell them that, no, I'm an ever-do-well. But again, I do not.

I look at the newspapers piling up in front of one house. Perhaps these people are on vacation. "I should rob them tonight!" I think to myself. Just kidding.

Today I spent most of the walk with my head cocked back looking up at utility poles. From top to bottom you have primary power distribution lines, which feed into transformers (the big buckets-shaped devices). The transformers, in turn, feed into the secondary power distribution lines below, which supply electricity to homes. Farther down, underneath the power lines, are the telephone cables, the cable TV/Internet coax, and fiber optic lines. The telephone cable bundles are punctuated with bulging splice cases. And along the cable TV/Internet cables one sees the occasional amplifier, covered with heat fins.

How do I know so much about utility poles? It's called reading. Specifically, Infrastructure: A Field Guide to the Industrial Landscape. Highly recommended.

On the way to work, I stop at the local Starbucks. I drink coffee and read the paper, which I bring along with me in my black messenger bag.

Today I sat near a crazy old woman in a blue, hooded sweatshirt. When a young man in fatigues sat down, she announced, "We have a terrorist in here! Picking on little countries, don't see you invading China. Bitch. Just like a bully. Just like in school." The man quietly got up and moved to another section. "Bitch, that's right, walk away."

I went back to reading the paper. A few minutes later she pulled out an apple and started peeling it. She threw the peels against the front window, where they fell to the ground. I looked at her.

"What are you looking at? Bitch."

"You're littering," I responded.

"So? So what?"

"So other people have to sit there. You're giving that guy a hard time for being a bully, but you don't care about other people, either."

I immediately regretted saying "either." That's not what I meant. I got up and walked to another section myself.

Should I have kept my mouth shut? This woman is probably mentally ill. Maybe she's homeless and off her meds. Is she responsible for her actions? Or is she just a miserable, selfish human being? Then again, perhaps I caused a moment of reflection on her part, maybe even remorse.

Who am I kidding. I'm sorry, crazy woman. It's not your fault. The soldier was wiser than I.

Posted by cradle at 9:11 PM | 7 Comments

September 24, 2009

An Open Letter to WETA

Dear WETA,

Allow me to set the stage. Having just finished viewing another excellent edition of the Newshour with Jim Lehrer, I was washing dishes with the TV still tuned — I thought — to WETA. I wasn't paying attention at first when I heard that nameless but instantly familiar movie commercial voice: "When all hope seems lost ... [Clive Owen and other actors speaking over inspirational music ...] what you need the most [more dialog and music] ... is closer than you think. This fall, from the director of Shine, and the producer of Billy Elliot: The Boys are Back, rated PG-13. Exclusive engagement starts September 25th."

At first I wondered why my TiVo had switched the channel to a commercial network. But when I returned to the TV, I saw that, no, this was indeed WETA.

What gives? If that wasn't a commercial then nothing is. Yes, I understand that no product claims were made, and there was no call to action, so that by your narrow definition this was not a "commercial" but an "underwriting statement." But whom are you kidding? Yes, this commercial didn't interrupt programming: it appeared between shows. This makes it slightly less irritating than most commercials, but that's the best one can say.

I'm a WETA member and have been for years. I'm not easily outraged (really!), but I am now. I'm seriously considering an end to my support of your station. Over the years I've put up with the ever-increasing encroachment of commercial messages into public television, but this crosses a line.

I realize you have difficult financial choices to make. But at some point you must ask yourself what principles are so important that you would forego revenue rather than violate them.

You've apparently made your decision. Now I must make mine.

Posted by cradle at 8:44 PM | 4 Comments