I bought a Linksys WRT54GL today, to replace our aging DLink DI-624 (it had been acting pretty flaky as of late). The Linksys router supports open-source firmware, and our first course of action was to flash the highly recommended DD-WRT distribution. I have to say that I am very impressed with this firmware. There are lots of options available and it reports lots of interesting information.

Setting up the router wasn't difficult, but my dad and I ran into problems getting our IBM laptops connected wirelessly. All of our other machines were able to connect without any problems, so it was clearly a problem with either the ThinkVantage Access Connections application or the IBM wireless adapter. We spent quite a while trying to get things working, and finally found the issue. We had originally set the Wireless Network Mode option in the router basic setup to "G-Only" mode since we intended to use 802.11g only around our house. But for whatever reason, the IBM laptops didn't like that. Switching the option back to "Mixed Mode" cleared up the problem immediately, much to our delight. Hopefully this little tidbit will help out someone else facing the same problem.

4Q Gaming Outlook

Oct 4, 2007

My birthday was earlier this week, and I got The Legend of Zelda: Twilight Princess for our Nintendo Wii. So far it's been a great game, and I've only just started the story line (even though I'm only over 4 hours in). There are lots of great games coming in the fourth quarter of this year, and I'm so excited! Here's what I'm looking forward to:

  • Metroid Prime: Corruption (Nintendo Wii, Available Now!)
  • The Legend of Zelda: The Phantom Hourglass (Nintendo DS, Available Now!)
  • Half-Life 2: Episode 2 (PC, October 9)
  • Portal (PC, October 9)
  • Guitar Hero III: Legends of Rock (Nintendo Wii, October 28)
  • Call of Duty 4: Modern Warfare (PC, November 5)
  • Gears of War (PC, November 6)
  • Unreal Tournament 3 (PC, November 9)
  • Super Mario Galaxy (Nintendo Wii, November 12)
  • Geometry Wars: Galaxies (Nintendo DS & Wii, November 13)
  • Crysis (PC, November 16)

So many games, so little time! What games are you looking forward to?

P.S. - This is post #400 at Year of the Code Monkey. Pretty cool!

Firefox 3 will include several heavy-hitting changes to extension development, some of which will cause existing extensions to break. Let's take a look at what's changing, to get an idea of what to expect from a development point of view:

New APIs One big change that will likely break some existing extensions are the new Firefox APIs being introduced in 3.0. All of the bookmark and history APIs are changing radically, with the introduction of the new Places architecture. As such, any extensions that make use of these will need substantial work to run properly in Firefox 3. Similarly, any extensions that use the Password storage functionality in Firefox will need changes (a new login manager will be used to handle stored passwords). It remains to be seen how one will develop an extension that will be compatible across all versions of Firefox. I haven't seen any mention of simply deprecating the existing API calls, though I would hope that's what the developers would do.

Secure Updates Firefox 3 will require that all extension updates be provided over a secure channel, to avoid man-in-the-middle attacks. This means that if you are not using the official addons.mozilla.org website to host your extensions, you must provide your own secure method of distributing updates. One has several options for doing this:

1. The updateURL must either use https or not be provided at all.
This method assumes that you either host with the official site (thereby not using an updateURL value at all), or you are willing to host your extensions from a secure location using https. The latter option will likely cost you money, while the former forces you to use a website beyond your personal control.
2. The updateURL uses http and the updateKey entry is specified.
This second option seems a little easier to swallow, though it will involve a little extra effort on the behalf of extension developers. First, an updateKey value must be provided in your extension's install.rdf file. Second, a digital signature must also be included in the update manifest; otherwise, the update will be rejected. Your updateLink value can either use https, or it can use http while providing an updateHash value. The updateHash value can be generated using either a sha1, sha256, sha384, or sha512 hash algorithm. But take note: you should not use sha384 or sha512 as of this writing. This forum thread mentions bug 383390, in which both sha384 and sha512 values are incorrectly truncated by Firefox 2.x (making backwards compatibility a problem).

Some further information about this new signing process can be found here.

Other Changes The two items above aren't the only changes coming down the pipeline for extension development, but they are the largest changes that I can see. A document detailing the new items is available, and should (hopefully) be updated as 3.0 nears an actual release date. It looks like extension developers will have a fair amount of work coming up, but I think these changes will be beneficial in the long run. How well the community accepts these changes remains to be seen.

Thoughts on iTunes 7

Sep 26, 2007

As I mentioned briefly yesterday, I recently bought my first iPod (the 80 GB, generation 6 model). I haven't gotten much time to play with it due to constant interruptions at work (which really sucks), so I'll be coming back to it later this week. For now, I'd like to share some thoughts on iTunes 7.

I've been using iTunes on my laptop for a while now, for the sole purpose of subscribing to podcasts that I enjoy (Diggnation, The Totally Rad Show, They Might Be Giants, etc.). In that regard, it does a great job. But until now, I hadn't used any of the the music library features.

Ripping a CD in iTunes

Ripping music from a CD is very easy. You simply put in the CD and iTunes prompts you to import it (after loading CDDB information about the CD). I like the fact that I can cancel the prompt, unselect the tracks that I don't want to import (or fix incorrect track names), and continue. I'm a accuracy freak, so the CDDB information is always important to me. Thankfully, the iTunes database is way more accurate than the database used by Windows Media Player. To my best recollection, I haven't needed to make any corrections so far; simple tweaks to remove stuff like "[Live]" or "(alternate take)" are all that I've done. Editing track information is incredibly easy, and you can batch edit multiple tracks at once (very handy).

In order to get album art, you must have an Apple store account. And in order to get an account, you have to provide a credit card number (which sucks). Thankfully, there's a way around this. Simply buy a prepaid iTunes card (I bought one for $15), and use that to create the account. Easy and a little more secure! Downloading the album art is quick and painless, but iTunes sometimes gets it wrong. Thankfully, it's easy to use your own album art image files. But where does one get these images? Surprisingly, I've found that Amazon.com is the best place to get the images. Most albums have user-submitted images, which can be used easily. I've filled all the holes in my collection using this technique, so I highly recommend it.

The iTunes Album View

I've noted that iTunes is clearly a multi-threaded application. When I'm ripping a CD, both of my processors are using about 80% of their available cycles. Ripping seems to take a little longer than in Windows Media Player, though I haven't done a side by side comparison, so it could simply be my poor time estimation. I chose to use MP3 files (instead of AAC) at 160 kbps, higher than the 128 kbps I used to rip at with WMP. I'm about 2/3 of the way through ripping my music library, and it's taking forever. But think of the music I'll be able to listen to!

Syncing music from my computer to my iPod is incredibly easy. I initially thought that I would manually manage the music on my iPod, but the automatic syncing is so easy I'm not sure that I want that hassle. Other miscellaneous thoughts: the "cover flow" view in iTunes is a nice gimmick, but seems a little impractical for frequent use. I prefer to use the searching, sorting, and browsing options (which are all quite responsive).

Overall I'm quite pleased. Like any application, iTunes has its quirks, but overall it seems like a very solid program. I think I prefer it to Windows Media Player 11, which now feels like even more of an iTunes wannabe than it did before I switched.

A recent article at Indistinguishable from Jesse gives some updates on the current state of memory management in Firefox. There are some exciting improvements coming in Firefox 3, which should be a boon to many users. One of these days, when I get a free chance, I'd like to examine my extensions with the leak-gauge.pl script. I'm not 100% sure that there isn't a leak or two in Googlebar Lite, though I've done my best to be careful.

In entirely unrelated news:

  • WordPress 2.3 has been released. I'll probably upgrade sometime this week.
  • I just got a new 80 GB iPod. Pictures, reviews, and thoughts will appear throughout the week, so stay tuned.

Another new recurring feature I'm going to try out here at the site are programming tip 'grab bags.' These will often feature a few tips I've picked up over the years, which I find highly useful. We'll start out this inaugural article with a few Perl tips:

1. Don't parse command line options yourself

One thing I've learned a number of times over is to never parse command line options yourself. Why? Because the Getopt::Long and Getopt::Std modules do it for you (and they make it both easy and convenient). These standard modules allow you to store away your command line options either in separate variables, or in a hash. There are times you'll want to use Getopt::Long over Getopt::Std (and vice-versa), so know the differences between the two. Either one will save you lots of time and headache. Here's one way to make use of this module:

use Getopt::Std;

our($opt_c, $opt_d, $opt_t);
getopts("cdt:");

my $filename = shift;

This tiny snippet parses the given command line parameters, looking for either a 'c', a 'd', or a 't' option. In this example, the 'c' and 'd' options are flags and the 't' option expects a user supplied value (note the trailing colon). If the user passes either '-c' or '-d' on the command line, the $opt_c and $opt_d variables will get set appropriately (otherwise, they remain null). Likewise, if the user passes a '-t' on the command line, the $opt_t variable gets set to the value the user passed in (so the user would need to type something like myScript.pl -t someValue). Otherwise, $opt_t remains null. Also note that we are still able to retrieve other values passed in via the command line (in this example, a filename). Quite handy!

One other hidden benefit of the Getopt modules is the fact that they handle combined options. So, myScript.pl -cd would parse just the same as myScript.pl -c -d. Doing this kind of parsing by hand would be tricky, so don't try to do it. Let Getopt do all the work for you.

Getopt::Long allows for long options (which make use of the double dash, such as --verbose), but it can also handle single letter options. Storing options in a hash is also available to both modules, making it very easy to set up if you have lots of options to parse.

2. Use printf (or variants) to print plurals

This tip comes from the excellent Perl Cookbook, and I've used it a number of times. Use either the printf or sprintf functions to handle printing the proper plural (or singular) of a value. For example:

printf "%d item%s returned", $size, $size == 1 ? "" : "s";

If there were only 1 item, we would print out 1 item returned. Likewise, if we printed out 2 or more items, 2 items returned (note the trailing 's'). You can use this trick to print the proper plural for words that have strange plurals, like "goose" and "geese."

3. Use File::Spec to handle cross platform file paths

The File::Spec module and its children allow one to easily make cross-platform file paths, useful for those scripts which must operate across operating systems. In one project at work, I made use of the File::Spec::Functions module, which exports a number of handy functions. I find the catfile function very handy, and I use it like so:

my $logFile = catfile('weeklybuild', 'log', 'build.log');

The function takes care of putting the right separators between the values (backslash for Windows, forward slash for Linux, and colons for the Mac).

Earlier today I mentioned the xkcd web comic. If you aren't familiar with the comic, I highly recommend it. It's well worth subscribing to or bookmarking. I've gone through all of the comics, and have compiled a list of my favorites. Make sure you read the hidden jokes in each strip, by hovering over them with your mouse for the title attribute. Enjoy:

One nice thing about the xkcd web comic, is that each comic's image has an additional joke or tidbit of information hidden away in an HTML title attribute. Hover your mouse over it for a second or two, and you'll see the joke. Sometimes, the text is fairly lengthy, as in this example. Unfortunately, Firefox only shows one line of text in a title tooltip, so any lengthy amounts of text get cut off with an ellipsis.

Thankfully, bug 218223 was filed way back in 2003 (as a Firebird equivalent of a bug posted in 2000). Now, 7 years later, a fix has been implemented. Firefox 3.0 will include this fix, much to my delight. This just might be enough to make me switch to the alpha builds of 3.0 for my daily browsing habits.

Update: I've found an extension that fixes this problem. Woo-hoo!

A Gaming Milestone

Sep 13, 2007

Among all of the computer games I have ever played, one game has stumped me for as long as I have played it: the "Expert" difficulty level of Minesweeper. I have never, to my knowledge, beaten the game at that level, though I've tried a number of times. Granted, Minesweeper is a game that I rarely play, but you would think that I could have beaten the Expert level by now.

I'm happy to say that I've finally conquered this foe. Here's my result:

Cleared in 376 seconds

The Reading Rainbow

Sep 10, 2007

Last week I took some much needed vacation. During that time I happened to pick up a book to read, something I haven't done in a long time (as sad as that is to say). My book of choice was Sherlock Holmes: The Complete Novels and Stories Vol. 1, which I received years and years ago from a family friend. I have never successfully read through all of the stories, though I have finished the odd one or two. My goal this time around is to complete the entire book. So far I have read through the two novel-length stories in the book: A Study in Scarlet and The Sign of Four. Both are gripping reads, and I found that I could hardly put the book down once I started reading. I'm very excited about the rest of the short stories. And then it's on to volume two!

What is everyone else here reading? Or are you even reading at all? It's certainly such a 20th century thing to do... ;-)

iPhone Rebate

Sep 6, 2007

Gizmodo has an interesting article on why they think Apple is offering the $100 coupon for early adopters of the iPhone. I happen to agree with the article 100%. Pretty clever marketing on Apple's behalf.

BioShock Review

Sep 6, 2007

I've played through BioShock a couple of times, so I thought I'd post my thoughts on the game. There are incredibly in-depth reviews all over the web, so I'll try to keep this as short as possible (fat chance though, right?). All of these thoughts pertain to the PC release, my gaming platform of choice.

The Good

Graphics
Without a doubt, this is one of the best looking games available today. It doesn't feel as gritty or realistic to me as Half-Life 2, but the game is a sight to behold. The water effects are well worth the price of admission. Future Unreal Engine 3 games should be fun to play.
Voice Acting
BioShock has some of the best voice acting in any game, on par with all-time greats like System Shock 2 and Half-Life 2. Many of the characters are believable, though there are a few rough edges. The primary bad guy is particularly bad, and you'll really come to hate him by the end of the game.
Art Direction
No game ever produced can touch the art direction presented in this game. In one particular level (Fort Frolic), you fight several waves of enemies all to the strains of Waltz of the Flowers from Tchaikovsky's The Nutcracker Suite. It's a magical gaming moment that I won't soon forget.
A Definite Psychological Thriller
There are a lot of really psychological moments in this game, many of them bordering on the horrific. Not many games can pull that off without being cheesy, and BioShock does an excellent job of keeping it just scary enough.

The Bad

I unfortunately have a laundry list of gripes with this game:

Volume Problems
The audio diaries scattered throughout the game are often difficult to hear. Turning on the audio-subtitles helps a little, but they quickly get out of sync (clearly a game bug). Hopefully a patch will fix this issue.
Mediocre UI Design
In order to see how many Little Sisters are left in the current level, as well as how much money and Adam you currently have, you have to go into the game menu (by pressing Escape). Storing critical information like that in a game menu is an incredibly poor design decision. Maybe this is different on the 360 release?
Repetitive Combat and Hacking
The bestiary in this game is very limited, which inevitably leads to repetitive combat. In addition, there are far too many enemies on some levels. System Shock 2 did a great job of maintaining a slower pace by limiting the number of enemies on each map. The pace in BioShock seems entirely too fast. Similarly, the hacking mini-game quickly gets tedious. Having additional hacking mini-games would have helped in this department.
Way Too Linear
Most first-person-shooters are linear affairs, but BioShock is too linear. While you have the option of visiting a previously cleared level, you never have a need to. System Shock 2 did a great job in this arena, forcing you to revisit levels to obtain some item you needed to continue on your journey. BioShock could have made backtracking a fun thing to do, but it ultimately does not, a big disappointment.
No Inventory System
How the hell am I supposed to tell what I'm currently holding?

The Ugly

This Is No System Shock
Touted as a "spiritual successor" to System Shock 2 (one of my favorite games of all time), I was expecting this game to be just as good. And it's simply not. There's a lot to like about this game, but there's also a lot to dislike about it. When I finished both System Shock 2 and Half-Life 2, I literally sat through the end credits thinking "Wow; that was one of the best gaming experiences of my life!" At the end of BioShock, I was simply glad the game was over. How disappointing!
Pricey
Games are expensive, and a blockbuster like this is expected to be pricey. But $50 seems a little high to me. I didn't feel like I got $50 worth of entertainment out of it. Which is why I'm glad I only paid $26 (long live Amazon rewards points)! :twisted:

Do I recommend this game? Absolutely. It's a must-play for 2007. There's a lot I ended up disliking, but overall I think the experience was a positive one (if only for the enjoyable art direction and eye candy). I'm guessing the 360 edition of the game is similar in most regards, but at least one review preferred the PC edition (your mileage may vary). If you don't have this game, be sure to pick it up.

It's Labor Day weekend once again, which means that it's time for the Old Fashioned Farmer's Day in Silk Hope, NC. Last year I took a number of pictures of the event, and I plan to do the same again this year. If you're located in central North Carolina, and you're looking for a good time this weekend, I recommend checking it out. It's just good ol' country fun!

Bioshock Foolishness

Aug 26, 2007

There have been some recent reports that Bioshock installs a rootkit onto one's computer. The 2K Games developers decided to use the SecuROM copy protection scheme, which installs a process with administrative privileges, allowing those users who do not have such privileges to run the game. A registry branch that happens to contain an asterisk also gets created, causing some rootkit detectors to flag the software. The service is apparently difficult to remove (which disappoints me), but it's questionable as to whether or not this is actually a rootkit. I'm definitely going to keep my eyes open on this issue, especially since I'm so excited about this game. Here's to hoping that things are as bad as people are making them out to be.

It appears that WordPress 2.3 has been feature frozen, and has now entered the bug hunting and fixing phase. The listing of what's new seems pretty bare bones, but I guess that is to be expected on a shorter release schedule. One of the big new features coming is tagging, something I've neither been impressed with nor interested in. Does anyone here make use of that on any other website? I don't see too much difference between tags and categories, so why include them? What I really wish they'd get around to adding is an automated updating feature; migrating to a new version is really painful.

For what seems like an eternity now, I've been trying to decide whether to purchase an Apple iPod to replace my Creative Zen Micro (I've outgrown the 5 GB of storage). And wouldn't you know it? Just as I seriously start to move towards purchasing one, my favorite retailer quietly stops stocking them.

A UBS Investment Research analyst recently speculated that Apple might refresh their iPod lineup in the next month or so:

In his note to clients, the UBS analyst also said he expects Apple to refresh its iPod video and iPod nano lines sometime next month. Among the expected introductions are higher capacity iPod nanos at aggressive price points, as well as a flash based widescreen video iPod likely using multi-touch technology for less than $300.

Will all the large iPods go to flash based technology? That would be a surprise to me. The largest flash drives I've seen on the market are 16 GB, far short of the 30 GB size of today's iPods. And what about this price increase? Quoting a price point of less than $300 indicates to me that the new device will cost somewhere between $250 (the current price) and $300 (I'm going to predict $299). It just so happens that $250 is about as much as I'm willing to pay, especially since I still have to buy a separate wall charger (which I still contend is highway robbery). I just wish Amazon would stock the 30 GB players again at $225 ($25 off). If they did, I'd be sold.

A Perl Module Primer

Aug 18, 2007

I've recently been wrangling with some Perl code for a project at work, and have been putting together a Perl module that includes a number of common functions that I need. As such, I had to remind myself how to create a Perl module. During my initial development, I ran into a number of problems, but I eventually worked through all of them. In the hopes of helping myself remember how to do this, and to help any other burgeoning Perl developers, I've written the following little guide. Hopefully it will help shed some light on this subject.

Let me preface this guide with two important statements:

  1. I'm not aiming to show you how to create a module for distribution. Most of the other tutorials cover that topic in depth.
  2. I am going to assume that you have a working knowledge of Perl.

To start, let's take a look at our sample module:

package MyPackage;
use strict;
use warnings;

require Exporter;
our @ISA = ("Exporter");

our %EXPORT_TAGS = ( 'all' => [ qw(sayHello whoAreYou $firstName
    %hashTable @myArray) ] );
our @EXPORT_OK = (@{ $EXPORT_TAGS{'all'} });
our @EXPORT = qw();

our $firstName = "Jonah";
our $lastName = "Bishop";

our %hashTable = { a => "apple", b => "bird", c => "car" };
our @myArray = ("Monday", "Tuesday", "Wednesday");

sub sayHello
{
    print "Hello World!\n";
}

sub whoAreYou
{
    print "My name is $firstName $lastName\n";
}

1;

We start out by declaring our package name with the package keyword. Special Note: If you intend on having multiple modules, and you use the double colon (::) separator, you're going to need to set up your directory structure correspondingly. For example, if I had two modules, one named Jonah::ModuleOne and another named Jonah::ModuleTwo, I would need to have a folder named Jonah, inside of which would live the code to my two modules.

I next enable the strict and warnings pragmas, since that's good programming practice. Lines 5 and 6 are standard to virtually all Perl modules. First, we require inclusion of the standard Exporter module, then we indicate that our module inherits from said Exporter (the @ISA (is a) array is what sets this).

Line 8 is where things get interesting. We need to specify what symbols we want to export from this module. There are a number of ways of doing this, but I have chosen to use the EXPORT_TAGS hash. Special Note: This is a hash, not an array! I recently spent about an hour trying to debug a strange error message, and it all stemmed from the fact that I had accidentally created this as an array.

The EXPORT_TAGS hash gives us a means of grouping our symbols together. We essentially associate a label with a group of symbols, which makes it easy to selectively choose what you want to import when using the module. In this example, I simply have a tag named 'all' which, as you might guess, allows me to import all of the specified symbols I provide in the associated qw() list. Note that you must precede exported variable names with their appropriate character: $ for scalars, @ for arrays, and % for hashes. Exported subroutines don't need to have the preceding & character, but it doesn't hurt if you put it there.

Line 10 shows the EXPORT_OK array. This array specifies the symbols that are allowed to be requested by the user. I have placed the EXPORT_TAGS{'all'} value here for exporting. I will show how to import this symbol into a script in just a moment. Line 11 is the EXPORT array, which specifies the symbols that are exported by default. Note that I don't export anything by default. Special Note: It is good programming practice to not export anything by default; the user should specifically ask for their desired symbols when they import your package.

Lines 13 through 27 should be self explanatory. We set up two scalar variables, $firstName and $lastName, as well as a hash table and an array. Note that we precede all variables with the our declaration, which puts this variable into the global scope for the given context. Since we're using the strict pragma, we need these our declarations; otherwise we'd get some compilation errors.

Line 29 is very important and can easily be forgotten. When a Perl module is loaded via a use statement, the compiler expects the last statement to produce a true value when executed. This particular line ensures that this is always the case.

Now that we've taken a look at the module, let's take a look at a script that uses it:

#!/usr/bin/perl
use strict;
use warnings;
use MyPackage qw(:all);

sayHello();
whoAreYou();

print "$lastName\n"; # WRONG!
print $MyPackage::lastName . "\n"; # RIGHT!

Most of this should be pretty clear. Note, however, how we import the module on line 4. We do the typical use MyPackage statement, but we also include the symbols we want to import. Since we didn't export anything by default, the user has to explicitly ask for the desired symbols. All we exported was a tag name, so we specify it here. Note the preceding colon! When you are importing a tag symbol, it must be preceded by a single colon. This too caused me a great deal of frustration, and it's a subtlety that's easily missed.

One other interesting note: on line 9, we try to print the $lastName variable. Since we never exported that particular variable in our module, referencing it by name only will result in an error. The correct way to access the variable, even though it wasn't exported, is shown on line 9. You must fully qualify non-exported symbols!

Hopefully this quick little guide has made things a little clearer for you. If for no other reason, it will help me remember these subtleties of Perl programming. :-)

Awaiting Bioshock

Aug 16, 2007

One of the first reviews of Bioshock has been posted, and it paints a really exciting picture. The verdict? 10 out of 10! I'm a big fan of the System Shock series, and seeing that Bioshock is a 'spiritual successor,' really gets me pumped. The screenshots evoke memories of Myst, System Shock 2, and Oblivion, all rolled together. I simply can't wait!

I'm going to try out something new here at the site; how well it does will determine if I continue to keep it up. Every so often (and I'll only do this on an occasional basis) I'm going to post a list of ten items pertaining to some topic. Consider it a "top ten" list if you will. This is just for fun, and is intended to foster some discussion. The inaugural topic: favorite television theme songs. I got the idea for this specific topic from a recent episode of The Jay and Jack Ramblecast (hat tip: Dustin). Here are my personal top ten, complete with links to each theme:

10. The Love Boat
This is definitely my dark horse entry, but I like it for one reason alone: it makes a great lounge singer song. I'm a fan of the lounge singer persona that Bill Murray did in Saturday Night Live, and this theme song would be great as sung by his character. As strange as it sounds, I think this would be a fun song to sing at a karaoke. At one point, I had this entire song memorized. I should also note that I never really watched the television show; I just dug the theme song.
9. Fresh Prince of Bel-Air
If there's one "rap" song that all white people know, it's this one. The Fresh Prince was one of the better shows of the early 90's. A memorable theme song made the show that much better.
8. Good Times
A classic theme song from a classic show. Any time I use the phrase "good times," I think of this theme song and usually bust out into a line or two from the theme. "Temporary layoffs; good times! Easy credit rip-offs; good times!" Dave Chappelle gave some props to this theme song in a sketch he called I Know Black People. Hilarious!
7. Sanford and Son
Of all the television theme show songs ever written, I think this one best fits the show it was written for. If you didn't know what Sanford and Son was about, and you only heard the theme song, you'd most likely say "that must be the theme to a show about a guy in a junk yard!" And you know what? You'd be right. The Simpson's made great use of this in the "Trash of the Titans" episode.
6. M.A.S.H.
This particular theme does an excellent job of capturing the sadness and hopelessness of war. For those who don't already know, the name of this song is "Suicide is Painless," and the lyrics are rather disturbing. An interesting fact is that the lyrics were written by a then 14-year old Mike Altman, son of the original film's director Robert Altman.
5. Airwolf
Who knew that a cheesy 80's television show about a super-helicopter would sport one of the best theme songs ever written? Airwolf was a show I wasn't allowed to watch growing up (I was far too young for it's content at the time), but the few times I did catch the intro really made an impression.
4. Knight Rider
If there was ever a reason to buy a giant sub-woofer, this television theme song is it. The bass line is incredible, and the show was nearly as good. I always wanted to be Michael Knight as a kid; having Kitt as your car would be totally awesome!
3. The A-Team
"In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem; if no one else can help; and if you can find them; maybe you can hire: The A-Team." An instant classic.
2. Doctor Who
Growing up, my family occasionally watched Doctor Who (I primarily recall watching Tom Baker as the fourth doctor). The theme music was as exciting as the television show. An interesting documentary on how the theme was developed is available on YouTube. Some of the effects used are pretty incredible (scraping a house key along a piano wire, for example).
1. The Dukes of Hazzard
This theme song, sung by country star Waylon Jennings, is my personal favorite of all time. I grew up as a big Dukes of Hazzard fan (it was probably my favorite show as a child), and I know the song by heart. The General Lee is still my favorite car of all time, and this theme song still ranks number 1 on my list. Oh, and Daisy Duke is was a real hottie.

So do you agree? Disagree? What television themes are you a fan of?

Amazon.com recently purchased AmieStreet.com, a digital music store that uses a unique demand based pricing. There has been some speculation as to what Amazon intends to do with this acquisition, but I'm guessing they will use this idea in their upcoming online music store. A demand based pricing system is interesting: all music starts out free of charge and, as the demand for specific tracks increases, so does the price. There certainly must be a price cap (no one would shell out lots of money for a single music track), but I'm not sure what that might be.

I think this could do very well for Amazon. One of the biggest selling points is that all music will be completely DRM free. Only time will tell how well Amazon can do against the existing juggernauts.