jeff's blog

Sanitize, tidy, or cleanup Word HTML using word unmunger

Word Un-munger python script will convert and clean crappy Word HTML to decent HTML.

Automator Script will make it easier to convert clean the Word HTML of several pages in a batch job.

Get spawn-fcgi to work with nginx on ubuntu

http://whatan00b.com/running-lamp-applications-using-nginx

This is what I used to setup a startup script for fastCGI to work with nginx. That allows me to run multiple wordpress blogs off my slicehost.

Building out a mobile web application using iUI. Biased towards iphone users

A co-worker and I have taken up the task of building out a mobile application biased towards iPhone users but we intend it to work decently on other advanced smartphone platforms like Android or Palm Pre. As such, we need something that will work reasonably well cross-platform and not rely compeletely on webkit-specific tricks.

The de facto standard for developing iPhone websites has settled on iUI made by Joe Hewitt of Firebug for Firefox and Facebook for iPhone fame. Now that I actually own an iPhone i have come to realization that creating a standalone app through something like PhoneGap is not totally necessary because you can develop a reasonable facsimile of the iPhone interface using webkit and iUI without going through the appstore.

Since I work for a website that gets good traffic (top 900 Alexa in the world) I think I can add a mobile version that is invisible to desktop users and hopefully get into search engine mobile indexes by adding an unobtrusive link to a mobile-targeted version of the pages.

iUI is nice because out of the box it looks like a copy of iPhone including much of the interaction and page-flip animations. These animations work equally well on Safari and Android. This would be expected because my understanding is that both browsers use webkit.

Design decision 1: Mobile-specific HTML? Or mix in with regular site HTML?

A cool thing about these new smartphone browsers is that you could theoretically produce 2 different targeted stylesheets specifically for handheld vs. desktop users. Having a common HTML page with separate CSS stylesheets sounds enticing but you need to take into account how much you have contained on your standard HTML page. There is certainly a lot of cruft extra stuff on a page that would be overloading for a mobile webpage. Whereas on the desktop version of our pages we aren’t concerned so much about page real estate the mobile browser only gives you 480px of width to work with and although people would be more willing to scroll beyond the fold of a mobile browser five finger flicks worth of content probably only equates to 2 pages of a full-size browser window.

For my purposes I know for a fact that our standard pages have a lot of crap that simply isn’t necessary for a mobile user and that it would probably take more effort to hide unnecessary items through CSS than it would be to simply make a separate page template. If you’re a DJango or Mako template user, the case is even stronger because the first thing I would do is make your own mobile-dedicated skeleton template.