Re: iTunes 5 scripting - thoughts?
Re: iTunes 5 scripting - thoughts?
- Subject: Re: iTunes 5 scripting - thoughts?
- From: Brennan <email@hidden>
- Date: Fri, 16 Sep 2005 11:29:50 +0200
On 7/9/05 at 15:16, Matt Deatherage <email@hidden> wrote:
> I see two new verbs:
>
> updateAllPodcasts: update all subscribed podcast feeds
> updateAllPodcasts
>
> updatePodcast: update podcast feed
> updatePodcast
>
> (Yes, that is the spelling. Neither takes any parameters or
> objects.)
>
> I don't know about other changes, but when I see both verbs
> and nouns in a verb, I cringe. What do more experienced
> iTunes scripters think?
Yes, I certainly cringe. Worse, I get violent fantasies (see below).
The Right Thing would have been to model a podcast object, with a plural,
and then get it to understand the update message.
Let's get a second opinion:
<http://developer.apple.com/technotes/tn2002/tn2106.html>
...states quite clearly:
"Being object-oriented means that your scripting is mostly organized
around objects, not commands. Objects can respond to commands – documents
can be printed, messages can be sent, and so on – but the focus is on the
objects, not the commands."
...and...
"Use multiple words, not InterCaps or underscores.
If a term consists of more than one word, separate the words
with spaces. Do not join the words together with capital letters
or underscores."
The problem with hacks like 'updateAllPodcasts' is that they tend to hang
around for the sake of legacy code. Apple should set the standard for
AppleScript implementation. There are so many cranky dictionaries out
there, we should be able to point their developers to Apple's apps and say
"THAT's how it should be done".
I can accept that older apps are not up to scratch. I can accept that
modern apps don't yet have scripting support, or have only embryonic
scripting support, but this kind of sloppiness is wholly unacceptable.
That they should have goofed like this so recently gives us an idea where
AppleScript is on the priority list.
Chris, Sal, where were you when this howler was allowed out? Don't you get
consulted about this stuff? Please print out technote tn2106, roll it up
and push it slowly but firmly down the throat of whoever implemented
'updatePodcast' and 'updateAllPodcasts'.
If they complain, tell them that if they don't want to read it, the
developer community knows other ways that it can be digested.
--
Brennan Young
"Eventually, that which prevents you from your work, becomes your work."
-Susan Sontag
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden