A short history of the calculating document
In 1494 Luca Pacioli described how Venetian merchants kept their books. A sale went into the journal among the other events of the day. In the ledger, the same sale appeared under the accounts it affected. A merchant looking up what a customer owed could turn straight to that customer’s account. What the merchant could learn from the figures depended on how the page was arranged.
A calculation at a keyboard
In 1964 a Dartmouth student could sit at a terminal, type a few lines of BASIC and get an answer. John Kemeny, Thomas Kurtz and their students had opened the university computer to people in subjects as far apart as engineering and classics. Once you had written the rule, you could try it again with different figures.
Follow a terminal session in Dartmouth’s 1964 BASIC manual.
Niklaus Wirth’s Pascal, with a working compiler in 1970, gave students a way to divide a long procedure into smaller ones. At Bell Labs, Dennis Ritchie developed C to write Unix itself. Reading someone else’s calculation became a skill worth teaching. In The Elements of Programming Style (1974), Brian Kernighan and P. J. Plauger took published Fortran and PL/I programs apart and rewrote them so a reader could follow the reasoning.
Paper on a screen
At Xerox PARC in 1974, Butler Lampson and Charles Simonyi helped develop Bravo. A writer could change a typeface and see on screen how the page would look in print. In the late 1970s Rob Barnaby wrote WordStar for early personal computers. A typist could insert a sentence in the middle of a letter and print a clean copy. The paragraphs below moved down by themselves.
See two documents open in Bravo on a Xerox Alto.
In the spring of 1979, Dan Bricklin was working on a Pepsi-Cola case at Harvard Business School. He used an early version of VisiCalc, the spreadsheet he and Bob Frankston were building for the Apple II. Each square could hold a text label, a number or a formula referring to other squares. Change a sales assumption and the profit figure changed with it. Bricklin kept his handwritten notes and his case report. The report was typewritten.
The personal computer goes to work
Secretaries in Orem, Utah, tried Alan Ashton and Bruce Bastian’s word processor on real correspondence and told them what needed changing. It became WordPerfect, whose Reveal Codes let a typist find the exact spot where a stray underline began. On the spreadsheet side, Mitch Kapor and Jonathan Sachs released Lotus 1-2-3 for the IBM PC in January 1983. An office could keep a sales list, pick out one customer’s records and turn a column of figures into a chart.
Later in 1983 Microsoft released Word. Simonyi led the team and Richard Brodie wrote much of the first version, which let a writer select and rearrange text with a mouse. Anders Hejlsberg’s Turbo Pascal let a programmer edit a line and compile and run the program again in seconds. Bjarne Stroustrup’s C++, named in 1983, extended the C that Kernighan and Ritchie had documented in their 1978 book, The C Programming Language. A programmer could now define a type such as a matrix and give it its own rules for multiplication.
.CPP extension, and F9 builds the program.
SAMNAD.S, 2012 · CC BY-SA 3.0 · resized · Stroustrup’s 1985 listing for complex multiplication
Equations get a page of their own
In 1984 Cleve Moler’s teaching program became a commercial matrix calculator, MATLAB. A student could enter a matrix and solve a set of simultaneous equations in a line. On the Macintosh in 1985, Microsoft Excel offered a different convenience. An ordinary worksheet could contain a whole budget, and Doug Klunder’s recalculation code worked out which figures an edit affected.
At MIT, Allen Razdow had watched lecturers draw a diagram, write an equation beside it and carry the argument on across the blackboard. His Mathcad worksheet brought that arrangement to a computer in 1986. An engineer could put the load on a beam beside its sketch and calculate the deflection underneath. In 1988, Stephen Wolfram’s Mathematica appeared with a notebook interface designed by Theodore Gray. A reader could change a mathematical expression, ask for its derivative and plot the result on the same page.
Languages for the work itself
Guido van Rossum released Python in 1991. A short script could read a file and do arithmetic, then call a library written in C when the work demanded it. Different professions could build their own tools while sharing a language.
At Goldman Sachs, financial modellers wrote in Slang, a language that allowed spaces in names. A term such as Accrued Interest could appear in a formula exactly as a dealer would say it. Goldman used Slang to program its Securities Database, known as SecDB. First used on a trading desk in late 1992, SecDB grew into a model of Goldman’s trading business, both the activity on its books and the world those books described.
Start with a single trade. On Goldman’s side it belonged to a book on a particular desk. On the other side stood a customer or another counterparty. The record held the terms they had agreed. Its value depended on prices in the markets in which they dealt. SecDB tied those records to pricing models and risk reports. A trader could ask what a move in exchange rates would do to one contract. A risk manager could ask the same question across the firm’s positions.
The people building those models worked in SecView. There they could write Slang, step through a misbehaving calculation and measure where a model spent its time. Goldman engineer Michal Dorko describes working in SecView. Goldman’s archive shows a design sketch from SecDB developer Michael Dubno’s notebook.
In 1993 Ross Ihaka and Robert Gentleman announced R, a language for fitting statistical models to observations and plotting the results.
In 1995 Borland’s Delphi gave business programmers another way to express a rule. They could place a button on a form and write what should happen when someone clicked it. Hejlsberg carried those ideas about properties and events into C# at Microsoft.
Watch David Intersimone demonstrate Delphi 1 on Windows 3.11.
A picture and a page of plain text
Tableau Desktop appeared in 2003, out of Stanford research into how people explored databases. An analyst could drag a region and a sales figure onto a sheet. That gesture told Tableau both what to ask the database and how to draw the answer. A sales director could start with a national total, pick a region and see where the difference came from.
Compare Stanford’s Polaris prototype with the first Tableau Desktop.
In 2004 John Gruber introduced Markdown, with help from Aaron Swartz. Its starting point was plain-text email. A line beginning with # could become a heading on a web page and still make sense in the file that produced it. Years later, the same quality made Markdown a convenient form for AI assistants to write and people to edit.
Try a heading in Gruber’s original browser tool, the Markdown Dingus.
The notebook and the dashboard
Project Jupyter grew out of Fernando Pérez’s interactive Python project, IPython, in 2014. A notebook let an analyst put a question at the top of a page, work through it a few lines of Python at a time and draw a chart underneath. A colleague could read the reasoning and try a different assumption in the same document.
n = 4 and run the cell again to see a different matrix.
2019 · Andrey Yakimchik · CC BY 4.0 · resized
Suppose an analyst is working out yesterday’s sales. She loads the orders, tries two ways of treating refunds, plots the result and appends the daily total to a sales log. Then she goes back and edits the refund rule to try another idea. By the time she stops for the evening, the rule on the page may have changed since she last drew the chart.
Next morning she can open the notebook and see the saved chart. If yesterday’s Python session has ended, the filtered orders that produced it are gone from memory. Running every cell again might fetch orders that have since been corrected. It would also append a second entry to the sales log. Before she can try her next idea, she has to work out which steps will rebuild the figures she wants and which have already done their job.
In 2015 Microsoft released Power BI Desktop and its new online service. A team could connect a sales database and a budget spreadsheet, define a margin and publish a report in which selecting a region changed the charts. Power BI and Tableau both connect to many sources and let other applications embed their reports. In an embedded view, the original platform still runs the filters and calculations. When someone copies the margin into a board paper, the figure makes the journey more easily than its working.
What belongs on the page?
A spreadsheet needs words to tell us what its figures mean. A report needs the relationships behind those figures. A sentence can depend on a number just as surely as one cell depends on another. A program can express that relationship as a rule, a notebook can show the working, and a dashboard lets a reader explore what happens when an assumption changes. In business, these are often different parts of one piece of work.
What if the starting point for all of it were simply a document? You could write and lay out the page as you pleased. Where you needed a calculation, you could name the quantities in your own words and write the maths in a form a colleague could read aloud. The same language could work with tables of data as readily as with words and numbers. For specialist work, it could draw on Python and its libraries.
The reader could take part, too. A choice beside a question could change the figures and bring a different conclusion onto the page.
That is the idea behind Literally.
One order, two print runs
A concert organiser has £150 to print programmes. Choose a print run and read the note she can send to the committee.
The programme print order
The printer quotes £98.00 for 200 programmes. We have £150.00 to spend.
Approve the order.
The printer quotes £178.00 for 400 programmes. We have £150.00 to spend.
Request another £28.00 before ordering.
Literally source
# The programme print order
Copies = 200
Budget = £150.00
Quote = £18.00 + £0.40 * Copies
radio "Print run" sets Copies from (200, 400)
The printer quotes **=Quote** for =Copies programmes. We have **=Budget** to spend.
='''Approve the order.''' if Quote <= Budget else '''Request another **=(Quote - Budget)** before ordering.'''
Download print-order.lmd
Sources and further reading
The ledger · Pacioli’s journal and ledger
Early programming · BASIC at Dartmouth · Wirth on Pascal · Ritchie on C · Kernighan and Plauger’s preface
Word processors and spreadsheets · Lampson and Bravo · Rubinstein on WordStar · Bricklin’s Pepsi-Cola papers · VisiCalc User’s Guide for the Apple II · Peterson on WordPerfect · Brodie and Simonyi on Word · Kapor and Sachs at Lotus · Excel’s original team
Tools for programmers and mathematicians · Hejlsberg on Turbo Pascal, Delphi and C# · Stroustrup on C++ · Moler on MATLAB · Razdow on Mathcad · The Mathematica archive · Gray on the notebook
Python, R and Slang · Van Rossum on Python · Van Rossum’s career · Ihaka on R · Goldman Sachs on SecDB · R. Martin Chavez on modelling the trading business · SecDB engineer Michal Dorko on Slang
Web publishing, notebooks and dashboards · Stanford’s Polaris project · Tableau’s product chronology · Gruber on Markdown · The origins of Jupyter · How a notebook runs code · What a notebook saves · Microsoft’s Power BI launch · Embedding Tableau views · Embedding Power BI reports
Literally’s creator recalls that Slang grew out of a reporting language. Van Rossum’s career notes above also cover his years as Python’s “Benevolent Dictator for Life” and his move to Microsoft in 2020.