Apple and Approving iPhone Applications

October 28th, 2008 § 2 comments § permalink

A recent screenshot provided to TUAW might shed some light as to why Apple summarily rejected the application from the iTunes App Store. A response provided to the developer at the time stated that the application “duplicated the Podcast functionality of iTunes”. At the time, this was a gross overstatement, sicne the iPhone had no built-in ability to download new episodes of podcasts directly from their sources (something that I think is sorely lacking). However, the new screenshot reveals that Apple may be planning to integrate this functionality into the upcoming iPhone firmware version 2.2.

This raises further questions around Apple’s approval policy for the App Store. To me, it smacks of anti-competitive practice when Apple pre-emptively strikes down any competing apps before they even have a chance to enter the marketplace. Since Apple controls the entire distribution chain for iTunes applications, I see a lawsuit on the horizon: it’ll only take one irritated moderate-size company to draw the eye of the Department of Justice. Consider what might happen if Microsoft tries to release a Microsoft Office Viewer application for iPhone but gets struck down because that functionality is already tenuously integrated into the device? Or if Sun wants to release a Java runtime, or Adobe pushes harder on a Flash player? Imagine if Apple stifled the distribution of those applications on its desktop platform–there’d be a lawsuit faster than you could say “Microsoft and Internet Explorer”.

For individual developers, this sort of action will only serve to bolster the underground “jailbreak” application development community, which even in the post-Official-SDK iPhone world is still alive and kicking.

Red Hat Enterprise Linux 4 with Oracle and Perl DBI::Oracle

October 23rd, 2008 § 1 comment § permalink

I spent a very frustrating day at work today attempting to implement a set of Perl scripts to run queries against a remote Oracle database on an RHEL 4 server. RHEL is notorious for lagging behind with some of its software packages. This is to be expected; the point of RHEL is to have a stable platform that doesn’t change very much except for bugfixes.

Red Hat does not bundle the Perl DBD::Oracle module, probably for licensing reasons, as it has to be compiled against proprietary Oracle software. Normally, this wouldn’t be a problem, as I’d simply fill the gap in my Perl kit by installing the DBD::Oracle module from CPAN and calling it a day. Problem is, the latest version of DBD::Oracle requires a recent version of the DBI module. I had previously installed the DBI that comes with RHEL and forgotten all about it. Unfortunately, the latest version available via up2date is not sufficient to support the latest DBD::Oracle module. Installing the latest DBI from CPAN puts it in a separate location from the up2date version and you end up with two copies of it floating about. I spent the day trying to figure out the most elegant method to get a fully functional suite of Perl, DBI, DBD::Oracle, and an Oracle 10g client running on RHEL 4. In an effort to spare someone else this headache, this is how I did it:

First, resist the temptation to do what seems like the easiest route to a solution, because it won’t work the way you expect:

  • Don’t install anything from CPAN.
  • Don’t install any Oracle clients using the Oracle installer.

Instead, do things the RedHat RPM way. Because RedHat doesn’t include any of the Oracle or Oracle-related software via its up2date repository, we’ll need to use FreshRPMs. Many thanks go to Matthias Saou for doing the legwork for us here. He has provided a suite of useful RPMs for Oracle on RHEL here: http://freshrpms.net/docs/oracle/. However, a knowledge of what you actually need  do with these RPMs is assumed but not provided. Here’s what you need to do to make this work. All commands are run as root:

  1. Download and install the oracle-instantlclient SRPM (Source RPM). This is a tiny RPM file that doesn’t actually include any Oracle software in it, but instead just provides an RPM specfile to build the RPMs that you actually want.
    # rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/redhat/testing/EL4/oracle/SRPMS/oracle-instantclient-10.2.0.3-1.nosrc.rpm
  2. The RPM might complain that it can’t write to /usr/src/redhat/RPM or somesuch. Make sure there’s a /usr/src/redhat directory. Create it if it doesn’t exist.
  3. You’re going to need the rpmbuild package. It’s available via up2date or yum:
    # up2date rpm-build
  4. When you installed the oracle-instantclient package a moment ago, a specfile landed in /usr/src/redhat/SPECS. You’ll need it later but if you skim it, it’ll give you an idea about what’s going to happen. Basically, you need to download the client zip files from Oracle, put them in the SOURCES/ directory, then build the RPM. It’s easiest just to download all the stuff from Oracle rather than building the RPMs piecemeal. Go and download the version of Oracle client 10g you want from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html. You want the zip files, not the RPMs. Get all of them: Basic, Basic Lite, JDBC, SQLPlus, SDK/devel, and ODBC. Save them in /usr/src/redhat/SOURCES.
  5. Build the binary RPMs that you want using the specfile:
    # rpmbuild -bb /usr/src/redhat/SPECS/oracle-instantclient.spec
  6. The RPMs will build, you’ll see a ton of verbose text, and you’ll end up with the Oracle instant client, RPM-ized, in /usr/src/redhat/RPMS/i386. Score!
  7. Install the RPM for the bits of Oracle client that you want. I just needed basic, but you might need something fancier. SQLPlus, in particular, can be quite handy.
  8. Now you can install the DBD::Oracle RPM that FreshRPMs has:
    # rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/redhat/testing/EL4/oracle/i386/perl-DBD-Oracle-1.19-1.el4.i386.rpm
  9. This should be sufficient to write scripts that use Oracle Databases on RHEL4. You can test whether or not you have a complete Perl kit with this one-liner:
    $ perl -e ‘use DBD::Oracle;’

Facebook and Live Search

October 7th, 2008 § 5 comments § permalink

Today, Facebook unveiled a new feature: built-in Live Search. According to a recent post to the Facebook Blog, “This is the first step in giving you the ability to find content from across the web while using Facebook”. I’m sure it’s no coincidence that Microsoft made a $240 million investment in Facebook last October.

I think this is the wrong direction for Facebook, for three reasons:

First, the Facebook brand has nothing to do with searching the Web. Attempting to integrate social-networking and a wider Web search in the same site will serve only to dilute the Facebook brand. In short, nobody goes to facebook.com to search the World Wide Web. They go to Facebook to find out what their friends (and friends of friends) are doing, send a quick message, and tell their friends what they’re doing, and all the classic social-network activities. Running a comprehensive web search? No way. The above-mentioned blog post suggests that the new integrated Live search will allow users to find information about what friends are doing on-the-fly. Unfortunately, most users already have a search bar built into their browser to do that, and it probably points to Google. I know I’ve got my cmd+T, tab routine down quite nicely at this point to open a new tab and perform a search.

As much as convergence is supposed to be the new face of the Internet, Facebook should be very, very careful about extending their product beyond their area of expertise by bolting on a third-party’s application. Facebook’s very good at communicating the nitty-gritty details of my friends’ lives, but I have no idea about how good it is at searching the Internet–I’ve already got a place for that, and its proven itself to be pretty excellent at it.

Second, this feels like it’s bringing Facebook a little closer to the portal territory of web search in the late 1990s and early 2000s. Check out a page from Yahoo from archive.org from a random date in 2001:

Yahoo in 2001

Yahoo in 2001

What does this website actually do? Notice that the ‘search’ functionality is lost amid the general chatter of the site. It’s apparently a directory, it’s my email, it’s my Personals Ads, it’s my Bill Paying, it’s…well, nothing, actually, because I never used any of those features, probably because I couldn’t find any of them. To Facebook’s credit, it gracefully integrates the Live search function behind the same search box that one uses to search for a person on the social network, adding a drop-down box that (correctly) defaults to searching only Facebook. But here’s the problem: Facebook’s not a search engine. It’s a social network that’s searchable, and should be extremely careful of attempting to integrate too many services into a single interface. That’s been tried, and it didn’t work.

Third, this is almost certainly an attempt by Microsoft to boost its share in the search market, which is currently hovering at around 3% by piggybacking on Facebook’s rising-star status, using its investment as leverage. The problem is that the web search in the Facebook user interface is almost entirely unbranded, so the user has no idea who’s providing the search results. I don’t think this provides much benefit to Microsoft, as users are unlikely to gain brand loyalty to Live if they don’t know where their search is going, and at worst may feel duped that their search isn’t being performed by Facebook if they decide to look under the hood.

I’ve been on Facebook for a long time; more or less since it was first opened to users at NYU which was shortly after it expanded beyond its initial confines of Harvard. If it goes public, I’ll be first in line to buy stock. But I think the Facebook team should be extremely careful about trying to score points with its (admittedly massive) investor by trying to bolt its flailing search engine onto its otherwise excellent social network.

Confession: I switched to Ubuntu

October 2nd, 2008 § 5 comments § permalink

I’ve been a Red Hat Linux user for years, from somewhere around RedHat 7 in 2000, making the switch to Fedora Core 1 in 2003 and continuing to run the latest Fedora release from there on. When I rejoined TSS, I decided that my primary desktop machine should be a Linux box; many of our backend systems are Linux-based, and it makes sense to be able to develop and deploy code from my desktop without the need for extensive hacking just to get a comparable environment. For example, I toyed with the idea of a new iMac or a Mac Pro, but while the hardware is nice and and the OS stable, the time lost in hacking around with Perl and Apache to make them interact with each other in a similar way to a standard Linux installation outweighed any street cred I might pick up for having some Cupertino hardware on my desk. And besides, I still have my MacBook Pro.

As soon as my chosen hardware arrived–a Dell Optiplex 755–I popped in the Fedora 9 DVD, and installed the OS. The installation itself was comparatively painless, but the provided open-source drivers for the ATI video card failed to work at all with the included Radeon 2400XT, requiring a hard reboot and dropping into single-user mode just to get a bash shell. I spent a couple of days coming up with a workaround hack that would allow me to boot my machine and run the OS at my monitor’s native resolution, but with no 3D acceleration.

It happened that at the time, one of my colleagues’ laptops was failing spectacularly and in need of a total replacement. In the interim, however, he needed to boot to a usable OS to keep working and to retreive what data he could. Rather than create a Fedora 9 boot disk, he went with Ubuntu, and reported a smooth installation process and ATI drivers which worked out-of-the-box and even provided friendly GUI links to download and run the non-free ATI-provided drivers. My interest was piqued, so I grabbed the Live CD, booted it up, and within minutes had a functioning Ubuntu system, with working video drivers. Out of the box. Shortly thereafter, my own laptop suffered a hard drive failure, and while waiting for the Apple store to install a new drive, I worked from a loaner laptop, booting and working solely from a USB key. Ubuntu installed flawlessly and quickly, booted and worked as fast as one could expect over USB2, and was generally a pleasure to use. I took the plunge and installed it on my desktop, and haven’t looked back.

I’ve had only a couple of gripes thus far:

  • Ubuntu 8.04 does not configure a host-based firewall by default. In my opinion, this is the single greatest problem with the distribution. If Microsoft can turn on the Windows firewall at install-time and issue appropriate scary warnings to users who attempt to turn it off, Ubuntu ought to be doing the same, and it worries me that it isn’t. Thankfully, iptables is installed by default, but it’s not configured to actually do anything. Users can use the included “ufw” scripts to configure iptables in a friendly fashion, though, so all hope is not lost. The OS should include a comprehensive firewall ruleset from the outset, however, which is something that Red Hat has done for years.
  • VMWare 2.0 doesn’t install cleanly, although it comes close. This isn’t strictly the fault of the OS, but Ubuntu apparently relies on a quirky PAM configuration which VMWare doesn’t know how to deal with when authenticating users to the web interface. Our newest hire at TSS has managed to get VMWare working on Ubuntu, though, so it is possible, I just haven’t done it myself yet.
  • Ubuntu ships with Compiz Fusion for ‘enhanced’ desktop effects. While some of the eye-candy is pleasant to watch and makes the hours sitting in front of a screen that much better, some of the defaults are headache-inducing and Ubuntu includes no way, by default, to customize the Compiz effects. You’re presented only with three levels of enhancement, essentially “none”, “some”, and “melt video card”. The latter includes the ‘wobbly window’ effect which more or less sends me running for dramamine every time I see it. Thankfully, one can find more granular configuration utilities in the default Ubuntu package repositories which allow for the disabling of the more disorienting compiz features.

On the whole, I’ve been thrilled with the ease-of-use of Ubuntu and its ability to get out of my way while I’m working and the minimal effort I have to put into keeping the OS happy. To be clear: I was never massively disappointed with Fedora, but for my purposes, its function as a proving ground for bleeding-edge software has proven to be burdensome, especially when upstream non-free driver providers like ATI are unwilling to update to the latest X.org/kernel/whatever at the same frequency that Fedora does. By its nature as a development platform, Fedora will always feel to be in ‘constant beta’ more than the average open-source project, but I feel that for my needs, Ubuntu gets closer to the sweet spot of free software that’s stable, highly functional, and easy and intuitive to use.