Friday, July 25, 2008

Missing sync: the only vendor that uses the iPhone sync conduit

How does Markspace do this?

I haven't seen any other vendor able to get at iPhone data via the conduit:
The Missing Sync for iPhone - Mac Version - Notes

... Transfer notes from your iPhone into Bare Bones Yojimbo, Microsoft Entourage or the included Mark/Space Notebook to search or copy and paste content easily...
If they can get across the conduit, could they sync an iPhone task application with iCal tasks?

Spanning Sync vs BusySync for iCal gCal sync - with a clear winner

I dread the thought of dealing with Apple's MobileMess. Apple has amply demonstrated they can't do reliable cloud services; dotMac was an intermittent disaster for years. They had one chance to show they could do this, and they blew it.

Apple should have delayed the transition. Big mistake.

So I'm even more committed to a Google solution. I'd take a look at Yahoo!, but they're in a corporate death spiral. Heck, I'd take a look at Microsoft, but I'm pretty committed to OS X and they're not.

You can directly subscribe from iCal to a gCal calendar -- I'm going to see if I can fit that into my iPhone workflow. It's not a sync solution however.

Google has a tool to allow Outlook to gCal sync, but they haven't done one for iCal. Given how bad their Outlook sync launch has been (synchronization is hard, but Google has issues too), that's no great loss.

There are two commercial alternatives: Spanning Sync and BusySync. Missing Sync, which we licensed for Emily's Palm, and licensed again for her Blackberry, deals with device to machine sync, so they're not a contender. Too bad, they do pretty well.

BusySync is sold as a product, Spanning Sync is a service with a per user license. So for a shared machine BusySync may be less expensive, though that's probably not the licensed use.

Here's what made my trial decision easy however:
  1. Spanning Sync offers a 15 day free trial. The main page doesn't tell me what it costs.
  2. BusySync has a 30 day free trial. The main page tells me it costs $25
I distrust any vendor that hides their costs.

BusySync wins. I'll download their trial. If they fail, then I'll take another look at Spanning Sync.

Update: I gave BusySync an acid test -- and it failed. I reset a Google Calendar, then checked to see if BusySync would remove all the iCal appointments. It failed, instead I saw many ghosts. I'll give it another chance, but if they fail again I'll try Spanning Sync.

Update: Ok, BusySync failed completely. On to Spanning Sync.No - it was Google Calendar Sync that failed that time. So BusySync only failed the removal test. So it's not out of consideration.

The NULL comparison trap: Escape with NVL (Oracle) and Nz (Access)

This is disgusting. I’m sure I once knew better; maybe writing this up will help. A quick Google search tells me I’m not alone in my stupidity, so maybe this will help others who aren’t truly DBAs, but have to play with data.

I got caught be the NULL trap. I think this might be why some databases are designed to never allow NULL values, but to use, for example, an empty string.

The NULL trap is impeccably logical, but infuriating.

Say you compare the values of two fields, one of which is Non-Null and one is Null. Are they different?

I think so when I look at them, but I think the “proper” answer is “NULL”. Meaning – “I don’t know”.

That’s because NULL doesn’t mean “nothing”, it means “could be anything”.

Consider this Microsoft Access 2003 query:
SELECT pub_CC_qry.CG_CC_ID, pub_CC_prior_qry.[Abbreviation prior], pub_CC_qry.Abbreviation
FROM pub_CC_qry INNER JOIN pub_CC_prior_qry ON pub_CC_qry.CG_CC_ID = pub_CC_prior_qry.CG_CC_ID
WHERE (((pub_CC_prior_qry.[Abbreviation prior])<>[abbreviation]));
It returns 62 rows. It doesn’t return 28 rows where one of the two columns contains a null value.
This qeury returns 90 rows, but it’s a mess:
SELECT pub_CC_qry.CG_CC_ID, pub_CC_prior_qry.[Abbreviation prior], pub_CC_qry.Abbreviation
FROM pub_CC_qry INNER JOIN pub_CC_prior_qry ON pub_CC_qry.CG_CC_ID = pub_CC_prior_qry.CG_CC_ID
WHERE (((pub_CC_prior_qry.[Abbreviation prior]) Is Null) AND ((pub_CC_qry.Abbreviation) Is Not Null)) OR (((pub_CC_prior_qry.[Abbreviation prior]) Is Not Null) AND ((pub_CC_qry.Abbreviation) Is Null));
The secret is the Nz function. Wrap any column that might contain a NULL in Nz, and LOT of things, including iff comparison functions and SQL comparisons work a lot nicer:
SELECT pub_CC_qry.CG_CC_ID, Nz([Abbreviation prior]) AS Abbreviation_Prior, pub_CC_qry.Abbreviation
FROM pub_CC_qry INNER JOIN pub_CC_prior_qry ON pub_CC_qry.CG_CC_ID = pub_CC_prior_qry.CG_CC_ID
WHERE (((Nz([Abbreviation prior]))<>Nz([abbreviation])));
Arrgggh.

So what about Oracle?

I’m not precisely sure how Oracle is handling this situation in comparisons. I’m still researching Oracle’s behavior. It does, however, have a function similar to the Access Nz function; it’s the nvl function:
How to use the nvl function in Oracle
The NVL function is used to replace NULL values by another value.
The syntax for the NVL function is:
NVL( value_in, replace_with )
value_in if the function to test on null values. The value_in field can have a datatype char, varchar2, date or number datatype.
replace_with is the value that is returned if value_in has a null value. The NVL statement works like this pl/sql code:
if (value_in is NULL) thenreturn replace_with;elsereturn value_in;end if;Sample code: select nvl(salary, 0)from employees;select nvl(ref_code,'Unknown')from users;
Here’s an example, and a response from a friendly DBA:
Select * from A, B where A.ID = B.ID and A.name != B.nom

Imagine

A.ID = B.ID = 7
A.name is NULL
B.nom is not Null

How do you get Oracle to return the row in B where B.ID=7?
Answer (I think for our purposes this would work if we just used NVL([column_name],’’) for our string comparisons)
I think what you're after is the NVL function, which converts a NULL to a substitute value for comparison's sake.

So in your query, we would replace a null A.NAME with an outlandish value like 'A1B2C3', and replace a null B.NOM with same.

SELECT * FROM A, B WHERE A.ID = B.ID AND NVL(A.NAME, 'A1B2C3') != NVL(B.NOM, 'A1B2C3');

The above query will *not* return rows where A.ID = B.ID and A.NAME and B.NOM are *both* null. If you also want those rows, then you need to tag on that condition to the end of the query like this:

SELECT * FROM A, B WHERE A.ID = B.ID AND ((NVL(A.NAME, 'A1B2C3') != NVL(B.NOM, 'A1B2C3')) OR ((A.NAME IS NULL) AND (B.NOM IS NULL)));

Work and home calendar integration – false signs of iPhone hope

I’m sorting through this warily. It’s like juggling antimatter. I have backups, don’t try this if you don’t.
I’m still striving towards the primeval goal of an integrated work/home calendar view. Palm failed this test. I thought the iPhone wasn’t even in contention, but I’m now seeing some faint signs of hope.
Here’s what I see so far:
  • The iPhone more or less supports multiple calendars.
  • It appears possible that an iPhone can sync differentially with multiple machines. I sync with an iMac at home, but in cautious testing I can connect and charge my iPhone at work while turning off the automatic sync option. I can differentially configure sync options for the work machine. [Update: this is not correct. After real world tests on OS X and XP I am convinced that iPhone 2.0 can truly sync with only one machine, and that machine better be a Mac. I think 10.4 may work, haven't tried 10.5. This is a regression from iPhone 1, which could sync safely with Outlook.]
  • iTunes PC has an option to sync Outlook with a “selected calendar”
  • Apple - Support - Discussions - Sync iPhone with work Outlook (Exchange ... confirms that Exchange server sync (includes some Sharepoint access!) takes over the entire phone. So while it has lots of appealing features, it’s out of the running for my purposes. In any case, Apple’s Exchange implementation is very weak: “"There are several common-- nay, fundamental-- things that you cannot do with the iPhone calendar application. You cannot:
    • create a meeting request and invite other people to attend..
    • create a recurring meeting unless it is repeated daily, weekly, bi-weekly, monthly, or yearly. That's right-- no more "first Thursday of every month" or "every Monday, Wednesday, Friday" appointments…
    • view suggested meeting times or free/busy times, either for your own calendar or for others'…
    • move to an arbitrary date, in either the future or the past…
But how does the iPhone do selectively synchronizing via USB cable with an Outlook Exchange Server client? Will it safely sync with an Outlook appointment that has attendees and schedule exceptions without wrecking the appointment? If I could enforce one way update of the iPhone rather than true bidirectional sync I’d test this out.

I’ve opened an Apple Discussion thread on this. More updates as I learn more.

Update
Update 2 

Complete despair.  The list of calendars to sync with is a list of Outlook calendars, not iPhone calendars. If you sync with the work calendar it wipes out all the home calendars. Heart breaking, really. (There is an option, btw, to force unidirectional updates from Outlook, but it must be manually set with every synchronization.)

Update 3

Just for the heck of it, I did a one way calendar sync from Outlook to the iPhone. I acknowledged my iPhone calendar would be replaced from Outlook. After about a half hour the progress-indicator free process stopped. My Outlook calendar was still intact. That was good. My iPhone calendar was empty. Nothing there.

Wow. No wonder Apple is pushing iPhone 2.1 out to developers. They really mucked this release up!

(See comments for a rumor that a combination of MobileMe and Exchange Push can produce a joint calendar on the iPhone. I recommend against trying any iPhone sync until after 2.1 is out.)

The iPhone Remote will control iTunes Airtunes in a multi-user system

So far I've learned 11 things about the iPhone I didn't see in any reviews. Mostly not bad.

One thing, however, has really impressed me.

First, some background ...
Gordon's Tech: Remote control of iTunes and AppleTV: will AirTunes return?

... Apple has, years late, added a remote control feature to the iPhone/iTouch:
... I’m wary though. I suspect:

1. It won’t work with background sessions.
2. The AirTunes streaming will still be messed up by microwave use.

It’s not totally hopeless though. I haven’t tested AirTunes with 10.5 or the new AirPort Express. If the remote will communicate with iTunes running in a background user session on a 10.5 machine I might try testing again. The background user problem doesn’t apply to an AppleTV of course.
I was suspicious. Years ago I spent weeks trying to make AirTunes work. I needed a way to control my upstairs iMac from the downstairs kitchen, but I was defeated by our multi-user configuration.

Today I tried Apple's Remote app for the iPhone/iTouch.

I connected to my iTunes library, chose the "stay connected" setting, and then switched users. iTunes was then running on the background ... in 10.4.11.

I was able to control it. I could even control what speakers it used -- local or the speakers connected to my Airport Express.

Wow, I didn't expect that to work! Now I'm tempted to give iTunes a go again. Maybe I should buy an iTouch for the family ...

Thursday, July 24, 2008

Apple's messed up Apple ID system: what are they smoking?!

What are they smoking out in Cupertino?

The latest muck-up has to do with the old Apple ID.

For years, even after I gave up on .Mac, my Apple ID was jfaughnan@mac.com. That's what my iTunes account and all my iTunes purchases are tied to.

Now, however, iTunes won't let me buy anything because my "email is invalid".

Turns out, somewhere in the bowels of Apple's increasingly messed up corporation, there's a requirement that the AppleID, to which all my transactions are bound, needs to be also my valid email address.

So, should I change it? I have a bad feeling about what would happen then. Apple is not a healthy company. The world might explode!

Sheesh.

Update: I found a link to Apple's Profile service, where you can change the email associated with your Apple ID.

You can't do this from the iTunes store itself -- even though iTunes kept sending me back to the account view.

After I updated the email stored in the profile service, I returned to the Apple store, and AGAIN I got the notice about a bad email address. This time, however, the account link showed a page with a NEW field in addition to my non-editable jfaughnan@mac.com account -- one holding my updated email address. I clicked done and this time I got a notice that my Apple account had been created! Despite that ominous language my purchase history was intact, the account was not created, it was updated.

After all of that I was able to buy "Voice Record" for my iPhone.

Update 7/25/08: Thinking about this a bit more, I wonder if this is another casualty of Apple's screwed up .Mac (dotMac) to .Me (MobileMe) transition. I discontinued my .Mac service years ago, but I was still getting emailed receipts for Mac account purchases with my old .Mac userid. So Apple was storing a forwarding address that was valid, probably in the profile. I suspect during the .Mac transition Apple removed the old .Mac forwarding, probably to free up more usernames for reuse with .Me. This ran into preexisting frailties with their Apple ID system, with the usual consequences.

Salvaging 661 Symantec MORE 3.1 documents

I'd like to move the family iMac to 10.5, but I'm held back by data lock --
Gordon's Notes: Data Lock: 661 Symantec MORE 3.1 documents keep me in 10.4
... The real problem is that my ancient copy of MoRu tells me I've 661 MORE 3.1 documents on this drive. MORE 3.1 needs MacOS 9 Classic, and 10.5 doesn't run classic.

I looked at a few of my old files. There's a lot of knowledge in there I don't want to lose.

Inspiration and OmniOutliner Pro will open these as outlines, but both will lose presentation graphics. Brad Pettit's free XML converter will switch the files to plain text XML, and I think it might be able to process multiple files at once. Otherwise I can open each one and save it to another obsolete file format, or I can use CUPS-PDF to create a PDF output classic can see.

This is going to hurt.
It now hurts less.

After some promising initial results, I selected every row in MoRu and dropped the 661 files on Brad Pettit's utility. It took less than 10 seconds to produce 661 XML files in the same directory as the original MORE file. Firefox renders the XML as a collapsible outline (Safari doesn't handle it) and of course I can open it in a text editor. If I define a style sheet I can even make it look better. Spotlight will work with the rest.

I can also use OmniOutliner to view much of the data in 10.5, though it doesn't always render embedded graphics. Of course OO is itself a proprietary format app with an uncertain future, but it should work for a few years in 10.5.

The speed of Brad's utility is astonishing.

Update 8/5/08: I wrote to thank Brad. He tells me the utility was written in C++, and that it's primarily I/O constrained. He also recommends keeping the originals of course. They do open in OmniOutliner, so I was planning to do that. I wouldn't be surprised if there's a good Classic emulator somewhere in the future, so I'll even keep my MORE binaries. Brad's working on MediaRoom these days, so I'll be keeping my eye on that product.