Sunday, August 31, 2008

View source code for iPhone RSS feed

I tried to view the Slashdot RSS feed on my iPod Touch, but instead of an RSS feed I was redirected to a specially formatted feed for iPhones. Very nice!

The iPhone specific URL is .

I was curious to about the source code of the page, really just to see if there was any interesting markup. So I tried to view the URL in Firefox... no dice. I was shown a page saying, "This Application Is Viewable Only On iPhone".

Hmm... it was time to cheat a little then. I googled around for the User Agent that the iPhone sends, opened a terminal and entered...

Thursday, August 14, 2008

Ruby on Rails doesn't scale you say?

You might want to read this how this Bumer Sticker, a Linked-In application, that is serving 1 billion page views per month. From the article... "Ruby on Rails is frequently criticized for lacking the ability to scale. While the road to a billion page views per month has certainly had some potholes, Bumper Sticker has clearly demonstrated that the Rails platform can scale quite well, so as long as the team behind it understands that many of the bottlenecks are exactly those faced by developers on any other database-driven web platform." Joyent also blogged about this. How many Rails application have you developed, then found scaling the app was fast, relatively simple... not to mention cheap? How many Java web applications have you developed, then found scaling the app was difficult, slower, and expensive? You probably aren't even aware of the extra work you're going through here if you've never tried to scale a Rails app. You can take your pick of frameworks, I'm not citing any specific Java web application frameworks here. I'm not directly comparing Rails to Java, but Rails to insert-your-java-framework-here. I've been working with Java for a long time, and it still has it's place. But I think Rails is eating Java's lunch in a lot of areas these days, particularly in the web application and web services area.

Thursday, August 7, 2008

Stop and start PostgreSQL on OSX

To manually stop or start a PostgreSQL 8.2 server that was installed via macports, use the following commands.


# sudo launchctl stop org.macports.postgresql82-server


# sudo launchctl start org.macports.postgresql82-server

Obviously this will also work for PostgreSQL 8.3 or 8.4 if you change the commands slightly.

I prefer the approach Linux distros have generally taken for service management, where all services are listed under the /etc/init.d diretory. To me /etc/init.d/postgresql-8.2 is easier, and you can use command completion to type it.