Wolfram Markdown, also called Computational Essay

I was reading Stephen Wolfram’s blog and came across this post:

People are used to producing prose—and sometimes pictures—to express themselves. But in the modern age of computation, something new has become possible that I’d like to call the computational essay.
I [Wolfram] have been working on building the technology to support computational essays for several decades, but it’s only very recently that I’ve realized just how central computational essays can be to both the way people learn, and the way they communicate facts and ideas. . . .

There are basically three kinds of things here. First, ordinary text (here in English). Second, computer input. And third, computer output. And the crucial point is that these all work together to express what’s being communicated. . . .

But what really makes this work is the Wolfram Language—and the succinct representation of high-level ideas that it provides, defining a unique bridge between human computational thinking and actual computation and knowledge delivered by a computer. . . .

Computational essays are great for students to read, but they’re also great for students to write. Most of the current modalities for student work are remarkably old. Write an essay. Give a math derivation. These have been around for millennia. Not that there’s anything wrong with them. But now there’s something new: write a computational essay. And it’s wonderfully educational.

A computational essay is in effect an intellectual story told through a collaboration between a human author and a computer. The computer acts like a kind of intellectual exoskeleton, letting you immediately marshall vast computational power and knowledge. But it’s also an enforcer of understanding. Because to guide the computer through the story you’re trying to tell, you have to understand it yourself. . . .

Wolfram gives some examples, and it looks pretty cool. It also looks just like R Markdown, iPython notebooks, Jupiter notebooks, and various other documents of this sort.

So I posted a comment:

You write, “what really makes this work is the Wolfram Language.” I’m confused. How is your computational essay different from what you’d get from Markdown, iPython notebooks, etc.?

Which elicited the following response:

The Wolfram Language underpins our technology stack, creating one cohesive process. Our notebooks offer a complete production environment from data import, prototyping, manipulation and testing which can all be done in the same notebook as deploying to the cloud or generating final reports or presentations. It doesn’t need to be bundled with separate tools in the same way that iPython notebooks need to be, making our notebooks are better suited for computational essays since you don’t need to set up your notebook to use particular libraries.

On top of that, since our language unifies our tech stack, there’s no issue with mutually incompatible interpreters like with Python, and even when you move to Jupyter which can take on multiple language kernels, it becomes increasingly difficult to ensure you have every needed package for each particular language. Markdown is useful in a notebook, but Markdown in iPython notebooks aren’t collapsible and that makes them difficult to structure.

One additional key feature is our built-in knowledge base. Across thousands of domains, the Knowledgebase contains carefully curated expert knowledge directly derived from primary sources. It includes not only trillions of data elements, but also immense numbers of algorithms encapsulating the methods and models of almost every field.

I don’t quite understand all this but it sounds like they’re saying that notebooks computational essays are particularly easy to do if you’re already working in the Wolfram language. I don’t really have a sense of how many people use Wolfram for statistics, or would like to do so. Should we have a Wolfram interface for Stan?

Regarding the “computational essay” thing: my inclination would be to call these “Wolfram markdown” or “Wolfram notebooks,” by analogy to R markdown and Python notebooks. On the other hand, there’s no standard terminology (is it “markdown” or a “notebook”?) so maybe it makes sense for a third term (“computational essay”) to be added to the mix.

27 thoughts on “Wolfram Markdown, also called Computational Essay

  1. Their point is BS. one could also say “unify” the stack by having everyone in the world use one distribution (e.g. anaconda) which determines what libraries and versions everyone is allowed to use, but the homogeneity is not worth stifling innovation.

    We should adopt tools that enable reproducibility (e.g. containers) but doesn’t lock everyone into a centralized language and set of libraries.

  2. Paul Romer had a fairly trenchant takedown of the Wolfram notebook format/interface recently, focusing on its refusal to play nicely with non-proprietary formats:

    ttps://paulromer.net/jupyter-mathematica-and-the-future-of-the-research-paper/

  3. To be fair, Wolfram came up with the notebook concept many years ago and Jupyter, RStudio, etc. copied them relatively recently. Their response to your comment just sounds like marketing, but the Wolfram Language is a lot broader than Python, R, and other languages that may have a notebook-like interface or another literate programming concept.

    There is a Mathematica interface to Stan now ( http://mc-stan.org/users/interfaces/mathematica-stan.html ).

  4. FYI, when you say “my inclination would be to call these “Wolfram markdown” or “Wolfram notebooks,” by analogy to R markdown and Python notebooks” you’re getting the order of priority reversed: Mathematica notebooks came first and were a direct inspiration for ipython notebooks and jupyter.

    • Anon:

      But if Mathematica notebooks came first, and now these are called Wolfram, not Mathematica, then shouldn’t they be called Wolfram notebooks? I don’t see the point of changing the name from “notebook” to “computational essay.”

      • The term “notebook” implies a kind of journal—something a scientist keeps in the desk drawer for recordkeeping.

        The term “essay” implies a completed work of wordcraft—something a writer produces for others to read and maybe even for publication.

        Very different connotation. Wolfram’s right here—the notebook analogy is clearly wrong for something being prepared for presentation.

        The term “case study” implies a work created for learning. Something someone will walk through from beginning to end. That’s probably why I liked it better than “notebook” for the Stan case studies.

        Andrew—you should be familiar with trying to introduce more appropriate terminology. It all reminds me of your preference for “warmup” over “burnin” because the electrical component burnin analogy is wrong.

      • They _are _called Wolfram Notebooks: http://www.wolfram.com/notebooks/

        Wolfram is making a case that Computational Essays are a new format of communication enabled by Wolfram Notebooks. Reading his essay, I believe he would agree that you can write a Computational Essay in R Markdown or Jupyter Notebooks.

        All these technologies, though, can be used for other formats, such as pure computation, pure writing, long research papers, application interfaces, etc.

        Historically, the Mathematica Notebook has been around since 1988. Jupyter Notebooks came about a quarter century later, largely inspired by them.

        The claim that the Mathematica Notebook is the best format for Computational Essays is, in my opinion, very much a secondary claim that stands independently of the Computational Essay concept.

        • Not having used Wolfram’s “Computational Essays” (and it’s been a *long* time since I used Mathematica, the concept sounds identical to LaTeX + knitr + R. Substituting LyX for your LaTeX front-end even provides a nice GUI that I think rivals anything Mathematica offers for writing documents. Isn’t Wolfram just adapting this to their own environment?

        • I would say he is framing and proposing the Computational Essay concept explicitly as a core of high school and undergraduate activity.

          The best reason he proposes for Mathematica’s advantage here is that it is a very-high level language, and has an integrated knowledge base. For example you can write a computational essay on Roman history and trivially grab and compute on populations of cities over time. As a question, “What computational environment is most friendly and usable by high-schoolers, in both science and math, but also in literature, social studies, and history?”

          So, he is not addressing the concept primarily toward STEM researchers, but toward as broad a populace as possible.

  5. It doesn’t need to be bundled with separate tools in the same way that iPython notebooks need to be, making our notebooks are better suited for computational essays since you don’t need to set up your notebook to use particular libraries.

    That’s a pretty strange claim, given that Mathematica (sorry, I guess I mean “Wolfram language”) specifically allows for external “packages” (like the Stan interface Ben Goodrich mentions). I guess the idea is that no one would ever want to write a “mathematical essay” on a topic that wasn’t part of the official Mathematic distribution…

  6. I think it’s a huge mistake to mix the presentation and the code for real work. Programming tooling just isn’t set up for mixing code and presentation together usefully. Reliable code (even for a single use) needs to be developed modularly by function for testing. Putting everything together into chapters or a book is the wrong granularity for doing that. None of the tooling you get in something like Jupyter or knitr leads to good programming practices.

    Jupyter (formerly IPython notebooks) is great for creating presentations about the REPL (read/evaluate/print-loop) process itself. knitr is nice for creating more traditional presentations with statistical content that are runnable.

    This notebook notion is slightly different than literate programming,

    … a programming paradigm introduced by Donald Knuth in which a program is given as an explanation of the program logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which a compilable source code can be generated. (From the Wikipedia.)

    It’s really all about the workflow:

    Implementing literate programming consists of two steps:
    1. Weaving: Generating comprehensive document about program and its maintenance.
    2. Tangling: Generating machine executable code
    Weaving and Tangling are done on the same source so that they are consistent with each other.

    This is where the notion of “weave” came from that led to sweave and knitr. The original focus of literate programming was more inward looking—the documentation being woven was that for the program, not for an external presentation. This makes more sense to me than developing code in a knitr or Jupyter environment, but the tooling still isn’t there for me to use this everyday other than things like doxygen and Javadoc, which let me lightly annotate code with structured doc.

    • Don’t you find it painful to put figures into a paper or documentation, using includefigure or something like that in latex? I find it easier to have all analyses and figures generated through knitr. I do do the analyses in an R file first, and then assemble the paper, because in the beginning I don’t know exactly how I want to proceed (unless pre-registering, which is still new for me).

      • Yes. That’s why I said I liked knitr for presentations. It pains me that I can’t get finer-grained control over output and that the doc for markdown’s behavior is sketchy at best, making the whole thing trial-and error. But I make the tradeoff.

        The point was that I don’t develop the code for those knitr presentations in knitr. I develop it standalone, then when it’s working, put it into knitr.

        • I learnt this lesson the hard way. I enthusiastically adopted knitr for writing code from the get go, and then started to face the fallout.

  7. So I think the order of precedence is somewhat germane, with Knuth’s literate programming and Mathematica notebooks being pretty distinct, but both preceding knitr etc (which I think is a particular flavour of “R markdown”) and Jupyter.

    Jupyter and Mathematica notebooks are interactive environments, but knitr, if I understand it, is a frozen format, good for putting things into final form but not really how one goes about doing the work. Once converted into, say, PDF, they all look similar, of course.

    Also, an important technical point of terminology: markdown is a formatting language for text, originally created by John Gruber of http://daringfireball.net for writing blog posts. I don’t think “a markdown” is a thing, and in any case certainly shouldn’t apply to things written in other formats.

  8. The best quote of all time about Mathematica comes from the preface to Forman Acton’s book, Real Computing Made Real (page XIII):

    “Should I use Mathematica to solve my problem?” The answer to this question is the same as JP Morgan’s answer about how much it cost to run a yacht: If you have to ask, you can’t afford it….Mathematica is a huge system of remarkable capabilities cloaked in a stupefying variety of commands. But after six months of frequent experimentation, I still find that three-quarters of my time goes into trying to discover why I got an error message instead of the answer I was expecting.

  9. As others have pointed out, Wolfram is proprietary software. Hence, it’s great if you have lots of money to blow, but it’s terrible for reproducible science or starving graduate students. Who cares what amazing features they claim. They just want your money.

  10. Compared with Jupyter, Mathematica notebooks are more powerful but they’ve also become bloated.

    They do not fit well with a versioning system.

    Exporting and sharing information isn’t great at all.

    Wolfram has missed the boat.

  11. Interesting discussion. Surprised not to see Observable by Mike Bostock mentioned https://beta.observablehq.com/. I only use Knitr but Observable is web native, free, and live in the sense the reader can amend doc and calculations update immediately (I get the sense ipython etc does this from this thread) and I am tempted by the power of this. Sort of like knitr and Shiny rolled into one. Do people see the explorable explanation as a specific type of computational essay? https://explorabl.es Or if the code is not visible or revealable does this make it something distinct?

  12. I wouldn’t mix up Markdown (and all of its various flavors) with notebooks (which use markdown syntax). Markdown is a lightweight mark up language https://en.wikipedia.org/wiki/Markdown simpler than HTML, YAML, XHTML or Tex or other mark up languages. ( and those of us who are old enough know what mark up meant in print.) Markdown was created (2004) to be much less demanding than HTML (and uses a lot of conventions of IRC) and not to require a browser or other environment to be human readable. That’s why it’s great for documentation or for things like wikis.

    Notebooks combine markdown, code and results. The notebooks for different languages can have different features, but that’s just a matter of saying anything produced can have different features and they can be added if there is motivation or demand to do so. I guess there is a matter of taste about if you prefer to have everything you might ever need available all the time or if you are fine with loading what you need.

  13. James Somers wrote a piece for the Atlantic, which claims to be about how The Scientific Paper is Dead but turns out to actually be a potted history of open-vs-closed-source scientific, uh, computational essays as exemplified by Mathematica and Jupyter. Most salient for the current discussion, it identifies the incentives that penalize academic-led tools for academics – “Pérez told me stories of scientists who sacrificed their academic careers to build software, because building software counted for so little in their field…”. The fact that we are having this discussion indicates something about the kind of marketing budget a large industrial organisation can bring to bear.

    (Aside: In answer to Andrew’s poll at the top, I personally use Mathematica all the time in my work, although mostly to check my integrals and export them as LaTeX for my knitr/pweave documents where the actual data analysis happens.)

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *