A webOS 1.2 Upgrade Experience That Couldn’t Be Much Worse

The following is a copy of what I just posted on the Palm Prē forums:

I woke up this morning to find that the webOS 1.2 upgrade had been pushed to my Prē automatically. I was happy, until the reboot finished and I saw:

Signed Out

You are no longer signed in to your Palm Profile on this phone.

If you plan to use this phone again, you can leave the files on your USB drive intact.

If you’re done using this phone, you can erase all your data on the phone and return to its factory default.

[Just Restart]
[Erase All Data]

The [things in brackets] represent buttons.

Read More »

What Characters Are Allowed in Twitter Usernames

A while back, when I was writing Hummingbird, I needed to look for Twitter usernames in various strings. More recently, I’m doing some work that involves Twitter at my new job. Once again, I need to find and match on Twitter usernames.

Luckily, this time, Twitter seems to have updated its signup page with some nice AJAX that constrains the user’s options, and provides helpful feedback. So, for anyone else who needs this information in the future, here’s the scoop:

  1. Letters, numbers, and underscores only. It’s case-blind, so you can enter hi_there, Hi_There, or HI_THERE and they’ll all work the same (and be treated as a single account).
  2. There is apparently no minimum-length requirement; the user a exists on Twitter. Maximum length is 15 characters.
  3. There is also no requirement that the name contain letters at all; the user 69 exists, as does a user whose name I can’t pronounce.

If you want a regex to match on this, /[a-zA-Z0-9_]{1,15}/ would be nice and safe for use in both POSIX and Perl-style regex syntax. (If you’ve got Perl-compatible regexes, /\w{1,15}/ is quick and easy. Update: And it’s wrong; see comment 6 below, by Mark Fowler.)

So Why Isn’t Perl My Favorite Programming Language?

A good long while ago, I tried doing an exercise that I was considering making into a standard job interview question: “For each of your ‘languages of choice’, tell me 5 things you like about the language, and 5 things you dislike about it.” My languages of choice at the time were Perl, PHP, and JavaScript, and my answers quickly showed me why this was not the best interview question:

It was far too easy to come up with dislikes, and not so easy to come up with likes. It was a perfect example of the adage that “Every programming language sucks, but some of them suck more.”

That said, the one language that scored more likes than dislikes, for me, was Perl. Here are some of the things I like about Perl: Read More »

Hummingbird Updated to Version 0.60

I’ve always questioned the wisdom of building a startup company based around someone else’s platform, like Facebook games or Gmail inbox add-ons. You’re totally at the mercy of the other company. (Many people have found out how silly it was to go up against Microsoft or Apple in just the same way.)

And yet, here I am with Hummingbird, which is totally dependent on Twitter’s bandwidth. (In my own defense, I can only point out that: a) I wrote it because I needed the functionality; and b) I’m not building a money-making company around Hummingbird. I’m just giving it away.)

In the past couple of weeks, I’ve noticed that Twitter can sometimes take an astonishingly long time to provide an update. Hummingbird works by requesting URLs like http://twitter.com/statuses/user_timeline/kmactane.xml?count=25, and (up until now) it worked on the assumption that Twitter couldn’t possibly take longer than 10 or 15 seconds to respond to such a request.

That turns out not to be the case.

In fact, my recent tests have shown that Twitter can sometimes take over 5 full minutes to finish responding to such a request. This is a problem, because the default installation of Hummingbird tries to update its cached data once every 5 minutes. And since I assumed the request would be fulfilled in, at most, 10% of that time, I didn’t bother building in any concurrency checking.

I’ve just completely reorganized most of Hummingbird’s architecture. The interface that a blog owner sees (in the sense of the configuration variables in hummingbird.php, and the calling syntax for blog pages and cron jobs) is still the same. However, all of the code for retrieving data from Twitter has been spun off into a new hummingbird-cache.php file, which can be launched into the background by the rest of Hummingbird, so that it can patiently take as long as it needs to in order to update the blog’s tweets cache.

The Major Change This Causes

In Hummingbird’s previous incarnations, it would freshen an out-of-date cache before displaying it. The assumption was that every once in a while, someone might have to wait a few more seconds before seeing your blog page. However, everyone would always see an up-to-date record of your tweets. (Where “up-to-date” means “no more than 5 minutes old, absolute tops”. If you tweet so relentlessly that that’s a problem, you probably don’t have enough time to keep up your blog…)

Now that we know that Twitter can take over 5 minutes to give you the data needed to freshen your tweets cache, that design is not acceptable. Instead, Hummingbird is now committed to showing the contents of your tweets cache as quickly as possible, and only then does it fork the cache-update process into the background.

This means that, if you’re not using cron or some other automatic job-scheduling facility to run Hummingbird every 5 minutes, visitors who arrive at your blog after a period of inactivity will see an out-of-date, stale listing of your tweets.

If you have a cron job set to keep Hummingbird fresh, you’ll be fine. (A page view will also trigger an update, so if you get so much traffic that there’s never a 5-minute period during which your page doesn’t get hit, you’ll also be fine.)

Palm Is Lying, Not Just Spying

So, Palm was recently caught spying on its users. Major kudos, by the way, to Joey Hess, who initially broke this story. For those who haven’t kept up, various other news outlets and blogs have also been reporting on it.

Palm’s response to this problem is a single paragraph of corporate PR-speak:

Palm takes privacy very seriously, and offers users ways to turn data collecting services on and off. Our privacy policy is like many policies in the industry and includes very detailed language about potential scenarios in which we might use a customer’s information, all toward a goal of offering a great user experience. For instance, when location based services are used, we collect their information to give them relevant local results in Google Maps. We appreciate the trust that users give us with their information, and have no intention to violate that trust.

The problems with this statement are:

  1. There is no indication of how to turn off this particular piece of data collection. Not on Palm’s web site, not in the user manual that came with the Prē, and not in the Prē’s user interface.
  2. For all the “detailed language” in Palm’s privacy policy, there is no slightest indication — anywhere — that they collect information about what applications the user runs.

It’s particularly interesting to look at the “On-Device Services” part of the privacy policy: It mentions types of data that will be collected “If you use services we provide” (emphasis added). For example, they say, “When you use a remote diagnostics or software update service, we will collect information related to your device (including serial number, diagnostic information, crash logs, or application configurations)”. This is the only mention of collection data about a user’s applications, and it clearly starts with “when you use a diagnostic service”.

It doesn’t say “once per day, no matter what”.

Other items under “On-Device Services” start with “When you use a back-up and restore service…” and “When you use location based services”.

All of this suggests that users have some sort of control over what gets sent and when. The Palm Prē’s “Location Services” preferences item has a control labeled “Background Data Collection”, with the caption: “Allows Google to automatically collect anonymous location data to improve the quality of location services.” (This is after other controls labeled “Auto Locate”, “Use GPS”, as shown at right. If you turn on Auto Locate, you also get a control labeled “Geotag Photos”.)

It doesn’t say that Google (or anyone else) will collect data on what apps a user is running. And it strongly implies that this data will only be collected when I actually run an app that uses location services — for example, Google Maps, or OpenTable (which wants to know where I am so it can try to find nearby restaurants).

And it blatantly claims that if I turn off that switch, it won’t send my data off to big corporations any more.

So far, I’ve verified a few things:

  1. The application data log includes installs, uninstalls, and launch and close times for all apps, not just Palm’s official ones. Homebrew and third-party apps are included.
  2. Flipping the Background Data Collection switch does not turn off the contextupload process that’s responsible for sending the information to Palm’s servers.
  3. Nor does it stop logging application launch and close times. I’ll repeat that: My Prē is still logging application launch and close times into /var/context/contextfile, even though I have Background Data Collection turned off.

We in the technology business have a technical term for what Palm is doing when it claims that it “offers users ways to turn data collecting services on and off” in the context of this particular data. That term is: lying. Palm is lying to us, pure and simple.

An Installation Shell-Script for Palm Prē Developers

Last week, I wrote that I’d been working on a script to easily install homebrew apps on the Palm Prē. It now looks like there are much better ways to handle such things — I’ve become quite a fan of fileCoaster, myself, and of course webOSQuickInstall is a wonderful piece of work, as well. But just in case anyone might find this shell script useful, I’ll release it for general use.

Assumptions

  1. You have a web-accessible server where you put your development .ipk files.
  2. You can ssh into your Prē.

Download

You can download the script at http://kai.mactane.org/software/libraries/download/homebrew.sh.

Installation

Just drop the shell script into your home directory and make it executable. If you want to be able to use the “my” argument, you’ll also need to edit the three configuration variables at the beginning: MY_HOSTNAME, STDPATH, and STDVERSION.

Usage

For most purposes, you’ll just want to install your own package that you’ve been working on. Assuming you’ve set the config variables correctly, you can just type ./homebrew.sh my appname, where the appname is the base name of your package.

If you’re installing multiple .ipks and you don’t need to restart the GUI manager for each one, you can use the “skip” command on all but the last:

./homebrew.sh skip my foo
./homebrew.sh skip my bar
./homebrew.sh skip my baz
./homebrew.sh my quux

You can also supply a complete URL: ./homebrew.sh http://forums.precentral.net/spe_attachment/download-23971-com.palm.net.precoder.fcoaster_1.0.2_all.ipk will download and install fileCoaster, so you won’t have to mess with my script any more.

What It Does

It automates the process of installing homebrew apps with a rooted Prē, as described on the webOS Internals wiki. Basically, it remounts the root partition in read-write mode, wgets your .ipk file, installs it, does the “Good Housekeeping” backup, remounts the root partition in read-only mode again, and then restarts the GUI manager.

A World Where People Regularly Discard Knowledge After 9 Years

In his latest entry on Coding Horror, “Windows 7: The Best Vista Service Pack Ever”, Jeff Atwood says:

I want the world to get the hell off Windows XP. A world where people regularly use 9 year old operating systems is not a healthy computing ecosystem.

I find this terribly, painfully wrong. The unintended consequence that comes from that mindset is: “Let’s make all the user’s hard-won experience and knowledge totally useless every few years.”

There are lots of reasons why I didn’t bother upgrading to Windows Vista (if you can call it an “upgrade”), but the one that’s relevant for this article is simple: I already know how to use Windows XP. I know how to use applications with menu bars. I don’t know how to use the Ribbon, and I don’t feel that I need to throw away my existing skills.

Maybe that means I’m not on the leading edge of the tech curve any more. Fine, so be it, but retraining habits and muscle-memory is an annoying, inconvenient task. There are times when the benefits are worth it.

Nobody has made a convincing case that Windows Vista’s blithe discarding of one of the four pillars of GUI design that’s been stable since the early ’80s — windows, icons, menus, and pointers — is one of those cases. In fact, the legions of people who bought computers with Vista pre-installed, and then paid more money just to use XP instead, argues pretty convincingly against such a move.

Mr. Atwood posits a world where people don’t use operating systems for more than, say 7 or 8 years. I’d like to counter with a world where the basic design of your car’s controls and interface changed every 7 years. Instead of a steering wheel, a pair of foot pedals, and a shift lever, suppose that the 2010 line of cars used a tiller lever and a single forward/back foot-slider. Or a joystick and throttle system, like a jet fighter.

Do you suppose the accident rate might spike?

I don’t know of any field besides computing where people think that it’s acceptable to completely redesign user interfaces every couple of years. In the terms of Kathy Sierra’s wonderful post, “Attenuation and the Suck Threshold”, redesigning your interface is a way of forcibly smacking all your users back down under the suck threshold. Instead of being able to continue to use your program, and gradually learn the new features, they have to drop everything they were planning on doing this week, and instead devote their time to re-learning how to use something they already learned before.

This is simply cruel. Please, don’t do it to your users.

There is a kind of fool who says, “This is old, and therefore good.” And another type of fool who says, “This is new, and therefore better!” But what kind of fool does it take to want everything to be new, or renewed, every few years?

Productivity on Various Fronts

I’ve actually made some progress on coding projects this weekend. My Palm Prē “Magic 8 Ball” application now responds to the Prē’s accelerometer: if you rotate the Prē, the app stays right-side up (including readjusting the position of the backdrop image). Even cooler, you no longer have to tap a button to trigger the fortune; now you shake the phone instead. (Last Saturday night, a friend expected to be able to shake the phone and have it “shake the magic 8-Ball”. But that wasn’t actually possible for third-party devs like me at the time; the accelerometer support only arrived in the webOS 1.1.0 update, which came out on Thursday.)

I’ve also got a reasonably good script for installing, updating, and uninstalling homebrew apps for the Prē. Instead of the annoying, six-step process for installing homebrew apps on a rooted Prē, I just shell in and type ./homebrew.sh my 8ball, and the homebrew.sh script does it all for me. I need to publish that thing, now that I’ve got it working fairly well.

Additionally, my Japanese sentence generator, called “J-Babble”, now does proper plain past tenses (the -ta and -nakatta forms), which will make it more useful for me as a tool to keep me from backsliding when I’m busy. I’d link to that, but it’s not really a general-use tool yet. It’s more just for me. Maybe some day, I’ll give it the option for people to customize what vocabulary and grammatical forms they know, so it can just generate stuff they have a chance of understanding. For now, though, its use is just for me: when my life gets too busy for me to read my Japanese textbook and try to make new progress, I can at least bring up J-Babble once a day and get 25 randomly-generated, but grammatically correct and semantically sensible, sentences in Japanese. It’s just enough to keep the neural pathways from atrophying; it allows me to hold my place instead of losing ground.

(I’ve gotten some housework done, too, but this isn’t the place to talk about that.)

Announcement: Hummingbird Upgraded to Version 0.51

I’ve just upgraded Hummingbird from version 0.5 to its new version: 0.51. Since I recently starting using the #PalmPrē hashtag in my tweets, I suddenly noticed that Hummingbird didn’t make hashtags clickable.

Well, now it does.

The change is pretty minimal, but it also incurred some overhead in my web site: the Hummingbird web page needed to be updated to match the new feature. And since that feature meant adding a new CSS class, I had to update the “CSS Styling” section as well as the “Features” section… and add a new “Version History” section…

All in all, it was harder to update the documentary web page than to update the software itself. In a way, that implies that my code was pretty clean. If you want, you can download the new version here.

See, I’m not neglecting everything to work on Palm Prē programming! (I’m also doing some contracting, which is taking up even more time.)

Palm Prē, Day Three: The Good and the Bad

So, I’ve already posted my anguished wail over the completely unusable state of the Prē’s memo pad app. Considering that Palm started off as a company that sold PDAs, whose main apps were contacts, date book, and note pad, the collapse of one of those three items seems pretty embarrassing. But aside from that, how is it? I have a variety of likes and dislikes.

First off, a correction to my earlier wail of woe: I claimed that the Task List app was also afflicted by the lack of categories. But it effectively does have categories, it’s just renamed them. You used to have categories with items in them; now, you have lists… with items in them.

Frabjously Cool:

  • Multitasking. ‘Nuff said, right? No, not quite, because that includes multiple instances of the same app, such as multiple web browsers. (Obviously, the memory resources are limited, so you’re not going to have a dozen different web pages open. But two or three? Sure!)
  • The general look and feel of webOS is pretty cool. There’s a nice “whoosh” sound when you flick a card off the top of the screen. If you turn on “advanced gestures”, you can swipe across the gesture area to switch between apps while leaving them full-sized, and the animation for that is pretty slick. For that matter, the effect when you swipe up from the gesture area into the main screen to pull up the Quick Launch ribbon is also pretty sexy.
  • It has support for displaying Japanese characters out-of-the-box. Since I’m currently studying Japanese, this is a wonderful Godsend for me: I can access Japanese resources on the web in the palm of my hand. Heck, sometimes, I just bring up a Japanese web page and look at it, just to see it.

Kind of Nice:

  • The keyboard layout is a little different from the Trēo’s. And it’s a better layout. They got rid of the “Menu” key, and then juggled other things around to allow comma and @ sign in normal mode (where they’d previously required symbol-shifting), and semicolon and underscore in symbol-shift mode (they had previously required much more awkward key combos). This doesn’t sound like much, but it makes both normal writing and entering email addresses a lot more fluid.
  • The Prē displays the time and the battery-charge indicator all the time, unobtrusively at the top of the screen. The Trēo only displayed those in the main window; if you were using an app, you couldn’t tell the time or see how your battery was doing.
  • The screen is nice and crisp. There’s not much to say about that, but it’s nice to look at.
  • Satisfying “snikt” sound when you snap it shut.
  • The gentle concave curve it makes when extended fits better around the face’s ear-to-mouth curve (for use as a phone) than single-piece smartphones I’ve dealt with. The single-piece ones are flat or even convex; my Trēo was so short, I usually found myself moving it back and forth from mouth to ear, which made my conversations annoying and choppy.
  • Comes in black. Sleek and sexy black. Mwah-hah-hah.
  • You can use any MP3 as a ringtone. Just connect the Prē up to your computer as a USB drive and drag the MP3 to the “ringtones” folder. Then the ringtone will automatically show up in the list of available ringtones (using the ID3 tag’s “title” attribute, if present). You can assign it as your default, or assign any ringtone to any of your contacts. Load up 500 custom MP3 ringtones, if you want (and if you can spare the disk space). (This feature might go in the “Frabjously Cool” category for people who have been gouged by their cell phone companies for downloadable ringtones, but I never had that problem; the Trēo would do this, too.)
  • Naturally, you can zoom in and out of web pages, like on other smartphones. But double-tapping a section of any web page will “auto-zoom” it so that particular part fills the width of the screen. When scrolling around a zoomed page, the browser also tries to come to rest with the edges of page sections at the edges of the screen. It’s helpful. It doesn’t always guess right, but it’s definitely more of a help than a hindrance, and I’m quickly coming to like it.

Could be Better:

  • Starting up an application takes longer than I’d like. This is probably partly a question of CPU horsepower; it might get better with the next generation of hardware. I can’t think of any way Palm could easily fix this, and I’m not blaming them for it. It’s just a little annoying.
  • While we’re at it, the phone’s bootup time is astoundingly long. This probably isn’t much of an issue for a normal user, because you really don’t reboot your phone very often. Since I’ve been doing weird, hacker-ish things that require lots of reboots to go into and out of Developer Mode, I’ve spent longer than I’d like looking at the slowly pulsing Palm logo.
  • By default, webOS gives you only three “pages” in the Launcher. You can put as many apps as you want on a page, and you can move apps around however you want. Still, with only 12 items displayed at a time, it’s easy to get lost. More pages would really help.

    And the OS actually does support more… except that Palm commented out the menu items for adding and deleting pages! I can’t understand why. If you root your Prē, you can uncomment that feature and add pages to your heart’s content… but honestly, I’m not sure that rooting is a process the average user is ready for.

  • You can have multiple web pages open, but it’s not quite as good as tabbed browsing, because there’s no real way to specify “open this link in a new tab (or window)”. And you can’t even right-click, copy the link location, and then manually open a new window and paste in that URL, because there’s no way to right-click. To be fair, I can’t figure out a good workaround for this either, so I’m not going to blame Palm for not coming up with anything.
  • As I’ve already mentioned, Synergy (the calendar app) color codes events based on where it got the information about the event from (e.g., from Google, from Exchange, or from direct entry on the phone). I think it should code stuff based on what type of event it is (work, party, doctor/dentist appointment, social date, etc.).

Bloody Well Needs to Be Fixed:

  • Text selection is a major hassle. On the Trēo, you could just hold down Shift and move your cursor around with the D-pad, like Shift-selecting with arrow keys on a full-scale computer. But the Prē doesn’t have any D-pad. You can move the cursor around one letter at a time by holding the Orange key and then moving your finger four-directionally on the touchscreen. And you can select by holding down the Shift key and dragging the cursor around… but it’s slooowww, and often loses the selection if you try to select a lot of stuff. It’s okay for short selections, but trying to select from one end of a text field to the other is nightmarish. There have already been times when I’ve just given up and retyped a whole line of text… like I’d have to do if my smartphone didn’t have a copy-and-paste feature at all.
  • Scroll bars. Lists need them. Lists in webOS slide nicely up and down, but unless you’re at one end of the list, you have no idea where in it you are. Or how long it is. Scroll three or four screens… are you just barely into a long list? Nearly at the end of a short one? You’ll need a crystal ball to tell. Zooming web pages means you can get lost in two dimensions, not just one. We need scroll bars to provide an indication of where we are. And when trying to move from one end of a long list to the other end, a scrollbar gives us a faster way of moving than laboriously flicking it over and over again.
  • This isn’t Palm’s fault, as I understand it; I am given to understand that the blame for what I’m about to describe goes to Sprint, not Palm. That said…

    Sprint apparently pre-loaded the phone with various crapware apps, ranging from an Amazon MP3 store to a variety of Sprint website links to a NASCAR app. Fine, fine, whatever, I’ll just delete those things and free up the space…

    What do you mean, I can’t delete them?

    *icy look* What!?! I will not accept this.

    Adding more Launcher pages is a good reason to root your Prē. But this? This absolutely requires it.

Other Notes and Observations:

  • The first time you try to pry off the USB socket cover, it’s nearly impossible. People have complained a lot about that. However, it quickly gets easier — I think this is partly because the cover loosens a bit, and partly because you start learning how to do it. In my case, that learning also included an aspect of “learning that the cover isn’t quite that fragile, and you can claw at it a little more firmly than you first thought”. At any rate, I’m now pretty comfortable with it, and can pop the cover off in about three seconds, tops. And I’ve only owned the thing for… what, about 75 hours? Really, it’s not that bad.
  • People have also complained about the battery life. It is definitely shorter than the Trēo’s was, but not by a whole lot. I’ve always been pretty good about keeping my smartphone plugged in when I’m not on the go, so this isn’t a big issue for me.

    Also, the thing seems to charge up impressively quickly. I haven’t run any formal tests, but I’m sure it charges up way faster than the Trēo… or than anything else I’m accustomed to.

  • The shiny surface shows off human fingerprint oils impressively well. That’s annoying (and makes me want to wash my hands more often), but not actually problematic. I’ve treated it fairly carefully, so I honestly can’t say how easily it scratches.

At the moment, my plan is this: I have something like 27 days left before I can’t return the phone any more. And I still own my Trēo. I’m going to try to make a concerted effort to learn lots of webOS programming in the next three weeks, and see if I can develop a replacement Memo Pad app. One that’s actually usable, instead of effectively being pretty to look at in a demo, but practically useless in real life. If, by the time the deadline is coming up, I can be reasonably certain that I can write such a thing — I don’t have to actually have it done, just be confident that I could do it in a reasonable time-frame — then I’ll keep the Prē.

If not… if I’d be stuck with the hideousness that is the current memo pad? Then I might still keep the Prē. It’s been growing on me. Actually, writing my previous screed helped get some of the pain out of my system, making it more possible for me to see the Prē’s good points.

Of course, as soon as I concocted that plan, I got called up for some contract work that’s been eating a lot of my available time… the universe is not without a sense of humor.