Reading Slashdot on the iPhone or BlackBerry is not as good as it could be. The iPhone's workaround for non-mobile-opimized pages—the pan and zoom system—is fine for sites I only look at occasionally, but for something I look at as often as Slashdot, I'd like something a little better. BlackBerry's browser tries to bite off more than it can chew, so instead of ignoring the CSS and just giving users a plain 1996-style rendering of the HTML, it looks like ass. Since Slashdot doesn't offer a good mobile-optimized version, I whipped up my own system. Note: This doesn't replace the entire site, it's just for the front page. (Update: that is no longer true. See below.) (Update #2: never mind, it's not working out. See below.)

I started with adding css to the RSS feed but the feed (in my limited experience) seems to be often out of sync with the actual front page. So, I fell back onto Plan B: the brute-force method of downloading the actual front page and styling it for iPhone. I've got a PHP script that pulls down the page with cURL, then I use two methods to hack away everything I don't want: PHP's str_replace and 'display: none' in the style sheet. Then I add styling to the elements I want to keep. This is ugly and hackish and I don't know if it's really valid HTML (probably not) but for the most part it does what I want it to do so I'm happy with it. I'm happy to hear any suggestions for improvement. Update: someone sent in some nice code that cuts out a lot of extra code and cuts the page size roughly in half--say, from 100k to 50k. I'll put it up here as soon as I get around to taking a good look at it. But I'm busy, so don't hold your breath.

For iPhone (my main portable device) I pull the front page (the non-logged-in front page, so it might show different stuff than what you see when you're logged in) and strip out as much as I can and leave what I want. (For example, I like to see tags and the number of comments.) I've also added what I think is a cool feature: arrows that jump up and down to the next and previous stories so you can get around without having to manually scroll all the time. (By the way, the icons are from Everaldo Coelho's awesome Crystal Clear icon set.)

For BlackBerry (work just gave me one--a Curve 8830) I just work with the RSS feed and add a bit of color to make it look Slashdot-y. I haven't put much effort into that, and won't, so if you want to do more, grab the source and go to town.

Aside: I started playing with the comment pages. Long story short: it didn't work out, so I've disabled it in the public code. Email me if you care.

There are a few bugs. Somtimes a headline will show but not the body, and sometimes there's an extra blank line between the headline and the story. And once or twice I've seen some crazy code at the top of the page, like
'); dfp_tile++; //]]> -->
But mostly it's working OK. I'll work it out in time... if I care to. It's not a huge deal. The source is out there so hack on it all you want. Go ahead and add my page to your bookmarks or copy it to your own server and change it all you want—hide bylines, tags, comments, add other stuff back in, whatever you want.

screenshot

For *ahem* comparison, here's how Slashdot's ancient "Palm" page looks on an iPhone:
screenshot
Niiiiiice.