It's even worse than it appears.
Friday April 9, 2021; 10:14 AM EDT
  • Just for fun I wrote a Drummer script that lists the earlierst Twitter users in an outline. #
  • Here's the script:#
    • var flfirst = true;#
    • op.insert ("Early Twitter signups", down);#
    • for (var i = 12; i < 25; i++) {#
      • var name = twitter.getScreenname (i);#
      • op.insert (name, (flfirst) ? "right" : "down");#
      • flfirst = false;#
      • }#
    • op.go (left, 1);#
  • The list it generates#
  • How the script works#
    • It inserts a headline in the current outline, down from the bar cursor headline, with the text "Early Twitter signups." #
    • Then it loops of users whose ids are 12 to 24. I picked 12 because I had figured out from an earlier script that it was the first-listed user. And 24 is a random value I picked out of thin air. ;-)#
    • For each user, it calls the Drummer verb twitter.getScreenname, which takes one parameter, the id of the user whose name you want. Then it inserts the name either to the right or down from the cursor depending on whether this is the first user we're inserting. That's how op.insert, an old friend from Frontier, works. #
    • When it's done looping, it moves the cursor to the left, onto the "Early Twitter signups" headline we created. #
    • It leaves the list expanded. #
  • The killer feature#
    • It's so humble you might actually miss it. #
    • Even though the script makes a dozen asynchronous calls to Twitter, it's written as if it were synchronous. No weird code structures, you just write it as you think of it, and the system translates it into the complicated stuff, for you. Do I have to explain why this is good? Any time you can let the computer do the complex stuff for you is time you save, and errors you don't make. #

© copyright 1994-2021 Dave Winer.

Last update: Saturday April 17, 2021; 9:41 AM EDT.

You know those obnoxious sites that pop up dialogs when they think you're about to leave, asking you to subscribe to their email newsletter? Well that won't do for Scripting News readers who are a discerning lot, very loyal, but that wouldn't last long if I did rude stuff like that. So here I am at the bottom of the page quietly encouraging you to sign up for the nightly email. It's got everything from the previous day on Scripting, plus the contents of the linkblog and who knows what else we'll get in there. People really love it. I wish I had done it sooner. And every email has an unsub link so if you want to get out, you can, easily -- no questions asked, and no follow-ups. Go ahead and do it, you won't be sorry! :-)