Lessons from James Garner

Never mind that I'm not in show business; I wish I could have worked for James Garner. In his book Enchantment, Guy Kawasaki quotes this story told by Stephen J. Cannell, the creator of "The Rockford Files".

There were occasions when I sent a script down to him that I didn't think was the best script that we'd ever shot, and I'd never hear from him. A lot of other actors I worked with over the years would call me up and say, "Hey, I don't think this is a very good script, we need to do this, this, and this…" Never a word from Jim. Nothing. He'd just do it. So I started to think that he didn't see that it wasn't a good script.

Once we were at a wrap party at the end of a season, and one of those weak-sister scripts came up. Jim wagged a finger at me and said, "Not one of your better efforts, Steve."

So I said, "Okay, let me ask you a question: Why don't I ever hear from you when you don't like the script?"

He said, "I'll tell you exactly why: I trust you and I trust Juanita [Bartlett] and I trust David [Chase], and I know if you send me a script that isn't quite up to what we're used to doing, it's because it's the best you can do that week given the pressures that are on you. And if I spin you guys all around and force you to rewrite, I'm going to turn one bad script into four bad scripts.

"So that's the time that the acting department has to step up and really kick some ass. We have to step up and really make the stuff work. I have to look for more motivation to make comedy where I don't see it on the page and try to make it go past the audience without them seeing that it wasn't that good a story."

Whoa. I mean, come on. What a pro! What a pro! And he's right: Very often I've found that when actors have spun me around like that–I know the script's not as good as it should be, but let's get past this one and have a good one next week. You can't do twenty-two excellent shows–it's just not possible. Anybody who does series television will tell you that. There's always a few that aren't as good.

He told me, at the same time, "You never sent me two bad ones in a row."

For a guy like that, I would make extra sure not to send two bad ones in a row. There are lessons in this story about trust, professionalism, and appreciation for the hard jobs other people do to help the star succeed.

I watched the whole Rockford Files series last year and was surprised at how good it was. Maybe I can appreciate it more now than when I first watched it as a kid. A friend told me Garner's old show "Maverick" is also excellent. I've been meaning to check that out too.

Three notes on typing (the keyboard kind)

Note 1: typing too fast

Lately I've noticed that when I type too fast for my Mac to keep up, the character input is sometimes not only delayed but out of order. Just recently, "To " came out as "o T" and "I didn't " came out as "idn't I". (A "d" got dropped in the latter case, but I can't say for sure I didn't accidentally leave it out myself.)

Anybody else seeing this? I don't think I ever saw it until recently. These examples suggest that it's not a simple case of me transposing two letters by mistake. It looks like the first character in my burst of typing gets pushed to the end, but I'll have to collect more examples to be sure of any pattern. I think it usually happens in my web browser — I forget which one.

As I recall, NeXTstep always guaranteed not only the character order you typed, but that the keyboard events would go to the window that was key at the time you typed them, even if for some reason they were delayed so long that you had already switched windows. I don't know if this is guaranteed on the Mac; I've never assumed it was. But I'd expect the events to at least be in the right order.

Note 2: cloud-based text editors

I use various "cloud-based" text editors on my iPhone — most often Elements, sometimes Simplenote, and rarely others. These editors synchronize local text files with either Dropbox or a web service, depending on the app.

I've noticed that if I launch one of these apps and immediately start typing, one of two things often happens:

  1. The app scrolls to the bottom of the text file and what I type is appended to the file instead of inserted where the cursor was when I started typing.
  2. I type a phrase and when I look up from the keyboard I see the phrase has been inserted twice.

I assume both of these are because I start typing before the app has finished retrieving the latest version of my file from the web. In the first case, my guess is that the app blocks while it retrieves my file and displays it in the editor view (thus putting the insertion cursor at the end), and only then does it handle the backlog of keyboard events.

In the second case, my guess is that the app is trying to be helpful. It remembers where my insertion point was, buffers my keystrokes while it asynchronously retrieves the file, and when the file has been retrieved it plays back the buffered keystrokes at the remembered insertion point. I'm guessing there's a bug in the "playback" code, but again, this is just a guess.

The workaround is to wait before I start typing. I wait until the network-activity indicator at the top of the screen stops spinning, and then I type. I would prefer that the apps enforce this workaround by making me wait. They should not let me start typing until the file is retrieved. I appreciate that these apps want to create the illusion that I can treat my files as if they were purely local, but I think this illusion is unsustainable.

These concerns are one reason I wanted to stick with Notespark, which has a different syncing model and does three-way merge instead of wholesale updating with the newest version of a file. It's a good app. I forget why I don't use it any more.

Note 3: not looking

A bit of personal trivia: sometimes when my eyes get tired I close them for a few seconds but continue typing. I do it when typing both code and prose. I kind of like the mental state this puts me in and the way it forces me to use my mind's eye. As a variation, sometimes I keep my eyes open but look away from the screen. Try it some time, you might like it.

English names in Lion's voices

Following up on my previous post… I discovered something that struck me as odd about the voices in Lion.

Each voice is given a person's name, and comes with a short sentence or two with which the "person" introduces him- or herself when you hit "Play" in System Preferences. This "demo text" is stored in the Info.plist file associated with each voice.

For example, here's Fiona introducing herself:

$ plutil -convert xml1 /System/Library/Speech/Voices/Fiona.SpeechVoice/Contents/Info.plist -o - | grep -A 1 VoiceDemoText
<key>VoiceDemoText</key>
<string>Hello, my name is Fiona. I am a Scottish-English voice.</string>


Often, as in this example, the demo text contains the name of the voice.

The odd thing is that the voice name always seems to be in English, even if the native language doesn't use the English alphabet. For example, the Thai voice Narisa:

$ plutil -convert xml1 /System/Library/Speech/Voices/NarisaCompact.SpeechVoice/Contents/Info.plist -o - | grep -A 1 VoiceDemoText
<key>VoiceDemoText</key>
<string>สวัสดีค่ะ ดิฉันชื่อNarisa</string>


This particular snippet sounds okay, at least to my ear. I don't speak Thai, but I'm guessing "Narisa" is being properly pronounced.

Similarly, the Japanese "Kyoko" and Russian "Milena" sound okay to me:

こんにちは、私の名前はKyokoです。日本語の音声をお届けします。


Здравствуйте, меня зовут Milena. Я – русский голос системы.


(I'd appreciate input/corrections from native speakers of these languages.)

In any case, the Cantonese "Sin-Ji" voice definitely sounds off:

您好,我叫 Sin-Ji。我講廣東話。


And the Taiwanese "Ya-Ling" seems to be asking why she's ailing:

您好,我叫 Ya-Ling。我說國語。


I don't understand why Apple didn't use Chinese characters in the demo text for the names of the Chinese voices. I've filed bug #9949961 accordingly.

UPDATE: Minor fixes were introduced. I don't know when.

Lion's glaring Cantonese bug

I was delighted to learn that Lion supports text-to-speech with a bunch of new voices that include not only non-American English accents (like Irish, South African, and to my surprise, Indian); not only non-English languages (like French as it sounds in both Canada and France); and not only two Mandarin accents (China and Taiwan); but also Cantonese.

I'm in a situation where it occasionally helps to know the Cantonese pronunciation for a phrase where I only have the written Chinese characters. Google Translate does a great job with Mandarin but has no Cantonese support. The Chinese University of Hong Kong has a site that does Cantonese text-to-speech, but the sound quality isn't great. A company called PiTL has an app that looks pretty good, but it only runs on Windows Mobile or Android, and I don't use either of those at the moment. It sure would be nice to have an iOS version.

The good news is that now, with Lion, all I have to do is select the "Sin-Ji" voice in my System Preferences. Now I can select Chinese text in any application and use the "Start Speaking" contextual menu item to hear it in Cantonese. For further convenience I've mapped "Start Speaking" to a keyboard shortcut in my System Preferences.

Here's an example of how I used this feature. A few weeks ago I got an email from a young woman named Kim who teaches an informal Cantonese class at a cafe in Chinatown. (They happened to be at the next table from me one day, and I'd gone over and talked to her.) In her email, Kim encouraged me to "guy jook hawk daw dee", which she explained means "continue to learn more".

I knew how to pronounce the "hawk daw dee". But I didn't know what the correct tones are for "guy jook", and that's not something I'd know how to find out from Kim over email. Besides, I'm a geek and wanted to figure it out myself. All I needed was the Chinese characters.

A Google search for "guy jook" turned up nothing useful. I tried "gai jook" and found that it occurs in the lyrics for a song called "Hou Sum Fan Sau" ("Break-Up With Good Intentions"). I searched for other sites with lyrics to that song and found an alternate spelling: "gai juk". Ah, I should have thought of that. Googling for "gai juk" easily found the Chinese characters I wanted:

繼續

Simplified version:

继续

Definition: "to continue; to persist".

For those of you who don't have the Sin-Ji voice installed, here's how it sounds:


Now I can pronounce Kim's whole phrase: "guy jook hawk daw dee" — "continue to learn more".

By the way, this "gai juk" should not be confused with the words for chicken congee — 鸡粥 — which sounds like this:

Can you hear the difference in tone? I ate chicken congee growing up, and it's delicious, but not what I was looking for.

Now the bad news: there's a glaring flaw in the Sin-Ji voice.

If you know any Cantonese at all, it's probably the traditional greeting "Nay ho ma?" — 你好吗? — which literally means "Are you good?" (Also often pronounced "Lay ho ma?") Naturally this is the first thing I tried when I learned about Lion's Cantonese support.

Here's how the Sin-Ji voice pronounces it:


The problem is that the "ma" is glaringly wrong. Since Cantonese is a tonal language, like all Chinese dialects, you're supposed to sort of sing each word with the correct intonation. Here's how it's supposed to sound:

I've submitted a bug report to Apple, with Radar number 9949661. I flagged it as a serious bug, because that "ma" at the end of a sentence turns it into a question. It is used a lot.

[UPDATE: For my own future reference, I'm adding this link to a site that translates Chinese characters to Jyutping, which is a Romanization system for Cantonese. I don't know how to read Jyutping — indeed, I had to use the Sin-Ji voice to find out how to pronounce "Jyutping" — but it's been handy for confirming that certain words have the same tone as words I know. I know this because the Jyutping for two words may be spelled differently but will have the same tone number at the end.]

[UPDATE, 2013-10-08: The inflection in "Nay ho ma" is fixed in the updated Cantonese voice in Mavericks. I didn't check whether it had been fixed before that.]

Atheistic Community

As occasionally will happen, today's post is not related to technology (well, unless you want to apply it to the Mac/PC wars).

John C. Welch writes about what atheists can learn about community from religious people:

Set aside the (always enjoyable) ridiculing of religion, and ask yourselves: "Do we provide an alternative that is at least as good?"

Regarding the always-enjoyable-ridiculing — I think there are plenty of areas of religion, and plenty of people who profess to be religious, that are highly deserving of scorn and contempt, and I heartily enjoy any smackdown of such areas and people.

At the same time, I agree with Welch that we shouldn't discount the good things people do because they happen to be motivated by religion. I think it would be pretty dickish to look down my nose at a church volunteer who hands me a blanket when a hurricane destroys my home. And I agree that the smugness Welch refers to is not only distasteful but counterproductive, for some definition of "productive".

  • If I want to convince individuals I know and care about, for their own good, to change their beliefs and thus their lifestyles, it behooves me to consider where they are coming from and where I am asking them to go.

  • If I want to work more broadly as an organizer or campaigner to tear down illusions and superstitions that are doing massive harm to society… well, actually I should still consider where people are coming from.

  • If I find religious people plain wrong, sometimes annoyingly so, but don't feel like trying to engage them or change them, that's my prerogative. (This is the category I'm in, at least for now.)

  • If my only interest is in "being right", as Welch puts it — with the implication that I get off on other people being wrong — well, that's my prerogative too. But I feel this is a narrow way of thinking.

I totally understand the urge for atheists to belittle religious people, because I have felt the same urge in other areas, and succumbed too often and with too much regret. I do enjoy my bitter sarcasm; the aftereffects, not so much.

For some reason I don't feel this urge about religion. The issue of my non-belief vs. other people's religious beliefs, however absurd I find them, is not a hot button for me and I'm perfectly happy to let others do the talking. I do think there's a place for hard-hitters like Dawkins and Hitchens, but also a place for what Welch is talking about.