Re: Javascript for automation quastions
Re: Javascript for automation quastions
- Subject: Re: Javascript for automation quastions
- From: has <email@hidden>
- Date: Wed, 17 Dec 2014 16:15:23 +0000
2551 wrote:
> I recommended the wiki as a "bootstrap" for AppleScripters. You
suggested it was lacking in some technical accuracy. I've no idea
whether you're right about the latter, but even if so, the line you
couldn't parse was meant to suggest that that doesn't necessarily matter.
Actually I stated that meaningful AE/OSA information is largely absent,
period. That what limited information is given is wrong or unsafe is
merely fluff on the cake. How you think these problems aren't a concern
is beyond me. (Oh, and there's no point implying that I might be wrong
or it's just my opinion: I have more knowledge and experience in this
area than anyone else on the planet, and the work trail to prove it.)
I'm not criticizing you for sharing the link, only for failing to
qualify it with a vital caveat. Anyone who tries to understand JXA using
the misinformation and misconceptions currently in circulation is only
going to end up with a head full of confusion. Welcome to
Dunning-Kruger. Heck, the same critical caveat applies to Apple's own
JXA (and SB) release notes which, as I've pointed out to confused
learners elsewhere, are an absolute sack of lies. Seriously, every time
the word "Array" gets used in JXA/SB documentation/discussion, Cook and
Harris kill another kitten. For Dog's sake, think of the kittens!
Like I say, better to take an experienced AppleScripter, teach them the
JavaScript language, and let them map knowledge of the former to the
latter by their own study and experimentation. They'll develop a far
more correct and useful understanding of the technology, and then might
be able push back against some of that misinformation and misconception
for others' benefit as well.
> As for the "Good JavaScript" book, I also have seen it highly and
widely recommended. It's like 90 of the other 100 computer books I own
(all of which were highly and widely recommended, too) - a poor teacher.
It's a book written by a computer scientist that pleases other computer
scientists. For laymen like myself stumbling around in coding darkness,
it's all words and no practice.
That smacks of reverse elitism (an unfortunate trait amongst end-user
programmers). You want to play with the Real Programmers' toys, you need
to work with those toys on *their* terms. (Yes they're a huge pain for
ordinary folks - why'd you think I make my own end-user languages now?)
What end-user programmers often don't realize/appreciate is that
*learning how to use a language* is NOT the same thing as *learning how
to program*. So if you're struggling with the former, it's because you
need to work on the latter. To get a better handle on programming
principles and practices, get yourself a high school textbook for basic
concepts followed by a copy of Code Complete for practical skills and
awareness (I'd recommend a 1st edition of CC from eBay as both cheap and
less pandering to Real Programmer Orthodoxy, as I suspect the 2nd ed. does).
The job of books like JS:TGP is to tell where all the button are, not
the order in which to push them. JS:TGP is not a beginner's introduction
to programming: it's not meant to be. And honestly, I doubt it's
particularly aimed at computer scientists either, since 98% of what gets
called "Computer Science" nowadays is just quasi-religious rock-banging
BS falling between "Software Engineering" and "Java Paper Mill". (You
want a head for what CS really sounds like, go try
<lambda-the-ultimate.org>; I've been lurking there for years and still
only get every 10th word. It's all about models of computation and very
math and theory heavy.)
> Pedagogically good computer books are a rare find. Bill and Sal's
"AppleScript 1-2-3" is a rare example of one.
Well, I've not read it myself beyond skimming the AS123 TOC and the
online extract, though I suspect I might disagree. Highly engaging, yes;
that was obvious just from the extract: Sal is a natural people person
with a great gift for the gab. But I suspect most readers will come away
with a head full of thrilling but garbled information that fails to gel
into a coherent whole. The fact that you're struggling so much to
transition from AS to JS, even though they're almost conceptual and
mechanical twins, speaks to that.
Incidentally, I tech-reviewed the 2nd ed of Apress's AppleScript book
and lead-authored the 3rd, and I had an appalling time trying to get the
pedagogy working right, and still wasn't entirely successful. Partly
because I ran out of time to re-rebuild critical early chapters, but
also because AppleScript is such a knotty, obfuscated mess it's
impossible to explain clearly and concisely anyway. I tried to avoid
ever outright lying, but there's still some significant areas I just
threw whitewash and prayed to get away with it. (Ugh. And I used to work
in edu. publishing too.)
> There's a whole series of "XCode Primer" books by a guy called Nick
Smith which, collectively, are another (they're also about a third of
the price of all the "highly recommended" doorstop ones, too).
> I've yet to find one on JavaScript that meets my criteria of a good
book. Between the wiki and release notes, however, I'm thinking I might
not need one. Just add time and mix.
As I've said before: Beware JXA's release notes. The Cocoa info looks
probably okay (as long as you already know some Cocoa, of course), but
the Apple event and OSA discussions are loaded with omissions and lies.
And the wiki is just a weaker, wider form of that. Unfortunately, with
the AS team abrogating its responsibilities (again), I'm really the only
person with enough knowledge and experience to explain how JXA works
(Matt Neuburg might've been able to give it a bash too, as he once
managed to write a pretty good book on Ruby appscript, but he's gone to
iOS now). But as I already said to Deivy off-list when he suggested I do
a JXA book, you can't build good work on top of bad, and I'm not going
to lie or BS users who don't deserve it. (And I would've *loved* to do a
great JXA book too.)
Regards,
has
p.s. JXA Dumb Defect of the Day: AppleScript library files have an .scpt
extension and go in the '[~]/Library/Script Libraries' folders. JXA
library files also have an .scpt extension and also go in the
'[~]/Library/Script Libraries' folders. Let's see how many folks here
immediately spot the fatal flaw to this brilliant plan, because the
AS/JXA devs clearly couldn't.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden