It's even worse than it appears.
I have arrived at an interesting place. Every day of every week feels like a weekend day. #
  • Following up on yesterday's news about Drummer, its key innovation is that you can write JavaScript code that's much simpler because it does not need to use callbacks. #
  • An example: #
  • dns.getDomainName (dns.getDottedId ("bullmancuso.com"))#
  • This works even though both DNS operations do I/O.#
  • We are using JavaScript's threading, we are not blocking the CPU. #
  • A programmer in any other language will be scratching their head wondering what's the big deal. I know. I've been saying that for years. If Python can do this, I don't see why JavaScript shouldn't. #
  • Note: JavaScript as spec'd can't do this. But we were able to make this work with a very simple pre-processor.#
  • I looked around for a decent explanation of JavaScript callbacks, but they take too long to get to the point, or they never explain what they are. Maybe it's too hard to explain? I've been writing a lot of docs lately, so let me try! :-)#
  • Callbacks are used when an operation is going to take a long time and your program wants to do other things while it's waiting. So you create a function to run when the operation is done, and provide that function to the slow operation you're calling with the intent that it will call this function when it's done. Thus it is a callback function. #
  • An example:#
    • fs.readFile ("notes.txt", function (err, filetext) {#
      • if (err) {#
        • console.log (err.message);#
        • }#
      • else {#
        • console.log ("The file contains " + filetext.length + " characters.");#
        • }#
      • });#
    • console.log ("Hi mom!")#
  • If you look in the console, you'll see:#
    • Hi mom!#
    • The file contains 28 characters.#
    •  #
  • An example of a real world callback. #
  • After you upload a video to Facebook, you'll get a dialog when the upload is done saying this is going to take a bit of time to process, so we'll let you know when it's done. In the meantime you can read stuff. When the video is ready, you get a message saying you can watch the video now. That's the basic flow of a callback. #
  • Medium has been around since 2011, getting pretty close to ten years, and in that time, they have switched business strategies many times. The appear to have done it again yesterday. So here's another opportunity to take stock of writing on the web, and where we have been and what could change.#
    • First, I got a nice note from Jay Rosen thanking me for pushing him to keep his own web presence, to not depend on any of the platforms. It's gratifying to see a longtime friend doing so well with this approach.#
    • Jay then sent me a link to an article by Kevin Drum asking why blogging has declined in the past decade. I think there's more to it than what Drum says, that the disappearance of Google Reader, while it certainly hurt the cause, is only part of the puzzle. The problem is that I can't write on my blog and share it with the popular publishing platforms without limiting what I can do with my blog. If you add up all the limits of Twitter, Facebook, Google Reader and Medium, then you can't blog at all because their requirements are contradictory. #
      • One requires titles and two don't allow titles. #
      • Facebook doesn't support the basics of blogging, links, simple styles, podcast enclosures and (again) titles. #
      • Medium supports most of what you would want them to support but doesn't allow updating, so if you make a change you have to do it by hand. #
      • None of them want to peer with blogs. They all insist you do your writing with their tools of greatly varying quality, and some are reallllly bad. Even the new hope of writers everywhere, Substack, requires you to use their editor. #
      • So, trying to keep this short as possible, in 2017 I gave up trying to peer with any of those services, and went back to writing my blog the way I like to write, and the lights came back on. It works again. So the moral of the story imho is to forget about peering, and just blog the way you want to, and I think we can all be happy.#
    • Now I mentioned Google Reader in the list of limiting environments. Oddly, even though it's long gone, it is still controlling how we blog. They didn't support the full RSS spec, they don't handle posts without titles. And all the replacements for Reader copied their limits, so even though it's gone, it's influence is still strong, contributing limits to blogging that weren't here before they came and went. #
    • Is Twitter's character limit protecting Medium? If so, please now would be a good time to change course. Twitter is only increasing in importance. I would love to seem them make a deliberate effort to do all that RSS can do in transporting web writing, so we can start building again, from a sane base. As much as I love Twitter, its constraints are still unbearable. #
    • One more thing. We're still waiting for independent writers to take the lead here, as I wrote last week. "Until the writers lead here, you're going to keep having your hearts broken and the tech for writing on the web will continue to go nowhere."#

© copyright 1994-2021 Dave Winer.

Last update: Saturday April 3, 2021; 5:04 PM 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! :-)