Apple and multi-platform apps

Steve Jobs has said developers won’t be allowed to write multi-platform apps for Apple devices. Software for the iPad, iPod, or iPhone has to be written specifically for those devices because developers are incapable porting software worthy of running on an Apple device.

I doubt Steve Jobs is sincere in the reasons he gives for blocking cross-platform applications. It seems more plausible that he simply wants to keep certain players (e.g. Adobe) off his devices. But let’s take his reasons at face value for the remainder of this post.

Apple is judging one piece of software by the existence of other software. Here’s an application X. It runs on the iPhone. Is it kosher? Well, that depends on whether another application Y exists that has similar functionality but runs on a different operating system! Application X is not being judged on its own merits. It’s as if there were some sort of quantum entanglement between applications X and Y. Like two particles separated at birth, they remain connected to each other in some spooky way.

Imagine applying for a job at Apple. You made a good impression in the interview, but before they make you a job offer, they have one more question: Do you have a sister who works for Adobe? They cannot hire you based on your credentials alone. They have to know first whether you have a sibling who works for a competitor.

This post [Update: dead link removed] defends Apple as follows:

Multiplatform applications are bad.

They look alien. They are not stable. Their main code is not native to the OS they are running. They cause confusion to some users and they can destabilize the whole OS.

I partially agree. I would say that multi-platform applications are often bad. They often look alien and are not stable.Years ago I could immediately spot an application were written in Java. (Since that time things have improved.) I don’t mind whether my software is written in Java, I only mind if I can tell it’s written in Java.

If Steve Jobs’ only concern were protecting the experience of his customers, he should ban software that acts like a port from another operating system, i.e. software that looks alien or is unstable, regardless of whether it runs on another platform. What matters is the quality of the software, not the existence of some sibling application.

C# random number generation code

This weekend Code Project posted an updated version of my article Simple Random Number Generation. The article comes with C# source code for generating random samples from the following distributions.

  • Cauchy
  • Chi square
  • Exponential
  • Inverse gamma
  • Laplace (double exponential)
  • Normal
  • Student t
  • Uniform
  • Weibull

After I submitted the revised article I realized I could have easily included a beta distribution generator. To generate a sample from a beta(a, b) distribution, generate a sample u from gamma(a, 1) and a sample v from gamma(b, 1) and return u/(u+v). (See why this works here.)

This isn’t the most efficient beta generator possible, especially for some parameters. But it’s not grossly inefficient either. Also, it’s very simple, and the code in that article emphasizes simplicity over efficiency.

The code doesn’t use advanced C# features; it could easily be translated to other languages.

Related links: