Things the iPhone could learn from the Treo

As per the topic of my last post, I recently switched from a Palm Treo 650 to an iPhone 3GS.

In most ways the iPhone is far more advanced, but as a PDA the iPhone still falls short of the 7 year old Treo design.

1 – Getting to most-used apps fast

Edit 2014: The Android app “Cover” does a lot of this, altho it’s half-baked. Unfortunately they got bought by Twitter, who seem to have ended development on it.

The iPhone’s UI is beautiful, but it is needlessly slow to get at often-used apps like Phone and Contacts.

On the Treo, a single button press gets you to the phone keypad.  A different single button gets you to Contacts, or any of 2 apps of your choice.  Admittedly, the Treo has many more buttons, but the iPhone could do far better.

On the iPhone, you:

  1. Press Home
  2. “slide to unlock”
  3. Press Home again (if you were previously in an app)
  4. Slide the app menu left or right a few times (if the app you want isn’t on the first menu page or the dock)
  5. Press the app you want

In the best case it’s 3 steps to your app, in the worst 5 steps.  That’s a lot of work just to start your favorite app.

But this is completely unnecessary.  Apple could easily do something like this:

iPhoneMockup2

Apple, you can do better!

(forgive the crude Photoshop work; but you get the idea).

This way you get to your favorite apps much quicker – just Home and one swipe.

Apple, if you want to do this, you have my permission – I won’t sue you.  Just ask if you want it in writing (see “About me“).

2 – Named app pages

The Treo let you name each page of apps, so you could categorize them.  And you could walk thru each page with the Home button.  I don’t see why Apple can’t do that.

3 – Contact searching

The Treo was much quicker at searching for contact entries.  It had a clever system where if you entered “db” it would search not just for names containing “db” but also for names with the initials “D.B.”.  This worked really well – just 2 or 3 letters was usually enough to identify a contact this way.

The only reasons I can think of why Apple doesn’t do this are (1) they didn’t know about it, or (2) patent issues.  But I’d think Apple and Palm are both infringing on enough of each others patents to make that moot – they’re already well into the realm of mutually-assured destruction.

4 – Telephone number selection

Again, Treo wins.

On the Treo all the phone numbers for each contact (office, home, fax, mobile, etc.) are visible on the screen.  You can directly click any one of them and dial it.

On the iPhone, you first find your contact, then select it, and only then can you choose a number to dial.  Three steps vs. one on the Treo.

5 – No casual notes in phone numbers

The Treo would happily ignore everything after the first alphabetic character in a stored phone number, so you could include casual notes like this:

+1 800 555 1212 (lake house)

+1 800 555 1213 (girlfriend’s place)

That’s a no-no on the iPhone – it will simply refuse to dial numbers that contain “invalid” characters.

There is no good substitute way to store this kind of info, which I find pretty important.

I’m very impressed with the iPhone’s capabilities, but I’m surprised how little Apple learned from what was already in the market.

In retrospect, I think I might have been better off buying the Palm Pre.  But I did want to try the “Apple experience”, and having spent two weeks getting the iPhone setup, I think I’ll let the Concorde Effect do it’s dirty work and stick with the iPhone for a while.

At least until my contract with AT&T is up.

Painful migration from Palm to iPhone

(Updated July 11 – it’s finally done.  Notes on regular expressions to search on and resetting to fix sync problems added.)

I’ve finally given in and joined the Apple collective.  On my phone, anyway.

For years my Mac-using friends have raved about how great the Apple experience is… “it just works!”.

If only.

I’ve been migrating my stuff from my old Palm Treo 650 to an iPhone 3GS for well over a week now.  I’m nearly there.  This post is partly to document things for myself, if I ever have to do this again.

Here are my tips if you’re going to do something similar:

1 – Calendar

This was the easiest, since I’d already moved onto Google Calendar some time ago (using GooSync with the Treo).  I just set the iPhone to sync with Google Calendar, and it works fine.

2 – RPN calculator

I’ve been using Russ Webb’s RPN on the Palm for many years.  It’s a solid, well-designed RPN calculator, with full programmability.  It worked well enough that I sold my old HP-42S on eBay (at a huge profit).  But it doesn’t run on the iPhone.  And there’s no Palm emulator for the iPhone due to one of Apple’s many stupid rules.  (“No emulators.”  Another stupid rule that galls me is “No scripting”, which means no Python.)42s on the iPhone

After trying lots of calculators in the App Store, I settled on 42S, a port of the Free42 re-implementation of the HP-42S (not an emulation; it doesn’t use HP’s ROMs).  It’s powerful, has a good UI, and is fully programmable.  It’s even open-source (but not free on the iPhone; it’s $5). I’m happy.

3 – Memos

I kept a lot of memos on the Palm, mostly shopping lists, to-do, etc.  I want these to be accessible from both my desktop and the iPhone.

Apple’s “Notes” app syncs to Outlook in iPhone 3.0, but I don’t (and won’t) use Outlook.

The solution I found was to put my memos in the “notes” field of Contact entries, then sync them with Google Contacts.  I put the memo title in the Company field, with “a.a ” in front of it – this forces the memos to the top of the list.

That solution was found after looking into a LOT of other possibilities, including the popular “Evernote” app and one called “gNotes” that syncs to Google Notebook.

I’d never have guessed it, but both of these apps (and who knows how many others) sync IN THE CLEAR!  If you’re using an open WiFi connection (say, at Starbucks), anyone on the network can see all your private notes being synced, using nothing more than a freeware packet sniffer like Wireshark.  I tried it myself – it’s true.  God help you if your bank account password is in there.

With all the stupid rules Apple has for the App Store, I can’t see why they allow apps to transmit private data in the clear (without even a warning); preventing that would be far more useful than “No emulators” or “No scripting”!

4 – Contacts

Now the sob story.

I spent days figuring out how to export my 800+ contacts from the Palm and get them into the iPhone and a desktop app.  (I used to use Palm Desktop.)

I don’t (and won’t) use Outlook.

I settled on Google Contacts as the best desktop solution – it has a simple, clean UI, and is accessible from anywhere on the web.  I can still get at my contacts on the iPhone if my Internet connection goes down.  And it’s free.

If you’re running older versions of Palm Desktop, there are export utilities on the Web that can help.  But I didn’t find one that supported Palm Desktop v6.5’s newer format.

However, Palm Desktop will export to vCard format.  Which is fine, except that everyone’s implementation of vCard has some non-standard fields that need to be translated.

So I spent a day or so reverse-engineering the custom vCard formats used by Palm and Google. (Create funny-looking contacts; export; view with text editor, hypothesize, edit, import, compare results.  Repeat…)

Then I exported all my contacts (one Palm “category” at a time, otherwise Google puts all the imports into the same “group”) into .VCF files and made the necessary corrections with a text editor; mostly via simple search-and-replace (but some use of regular expressions was needed).

Here are the steps I used:

A – Translate fields from Palm to Google format

The following vCard fields don’t import to Google; they’d need translation but I didn’t bother since I wasn’t using any of them:

X-PALM-ANNIV (anniversary date) >  no Google equivalent, need custom field

IMPP:IM (IM address) > X-GTALK or X-YAHOO, etc.

IMPP:IM2 (another IM address) > X-GTALK or X-YAHOO, etc.

X-PALM-ASSISTANT (name of secre… um, personal assistant) >  no Google equivalent

X-PALM-ASST-TEL (telephone number of same) > no Google equivalent

Then I translated a couple of custom fields in the Palm that I’d started using back before Palm introduced standard fields for the same thing:

“X-PALM-CUSTOM;1” > “EMAIL;INTERNET”

“X-PALM-CUSTOM;2” > “URL”

Next, the Palm marked a firm’s “main” number (switchboard number) differently than Google did:

“TEL;X-Palm-Main” > “TEL;TYPE=MAIN”

B – Translate extensions into commas

The iPhone address book refuses to dial any number that has characters other than +, 0-9, #, * and , (comma) in it.

This causes more than one kind of problem.

First, if you store telephone extension numbers like I did, you have a lot of numbers that look like this:

+1 800 555 1212 x1234

…indicating the use of extension 1234.  The only way I found to preserve this information is to change the ‘x’ (or “ext.”; whatever you use) into a comma (‘,’).  The comma is allowed, and causes the iPhone to pause (rather a long time) and then dial the extension (rather slowly).  At least it’s still there.

These I changed, after finding them with the regular expression “x[0-9]”.  (I use TextPad as my editor; your regex syntax may differ.)  That expression isn’t perfect, but I looked at each hit and edited by hand.

C – Create Custom Fields

The Palm Desktop had a concept of a”preferred” number for a contact – I think this was supposed to be the number that it would dial by default.  This was marked in the vCard format with “PREF” like this:

TEL;HOME;PREF:+1 800 555 1212

Google (and the iPhone) don’t seem to support this concept, although it is a part of the official vCard 2.1 spec (I read that too).  No problem, I thought – I’ll just move that into a note after the phone number:

+1 800 555 1212 (preferred)

After all, I have lots of other kinds of notes in my Palm address book numbers.  For example:

+1 800 555 1212 (lab)

+41 22 730 5111 (Geneva main)

+1 800 555 1212 (lake house)

etc.

This turned out to be a bigger problem.  As mentioned, the iPhone won’t dial a number with notes in it.  This is a major pain – the Palm happily ignored non-digit characters.

There is a workaround – “custom fields”.  You make a custom field label and put your notes in there.  So:

+1 800 555 1212 (lake house)

becomes

Lake house: +1 800 555 1212

The syntax for this is:

item1.TEL:+41 22 730 5111
item1.X-ABLabel:Geneva main
item2.TEL:+1 800 555 1212
item2.X-ABLabel:Lake house

Again, I edited in these changes by hand, after finding them with the regex “^TEL.+[0-9]+.+[:alpha:]”.  Remember to increment the item number if there are multiple custom fields in the same contact.

Once you do that, the iPhone offers “Lake house” and “Geneva main” as possible labels on every phone number, but I can live with that.

D – Fix truncated notes

Ah, the joys of incompatible software.  The Palm stores control characters (CR and LF) in a “QUOTED-PRINTABLE” format, such that newlines look like “=0D=0A”.  Which is fine, except that Google’s parser sometimes misinterprets ‘=’ symbols in the note (like “Son=Oliver”) in a way that truncates the note.  This only happened a few times, but I had to fix each one by hand.

I searched in the Palm-exported .VCF file for “^NOTE.*=[^0Q]” (a line starting with “NOTE” contaning an equal sign followed by something other than zero or Q).  Then I checked each imported note this found and fixed it by hand if necessary.

E – Resetting the iPhone/iTunes when out of sync

Somewhere while making all these changes (and test imports/exports) the iPhone/Google synchronization (performed by iTunes via USB)  got messed up, such that new entries in one contact list wouldn’t get synchronized with the other.

I tried the File>Preferences>Devices>Reset Sync History button in iTunes, but that didn’t help.  In the end, the only way I found to fix it was:

  1. Uninstall iTunes
  2. Delete the iTunes folder in /Users/<username>/Music (this was on Vista, try /Documents and Settings/<username>/My Documents/Music if you’re on XP).
  3. Delete the “Apple” or “Apple Computer” folders in /Users/<username>/Local and …/LocalLow and …/Roaming.
  4. Re-install iTunes

(I did try several subsets of that, which didn’t work.)

After all of that, I imported the result into Google.  And let it sync with the iPhone.

At first it seemed to work OK.  But when I turned on over-the-air syncing, some phone numbers were missing altogether, and others were very messed up on the iPhone.

F – Don’t use over-the-air syncing (Microsoft Exchange, ActiveSync)

After much hair-pulling and googling, it turns out that the ActiveSync protocol that Google uses to sync with the iPhone doesn’t support custom fields.  Any number labeled with a custom field doesn’t sync.  (In fact, just enabling over-the-air syncing on the iPhone disables the use of custom fields.)

So how do you identify which number is for the main office, and which for the regional office?  Or your friend’s main home vs. vacation home?  Answer: You don’t.

That won’t do.

The workaround is to disable over-the-air syncing for Contacts, but allow USB syncing (to Google Contacts) via the iTunes app.  (The setting is in the iPhone Settings app, under Mail, Contacts, Calendars > (your Gmail account) > Contacts.  Turn it OFF.

That’s it.

“It just works”?  I wish.

Tiny Rocket Altimeter Fits In 18mm Motor Casing

I just finished building this tiny rocket altimeter.  It fits inside a standard 18mm (diameter) rocket motor case – in this case, a used Estes C6-7 motor.

side_img_0376

It’s based on Robert DeHate’s PICO-AD4 altimeter.  It measures peak altitude and will fire the ejection system at either apogee or a main deployment point (a few hundred feet AGL).

The most difficult thing was finding an adequate battery that would fit – I ended up with a L1016 6v alkaline; they are widely available (online) and inexpensive.   It uses a 220 uF capacitor to fire a AG1 flashbulb for deployment (220 uF is enough to do this reliably).

Here’s the schematic – not much to it:

ad4-altimeter-schematic_500px

I drew a power switch, but I couldn’t get it to fit.  So I just take out the battery to turn it off.

I made the hole for the battery with a Dremel tool.

Here’s the back side:

bottom_img_0379

The jumper on the back (J1) selects whether the ejection will happen at apogee or using the main deployment point.

The two bolts/nuts on the end are the attachment for the AG1 bulb (2-56 hardware), the battery clips were made from parts in my junk box.  The negative terminal is soldered onto two cut-off pieces of paperclip (paperclips are made out of good-quality steel), which are in turn soldered onto the perfboard.

(By the way, I’ve discovered the perfect tool for cutting PCB traces – a little battery-powered engraver. Harbor Freight sells the one I use for less than $10.  Just make sure you blow away all the tiny copper pieces afterward with canned air.)

The resistor is just to limit the charging current on the capacitor – that little battery really doesn’t like high currents.  The resistor value is not critical – anything from 500 to 3000 ohms or so should be fine.

Here’s a top view (with it running and the LED blinking):

top_img_0366

The 220 uF cap is held in place with some hot glue (as are some of the wire-wrap wires on the back).  I used epoxy to hold down the jumper, screws and base nuts and to reinforce the thin bits of perfboard next to the battery – otherwise the whole thing bends too much under the off-axis tension from the battery springs (I broke an earlier version that way).

Here it is snug in it’s 18mm motor case:

end_img_0362

The flashbulb wires are meant to go out the other end, thru the rocket nozzle hole.

As you can see, I had to ream out the inside of the motor case a bit to get things to fit.  (This was desirable anyway, to get out all the black soot left after firing – do NOT try this with a unused motor!!)

The reaming was done starting with a 1/2″ drill bit, then a 9/16″, finishing with sandpaper wrapped around the 9/16″ bit (use some double-stick tape to keep it on there).  It helps a lot to have a drill press.

I haven’t flown it yet, but it works well on the workbench.

Detecting Windows software RAID failure

A RAID 1 or RAID 5 array will avoid losing data when one of the N drives in the array fails.

But if a second drive fails, you lose your data.  So it’s important to know when one of your RAID drives has a problem.

Windows NT, 2000, and XP (if you do this), plus server versions of Windows, support software RAID – no special RAID hardware needed, just drives visible to the OS.  (It might work with Vista, too; I haven’t tried.)

But there’s no way for Windows to notify you when there’s a problem with one of the drives.  (You really want to replace a failing drive before a second one goes bad!)

So I put together CheckRAID to solve this.  (Click to download; it’s a 133 kB ZIP file).  It’s freeware (public domain).

Unzip it into a folder (anywhere you please) and run CheckRAID.bat every so often to check for a failed (or unsynchronized) RAID drive.   See the README.TXT inside for more details.

Enjoy.  If you find this useful, I’d appreciate a comment.

Where lift really comes from

I’ve been reading Martin Simons’ wonderful Model Aircraft Aerodynamics (3rd ed.) recently. I was hoping to find out, among other things, where lift really comes from. Simons’ book has lots of fascinating detail about aircraft design (not just for models), but didn’t answer that question.

But I have finally figured it out, and thought I’d share it with you–

First, lift has nothing to do with the curvature of wings. Airplanes with completely flat wings can fly (although not as efficiently as with proper airfoils). And airplanes with curved wings can and do fly upside down.

Wing curvature and airfoil shapes are for the purpose of reducing drag – valuable, but not necessary for lift. Because most aircraft wing shapes are optimized for efficient (low-drag) right-side-up flight, inverted flight is less efficient. But possible. (Aerobatic aircraft that spend lots of time upside down often have symmetrical wings.)

Second, lift has nothing to do with “equal transit time” for molecules on the top and bottom of the wing surface – this is simply a myth (well debunked both at Wikipedia and in a nice article at Plane & Pilot magazine). While it’s true that air flows faster on top of a wing, it does not rejoin the flow on the bottom at the trailing edge of the wing.

So what is it, then?

There are two popular explanations, both of which are fully and completely correct, because they are two ways of describing the same thing. One, Bernoulli’s Principle, is easily misunderstood and leads to lots of confusion. The other, Newton’s Third Law of Motion, is simple to understand.

Wings generate lift by deflecting incoming air downwards.

Therefore, lift comes from Newton’s Third Law – the action of pushing air down results in a reaction of the wing being pushed up.

As an aircraft flies, the wing presents some angle of attack to the incoming air – a wing that is generating lift isn’t aimed straight forward; instead the leading edge is a little higher than the trailing edge; this is the angle of attack.

Fundamentally, lift is the result of angle of attack and forward motion of the aircraft relative to the surrounding air.

To just slightly oversimplify – air molecules come at the wing and whack into the bottom side, bouncing off downwards and pushing the wing up. This transfers momentum from the molecule into the wing, generating lift. This sweeping of air molecules below the wing leaves less molecules above the wing – a partial vacuum. So air rushes in to fill that vacuum, most of which comes from above (it can’t come from below because there’s a wing in the way). More lift- a transfer of momentum from forward motion of the aircraft to downward motion of air behind the aircraft. The air goes down, the aircraft goes up. Action and reaction. This is the Newtonian explanation of lift.

In Bernoulli terms (again, slightly oversimplified), because of the angle of attack, lots of air molecules are swept down under the bottom of the wing, and less go over the top. Since there are now more molecules on the bottom and less on the top, there is more pressure on the bottom and less pressure on the top. So this pressure differential pushes the wing up. This is the Bernoulli explanation of lift, and it is equally correct – Bernoulli’s equations are derived from Newton’s – it’s just another way of saying the same thing.

And, yes, air on top of the wing does move faster than on the bottom, just as Bernoulli says. In Newtonian terms, because the leading edge has swept lots of air molecules under the wing, there are fewer molecules on top. All the molecules in front of the wing (before the sweeping-away) are still pushing on those few remaining molecules on top of the wing, but there’s not much pushing back – so they accelerate. And vice-versa on the bottom of the wing.

If you find the above confusing, I can’t recommend a better introduction to the basic behavior of molecules and matter than the first chapter of Richard Feynman’s Six Easy Pieces – it should be mandatory reading for high school graduation.

SSI to PHP Conversion Made Easy

I’m learning PHP in order to simplify one of the websites I maintain.

It turns out that SSI (server-side includes) and PHP are incompatible – you can’t use both at once, so I have to convert all my SSI includes into PHP includes.

PROBLEM STATEMENT

I’ve been using the “virtual” SSI mode, as in:

<!–#include virtual=”/INCLUDE/_HEADER.html” –>

This is nice because it’s relative to the site root (instead of relative to the calling document location), so you can cut-and-paste include directives without worrying about what folder the calling document is in.

Unfortunately, PHP only does document-relative inclusion, using include() or require().  So you have to do something like:

<?php include(“/home/dave/public_html/nerdfever/INCLUDE/_HEADER.html”); ?>

I guess that would be OK except that I run test sites on another domain, and keep the files in another folder (think “testsite” instead of “nerdfever” in the path above).  That means all my include() calls need to change when switching from the test site to the live site – which defeats the purpose of testing.

SOLUTION

I found a trick that solves the problem.  There’s a global variable in PHP called $DOCUMENT_ROOT – so you just do this:

<?php include(“$DOCUMENT_ROOT/INCLUDE/_HEADER.html”); ?>

Strangely, I couldn’t find anyone else posting this solution on the web, so I thought I’d post it here.

There are other solutions, but they’re either more complicated or they require support of the PHP virtual() function, which isn’t allowed on most shared hosts.

Have fun.

Big, Bad Black Rock

or,

How I Learned to Stop Worrying and Love … Dust



This is my NEMROC presentation from 2007; about my trip to the Black Rock Desert (Nevada) in September 2007 for the XPRS rocket launch.

Two friends and I (plus the son of one of my friends) drove from Boston to Black Rock in 51 hours, in my 20 year old RV.

The Black Rock Desert is simply … otherworldly.  I love it, but it’s not to everyone’s taste.

There are over 120 slides (mostly pictures) in the PowerPoint file – the images in this post are just a sample.

I’m quite happy with the way most of the photos came out; particularly the ones taken at night.  The Black Rock has really dark night skies – the Milky Way can easily be seen most nights, and came out well in the photos.

The last evening we had a night launch with lights mounted on the rockets, as you can see here.

Night launch

Night launch

I hope to go again the the fall of 2009; if you’re a New England rocketeer and are interested in coming along (and splitting the gas cost – the RV gets 7 mpg), leave a comment.

Click on the link below to download the full set of PowerPoint slides (15 MBytes).

2007-11-big-bad-black-rock.ppt

The Past, Present, and Future of Video Telecommunication

Last week I presented a talk on “The Past, Present, and Future of Video Telecommunication ” at the 2008 IMTC Fall Forum.

1927 Videophone

I spent 14 years in the video conferencing industry (1993-2006), first at PictureTel and then at Polycom.  For most of that time I did standardization work – I was a rapporteur in the ITU, went to IETF meetings, etc.

The talk is my view on why video telecommunication (videophones, picturephones, video conferencing, etc.) has never taken off in the mass market, despite lots of consumer enthusiasm and lots of investment.

In brief, the quality of experience offered by these products doesn’t come close to what consumers expect and are promised.

Manufacturers keep expecting that being able to see people on a screen is enough to make it “feel like being there”, but it isn’t.  (To be fair, consumers expect this too, and are disappointed when they try it.)

In my opinion, this situation will remain the same until products are offered that really do provide a feeling of “being there”, or at least more so.

Recently, “telepresence” systems (Cisco, HP, Polycom, Tandberg) have taken a step in this direction.  These systems are better, but still far from what I think is needed.  They are also impossibly expensive for consumer use.

The slides make the case in more detail than I care to go into in this post.

1964 Picturephone

Update March 2009: I’ve found it difficult to succinctly express just what it is that’s missing from the video communication experience. The issue is not the quality of video or audio – a long telephone call feels far more intimate than a video call, despite 3 kHz audio bandwidth and no video at all (the reason for this is given in the presentation).  In the slides I talk a lot about eye contact and the importance of knowing who is looking at whom.

Pointing finger

But to put it another way, I’ll make a prediction: No system for video conferencing / video telephony / telepresence will enjoy mass-market adoption until it is possible to point (with a finger) at a particular person or thing on the far-end. To clarify that, I mean the ability for someone in Boston to point at a particular person in Geneva, and for everyone present in Geneva to be aware who or what is being pointed at.

You’re welcome to use the slides as you like, but please do credit me as the source.

2008-11-imtc-sfo.ppt 5.8 Mbytes – PowerPoint slides only

2008-11-imtc-sfo.zip 21 Mbytes – ZIP file (slides & video clips)

(for the ZIP file version, you’ll need to have VLC installed in “C:\Program Files\VideoLAN\VLC” for the clips to play).

Not much like being there

Not much like being there

Interim Report: GPS-guided Rocket Recovery

Saturn Zero

or,

Nevada Dave and the Rocket-Eating Trees

This is my presentation for NARCON 2010 (was NEMROC 2008 … see below), summarizing my efforts over the last three years since 2006 toward building a model rocket that won’t get lost.

The idea is that it carries a GPS and a steerable parachute, so it steers itself back to the launch pad on the way down.

An introduction to the project is in the PowerPoint presentation below.  Fair warning: It’s 60 Mbytes.

Update January 2010: I’ve posted all the hardware design and source code for the “Rev 3” hardware on this site.   The main index to the series of posts is here.

Update March 2010: I’ve replaced the presentation with a slightly updated version that I presented at NARCON 2010.  It discusses a little about the “Rev 4” hardware, based on the 32-bit PIC32 MCU, toward the end. Download all 3 files (and put them in the same folder) if you want the Google Earth links to work.

2010-03 NARCON Presentation.ppt (PowerPoint file)

1004_f2_pressure.kml (Google Earth .KML file, flight of 2008-10-04)

1101f2_pressure.kml (Google Earth .KML file, flight of 2008-11-01)

If PowerPoint is an issue, here’s a PDF version of the slides (15 MB):

2010-03 NARCON Presentation.pdf (PDF)