iPhone Simulator

The tough part of being a web developer is that the technology is constantly changing. Its not like being a plumber. The skills they know will still be relevant 5 years from now. The equipment they use will still be useful 5 years from now. For web developers, in 5 years, we will likely have to learn completely new technologies which are incompatible with what we know and do today.

One new technology which has become widespread is the iPhone. Many devices that have been sold and are being use heavily for accessing web sites. While they can view any site with its Safari web browser, most of the sites don’t fit well on its tiny screen and its a challenge to use. Web sites customized for iPhones need to be created if you want iPhone users to continue using your site.

Apple users can install iPhony, which is an iPhone simulator for Macs running OS X 10.4.7 or higher. This can be a problem for Windows users, but they can test iPhone web sites on

Web sites built today should be tested on Internet Explorer, Firefox, Safari, Opera, iPhone, and the smaller cell phone browsers. PDA or Blackberry web browsers would likely be similar to an iPhone.

Now, trying to get web sites to look similar across all platforms … that’s another blog post.


Viewing iPhone Web Sites in Firefox

There are certain web sites which require an iPhone to view. For those who don’t have iPhones, its possible to use those sites by making them think that your web browser is an iPhone. This is accomplished by switching the user agent which is sent by your browser to the web site.

You can change the user agent in Firefox by installing the User Agent Switcher. Once installed, go Tools->User Agent Switcher->Options->Options. Select User Agents and add a new agent called iPhone. Enter the following information in the fields below:

Description: iPhone
User Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b Safari/419.3

The other fields can be left blank. Now, when you surf to an iPhone-only web site, switch to an iPhone user agent and you will have full access to the site.

Something important can be learned here: web statistics of browser usage are questionable. Anyone can change the user agent of their web browser and the logs of the web server that is visited will get false information on the browser type. What’s the real market share of web browsers? They can be faked very easily.


Fixing “/var/lib/pgsql/data is missing” Error

After installing an older version of Fedora, I noticed an error message that quickly appeared every time the system boots and its starting the many services that Linux uses:

/var/lib/pgsql/data is missing

The solution to this PostgreSQL problem is shown with the error message but the screen scrolls very quickly (or is unreadable with a very fast computer) so its difficult to catch. The command to correct this issue is:

service postgresql initidb

Run this from a command console (i.e. Konsole) and then the Postgres database will operate correctly.