Monthly Archive for April, 2006

Not at all a bad way to spend a Sunday evening

Here’s something fun you can try at home. First, find a cool spring night. That could be kind of tricky depending on the time of year, but I just happen to have one right here that I’m going to use. Next, open up a bunch of windows in your house/apartment/whatever. Ideally you should be able to hear crickets, but if not, no big deal it’ll still work. Maybe turn on a fan or two and get a nice breeze going. Fire up your media player of choice and load up “Wien” by Labradford from their album Fixed::Context. If for some reason you don’t already happen to have this track handy, it can be easily and cheaply obtained from eMusic. Once you’ve got it loaded, set it to repeat and hit play. Now for the final step (and here’s where it gets good): just sit there. See what I’m talking about? I know, you can thank me later.

Our first anniversary!

It’s hard to believe that it’s been a full year since the crazy, hectic wedding planning came to an end and our long awaited wedding finally arrived. Despite having to brave freezing rain and snow at the end of April (and of course it’s unseasonably warm at this time this year) it was without a doubt the happiest, most special day of our lives and a lot of that was due to all of our families and friends who were there with us. We went out to celebrate Friday night by going to Skies for dinner, a revolving restaurant that offers some pretty cool views of the KC area. Oh, and some really nice food too. Definitely a good choice for an anniversary dinner out. Today we learned that even though we’ve only been married for a year apparently we’re already starting to think exactly alike. We both managed to get each other the same gift completely independently: cooking classes for 2 at the Culinary Center of Kansas City. Well, not the exact same gift fortunately. Jolayne signed us up for a class on BBQ and I got a gift certificate so we still need to figure out what class to take with that. Anybody want to be victims volunteers to test out the results of our soon to be acquired cooking-fu mastery?

The exciting world of operator precedence

I think it’s time we had a talk about operator precedence. Specifically operator precedence in C++ as it pertains to the bitwise “and” and “or” operators (& and |). (Ok, and let’s not forget the all too often overlooked “xor” (^)) One thing that it seems that people occasionally forget is that these operators are evaluated at a lower precedence than the comparison operators, such as == and !=. This means that the following piece of code doesn’t do what you might have assumed it would:

if (bitmap & BIT_MASK != 0)
{
...
}

Unless, of course, you correctly assumed that it would first compare BIT_MASK to see if it is not 0 (which likely is true) and then performs a bitwise “and” of the result of that comparison and the bitmap variable. Not the intended result at all. For this to work you would need to group the bitwise portion of the expression using parentheses (which also happen to be at the highest level of operator precedence) like so:

if ((bitmap & BIT_MASK) != 0)
{
...
}

(Of course the comparision to 0 is completely unnecessary in this example, but hey, it’s just an example.) This isn’t anything groundbreaking, in fact it’s pretty basic stuff. Still, given the fact that I’ve seen this several times as the root cause of defects I’ve fixed makes it seem like maybe this gets overlooked too frequently. I wonder if it may be due to the fact that the bitwise operations feel more like arithmetic operators such as + and – which do have a higher precendence than the comparison operators. It’s always a good idea to pay close attention to how your expressions will be evaluated and not just assume that things will be grouped the way you intuitively feel they would. And of course it’s an even better idea to actually step through your code and see just how that expression evalutes for different possible values of the variables, which would have caught something like the above mistake trivially.

Orb

A while back when I was gushing about my new phone, I mentioned an audio/video streaming program called Orb that I thought was pretty cool. 3 months later I’m still just as impressed with how simply and conveniently it can allow my phone to function as a portable media device. I’m guessing it’s just a matter of time until something like this makes iPods obsolete (ok, but I’m not going to take a guess as to how much time. It could still be a while, fair enough) Why worry about filling up a hard drive/flash memory device with music and movies when you can just stream them from your collection at home. I’m able to listen to my mp3 collection on my phone with a level of audio quality that’s almost as good as an mp3 player. It’s not quite there but I don’t know how much of the difference comes from Orb itself, the network speed, or just the fact that the phone’s audio hardware probably isn’t designed with serious music listening in mind. In my opinion though, I think video is where Orb is the best. I can watch any of my recorded tv shows from anywhere, and the best part is that I don’t have to re-encode them to a format and size that my phone can handle. Orb manages to pull off transcoding the files on the fly so the same massive uncompressed MPEG-2 recording of say, last night’s episode of the Daily Show can be displayed on my phone’s screen even when the network speed isn’t at its highest. It’s just another example of the way Orb makes something as seemingly complicated as streaming media content to mobile phones dead simple. Here’s the entire set up process: Install Orb. Start Orb. Set the folders that have files (music or video) that you want to stream. Log in from your phone’s web browser. That’s it. And it’s free. The mind boggles. There are a couple of small drawbacks, for example the playlist control for music files is somewhat lacking. Once my phone’s media player has started playing the stream there’s no way to skip over a song without stopping the stream returning to the phone’s browser to select the next song. I usually tend to just listen to large playlists on shuffle though, so it’s not that big of a problem for me. Also, if you were hoping to make friends by letting other people stream stuff from your computer at the same time, that’s pretty much out since it only allows for one user to stream at a time (though I think they may have a non-free version that allows for this). Minor issues aside, Orb is just about the best way to make use of a mobile phone ever. Other than, you know, talking to people. I have seen the future, and any future that involves watching an episode of The Simpsons while waiting in line at the DMV to renew your license plates is ok with me.

Spoon @ Day on the Hill in Lawrence KS


Last weekend Jolayne and I went to Lawrence to see Spoon play at Day on the Hill, a music festival put on by KU’s student activies center. Apparently the festival was pretty big in the mid 90’s but had gotten progressively less impressive in recent years, and had been on hiatus since 2002. This year was an attempt to revive the festival, and having Spoon as the headlining act was definitely a good start. It would have been nice to see some of the opening acts too, but really you can only pretend you’re still in college for so long. The above video is of the song “Everything Hits at Once” from their album Girls Can Tell which they played during their encore. As awesome as everything from Gimme Fiction is, I still think that one is probably my favorite song of theirs. The sound and video quality aren’t anything amazing, but I was pretty impressed at how well my camera was able to double as a video camera, especially from how far back we were.

BBQueue – A Yahoo! Widget

This has kind of been out for a while now and I meant to post about it earlier but it sort of got overlooked in the craziness of moving and whatnot, but I put together a widget for Yahoo! Widgets (the exclamation mark always seems like a little bit much to me) for checking up on the movies in your Blockbuster queue. It’s called BBQueue (Oh don’t worry, I’m already aware just how terribly, terribly clever that is.) I think it’s pretty handy if, you know, you use Blockbuster instead of Netflix, which we do. Netflix is kind enough to provide RSS feeds for their user’s lists but Blockbuster apparently isn’t too hip about what the kids are up to on the internets these days. As a result this widget gets by on screenscraping and I’d be almost willing to guarantee that if Blockbuster makes any changes to their site it’ll break my modest regex-fu. But for now it works, so hopefully it’s of use to someone and maybe someday I’ll get around to adding some more functionality to it.

The end of an age old debate

It seems that the whole time we were wondering whether pirates or ninjas were more awesome we were asking entirely the wrong question. The true winner of the struggle for awesomeness has emerged from the shadows and it’s… ATF agents? Despite the fact that ninjas are not normally known for being involved with either alcohol, tobacco, or firearms ATF agents recently detained a University of Georgia student who was dressed like a ninja as he was leaving a “pirates vs. ninjas event” on campus. As I’m sure you’re aware, the only way a ninja would be leaving such an event would be if all the pirates were dead. That the ATF agents were able to subdue the victorious ninja clearly shows that they deserve their place on the top rung of the awesome ladder. In addition to vast physical prowess these agents obviously possess a fearsome cunning as well:

‘Seeing someone with something across the face, from a federal standpoint — that’s not right,’ McLemore said, explaining why agents believed something to be amiss.

Obviously from a state or city jurisdiction standpoint this situation would be no cause for alarm. Fortunately thanks to highly trained federal agents we have nothing to fear from collegiate ninjas with something across their face.

It’s harder than it looks

Contrary to popular opinion (and by popular I mean mine, previously) a house is not just like an apartment that you’re allowed to paint. It turns out that owning one is, to put it mildly, a fair amount of work. I mean, I’m sure it’s worth it, what with all the equity and whatnot but still a lot of work. At any rate, it’s certainly kept us busy over the past couple months. The move itself went smoothly and with minimal destruction of personal belongings. We’re mostly unpacked now but we still need to kind of improve the storage situation somewhat. Another thing that I didn’t realize about getting a house is that it means that Home Depot gets all of your money. Of course I’m just kidding and that’s not really true. Lowe’s gets some of it too. Speaking of fun ways to spend a lot of money on your house, here’s what we woke up to one morning in March a couple weeks after we moved in:




You can’t really tell from the video but a lot of the hail was almost golfball sized. Here’s Jolayne holding some of the hail stones afterwards.

At the time we just thought, “Man, isn’t it awesome that we have a garage. Otherwise our cars would be totally messed up.” It looked to us like we escaped with no other damage than some window screens that got knocked out. Just to be safe though we had an insurance adjustor come out and look at the roof. And that’s when we learned a valuable lesson about home ownership, the lesson being that hail is very, very not good for your roof. Consequently, we’ll be having the roof replaced shortly. Welcome to owning a home!