My Biggest Rant About Observable

Is the lack of visualization explaining fundamental notebook building brick - the stuff that is confusingly known as Inspector (beginners hate that one complex trick).

I know that all of you, who know what I am speaking about, are touched by the curse of knowledge. It looms over me too, and because the process of being consumed by it is very painful for my particular brain, I hope to still explain it to you here.

  • Notebook bricks are cells.
  • Cells contain stuff, and every cell has a value.

So far so good. It is explained here A Taste of Observable / Observable / Observable

But then you want to do nice things. Convenient things. Things you’ve seen in other notebooks. And it is where the beautiful picture starts to fall apart.

Because nothing, almost nothing explains what is going on with the Notebook when you define cells, and then reference them. It is not just cells. It is two types of cells - “definition cell”, and “reference cell”. “definition cell” (where you assign value to cell variable) attaches stuff to Notebook, creating visualization, etc. “reference cell” (where you reference previous cell) doesn’t attach anything and invokes the Inspector that dumps info about variable, but not its viz.

I tried to explain already that there.

But My Biggest Rant About Observable (that makes me feel insecure and stressed about trying to do things in Observable again) is two-fold.

  1. I am still not sure I got it right (after like, being absent for some time)
  2. I have to juggle all that stuff in my head, instead of meditating over some looped .gif animation until the enlightenment hits my cortex

P.S. Nevertheless thanks for a wonderful tool, and gratz for gathering Observable Insight. I hope this feedback will be valuable on the eve of the congression.

Press :heart: if you liked my insight, :heavy_plus_sign: if you’ve felt the pain and :+1: if you’d give money to Observable to film the .gif story for enlightenment.

Think of each cell as a function that gets rerun automatically when any of its arguments change. The arguments to this function are the values of all other cells that the current cell references.

To see what these functions and their arguments (“inputs” in Observable speak) look like, check out the following link:

The same is true for non-Javascript cells. For instance, if you have a Markdown cell, it will be compiled to something like

function _using(md){return(
md`### A heading

Some text.`

Can you give a few examples?

While I appreciate the explanation, it is still a lot of text, which I need to wrangle in my head.

Think of each cell as a function that gets rerun automatically when any of its arguments change.

That’s not always true. Fears in my head tell me there are cases when the function is not rerun if it was resolved once. But I don’t remember them.

I can’t give examples that I don’t understand, but here is the thing that I’ve failed to accomplish a year ago - get rid of red error messages if no input is given, here - List remote .zip contents / Anatoli Babenia / Observable

Another thing I wanted to do, is to control how many GitHub API to call, or call them manually once they queued. To avoid depleting my request quota, and show how it replenishes. To count active forks in a repo. Didn’t get far too GitHub API Starter (active forks) / Anatoli Babenia / Observable

No. Any update to any of the dependencies of a cell will cause its downstream cells to be invalidated. You can read more about it here:

Note however that Observable’s Runtime cannot account for global variables or other side effects.

I’d argue that’s an advanced usage pattern, but I also responded to that already: await for specific cell value - #11 by mootari

Also an advanced usage pattern, and basically a vanilla JS throttling problem. If you want to go the extra mile, then the only addition here would be that a queued request might become invalid before it gets sent.

A simple implementation would look like this:

And despite all these explanations, the complete mental model of cells in Observable notebook just doesn’t compile in my head. That’s why I need visualization.

I don’t think anyone but yourself will be able to create that visualization. We’re happy to answer any questions you might have, though.