Archive for the ‘Web’ Category

Posts I haven’t written

I haven’t been updating this blog too much recently. I never meant for this blog to run on a schedule, but I did intend to post more frequently than this. My original idea was that the blog would serve two major purposes. First, it is a place for me to announce new projects or updates to software and websites I’ve already released. It’s done that quite well, though I haven’t had much to announce recently. My job has been taking the majority of my development time, and most of the projects I’ve been working on at home are either private or haven’t been released in the form I’d like to because my employer hasn’t approved them for release yet.

The second major purpose for my blog is as a place for me to record the solution to problems I run across while developing software, so that others won’t have to spend hours Googling or using trial and error to come to the same conclusion. I didn’t intend to rehash things that were easily found or that had already been discussed - only to post when I felt it was something that added value to the internet that hadn’t been there before. So a lot of the blog posts are not really a narrative or running commentary - they’re not meant to be subscribed to, but found individually. It’s for this reason that my most popular posts tend to include the exact text of error messages. This type of post has suffered both because I haven’t been doing as much development, because I can’t discuss a lot of what I’ve learned due to the nature of the projects I’m working on, and because I’ve been learning new stuff (like Ruby on Rails) and haven’t done enough to have solved problems others haven’t already posted solutions for.

The third reason I have this blog is to occasionally talk about my thoughts on different technical topics, from web development to video games. Again, I don’t like to make a post unless I think I’m adding something new, and most of the topics I’ve wanted to talk about have already been covered. I had a lot of draft posts sitting around about web development, web standards, and the evolution of browsers, but then I discovered Alex Russell’s blog and it turns out he’s already said most of what I wanted to say, and better than I could. Other stuff, like my impressions of Windows Vista, critique of stackoverflow.com and suggestions for the Xbox Live Arcade lineup, have been covered to my satisfaction in plenty of places. Maybe some of them will end up posted, but probably not.

Another part of the reason I haven’t posted much is the sheer weight of unfinished posts I have. Right now I have 64 drafts and only 52 real posts! So I’m going to attempt to clear things out by writing a little about what I haven’t posted. A lot of this stuff wasn’t posted because it fell under that third point above, but some of it I was just too lazy to flesh out into real posts. Some of it’s just random stuff. So here’s what’s been happening in the last year:

(more…)

Setting up IIS7 (with bonus PHP instructions!)

Every time I try to set up IIS7 on a Windows Vista machine I run into the same series of problems. You’d think I’d have learned by now, but I usually just struggle through the cryptic error messages and get it working one way or another, then forget about it until the next time I need IIS7 on a machine that doesn’t have it. Finally I’d had enough and so I decided to write myself a little guide here so I won’t waste as much time next time. These instructions are basically the same as these, but with additional detail and screenshots.

(more…)

Firefox bug rendering list items next to floated elements

I was working on a web app a couple weeks ago when I hit a weird problem. I had a sidebar floated right, and an unordered list right next to it. What was weird is that each list item was getting “pushed aside” by the floated sidebar. This went against what I thought I knew about how floats work in CSS. My understanding was that floats should be removed from the page layout, and appear above any other block level elements, like my list items. Reading CSS Float Theory: Things You Should Know and the W3C spec on floats only backed up what I thought. Floats should always appear above block boxes, like LIs. I wrote up a minimal test case and tried it out. What I expected was something like this, where the green boxes are LIs, the red box is my floated DIV, and the purple box is a normal block element like a P:

CSS compliant float rendering

Instead, what I saw in Firefox 2 was:

Firefox bug 163110

It actually took me a very long time to get to this point because I hadn’t even bothered to try it out in non-Firefox browsers, since I assumed Firefox was right and I was missing some arcana in the spec. I had tried it out in Internet Explorer 6, but I had taken that as even more evidence that Firefox was right (if it differs between IE6 and Firefox, it’s usually IE6 doing it wrong). However, when I finally popped my test case into Safari 3 and Opera 9 and they agreed with IE, I realized that it was really a Firefox bug. Not too much searching later I came across this css-discuss post which pointed out the bug and offered two solutions. Either I could force my LIs to take up the whole space by setting “width: 100%” on them, or I could use the proprietary Mozilla CSS property “-moz-float-edge: content-box“. Either one made the list items act like I expected them to, though you give up some flexibility with the first method, and the second won’t validate.

This bug has been filed as Bug 163110 since August 2002, and many duplicate bugs or similar-but-not-quite-duplicate bugs have been filed since. Unfortunately, it doesn’t look like anyone is working on fixing it, and I don’t expect to see this problem go away in Firefox 3, which should be shipping relatively soon. I’m just going to have to add it to the list of bugs and workarounds I need to keep in mind whenever I’m navigating the minefield of modern web design.

Update (5/29/08): This has been fixed as of Firefox 3 RC1. Yay!

Updated RIAA Radar Greasemonkey Script

Some time ago I came across the RIAA Radar site, which uses Amazon’s E-Commerce Web Service to cross-reference the labels musical albums are published under with known RIAA members. The idea is that you can use the service to help restrict your music purchases to labels that do not affiliate themselves with the RIAA, and by extension the RIAA’s strongarm tactics against music fans. I liked the idea but didn’t want to have to visit the site every time I looked at an album. Fortunately the site had a Greasemonkey script called RIAA Radar that would automatically insert a little icon on the Amazon detail page indicating whether it was from an RIAA label or not. Unfortunately, the script was broken. I went ahead and fixed up the script, as well as optimizing it and expanding its functionality. Since the site’s maintainer never accepted the revised version, so I’ve been maintaining a fork ever since.

RIAA Radar Greasemonkey Script example

Anyway, with the launch of Amazon’s new MP3 Downloads store, I figured I could get RIAA Radar working with that too. It turned out to be pretty easy, and I was able to fix a bad URL in the script while I was at it. So the script should serve music fans even better as they browse the DRM-free music available at Amazon.

Collapsible Amazon Greasemonkey Script Update

I’ve taken another crack at my Collapsible Amazon Greasemonkey script, and I think it’s pretty complete now. Once you’ve installed the script, you’ll be able to click on the orange title of any section of an Amazon product detail page to collapse it out of sight, and the script will remember your preference for other pages. So you can customize your product page however you like, and it’ll stay that way. This new version makes it possible to collapse any of the orange-titled sections in the page (in older versions, a couple of them weren’t collapsible), and collapsing a section will now get rid of everything in the section, not just the main part. It should be a much nicer experience overall, and result in cleaner, more relevant product pages for everyone.

An Example Screenshot of Collapsible Amazon