Standard Wavelength
← Field notes
Field notes · Explained

Chalk and cheese

A spreadsheet and a database both look like tables. That is where the resemblance ends.

Slices of Swiss cheese standing on a spreadsheet. A #VALUE! entry gets through a hole in the first slice and stops on the second.

Green squares are true stories. Tap one.

Last time we left Excel Del on a beach in Mexico, taking calls about column F, and promised to say what the system should be instead of his spreadsheet. The short answer is a database. The longer answer is why, because to most people a database sounds like a spreadsheet with an IT department attached, and that is the wrong way round.

Put the two side by side and they look like cousins: rows, columns, a grid of values. They are not cousins. One is a page you write on. The other is a record that knows what it holds. Chalk and cheese.

The tool that says no

The spreadsheet won because it never once said no. Type anywhere, type anything. A database is the opposite, and that is the whole gift. Before it will hold a single value it wants to know what the thing is. Is it a date? A depth, in metres? A node, belonging to which line, on which job? It asks the dull, difficult question at the start, once, so that nobody has to ask it again at the end, in a dispute, with Del on the phone.

That one difference, deciding what things are before you write them down, is where everything else comes from.

Context, always

Start with the thing that wears everyone out. In a big sheet the node number is in column B and the reading you care about is in column KJ, about three hundred columns to the right. To read one value you freeze the panes, scroll across, and run a finger along the screen hoping you haven't slipped a row. What unit is KJ in? It says in the header, or in a cell comment, or in Del. Which version of the battery is that? Another tab. The value is there; its meaning is somewhere else, and you carry it across in your head.

Do that a few hundred times a day and it isn't analysis. It is hard work, and it is how mistakes get in.

A database never separates a value from its meaning. A reading is stored with what it is a reading of: this node, on this line, on this job, in these units, taken at this time, from this source, entered by this person. Ask for KJ and B comes with it, because they were never apart. Nothing to scroll to and nothing to remember. The context isn't a column you have to find; it is part of the value.

That is also why the record still makes sense next year, after the job, after Del. The meaning is written down beside every number, not smeared across columns I and J and a note somebody meant to tidy up.

Type it once

Follow one number through a job. A node goes overboard at 03:12. The deck crew writes it on a sheet. Somebody types it into the deck log. Somebody else types it into the daily report. It gets typed again into the weekly summary, again into the client's own template, which wants it in a different order, and again into the sheet that works out the invoice. Six entries, by four people, for one event. Six chances to get it wrong, and when two of them disagree, nobody knows which one is right.

A database takes it once. The node went overboard at 03:12, by this person, from this vessel, and that is written down one time. The daily report reads it. The weekly summary reads it. The client's return, the battery forecast and the invoice all read it. Nobody retypes anything, so nothing drifts, and if the time was wrong it gets corrected in one place and is corrected everywhere.

One entry, and only one. Every report after that is a view, not a copy. It is the single biggest saving there is, and it costs nothing but deciding to do it. Remember the day spent reading numbers off a PDF and typing them into cells? That day just goes.

The more, the better

A spreadsheet gets worse as it grows. It slows down, it takes a minute to open, the formulas creak, and somewhere past a few hundred thousand rows it simply stops. So people trim it. They keep the daily totals and throw away the readings, keep this job and archive the last one, summarise because the file can't take the detail. The sheet survives by forgetting.

A database works the other way round. It gets better the more you put in. Every reading, every event, every job, kept whole, and each one makes the rest worth more, because now there is something to compare it with. One job's downtime is an anecdote. Ten jobs' downtime is a pattern. Every job's is an answer.

Complete matters as much as big. A database knows what ought to be there, so it can tell you what isn't: the node laid with no recovery, the shift with no handover, the day with no weather. In a spreadsheet a missing row looks exactly like a row that was never meant to exist. In a record, a gap is a finding.

The insight is in the whole set, not the summary. Keep all of it.

What a database gives you

None of this is new. Databases are older than most of the people who use them, and the basics have been settled for decades. In plain words:

Design: the bit worth doing properly

A database is only as good as the decisions behind it, and this is where projects go wrong. We say that from experience. Get the shape of the data wrong and everything built on top inherits the mistake. So the work starts on paper, not on a keyboard: what is each record, who owns it, what does it belong to, what must always be true about it.

Offshore, the good news is that most of it is the same shape. A sighting, a deck event, a stoppage, a node going overboard, a gun dropping out: each one is something happened, at a time, at a place, to something, according to someone. Store that shape once, properly, and each kind of event only has to add its own details on top. One shape, many uses. That is what lets the downtime from one job sit next to the downtime from another and actually be compared, which is exactly what the spreadsheets never allowed.

Room to grow

The old fear is that a database is rigid: decide everything up front and you're stuck with it. The reverse is true. Because every field is known, adding one is safe. A new kind of event, a new sensor, a new rule for a new client: each slots in beside the old ones without breaking a single report.

Remember the sheets still carrying columns for laser positioning kit nobody has fitted in years, kept in case column M matters? In a database you can see exactly what uses a field before you retire it. If nothing does, it goes. If something does, you know what. No barnacles. And when the categories need to change, a new type of incident or a new piece of kit, they can change, instead of being frozen by whoever built the drop-down list in 2009.

Still yours to play with

The last fear is the reasonable one: that a database means filing a ticket and waiting a month to add a column. It used to. It doesn't have to now.

You still get a grid when a grid is what you want. Filter it, sort it, chart it, export it to Excel and take it apart on a Tuesday afternoon. Drag a file in and it gets read. The difference is which way round it goes. The spreadsheet becomes a view of the record, not the record itself. Mess about with the view all you like; the record underneath stays right. Keep the scratch pad, just feed it from something that knows what it holds.

Bang for buck

So what are the options, honestly?

Cost to startTyped onceRefuses bad dataKeeps contextHistoryMany people at onceSurvives its author
The spreadsheetNothingNoNoIn your headNoCopies by emailNo
The shared online sheetNothingNoNoIn your headSomeYesNot really
The desktop database that came with the office suiteLittleMostlyYesYesNoBadlyRarely
No-code table appsMonthly, per seatMostlySomeSomeSomeYesWhile you pay
The big enterprise systemYears and a committeeYesYesYesYesYesYes, eventually
A small, well-designed databaseSome thinkingYesYesYesYesYesYes

The interesting row is the last one. The databases themselves cost nothing. The best of them are free, decades old, tested harder than almost any software on earth, and happy to run on a laptop, on the ship's network or in the cloud. They were never the expensive part. The expensive part was the design and the building: a programmer, a year, a specification and a beanbag. Now that gap has closed. The users become the creators.

Which is why the spreadsheet's one real advantage, that it costs nothing to start, has quietly gone. A well-made record costs a little thinking at the beginning and then pays for itself every time someone asks a question and gets an answer instead of a fortnight.

The three questions

Last time ended with three questions nobody could answer. Are we learning? Is this getting cheaper? Are we improving?

They can't be answered from a thousand sheets, each with its own Excel Del and its own column A. They can be answered from one record, where every reading carries its context, every event has the same shape and every job can sit next to the one before. Not because a database is clever. Because it made somebody decide, at the start, what the data actually was.

Chalk and cheese. Keep the chalk for the board. Build on the cheese, as long as the holes don't line up. Anyone who has sat through a safety induction knows that one. Stopping them lining up is what the record is for.

Standard Wavelength · Field notes · More field notes
True story

The year that never was

Ask a spreadsheet what day of the week 29 February 1900 was, and it will tell you. It shouldn't. 1900 wasn't a leap year.

The mistake began in Lotus 1-2-3, the king of the early 1980s. When Microsoft Excel arrived to dethrone it, it copied the mistake on purpose, so Lotus files would open with the same answers. Microsoft has kept it ever since, for the same reason.

So the most used spreadsheet on earth still believes, deliberately, in a day that never happened, and every date before March 1900 is a day out. Nobody minds, because nobody checks.

Source: Microsoft: Excel assumes 1900 is a leap year

True story

The genes that became dates

Human genes have short code names. One is MARCH1. Another is SEPT2. Type them into a spreadsheet and it helpfully turns them into 1 March and 2 September, and there's no undo: the gene is gone and a date sits in its place.

A 2016 study in Genome Biology looked through published research with gene lists attached and found the damage in about one paper in five. There was no simple way to switch the feature off.

So in 2020 the HUGO Gene Nomenclature Committee, which names human genes, gave up and renamed them. MARCH1 is now MARCHF1. SEPT2 is now SEPTIN2. Biology changed its vocabulary to suit a spreadsheet.

Source: Genome Biology, 2016 · The Verge, 2020

True story

Pounds and newtons

In September 1999 NASA's Mars Climate Orbiter reached Mars after nine months in space, and flew straight into the atmosphere.

Software from the builder, Lockheed Martin, gave the thruster pushes in pounds of force. NASA's navigators at the Jet Propulsion Laboratory read them as newtons, which are about four and a half times smaller. Nobody had written the unit down beside the number, so every small correction on the way out was wrong by the same factor, quietly adding up.

The probe came in far too low and was lost, along with a $327 million mission. The numbers were right. The context was missing.

Source: Mars Climate Orbiter

True story

The Gimli Glider

In July 1983 Air Canada Flight 143, a nearly new Boeing 767, was fuelled in Montreal with its fuel gauges out of action, so the crew worked the fuel out by hand. The 767 was one of the first in the fleet to be measured in kilograms. The sums were done in pounds.

A pound is less than half a kilo, so they took off with less than half the fuel they needed. Both engines stopped at 41,000 feet.

Captain Bob Pearson happened to be a keen glider pilot. First Officer Maurice Quintal happened to have been stationed at a disused air-force base nearby. They glided it onto the old runway at Gimli, Manitoba, which that day was hosting a family motor-racing event. Nobody was seriously hurt. The figure had been worked out, checked and accepted. Nothing said no.

Source: Gimli Glider

True story

Copy, paste, six billion

In 2012 JPMorgan Chase lost about six billion dollars on a trade, run by a London trader the markets nicknamed the London Whale, that its own risk model said was fine.

The bank's own investigation found the model ran through a chain of Excel spreadsheets, with figures copied and pasted from one to the next by hand. Somewhere along the chain a formula divided by a sum where it should have divided by an average, which made the risk look about half its real size.

Nothing recorded who had changed what, or when. The trade kept growing, because the number said it could.

Source: 2012 JPMorgan Chase trading loss

True story

Sixteen thousand off the bottom

In October 2020 Public Health England missed 15,841 positive Covid cases from its daily figures over about a week.

The results were pulled together in Excel's old .xls format, which has a hard limit of 65,536 rows. Each case took several rows, so each file filled up at around fourteen hundred cases, and everything after that simply wasn't there. No error, no warning.

The contacts of those people weren't traced for days. The first fix was to split the data into smaller spreadsheets.

Source: BBC News, 2020

True story

Five rows short

In 2010 the Harvard economists Carmen Reinhart and Kenneth Rogoff published a famous result: once a country's public debt passes 90% of its economy, growth falls off a cliff. Governments quoted it while cutting budgets.

In 2013 Thomas Herndon, a graduate student at the University of Massachusetts Amherst, was given the paper to reproduce as coursework and asked for their spreadsheet. The average at the heart of it stopped five rows short, leaving five countries out.

Put them back, with a couple of other fixes, and the cliff became a gentle slope. The authors owned up to the spreadsheet slip, though not to it changing their conclusion. Nothing on the screen had looked wrong. A sum over the wrong rows looks exactly like a sum over the right ones.

Source: Growth in a Time of Debt