Re:Coding for non-programmers: Why we need better GUI automa...
by mynameismon on Saturday December 04, 2021 @01:43PM
(#29443192)
> The bottom line for me was that fetching a couple thousand cells from Sheets as a JS array and then just processing them in JS without touching any of the Apps interfaces turned out to be a couple of orders of magnitude faster than trying to figure out exactly which cells I needed and fetching then individually, even if I only really needed a couple dozen in the end.
Weird, when I had worked with Google Apps Script, it had been significantly faster than working with the APIs by an order of magnitude or so. (although the feeback loop is still painfully slow)
Re:Coding for non-programmers: Why we need better GUI automa...
by mananaysiempre on Saturday December 04, 2021 @01:47PM
(#29443235)
Not what I meant: in GAS, batch-fetching everything (and processing it in JS) was faster than individually fetching the things I needed (and doing much less processing on them). Does Google want me to run more JS on their machines?..
Re:Coding for non-programmers: Why we need better GUI automa...
by waxdotrun on Sunday December 05, 2021 @06:16AM
(#29448424)
Agreed, GAS is a great idea, horribly executed. It's part of the reason I made Wax[0]. It lets people run Python + SQL from Sheets with zero infrastructure. It's like GAS built for less technical people that already know some Python or SQL. It's also already integrated with other tools (e.g. databases, Slack, etc.).
If anyone has internal apps that are heavily dependent on Sheets, I'd really appreciate your feedback.
It’s done in an extremely verbose OO style (everything must be treated as an active object, even things that are by their nature dumb data), tries to compensate for that by providing shortcuts for the resulting multiple-level accessor chains, but with no rhyme or reason wrt which shortcuts exist and which don’t. There are also some things that ought by the nature of the problem exist in the implementation, but are not exposed, and the official docs literally have you reimplementing them (IIRC an official way to see which Sheets rows are selected by the currently active Sheets filter was only provided relatively recently, and you still have to redo date formatting yourself). And maybe the verbosity is no big deal for the original consumers of the API, but in the GAS environment my impression is that every method call is an RPC that takes tens of milliseconds. The bottom line for me was that fetching a couple thousand cells from Sheets as a JS array and then just processing them in JS without touching any of the Apps interfaces turned out to be a couple of orders of magnitude faster than trying to figure out exactly which cells I needed and fetching then individually, even if I only really needed a couple dozen in the end.
I guess the real question is: why would anyone do it this way? I recognize that what the API is doing is in fact much more complex than it appears, because it’s a complicated distributed system (then again, when it was a VBA macro running on my desktop it didn’t need to be...), but why does it give the impression that noöne actually cares about the ergonomics? Even its original Javaish ergonomics, let alone given the fact that JavaScript is not Java.