Hulu - Like On Demand, but Better

Tue 17 Jun 2008

Yesterday, Mark Cuban posted about how Hulu is killing YouTube in terms of being able to monetize its content. I had never heard of Hulu, so I checked it out and it's awesome. It's a video site that has full episodes of television shows, as well as full length movies - like On Demand, but better.

As of the last year or so, the major TV stations have started providing their shows on their websites, but I like the idea of having it all in one place. This means that I don't have to navigate different site structures to get to the video, and then download different media players and codecs in order to be able to watch the video.

If you have a HTPC with a web browser, you can watch directly on your TV in your living room.

Filed Under: Web | Leave a Comment 

Testing in IE 5, 5.5, 6, and 7 on a Single Machine

Mon 09 Jun 2008

I've always found it a pain to test in the various versions of Internet Explorer. In Windows, there's no easy way to install multiple versions, so whether you are working on a physical Windows machine, or a virtual machine via Parallels, VMware or some other virtualization software, proper testing in IE always required at least two or three separate machines.

The other day a co-worker showed me a cool little setup that will allow you to test in IE5, 5.5, 6, and 7 on the same physical Windows XP machine. I suppose this would also work on a virtualized copy of Windows XP on a Mac, but since this solution involves virtualization, you'd be running a virtual machine inside of another virtual machine, which means you'd need a heck of a powerful system.

Assuming you are running Windows XP, you should already have a copy of IE7 installed. One IE down, 3 more to go. So, here's how to get the rest of them:

  1. Download VirtualBox and follow the installation instructions.
  2. Grab the .iso for your choice of Linux distro (Ubuntu, Kubuntu, Xubuntu, Fedora, Gentoo, Debian, Suse, Mandriva, or PCLinuxOS should work at the time of this writing) . I used Ubuntu in my setup.
  3. Launch VirtualBox and setup a new virtual machine for your Linux distro.
  4. Start the virtual machine and follow the prompts in the First Run wizard, making sure to set your media source to the Linux .iso you just downloaded.
  5. Click Finish at the end of the wizard and your Linux distro should start the installation process (this process will vary depending on your distro of choice).
  6. Visit the IEs4Linux website and follow the instructions to install cabextract, Wine and IEs4Linux.
  7. Once you're done with the install, you should have icons on your Linux desktop for each of the IEs that you installed. Just double-click and point them at the URL you want to test!

Link Highlighter Bookmarklet

Tue 15 Apr 2008

From time to time, I'll come across a blog or article on the web where the person has chosen to remove the underline from their links and/or change the link color, but didn't make the color easy enough to distinguish from the body text. This seems to be especially common for links that have already been visited, because the default color for visited links is a dark purple, and most text on the web is black. I grew a little frustrated with this situation and thought it might be helpful to create a bookmarklet that highlights all the links on the page.

To use the bookmarklet, just drag the link below to your bookmarks bar.

Link Highlighter

When the highlighter is active, you'll see a "Remove Link Highlight" overlay at the top-center of the browser window. To disable link highlighting, just click the overlay text.

So far, it's been tested and working in Firefox 2/Mac/Win and Safari 3/Mac/Win.

Known issues:

  • Does not work in IE - I keep getting a vague error message about an error at line x, char x and simply haven't spent the time to get it working right for lack of a decent way to debug JavaScript in IE.
  • Does not highlight links in iframes.

Please leave me a comment if you find any issues not mentioned above. Be gentle - this is my first bookmarklet, so there may be other issues I'm not aware of.

Since this bookmarklet was created for personal use and currently meets my needs, I'm debating on whether to fix the above issues. However, if there is enough demand to fix them, I'll certainly consider it. Please leave a comment to let me know that you are using it.

Also, if anyone knows of a decent way to debug JavaScript in IE without purchasing Microsoft software (Office or Visual Studio), please let me know.

Keyboard Shortcut to Reopen Closed Tabs in Firefox

Tue 11 Mar 2008

I accidentally discovered a useful keyboard shortcut in Firefox today. I was trying to open a new tab by pressing Ctrl-T, but instead I hit Ctrl-Shift-T. Instead of opening a new blank tab, Ctrl-Shift-T (Command-Shift-T for Mac users) opens your last closed tab. If you keep pressing this key combination, it will step backwards through your closed tab history and reopen your tabs one-by-one.

Of course, you could always use the 'Recently Closed Tabs' menu item by going to History->Recently Closed Tabs, but if you're like me, you'd rather use a shortcut than click through the menus.

Filed Under: Web, Firefox | Leave a Comment 

IE8 Will “break” Poorly Coded Websites… It’s About Time!

Tue 04 Mar 2008

Up until this point, whenever I heard someone from Microsoft start talking about standards, I couldn't help but laugh while thinking of how badly IE has butchered them in the past. Standards compliance was somewhat improved with IE7, but it sounds like Microsoft has finally agreed to step up to the plate and make IE8's standards mode actually standards-compliant.

MS has fought standards-compliance as the rest of the world knows it for several iterations of IE, knowing that it would break a lot of old sites that were specifically targeted towards IE's faults. With IE8 they will admitedly break sites that do not specifically request a special http header/meta tag to trigger IE7 standards mode. It will be quite interesting to see how many sites this affects. I'm guessing a VERY large number.

Since some (but certainly not all) of the rendering differences between IE and standards-compliant browsers have been due to a certain degree of ambiguity in the W3C documentation, Microsoft's definition of "the most standards compliant way possible" may be far different than that of Firefox or Safari. It would be nice if they just used Firefox and Safari's interpretation of the W3C standards, but I'm sure that Microsoft will come up with their own creative way of interpreting them.

So kids, this is why you code to standards and make IE the exception, not the rule. For those who ignored the standards evangelists, let the fun begin...

What Happened to the “My Account” Link on my iGoogle Page?

Mon 11 Feb 2008

A few days ago, I noticed the the "My Account" link was missing from the top of my iGoogle page. This is how I (and I'm guessing most other people) get to all my Google services. Why would they take it away?!?

I mentioned this to a co-worker and he figured out that it shows up when you go to the Classic view, but why are they punishing iGoogle users? Hopefully they'll put it back soon. I'm getting tired of switching back and forth between my iGoogle page and Classic view. :(

Filed Under: Web, Google | 4 Comments 

Working Around IUI Click Interception to Allow for Native iPhone Functionality

Sat 09 Feb 2008

For those of you who haven't checked it out yet, the IUI is a great library created by Joe Hewitt (the same guy who brought us Firebug) for creating iPhone-like web applications. Overall, I love how easy it is to create screens, transition between screens, submit forms via AJAX and much more. However, while working on my first iPhone-targeted web project, I came across an issue.

There a few special hrefs that can be used to launch iPhone functionality such as the Google Maps application (using an href that begins with "http://maps.google.com") or prompting the user with a dialog box that allows them to dial the linked phone number (using an href that begins with "tel:"). Since the IUI intercepts the click event on links and prevents their default behavior, it ends up overriding this functionality.

While I was searching the web for a workaround, I found a few sites that said that the IUI code had to be modified in order to make these special hrefs work, but they didn't say exactly how. So, here's my solution:

For all links that launch iPhone functionality that you don't want the IUI to override, assign them a type of "iphone" like this:

<a href="tel:9043430030" type="iphone">Click to dial the number</a>

Then modify iui.js. I'm showing the whole block of code, so you can see the changes in context, but the only changes necessary are to lines 174 and 175. I'm using version 0.13 in the example below, so your line numbers may be different depending on the IUI version.

  1. addEventListener("click", function(event)
  2. {
  3. var link = findParent(event.target, "a");
  4. if (link)
  5. {
  6. function unselect() { link.removeAttribute("selected"); }
  7.  
  8. if (link.href && link.hash && link.hash != "#")
  9. {
  10. link.setAttribute("selected", "true");
  11. iui.showPage($(link.hash.substr(1)));
  12. setTimeout(unselect, 500);
  13. }
  14. else if (link == $("backButton"))
  15. history.back();
  16. else if (link.getAttribute("type") == "submit")
  17. submitForm(findParent(link, "form"));
  18. else if (link.getAttribute("type") == "cancel")
  19. cancelDialog(findParent(link, "form"));
  20. else if (link.getAttribute("type") == "iphone")
  21. return;
  22. else if (link.target == "_replace")
  23. {
  24. link.setAttribute("selected", "progress");
  25. iui.showPageByHref(link.href, null, null, link, unselect);
  26. }
  27. else if (!link.target)
  28. {
  29. link.setAttribute("selected", "progress");
  30. iui.showPageByHref(link.href, null, null, null, unselect);
  31. }
  32. else
  33. return;
  34.  
  35. event.preventDefault();
  36. }
  37. }, true);

New Theme!

Tue 05 Feb 2008

Well, if you're a frequent (or even infrequent) visitor to my blog, you'll notice that I've changed up the theme quite a bit. I was never really completely happy with the old one, and did quite a bit of searching to find one I liked better, but could never find one that really jumped out at me. So, after much procrastination, I finally decided to buckle down and create a theme of my own. I'm much more happy with this one - it's cleaner, more readable, and not as cluttered as the old one.

Hopefully, I'll have the time (and motivation) to work on it more over the next few weeks. There are still a few things that I want to do with it before I call it done. I'm planning on adding an "About" page, fine tuning the code to ensure W3C standards compliance, and possibly making the panoramic image above into a slideshow.

I've tested the new theme in FF 2/Mac, Safari 3/Mac, and IE6/Win, and there were no glaring issues. I'll be testing in IE7 tomorrow, but I don't anticipate any major issues. If you happen so see anything crazy going on, please let me know by leaving a comment on this post.

Thanks!