I signed up for Netflix today, and I'm starting to populate my queue with stuff I've been meaning to either see for the first time, or rewatch becaues it's been such a long time. Thanks to the very handy Wordpress Netflix Plugin, I'm able to share my latest queue picks here on this site. Over in the sidebar are the cover images for the next 6 titles in my queue. Each one is a link to the movie listing, and if you hover over the image, you'll see the movie title. I'm really looking forward to catching up on all the stuff I've missed over the years. So long cable TV!
Netflix Queue Plugin
Oct 13, 2008Review: Dyson DC25 Vacuum Cleaner
Oct 9, 2008Here's another home related product review. Before I jump into it, however, let me tell you a story.
Several years ago, my mom wanted to get a new vacuum cleaner. Her current one had served her well for a number of years, but was nearing the end of its life. My dad, sister, and I decided to get her a Dyson Animal for Christmas (we got her one of the older models; the one linked to is a newer one). It was quite expensive (~$400 if I remember correctly), but we wanted to splurge and get my mom something nice, so we did. On Christmas eve, my mom vacuumed the living room with her old vacuum, and everyone went to bed. The next morning, we got up and opened our presents. After all of our packages were opened, my mom wanted to try out the new vacuum, and did so on the freshly vacuumed floor from the previous night. To our surprise, one pass of the Dyson over the carpet actually made it look cleaner. She continued to vacuum the whole room, and in the end, the canister was completely full of cat hair, dust, and dirt! Needless to say, we were sold on the Dyson line of vacuums.
The Dyson line has improved since those early days, and the new Dyson DC25 uses a ball to handle steering. After reading a bunch of reviews for it and its smaller brother (the DC24), I decided to go with the DC25. Every review I read was highly positive, so I broke down and bought one.
Just after I moved in, I had the carpets professionally dry-cleaned (the former owners had several pets). The guy did a great job, and the carpet looked much better once he was done. Remembering my mother's experience with the Animal, however, I decided to give the carpets another cleaning with the DC25. I ended up emptying the canister twice! I was shocked at how much pet hair and dirt the professional cleaning left behind. Not only did my carpets look better at the house, the whole house smelled better! The ball really is amazing to use (a flick of the wrist is all that's needed to steer the vacuum), and it's much lighter than my mom's older Animal. Setup was very easy: a total of 4 clicks was all that was needed to get things going. And cleanup is a cinch; one button allows you to disconnect the canister from the vacuum, while another allows you to dump the contents into the trash, all with one hand!
This vacuum has a few drawbacks, however. First of all, it's very expensive, much more so than its competition. I personally think the cost is worth it, considering how well my experience with this line has been in the past. But it may be a little off-putting for most people. Second, the documentation that comes with the vacuum is sorely lacking. I was really disappointed with the poor quality, and was hoping for something a little more substantial. Next, the packaging ends up being a mountain of cardboard. It's all recyclable, of course, but the amount of cardboard that came in the box was pretty crazy. Finally, the cord feels a little shorter than the one on my mom's Animal. This isn't a big problem, but a few extra feet would have been appreciated.
All in all, I'm quite happy with my purchase. I was pleasantly surprised at how much dirt and debris the vacuum picked up, and I'm glad I gave my house another once-over with it. If you're willing to pay the high price, you won't be disappointed with the Dyson DC25. It gets a solid A+ from me.
Electronics Shopping
Oct 6, 2008I'm currently in the market for a new television and a DVD player, and I still have absolutely no idea which way to go. There's plenty of educational material on the web, and I've read a fair amount of it. The classic LCD vs. plasma debate is the topic of conversation everywhere, and everyone seems to say the same thing: it all depends on what you want. Plasma has some great pros: deeper black levels, a better viewing angle, and (according to some sources) cheaper per inch than an LCD. One of the major drawbacks for me is that plasma screens are highly reflective. I've got four windows that allow in the bright afternoon sun, and they're directly opposite where the TV will ultimately be placed. I've got blinds, but they only do so much for the light. However, I primarily watch television at night, so it's not a major issue (though it might become one in the summer, when it's lighter later).
My current TV of choice is the Panasonic Viera TH-42PX80U (which seems to be offered by a different 3rd party outfit every day). I've read that at under 50 inches, going to 1080p isn't really worth it, unless you plan on using the screen as a computer monitor. I'm not planning on doing that, so the cost savings is worth it to me.
As far as DVD players go, I'm not sure what to do. Lots of players do upconversion these days, but I've read some strange reports of problems with this feature. Some players upconvert to 16:9 only, forcing you to stretch older DVDs (e.g. older television shows) to fit the screen. Other players have reports of defaulting to 1080p, causing display issues on 720p sets.
What kinds of TVs and DVD players do you folks use? Any tips on what I should buy or avoid?
Going to Netflix
Oct 5, 2008One of the decisions I made before I moved into my new house was to not sign up for cable television (though RoadRunner was a requirement). Instead, I've decided to watch television over the air. This will fulfill nearly all of my television watching needs: The Simpsons, The Office, Pushing Daisies, the news, PBS, etc. Right now, I've got an old, tiny CRT television hooked up to some rabbit ears. The reception is shoddy, the picture blurry, and things are generally bad. Hopefully, switching to digital television will fix this (more on this in an upcoming post).
Instead of cable television, I'm going to try out Netflix. I've heard great things about it from various people, and it's way cheaper than paying Time-Warner (in the neighborhood of $40 or $50 cheaper a month). And interestingly enough, I see reports of people dropping cable for Netflix around the web (in a number of product reviews at Amazon, for example). There are a literal ton of movies that I've never seen, and it's high time to catch up. Plus, I'm eager to catch up on some old television shows that I enjoy (MAS*H, Cheers, and Frasier to name a few). Just as soon as I can pick up a DVD player (and possibly a new television), I'll sign up.
Do you use Netflix? If so, what do you think?
David Blaine: Idiot Extraordinaire
Sep 23, 2008Does anyone even care about this guy anymore? His latest stunt, in which he'll be upside down for 60 hours, might leave him blind. It's sad to see him have to resort to stunts like this to get attention. But I guess that's the way of things, seeing as magic lost its charm after all of those Magic's Biggest Secrets Revealed specials.
At least he's easy to make fun of. There are some really great David Blaine parodies on YouTube, all of which I have linked below. They really nail his demeanor and the jokes are hilarious. Mind the salty language, however. Each video is about 5 minutes long, so make sure you have some time to watch them.
Blast From the Past
Sep 22, 2008I've recently been looking for a few new computer games to play. Seeing as there's nothing on the immediate horizon that suits my fancy, I decided to dig into my existing computer game collection for something I hadn't played in a while. The first title that popped up was Microsoft's Rise of Nations, the one and only real-time strategy (RTS) game that I own. I'm not a big fan of the RTS genre, mostly because I'm really terrible at those types of games, and the only reason I own one is because my dad got it for free at a Microsoft conference. Surprisingly to me, it's a fun little game. As I've already said, I stink at RTS games, so even playing on the 2nd (of 7) difficulty levels still presents quite a challenge. But I have fun playing the game, and that's what matters.
As much fun as I was having, there was still an itch that I couldn't scratch. Thanks to some recent Diablo III screenshots I found via a news posting on Blue's News, it occurred to me: I needed a good-ol' role-playing game (RPG) to play. So I dug through my still-boxed computer games (which I never unpacked), and found my old copy of Sacred. It's a Diablo-like RPG and was just what I was looking for. While perusing the Wikipedia article on the game, I noted that an expansion pack had been released, something that I originally had not picked up. A 'gold' edition of the game had later been released, including the original game along with the expansion. I saw it for sale on Amazon for $25.99, which seemed a little high, considering I already owned the base game. Thankfully, the game is also available on Steam for a paltry $9.99. I was sold, immediately bought the game, and I'm already having a blast (and I'm looking forward to all the new content).
Score another win for the Steam platform.
Amazon Wish List Improvements
Sep 19, 2008Long, long ago, when I was first setting up my website at DreamHost, I wanted a way to store a personal wish list. I looked at the Amazon wish list, but it had one fatal flaw: there was no way to list items that weren't sold at Amazon or one of their partners. This flaw was enough to drive me out to develop my own wish list software. It's not flashy, but it gets the job done. But it, too, has some annoying faults.
Recently, while perusing Lifehacker, I ran across a link to this article that points to the Amazon Universal Wish List. Essentially, Amazon provides a bookmarklet to users, enabling them to save any product to an Amazon wish list! This new feature has me seriously considering whether I should switch over.
One thing I really like about the Amazon wish list setup is that people can purchase things for you without knowing your address. So folks who would like to support Born Geek could simply buy me something off my wish list, without worrying how to get the item to me. Another big benefit is that I no longer need to copy-paste the product link and information. With this bookmarklet, it's simply a two-click process to save an item to my wish list. Pretty sweet!
One Perl Tip and Gotcha
Sep 16, 2008I ran into a strange problem with a Perl CGI script yesterday. Upon script execution, I received the following error message from IIS:
CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers.
A quick Google search of this error message turned up a number of discussions mentioning bugs in IIS, server configuration problems, etc. However, I suspected that my scripts were to blame (I had been hacking on them on Friday). But how could I determine whether I was at fault or if the server was to blame? Thankfully, the solution comes through one of the Perl CGI modules (here's the Perl tip):
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
The Carp module (and where does that name come from?) gives us the fatalsToBrowser
and warningsToBrowser
subroutines. When included in your script, any resulting Perl execution errors will be output into the browser window (very handy). After turning on these features, I immediately found my error. It resided in this line (here's the gotcha):
$safeProductName =~ s/\$/\\$/g;
It was my intent to replace any instances of the dollar sign character ($) with a backslash-dollar sign pair (\$). At first glance, this substitution rule may look alright. But it's not! The replacement portion of a substitution is treated as a double quoted string. So, the interpreter was escaping the backslash just fine, but then hits a naked dollar sign, indicating a variable (of which I didn't provide a name). And so it chokes! The line should have read:
$safeProductName =~ s/\$/\\\$/g;
Note the three backslashes in the replacement string. Two to print an actual backslash character, and one to print the actual dollar sign. Subtle? You bet.
2008 Summer Paralympic Games
Sep 13, 2008There a really great page with photos from this summer's Paralympic Games, the forgotten little brother of the Olympics. The things some of the folks in these pictures are doing are way more impressive than anything I saw in this year's Olympics (excepting Michael Phelps' craziness). Soccer matches featuring blind players? Crazy. One armed archery? Epic. These people truly define 'athlete'.
Fair Games
Sep 7, 2008(I've been neglecting the 'Accessibility' post category at this site for a while now, and it's high time to correct that mistake. Expect some more posts in this area over the coming days.)
There's a really great article that's been posted about the work my dad is doing with Maze Day. Maze Day is a yearly event geared towards children with disabilities, and held at the Computer Science Department at UNC. Each year, the students come out to try out new games and technologies being developed for them. Some really cool stuff has been developed over the past few events, and I know the students always have a blast taking part. Check out the article to learn about the cool things being developed (and given away for free!) for kids with disabilities.
Harry Potter and the Deathly Hallows
Sep 7, 2008I just completed the seventh and final installment of the Harry Potter series: Harry Potter and the Deathly Hallows. Without a doubt, this final volume is the pinnacle of the series. The narrative is unlike any of the previous installments, and reads like a non-stop action movie. And while I'm on the topic of movies, I will go ahead and predict that the feature film for this story will not do it the appropriate justice. To fully appreciate this story, and the overall arc of the boy wizard, one must spend time with the books.
I'll admit that I was apprehensive of going into this final story; a little scared, even. A great sense of foreboding precedes the reader into this final volume, and never once lets go. My nerves are pretty shot as a result (J. K. Rowling is truly a master of the cliffhanger). Thankfully, I can say that the finale is well worth the journey through seven years in the life of Harry Potter.
Completing this series is difficult. I've become friends with the characters in these books, and to know that their adventures are over is a little sad. But, as I mentioned in a recent post, the reading bug has bitten me once again, and I look forward to delving into other worlds.
If you haven't read this series, pick it up. If you think the series is just for younger readers, think again. And if you're persistent enough to read through all seven volumes, you will be rewarded. I feel safe enough to say that these books now rank among my favorites, and will hold a treasured spot on my book shelves.
WordPress 2.7 Sneak Peek
Sep 4, 2008There's an interesting article offering a preview of the next major release of the WordPress blogging platform. It looks like the old administration look and feel will be returning, especially on the write panel. I'm looking forward to having more vertical screen space when writing, but these changes will (yet again) take some getting used to. There's lots more changes in store, so 2.7 should be an interesting release.
Google Chrome
Sep 4, 2008There's an incredibly insightful comic (hat tip to Dustin) on the new Google Chrome web browser. It explains a number of the design decisions that the Chrome team has made, and the ramifications behind them. There are some very interesting ideas in this new web browser:
- Instead of taking the pure multi-threaded route, Google has instead opted for a multi-process route. According to their explanation, this requires a larger up-front memory quota, but reduces memory fragmentation over time (the cause of the much misunderstood 'memory leak' in Firefox).
- The user interface is quite clever, with tabs appearing above all of the other browser chrome. This groups the controls more logically, and reinforces the separate processes model (you can drag tabs from one window to another, for example).
- Chrome's security model is clever, again thanks to the multi-process model.
As can be expected with this kind of thing, the media is buzzing about this new entry into the browser space. Some people are heralding its arrival, while others are brushing it off. There are several problems I foresee with Chrome that I believe will prevent it from becoming the new defacto web browser:
- Accessibility
- This is the biggest potential flaw with this web browser. According to one report, Chrome is far from accessible. No matter how good Chrome turns out to be from a functionality point-of-view, if it's not accessible, it won't be accepted by major corporations or government entities. Given Google's very poor track record, I don't have high hopes on improvements in this area.
- No Add-ons
- As far as I know, Chrome does not support add-ons like Firefox. That means no Adblock Plus, CoLT, or Firebug. That's a deal breaker for me.
- Security Concerns
- Google's security model for Chrome is clever, but as security problems are found, how quickly will they be patched? Google has never been prompt on releases (the last Google Talk update was in 2006), so I'm leery of how readily they will respond.
- Stupid Name
- Chrome is a ridiculous name. How many millions of other stuff out there has the word 'chrome' in it? It doesn't stand out, and seems a little bland, in my opinion.
I haven't yet downloaded the browser to try it out, but I plan on doing so soon. Have you tried it out? If so, what do you think?
Behind the Demoman
Aug 30, 2008The Team Fortress 2 Blog has a really insightful article on the design process behind the demoman class. Most interesting is the fact that the demoman started out as a red-haired Caucasian which, in the author's words was "perhaps a little too much like a groundskeeper in Springfield." These behind-the-scenes looks at the game design process are really interesting to read, making the TF2 blog a worthy bookmark.
Order of the Phoenix
Aug 29, 2008In order to properly describe my reading experience with Harry Potter and the Order of the Phoenix, I'd like to talk briefly about another, unrelated book.
The seventh and final book in the Chronicles of Narnia series, entitled The Last Battle, is perhaps one of the most frustrating books I've ever read. Strangely enough, it's also the most gratifying of the series. For what must be easily three quarters of the book, the reader is forced through one bad event after another. No hope ever presents itself and all seems lost. At one point, I seriously considered putting the book down for good. Thankfully, I didn't do so. The final quarter of the book makes the difficulty of the first three quarters worthwhile.
The Order of the Phoenix has a similar resonance with me. Much darker than the previous volumes, the fifth installment of the Harry Potter series is a frustrating read at first. Bad fortune seems to follow Harry around, affecting everyone around him. This makes the reader's job an unpleasant one. Thankfully, about two-thirds of the way through the book, things begin to turn around. As with the previous installment of the series (Harry Potter and the Goblet of Fire), this book ends on a rather melancholy note. This makes me a little anxious about what's to come in the final two volumes, especially the final one.
All in all, I'm really enjoying the series; much more than I thought I would originally. These books have rekindled my interest in reading, which I'm excited about. I used to read all the time when I was younger, but my efforts have been focused elsewhere for the past several years. Thankfully, that spark has been ignited again. I'm already thinking about what to read after I conclude the Potter series. Maybe I'll take a stab at the Lord of the Rings books...
Windows XP Service Pack 3
Aug 27, 2008Just the other day, after weeks of nagging by the automatic update daemon, I installed Windows XP service pack 3 on my desktop machine. So far, so good. I was quite leery of installing the update pack, seeing as Microsoft has fallen off the beam of competent programming in recent times. In fact, I'm still putting off updating my work laptop, out of fear that something will stop working. I've read reports online (and heard firsthand accounts at work) of automatic updates failing to install properly after installing SP3. Since no updates have been pushed out since I updated my system, I can't say one way or the other.
Catching Up With Harry Potter
Aug 23, 2008A few weeks ago, I was in search of something new to read, so I decided to pick up the first six volumes of the Harry Potter series. Having only seen a couple of the movies (the first and third movies, I now recall), I wasn't too familiar with the story line. What better way, then, to read the whole story from the beginning?
I just now completed the fourth book (Harry Potter and the Goblet of Fire), and will begin on the fifth (Harry Potter and the Order of the Phoenix) tonight. Without a doubt, J. K. Rowling is one of the great authors of our time. Every book I've read so far has been a delight, packed with action that runs the gamut of emotions. I've laughed out loud a number of times (there are some very funny scenes in each book), I've been tense with anticipation at the climax of each story, and there have even been a few sad moments, especially in the book I just finished (which is quite dark at the end).
I'm glad that I've finally gotten around to reading this series. If you haven't read them yet, I highly recommend doing so.
Team Fortress 2 Arena
Aug 21, 2008The new arena game type in Team Fortress 2 is a strange beast. Players are given one life per round, and there's essentially no health to be had in each map. Rounds are played until either an entire team has been killed off, or a team captures the one and only capture point (which becomes active after 60 seconds). If a team wins 5 rounds in a row, the teams are scrambled and play begins again. I like this feature, but I think the limit should be lowered to 3 rounds in a row.
I've been playing this game type each night since its release on Tuesday, and I have to admit that I don't really like it. This most likely stems from the fact that I'm no good at arena mode; I'm often the first to be killed, and standard Team Fortress 2 tactics don't apply. Arena feels nothing like the game I've come to love, and I'm rather disappointed that Valve has expanded the game in this direction. A 'last man standing' approach doesn't yield for great team play, which is the entire point of the game. For now, I'll be sticking to the classics: payload, control point, and capture the flag.
Unicode and the Web: Part 2
Aug 19, 2008In my previous article on Unicode, I discussed a little bit of background on Unicode, how to prep PHP to serve UTF-8 encoded content, and how to handle displaying Unicode characters. There's still a bit more we need to talk about, however, before we can truly claim internationalization support.
Prepping MySQL for Unicode
MySQL allows you to specify a character encoding at four different levels: server, database, table, and column. This flexibility becomes quite useful when working on a shared host (like I do at DreamHost). In my particular case, I do not have control over either the server or database setting (and both are unfortunately set to latin1). As a result, I set my desired character encoding at the table level.
To see what your current system and database settings are, issue the following SQL commands at the MySQL command prompt:
SHOW VARIABLES LIKE 'character_set_system';
SHOW VARIABLES LIKE 'character_set_database';
To see what character set a table is using, issue the following command:
SHOW CREATE TABLE myTable;
If you are fortunate enough to have control over the database-level character set, you can set it using the following command:
(CREATE | ALTER) DATABASE ... DEFAULT CHARACTER SET utf8;
The table-specific commands are similar:
(CREATE | ALTER) TABLE ... DEFAULT CHARACTER SET utf8;
Column level character encoding can be specified when creating a table or by altering the desired column:
CREATE TABLE MyTable ( column1 TEXT CHARACTER SET utf8 );
ALTER TABLE MyTable MODIFY column1 TEXT CHARACTER SET utf8;
I personally recommend setting the character encoding as high up as you have the capability to. That way, you won't have to remember to set it on any new tables or columns (or even databases).
If you have existing tables that do not use the utf8 character encoding, you can convert them with a simple command:
ALTER TABLE ... CONVERT TO CHARACTER SET utf8;
Be very careful when attempting to convert your data. The convert
command assumes that the existing data is encoded as latin1. Any Unicode characters that already exist will become corrupted during the conversion process. There are some ways to get around this limitation, which may be helpful if you've already got some Unicode data stored in your database.
Communicating with MySQL
Once our tables are ready to accept Unicode data, we need to make some minor changes in the way we connect our application to the database. Essentially, we will be specifying the character encoding that our connection should use. This call needs to be made very early in the order of operations. I personally make this call immediately after creating my database connection. There are several ways we can set the character encoding, depending on the version of PHP and the programming paradigms in use. The first method involves a call to the mysql_query() function:
mysql_query("SET NAMES 'utf8'");
An alternative to this in PHP version 5.2 or later involves a call to the mysql_set_charset() function:
mysql_set_charset('utf8',$conn);
And yet another alternative, if you're using the MySQL Improved extension, comes via the set_charset() function. Here's an example from my code:
// Change the character set to UTF-8 (have to do it early)
if(! $db->set_charset("utf8"))
{
printf("Error loading character set utf8: %s\n", $db->error);
}
Once you have specified the character encoding for your database connection, your database queries (both setting and retrieving data) will be able to handle international characters.
Accepting Unicode Input
The final hurdle in adding internationalization support to our web application is accepting unicode input from the user. This is pretty easy to do, thanks to the accept-charset
attribute on the form
element:
<form accept-charset="utf8" ... >
Explicitly setting the character encoding on each form that can accept extended characters from your users will solve all kinds of potential problems (see the "Form submission and i18n" link in the Resources section below for much more on this topic).
Potential Pitfalls
Since PHP (prior to version 6) considers a character just one byte long, there are some potential coding problems that you might run into in your application:
Checking String Length
Using the strlen function to check the length of a given string can cause problems with strings containing international characters. For example, a string comprising 10 characters of a double-byte alphabet would return a length of 20. This might cause problems if you are expecting the string to be no longer than 10 characters. Thankfully, there's an elegant hack that we can use to get around this:
function utf8_strlen($string) {
return strlen(utf8_decode($string));
}
The utf8_decode
function will turn anything outside of the standard ISO-8859-1 encoding into a question mark, which gets counted as a single character in the strlen
function (which is exactly what we wanted). Pretty slick!
Case Conversions
Forcing a particular case for string comparisons can be problematic with international character sets. In some languages, case has no meaning. So there's not a whole lot that one can do short of creating a lookup table. One example of such a lookup table comes from the mbstring extension. The Dokuwiki project implemented this solution in their conversion to UTF-8.
Using Regular Expressions
The Perl-Compatible Regular Expression (PCRE) functions in PHP support the UTF-8 encoding, through use of the /u
pattern modifier. If you are making use of regular expressions in your application, you'll definitely want to look into this modifier.
Additional Resources
In learning about how to add internationalization support to web applications, I gathered a number of excellent resources that I highly recommend bookmarking. Without further ado, here's the list I've created:
- Character Sets / Character Encoding Issues
- Handling UTF-8 with PHP
- MySQL and UTF-8
- Do you know your character encodings?
- A tutorial on character code issues - Lots of theory; in-depth discussion
- MySQL and UTF-8 — no more question marks!
- Form submission and i18n
- Survival guide to to i18n
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) - Joel on Software
Visual Studio 2005 Threading Woes
Aug 17, 2008Visual Studio 2005 introduced support for doing parallel builds in solutions that contain more than one project. This is a great idea, especially on systems equipped with multi-core processors. Unfortunately, the developers at Microsoft apparently don't know how to program a multi-threaded application.
Suppose we're building two projects within one solution, call them Project A and Project B. If A and B exist in completely different folders, and are mutually exclusive in every way possible, the parallel build option is quite handy (improved build performance). However, if projects A and B share any code, any code at all, you run the risk of build failures. It seems as though Visual Studio doesn't lock files appropriately during the build process. So, if each instance of the compiler tries to build the same file at the same time, one of them will fall over and die, complaining that "no class instances were found."
It's shocking to me that something so seemingly simple could be broken in an application of this caliber.