Archive for the 'TIMTOWTDI' Category

Yes No Maybe I Don’t Know

They Might Be Giants, as you may or may not know, are responsible for "Boss of Me", the theme song for the highly entertaining television show "Malcolm in the Middle". The chorus of the song goes "Yes No Maybe I Don't Know". Before today, I'd always parsed that as "Yes, No, Maybe, I don't know", as though they were responses to four different questions, or one flustered response to a dangerous question.

I suspect that that's probably the intended parsing of the phrase, but in Music and TMBG, it's hard to be sure... So tonight, I was listening to the copy of "Boss of Me" that was part of this months TMBG Unlimited, and another possible interpretation of the phrase was presented to my ears: "Yes, No, Maybe I don't know". Yes, I like this interpretation better. No, I don't think it's what was intended. Well, Maybe. I don't know.

If you're curious, this month's Unlimited has some good live songs (including a great copy of Fingertips and some great dialogue about listening to Fingertips via CDNow), some new songs ("All McGyver On It" was such a promising title... Pity the song sucked), and several tracks from McSweeney's.

Arrays of Unique Elements

In doing some log parsing in perl, I found I wanted an array full of unique values. My first approach was to put all of my values in an array and then try to use a function to unique-ify the array after I'd collected all the values. I got the function written, and it wasn't overly long or complex or slow or anything, and it did it's job, and everything was good.

Until I realized that I'd reinvented a wheel. A little later in the same script, I was doing some hash work, and I realized that perl already had this really fast and highly tuned way of storing an array of unique elements. It's called a hash. Watch:

$hash_of_unique_elements{$unique_element} = "$unique_element";

Of course, the value assigned to that key could be anything. With just a few more lines of code, the value could be the number of times the element occurred. The point is, perl is already really good at doing this sort of thing, and it already accomplishes exactly what I wanted much much faster and in far fewer lines than even a highly tuned bit of code could.

Another Perspective On Movies

First, the link: Christian Spotlight on the Movies. In short, it's a site which reviews movies with a very Christian Eye. The site rates movies by "Moviemaking Quality" and "Moral Rating", and if that's the particular angle you take on the world, then this site would probably be an excellent resource. That, however, is not why I'm including this link.

I'm also not linking to the site because I intend to attack all of these opinions I don't necessarilly agree with. No, Not Me! Honest!

I'm linking to this site because, for one, the site actually serves a purpose for those who agree with the premise of the site (though I'm not one of them), unlike the countless other movie review sites on the web. Second, reading these opinions of movies which focus on very different elements than I do when I watch a movie is an interesting exercise.

Finally, being willing to take another perspective and think about why people might hold that point of view is an important ability. Read a few of the reviews about movies you like, and don't get upset with their opinions. Read the review, think about why they hold their opinions, and think about why, as far as they are concerned, their opinion is right. Feel free to know that you are right, and don't feel compelled that you have to believe that they are right, but don't think about why you think they're wrong until you've thought about why they think they're right.

How to eat (o)sushi

Go read this opinion on what is the proper way to eat sushi. Now, you might be asking yourself how I ended up that page. Well, I searched for "My Darling Lorraine" on google,, and I followed a link to this opinion. From there, I clicked on the about the author link, who is apparently the girlfriend in question of the author, because from there there was a link to the sushi eating page. Like you needed to know that. I mean how I got there. How to eat sushi is a fine thing to know.

Damn Buggery Netscape/IE Differences

So there I was, coding merrily, when I noticed some strange requests in my logs. I had been using a single script as my index.html which handled all arguments, so my links on the page looked like href="?cat=5". I do all my testing in Netscape, since that's the best option in Linux, and in Netscape, this worked fine. These even worked fine in IE, until I added some other documents.

Once I added some other documents, I started seeing requests for document.html?cat=5 in addition to the requests for index.html?cat=5. You see, the behaviour of an empty href or an anchor href is to point at the current page. So href="" is the same as a link to self, and href="#anchor" is a link to the anchor named anchor in this document. So IE interpretted my href="?cat=5" to be self with the arguments cat=5, whereas netscape sent the request to the server, which found the index and passed it the arguments as expected. In this case, I think that IE may actually be right, but it's these annoying behaviour differences that drive web authors up the wall. Grr..."

It’s an Octothorpe, damnit.

Not a hash, not a pound, not a number; It's an Octothorpe, damnit. Why is this so complicated?

Ruby Tuesday

I came across the Ruby Programming Language through Perlmonks. It looks cool enough, though I don't have any reason to use it. The neatest thing it does is allow for punctuation within method names, ala scheme, making for much more readable code. I was a little surprised to find out how long it's been around, though, and just how much stuff `apt-cache search ruby` revealed to use it.

When an X-Acto isn’t an X-Acto

Seth just asked me if he could borrow my X-Acto knife, and I said "I don't have any X-Acto knives here." He said "Sure you do..." and then I realized he was referring to my knife...

So why is this not an X-Acto knife in my mind, while a generic cotton swap is a Q-Tip, and a generic nose hanky is a Kleenex? Probably because this isn't an X-Acto. The blade of an X-Acto attaches to the end of the handle and is tightened by turning the end of the handle. This knife has a blade which is pushed out from the inside, and which can be broken off when the tip becomes dull.

It's not like it's an exact science or anything.