2010-04-22

Developing for Maemo - Fremantle VirtualBox Image

So I've been playing around with the Fremantle VirtualBox image that Maemo.org provides on their web site. The idea is great: you get the image, run it in a virtualization environment, and you don't have to set up anything.

Great idea, poor implementation. First of all, the image doesn't come pre-loaded with instructions. I would have expected a big icon to show on the desktop after launch, telling me what to do next. Instead, there were icons for the VM native software, as well as for the development environment.

Next thing, I start the environment. It's the standard Eclipse, optimized and configured for Maemo. Nice. I decide to create a test project. Easy enough. Let's make it simple, let's create a Python project. Easy enough.

Give it some default values and you are ready to go. We are going to create a PyQt4 project that displays a Hello, World! app. My goodness, could it be any simpler?

You get a wizard that asks you a bunch of questions. Nicely done. Then it tells you it is going to create the project. It merrily starts doing stuff, a progress bar moves back and forth, bouncing left and right. A half hour later, the bouncy bar is still merrily swinging, and I start getting the impression something is wrong. I try to kill the wizard, but it won't die. I open a terminal and kill the thing.

I start looking at the reason for the issue. I try to isolate the problem, but I can't seem to make anything work. All other project types have the same issue. The wizards just hang. WTF?

I read and read and read, and finally I find amongst the myriad pages on the subject one that says that the scratchbox environment isn't initialized properly and that the resolv.conf needs to be updated before starting. Now, maybe you know what scratchbox is, maybe you don't. Maybe you know what resolv.conf does, maybe you don't. I knew both things and also knew that they would cause the behavior I saw, so I manually ran the update, and lo and behold, the project was created.

Next thing I notice is that the image is ancient. It is running Intrepid, two releases of Ubuntu behind. That wouldn't be much of a problem. It does also have targets for the Diablo release, the old version of Maemo that runs on the 810s. That's worse. Finally, the Qt libraries are not installed on the Fremantle targets/boxes, and the keys are not in the apt repository.

Now, I know how to fix all of that, after working with Linux for almost two decades. I'll address that in time. But the real question is: why isn't that already in the image? Why would anyone have to spend a day just to configure something that really should run out of the box, and that it would take only hours to configure correctly? Why do I have to download 1.5G of image just to have something that isn't configured properly.

Methinks this project is not going to go anywhere if nobody starts paying more attention.

2010-04-20

The Suicide of the Kindle

Who remembers the time when Amazon deleted a bunch of books from Kindles? It was the dark ages of e-ink, Amazon was the undisputed master of ebooks, its marketplace was teeming with "publishers" that sold books in the public domain. One of those publishers offered a book whose copyrights had not expired. Understandable, given the absurd length of copyright extensions.

In any case, what Amazon did next was completely horrifying to any book lover. They used the Whispernet connection with which the Kindle communicates to the "mothership" and instructed Kindles with this particular copy of the book to delete them. There you are, reading your purchased copy of Orwell's 1984, and then on the next morning, it's gone.

Now, electronic gadgets usually start as analogies to analog ones. The Kindle is in analogy to a book. The idea is that of replacing hundreds of books on your shelves for a single book in your lap. Advantages: it's lighter than many books, and when you are bored, you can get a new book without going to the book store. Disadvantages: you need to charge it, it is much more expensive, and - apparently - Amazon can delete books as it sees fit.

To a non-book lover, the problem will seem minor. To a book lover, though, the idea of someone reaching into my bookcase and stealing one of my books is traumatic. So Amazon already got a really, really bad head start with this event. It will have to convince me to buy one of its books against the odds it might want to delete it.


2010-04-03

Imagine Roads Like WiFi Networks

I finally made the switch from Verizon to T-Mobile. I had been tempted for a long time, had gotten the final push last year, and finally I found the phone and opportunity that I wanted. I had heard all sorts of horror stories about T-Mobile, but with the amount of talking on the phone I actually do, it's perfectly fine if they work only 30% of the time. [Note: they have been extremely reliable, so far, and none of the horror scenarios I heard about actually came to bear.]

I came to think about the Verizon ads and how much their marketing department pushes the fact they have the best network. I guess I have to concede that point, Verizon has always been good to me from a coverage perspective, and only in Hawaii would calls get dropped frequently.

Then I wondered: why isn't building the wireless infrastructure a task for society to undertake? Why do we have every company that wants to provide wireless service start from scratch, building a whole network that covers the entire nation?

The situation is similar to that in railroads: the government didn't build them, it left the task to the Stanfords and J.P. Morgans. It gave each railroad company a monopoly over a specific route and let the company build the railroad and set prices for transportation.

When paved roads for cars came along, the government chose a different route: roads were built by government entities and were free. Of course, this difference over time destroyed railroads. In return, it gave us splendid roads, highways, and freeways.

In wireless networks, the situation is slightly different again: the government monopoly is not for a location or route, but for a band of the wireless spectrum. This means that we have many networks in the same location. To make things completely annoying, most networks are perfectly incompatible with each other. There are two major technologies (GSM and CDMA), different bands of the spectrum, and even when the technologies are compatible, the providers do their best to prevent interoperability.

Let's see how that translates to the road vs. railroad analogy.

If roads were like the wireless infrastructure, we'd have:
  • Several roads built side by side and paralleling each other where most cars drive; where few cars want to drive, there would be no roads
  • Subscriptions to a particular type of road. If your type of road does not exist in a particular location, you wouldn't be allowed (or able) to use that of a different road carrier
  • Flashy cars that work only on one particular kind of road. They could work on a different type, but the manufacturer has a deal with the road carrier to prevent that from happening
  • As long as you drive your car or leave it parked, everything is fine. As soon as you want to use it to haul a trailer, you have to pay whatever price your company demands, regardless of the fact it didn't tell you how much it would cost ahead of time (SMS and Internet pricing)
  • You'd only be able to buy a car the road carrier approves of. Any road carrier can declare a car unfit for its road network
Of course, roads don't work that way. You can take any vehicle on a public road, with certain limitations, because all vehicle produced suffice the requirements of the road. You don't see parallel roads that go from one place to another - if the traffic is bad enough, you see one wider road.

So, why did we switch from a private enterprise system to a public infrastructure system, only to switch back to the private enterprise system? Why private railroads (a failure), then public roads (a success), then private wireless infrastructure?

Imagine a different setup: a public organization is responsible for building the wireless infrastructure. Instead of dealing directly with 300 million customers, it wholesales the infrastructure to private companies that offer whatever they like. You can get the "traditional" 2-year deal with free phone from one, and a different a-la-carte system from a different company.

How is that better? For one, the cost of setting up wireless infrastructure is much higher in the current system. We have the same place covered by multiple networks, and that's invariably more expensive than a single network.

Then, since there are more resources available in the first place, coverage could be much better for everybody. There would be fewer dead spots, because it would be cheaper to cover them.

Additionally, since voters ultimately run the infrastructure carriers, there is much more direct involvement in investment. Right now, if your carrier doesn't feel the desire to invest in a 4G network, your only option is to walk to a different carrier, which means you have to get a new phone, subscription, etc.

But isn't this socialist? No, in multiple ways:
  1. The common infrastructure wouldn't prevent a private party from building its own network. It just wouldn't happen because the capital investment (and risk) are the biggest part of the problem
  2. Allowing companies to make a profit by offering the best packages with the wholesale infrastructure is very much capitalism at work. It's like shipping companies on the road, or restaurants at the road side
  3. The whole point of free markets is freedom. That's why they are called free markets. If you need several hundred million dollars to enter the stage, there is no freedom. That's evidenced quite visibly by the current state of wireless in this Nation

2010-04-01

Life with my Nokia N900

I've been running around with my N900 for a good time, now, and I have a better idea of its pluses and minuses. Time to share!

The Good:
Sound Quality: It's a Nokia, and it shows. Calls are crystal clear, the sound is perfect, and when the ring tones start blasting, it feels like the ghetto is on tour.
Screen Resolution: Seriously, I've used a BlackBerry and an iPhone, and I pity the poor fellas that continue using them. In particular, using the pinch-zoom on an iPhone is just about the most annoying thing in the world, because you constantly have to do it. Nah, get yourself an N900 and see the world with new eyes.
Extensibility: Yep, it doesn't have as many apps as the iPhone or even Android, but it's much easier to write new ones and to make old ones work on it. I tried it myself - after the frustrating experience of setting up cross-compilation, I actually got tcpdump compiled and installed and had a ton of fun seeing it work. There is just something about having a full environment to work with that is special.
Speed: It's zippy, alright? It's zippy enough that you immediately know when you are sent from WiFi to GPRS, because all of a sudden the browser can't keep up with you. As long as you are running on the little device, things are FAST.
Browser: Hello, Firefox! I got so frustrated with all the sites that don't work properly in Opera Mini, WebKit, or BlackBerry. On the N900, all sites WORK. It's just like sitting in front of your desktop and using your browser there. (Notable exception recorded later).
Skype Integration: A wonderful idea! You register your Skype account (whether online only or offline, too) and you get all your Skype calls into the regular phone mode. You can't really even tell the difference between Skype and regular calls, both inbound and outbound.

The Bad:
Battery Life: Sucks. As bad as the iPhone. If I stay out of the house for more than 8 hours, it dies on me. Grrrr...
OVI Software: One of the only things I absolutely regret is that Google Maps doesn't work in the browser. The navigation conflicts with the screen gestures for the browser itself. I wouldn't mind if the Maps from Nokia were anywhere near Google, but they are just pretty, but useless. I got tons more mileage out of my BlackBerry without GPS than with the N900 with. OVI Maps feels like it was written in the last Millennium, cumbersome, devoid of features, and quite clueless as to what you want from a mapping software.
Buggy: The bugs are right where you'd least expect them, and they are such that the experience is really unnecessarily hindered. For instance, for some mysterious reason, the phone refuses to show me who's calling half the time. I found a workaround: popping the keyboard open forces the phone app in landscape mode, which shows me all the info - but what do you do with a phone that displays precisely nothing when a call comes in?
Inconsistent: A phone that is open has one immense possibility, that of creating a hub of information. Incoming streams can be displayed alongside each other, filtered by source, by type, by urgency, whichever way you want. Not so in the N900. For instance, I use Pidgin for instant messaging - and despite the fact that IM is available through Skype in the main phone app, the messages that I get on Pidgin are somewhere completely different than those that come from Skype. This is kept throughout the phone: the contact entries are stored in a Berkeley DB, while the browser properties are stored in SQLite databases. That's all unnecessary: create a consistent architecture and work on all apps supporting it.

The Ugly:
Keyboard: Sorry, people, an Internet tablet that has a slider keyboard but doesn't support bluetooth or USB keyboards is plain dumb. It's not that it's bad, it's just stupid.  Once I learned to use the on-screen keyboard, I've never used the slider (except for those keys that are not available on the O-SK). The keys are too tiny, don't have enough feedback, and are in general too icky. If I could shave 1/3 of the height of the device by removing the keyboard, man would I be ecstatic! (Why bluetooth keyboard are declared "not a priority," is a mystery to me. Especially because in the pre-N900 tablets, they worked perfectly well.)
Gizmos: The camera is nice and well-integrated, so kudos for that. Everything else, though, seems to be half-assed. There is a webcam, for instance, but the picture quality is abysmal under low-light conditions, and there is no support in any meaningful app. To mock all of us, the only one that actually seems to work in bright light is "Mirror," which shows you to yourself. Cool? Not so much.
I mentioned lack of USB host support. That means that, while you have a fully competent Linux machine, the USB connector is crippled. You could print over the network, for instance, but you can't over the USB port. You could use an external webcam, but you can't connect it. I am not sure whether the problem is with the hardware (lack of USB host support on the controller) or the software, but in either case, the lack of functionality is maddening.
USB Port: Nokia, is it that hard to use standard connectors? Why on earth do we need a non-standard port to connect a USB device? Just give us a phone with a standard USB mini port, like the BlackBerries. It's not just that I don't want to carry one more cable with me - it's that if I am somewhere without the cable, there is no way I will find a Nokia connector at the nearest 7/11 - but I will almost certainly find a USB mini cable.
MeeGo: Did you hear the latest? Nokia merged its Maemo efforts with Intel's Moblin, and now they are MeeGo. Everything changes, nothing stays the same. Oh, and since Nokia bought Trolltech, you'll have to switch from Gtk to Qt for development. I hate saying this, but every time you force a change of infrastructure on people, you lose more developers willing to develop for you. It was true with Windows CE, which frustrated me to no ends with its incessant change of APIs, and it's true for these phones, too.
Cost: Seriously, Nokia. There is ONE phone that runs Maemo. It's the N900. It's freaky expensive. Give us something that a college kid could use on a shoestring budget. It's perfectly pointless to give us a Rolls Royce and expect the open source community to work with it. Know Thy Audience!