Steps to Writing a Computational Essay

What Is a Computational Essay?

A computational essay is an intellectual story told through 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.
As
describedbyStephenWolfram
, when you write a computational essay, the code in your computational essay has to produce results that fit with the story you are telling. You can immediately see what your code does and how it fits with the story.
The structure is built up from segments consisting of:
◼
  • Text—A few sentences expressing the main idea of the segment, giving background and context.
  • ◼
  • CodeText—A one-sentence description of the computer code (input) that immediately follows.
  • ◼
  • Input—Code that gives a precise computational specification of what’s being talked about.
  • ◼
  • Output—The result of a computation, which delivers facts and results, often in graphical form.
  • A segment may contain more than one input/output, as long as these inputs/outputs address the same topic.
    To see some good examples of computational essays, check out the Wolfram Blog, where posts are usually written in the computational essay format (e.g. example 1, example 2, example 3). You can also find some good examples in the Staff Picks category on Wolfram Community.

    Common Steps for Writing Any Essay

    Choose a Subject

    Your essay should address a topic that is interesting and/or informative for your audience.
    ◼
  • Choose a subject that you know well.
  • ◼
  • If you are looking for inspiration, feel free to check out Wolfram repositories, Wolfram U and WikiProject Science.
  • Compose a Title

    The title of your essay is the first thing readers will see. It should be concise, descriptive and easy to understand.
    ◼
  • Be as straightforward as possible.
  • ◼
  • Be specific, distinctive and informative.
  • ◼
  • Clearly convey the subject of the essay.
  • ◼
  • Make sure the subject area is recognizable by non-experts.
  • ◼
  • Avoid ambiguous abbreviations in the title.
  • ◼
  • Avoid too broad or overarching titles.
  • ◼
  • Use APA format (capitalize the first letter and any proper nouns).
  • Original title
    Improved/revised title
    Reasoning
    Introduction to Euclidean vector
    Euclidean vectors
    Remove implied or obvious statements
    Exploring correlation in statistics
    Correlations in statistics
    Remove implied or obvious statements
    Markov chains
    Discrete- and continuous-time Markov chains
    In a broad field, address the specific subject of the essay
    Quantum mechanics
    Schrödinger equation of state
    In a broad field, address the specific subject of the essay
    Web development
    APIs in the Wolfram Language
    In a broad field, address the specific subject of the essay
    Segmentation using mathematical morphology
    Morphological image segmentation
    Make titles concise where possible
    Comparison of equations of state for gaseous
    CO
    2
    CO
    2
    ​(g) equations of state
    Make titles concise where possible
    Sonifying Clave Son – Exploring musical rhythm
    Rhythmic timelines
    Make titles concise where possible
    RSA
    Rivest–Shamir–Adleman Cryptosystems
    Remove ambiguous abbreviations
    The Collatz Conjecture
    Visualizing the Collatz Conjecture
    Describe behavior of the essay if applicable, not just the topic
    Recurrent Neural Networks in Text Generation
    Recurrent neural networks in text generation
    Use APA formatting

    Write an Abstract

    An abstract is located below the author name and summarizes the most important points in your essay.
    ◼
  • Summarize your most important content in about 100 words.
  • ◼
  • Provide a concise overview of the essay's conversation.
  • ◼
  • Highlight the motivations and scope.
  • ◼
  • Pay attention to the target audience. In the following example, explaining “cryptography” depends on the audience’s reading level (e.g. pre-college students or grad students).
  • Good abstract: Public-key cryptography, also known as asymmetric cryptography, uses two different but mathematically linked keys, one public and one private. In Rivest–Shamir–Adleman (RSA) cryptography, both the public and the private keys can encrypt a message; the opposite key from the one used to encrypt a message is used to decrypt it. Using RSA, we show how to encrypt messages between two users.
    Bad abstract: RSA uses both the public and the private keys to encrypt a message, thus it is used for secure data transmission.

    Add Section Headings

    Giving your essay a proper heading structure helps to organize your content for better readability.
    ◼
  • Categorize sections based on similar content. Each section should tell a story by itself.
  • ◼
  • Headings overall should tell the outline of the essay.
  • ◼
  • Example 1:
  • The Central Limit Theorem
    Discovering the Central Limit Theorem
    The Normal Distribution
    Toward the Normal Distribution
    The Normal Distribution in 2D and Beyond
    Random Walks
    ◼
  • Example 2:
  • Collapse Models
    Collapse Problem in Quantum
    Random Processes
    Collapse as a Dynamical Random Process
    Recovering Quantum after Statistical Averaging
    Drawbacks of Collapse Models

    Cite References

    Citing references in your essay allows others to follow your work and explore on their own.
    ◼
  • Cite any references that have been used in the main body.
  • ◼
  • Cite any functions or datasets that you used from Wolfram Repositories.
  • ◼
  • Cite relevant Demonstrations (from Wolfram Demonstrations) or notebooks (from the Notebook Archive).
  • ◼
  • At a minimum, list the author, title, creation date and/or URL where relevant.
  • You are free to choose whichever citation format best suits the needs of your essay -- just make sure that your style is consistent.

    Detailed Description of Computational Essay Elements

    Instead of static text paragraphs, a computational essay is constructed of segments that convey each major point through a combination of text, code, visualizations and interactivity. A segment consists of four pieces: Text, CodeText, Input (code) and Output (including visualizations).
    ◼
  • Each segment should discuss only one major point.
  • Example:
    “Discover” the central limit theorem empirically, by looking at collections of random numbers.
    Make a list of 10 random real numbers between −1 and 1:
    In[]:=
    RandomReal[{-1,1},10]
    Out[]=
    {-0.0771015,-0.366985,-0.339309,0.828772,-0.0314546,0.258496,-0.626615,0.903993,0.337799,-0.719367}
    ◼
  • A segment may have more than one input/output.
  • Example:
    These random numbers are uniformly distributed, so if you make a histogram of them, it will be flat.
    Make a histogram of 1000 random numbers between −1 and 1:
    In[]:=
    Histogram[RandomReal[{-1,1},1000]]
    Out[]=
    With 100,000 numbers, the histogram is almost exactly flat:
    In[]:=
    Histogram[RandomReal[{-1,1},100000]]
    Out[]=
    ◼
  • A segment should flow well and smoothly from text to outputs.
  • ◼
  • A segment should be easy to scan (mostly through proper visualizations).
  • Example:
    The distribution for the means is not flat; instead it is a bell-shaped curve.
    It is easier to see the shape of the curve if you use smaller bins; here, width 0.01:
    ◼
  • The reader should be able to understand the logic by only reading the text or studying the outputs.
  • ◼
  • Segments should follow a logical order and build on each other.
  • Text

    ◼
  • Text describes the flow of conversation.
  • ◼
  • It is usually not more than a few sentences.
  • ◼
  • It clarifies the transition from one segment to the next one.
  • ◼
  • It should explain how the topic is studied and (broadly) how the topic is implemented in the code.
  • CodeText

    ◼
  • Before each line of code, there should be a single line in the CodeText style.
  • ◼
  • The CodeText explains the function and purpose of the code that follows.
  • ◼
  • It should explain only the code, not the topic itself.
  • ◼
  • CodeText sentences should end with a colon.
  • Good examples:
    Find the eigenvalues:
    Bad examples:
    Make a raster:

    Input

    ◼
  • The code should be clear, easy to read and no more than three lines long. Do not use long, complex blocks of code.
  • ◼
  • Break complicated, lengthy code into multiple segments and separate with CodeText lead-ins explaining each segment.
  • ◼
  • Separate different definitions into different cells.
  • ◼
  • If it is a repeated function, give it a Wolfram Function Repository page.
  • Shortening Code

    ◼
  • If a complicated function must be used, abstract the code into an initialization cell at the end of the notebook.
  • ◼
  • Reverse-close code that is purely defining visual appearance.
  • ◼
  • For large functions, possibly use a smaller font.
  • Example:
    Instead of:

    Using External Functions

    ◼
  • If you want to use functions from a particular package, properly explain the functions and corresponding arguments.
  • ◼
  • If you want to use WSTP and External Program Communication, properly explain the functions and corresponding arguments.
  • ◼
  • If you want to use any function from the Wolfram Function Repository, briefly explain the functionality and arguments of the functions.
  • Invoking Data

    ◼
  • Describe any input data that you use.
  • ◼
  • Comment on any cleaning processes that you may have done on the original data.
  • ◼
  • The notebook should be self-contained. No local data files should be imported.
  • ◼
  • If possible, get data from the Wolfram Data Repository or other online public source. Otherwise, include data with Iconize in the notebook, showing a few samples.
  • ◼
  • For especially large data files, upload the data and import it into the notebook from a public link.
  • Images

    Output (Visualizations)

    ◼
  • Include simple visualizations to illustrate the topic and engage the reader in the discussion.
  • ◼
  • Visualizations should work well and contribute to the narrative.
  • ◼
  • Visualizations, together with interactivity, should convey the topic effectively. A non-expert should be able to read the essay and understand something new.
  • ◼
  • Visualizations must be self-explanatory.
  • ◼
  • Add captions, legends, callouts, etc.
  • ◼
  • Label axes, explicitly mentioning any units/dimensions.
  • ◼
  • Label the overall plot.
  • Example:
    Instead of: