Why don’t physicists write human-readable formulas, like developers do?

For example, energy = mass * speed_of_light ** 2 instead of E = mc²

The problem in your question is bias: you’ve decided that a particular practice that programmers use, namely, the plain-english naming of variables in a program to improve human readability, should be done everywhere. To illustrate it, you’ve taken a particular equation, a very simple and apparently straightforward one that appears to increase its readability. This is a classic error of logic, called the “straw man” fallacy. It’s a straw man, because you’ve confused the work of what developers do with the work of what people in other fields of study do.

Take, as an example, the following equation, the Einstein Field Equations:

image from Einstein field equations — Wikipedia

Now, following the logic that you’ve laid out, write the same thing in human readable form. You’re going to need a bit of time, because in order to do so, you’re probably going to have to write what amounts to a graduate-level physics textbook, page after page, with absolutely no pictures. What a formula does, written in the format that it is given, is replace a representation using the 26 alphanumeric characters with a much broader set of possible images with positional orientation, use of non-Roman characters including greek letters, signs and symbols, etc., to convey quickly the meaning of what is being communicated in a form that is readily practiced and interpreted by other physicists.


You may have heard the phrase, “a picture is worth a thousand words”- aren’t there a handful of situations where you, as a programmer, would be wasting less time by drawing a UML state diagram rather than its equivalent in some longhand plain english? Then you understand why a program, written out in plain-english entirely alphanumeric form, is not always the easiest or quickest way to document or communicate to another programmer the elementary components of what a fairly complicated program might be hoping to accomplish.

Every field involved “jargon”- just look at the mess that it takes in UML to make “that caps-lock thing”. You’re just going to say “caps lock” as a bit of jargon that means all the ways that a becomes A, b becomes B, and yet somehow, 1 doesn’t become !. Sometimes, that jargon is most simply replaced with a single english word like “capslock”, and sometimes, it’s more easily symbolized, say with ___ or ^_^ or some other picture that isn’t going to linearize smoothly into an alphanumeric string. Even emoji is a poor substitute for actual non-symbolic nuance: who knows if I’m being genuinely nice, or obnoxiously snarky, if I use :) ?

Where it is “the quickest way” is when you want to jam something like that into an existing finite state machine, namely, a computer. A computer has evolved from something that is only capable of taking input in the form of “ones” and “zeroes” into a more “human readable” form via the intermediary of a compiler. There, you now have a double-translation: the finite state machine points to a specific series of bytes somewhere in memory, pushes and pops bits into stacks, and then turns around and re-translates it back into pseudo human readable form to say “error- failure_to_initialize in variable speed_of_light” when dealing back and forth with that finite state machine.

There’s a reason that physicists don’t say “the_ricci_curvature_tensor_sub_mu_sub_nu” for the first term of the equation, in that “the Ricci curvature tensor” isn’t a variable in the sense that programmers might use the term. For a programmer to express the Ricci curvature tensor in any of the to 20 or so programming languages currently in popular use, they will likely need to write an entire program (or draw on extensive sections of a specialized function library) in a way that is not a straightforward as writing the equation E=mc².

Scientists don’t routinely engage in the act of entering programs into computers in pure alphanumeric form. (Actually, these days, most do, it’s just not what they “do for a living”, and maybe you resent the fact that they too can talk directly with those state machines without all the rules and biases of your finite state machine priesthood.) They aren’t interested in the final answer, a “10 print speed_of_light” operation that has a single, absolute answer at the end of the day. In order to perform the acts that they do on a daily basis, they engage in a series of symbolic operations that aren’t neatly linearized into alphanumeric “plain english”. This is why the overwhelming majority of scientists don’t use a simple keyboard typewriter to write out their equations, they do so with either chalk and chalkboard, or if they are professionally typesetting their equations to talk to other physicists, a specialized editor such as LaTeX. Or, they use a mathematical engine like Mathematica or R or one of the many other specialized programming tools that mathematicians, scientists, and engineers use without going through the act of “writing a program”. You’ve got to admit, Eclipse for anything other than that specific thing you do writing in the major programming languages is a rather shitty IDE. Imagine if you forced graphic designers into Eclipse every time they wanted to edit a photo or draw a logo?

Yo’ve also misunderstood the role that a function like E=mc² plays in the day to day work of physicists and other scientists. As a practical matter, no physicist routinely says “gee, I have a bit of mass here, what would that be like in energy?” the way a programmer might say, “gee I’m trying to collect a sum of how many pixels I need to move this sprite from location_of_object_one to location_of_object_two on a screen”. When a physicist talks about the meaning of E=mc², they are talking about the inherent interchangability of mass and energy units of measure, and as a result, they talk about them as if they are the same thing. For example, just as one might say “i have two or three grams of sugar” a physicist might refer to mass as being measured in electron-volts or kilojoules or some other derived term.

This leads to another inherent blindness within computer programming: when you use a variable name like speed_of_light you assume that such a thing has a distinct (and binary-numeric-representable) form. For a physicist though, that might be 1 (if using Planck units) but when you naively wrote that out, you didn’t have any way of saying whether speed of light was in Planck units or meters_per_second or kilofurlongs_per_fortnight or aardvarks or any other unit of measure. So in the process of writing it in a form that is non-traditional (but apparently more “human readable” to your programmer eyes) you are actually making things worse for the hundreds of thousands of non-programmers who know that E is not a variable, it is an abstract representation for an entire class of things. You have forced it, in programmer-speak, into being a variable when no physicist actually ever deals with “energy” as a number or in numeric form. They intend it in symbolic form: E means energy but it also might mean mass or momentum or potential or voltage or hundreds of thousands of other things that have entirely different plain english words to call them out.

Furthermore, you talk about E=mc² like it’s something that anyone uses. In reality, while it is famous, it isn’t useful- in fact it’s the derivation of this simple form that shows all of the actual useful symbolic “stuff” behind Special Relativity, and in fact, it is not a “law” so much as a result derived from other laws. If you’re going to write out the fundamental “thing” behind Special Relativity, you’d write out the equation at the top of the page, not E=mc². For a fuller explanation of the kind of thing you’re getting yourself into when you start talking about having to write out speed_of_light_squared, I point you at one of the numerous blog posts that show the actual derivation of E=mc², say Terence Tao’s “Einstein’s derivation of E=mc²”:

image: from Einstein’s derivation of E=mc²

If you were to write a line of a computer program in the form that Einstein actually intended, you might have to write

mass_of_object = mass_of_object — energy_of_photon / speed_of_light ** 2

And there’s yet another complication in “programmer-speak”- when a physicist writes equations, they are talking about a symbolic equivalence, whereas when a programmer writes an equation, they are talking about the time-evolving state of a state machine: the value of mass_of_object before the action of the line written and after the line written are two different values. That’s why Einstein didn’t write m = m — e/c²: he’s not trying to force the language into one that can be understood by a discrete and finite state machine. He’s saying that all the things on the right hand side of the equals sign are essentially the same thing, under his assumptions and theorems, as the things on the left hand side of the equation, for all time forever.

For you, as a programmer, you might be comfortable only dealing with absolute tangibles, ones that never blue-screen, ones that are always completely expressible in a finite state-machine. Except, while the laws of physics might one day be fully expressible and not “syntax error” your finite state machine, you have to begin to become more comfortable with the fact that your “plain english” programmer-speak isn’t a fully robust and “complete” way to express all of the things that humans want to express.

Let’s go back, briefly, to the Ricci curvature tensor. You might see this written in some textbooks as (in your “plain english”) Ricci_curvature_tensor_sub_mu_sub_nu or you might see it written Ricci_curvature_tensor_sub_i_sub_j. Immediately, you’re going to recognize that the simple replacement of english words for the subscript parameters isn’t sufficient or good programming practice- for example, both “i” and “j” are ways that some engineers or mathematicians might write square_root_of_negative_one, except (hopefully obviously) you “know” we don’t mean that when talking about i or j here. So what’s the plain-english representation you should be using here for the “meaning” of mu or nu? In fact, these are two vector fields, abstract collections of an infinite number of points in ordinary four-dimensional space each of which has a “curvature”, a vector pointing at another of the points in that four-dimensional space.

So let’s give that a whack: “Ricci_curvature_tensor_over_the_interaction_of_the_set_of_all_conditions_related_to_the_first_location_in_spacetime_and_the_second_location_in_spacetime”.

Is that really more useful or plain-english readable than three symbolic identities capital_R_sub_mu_sub_nu? You’re losing the utility of “plain english” by attempting to write a rule, saying “all things should be done clearly and in plain english like developers do” without understanding first the reasons and contexts why things are done or not done that way- that’s why you’re engaging in bias, in a cultural insensitivity.

There are certainly more compact forms of expressing things symbolically that aren’t expressible in the first 255 ascii-characters: it’s much easier to draw than write four_sided_equilateral_parallelogram, and that doesn’t even involve infinities, infintesimals, symbolic tensor calculus, or any of the complexities and nuances of the calculation at the top of this answer.

So why you hating? Embrace the symbolism in E=mc². And don’t even get me started on a freakout about the camel casing controversies in physics or spaces versus tabs.

Further reading: Physics Has Demoted Mass- Modern physics has taught us that mass is not an intrinsic property.

Question originally answered on Quora: https://www.quora.com/Why-dont-physicists-write-human-readable-formulas-like-developers-do-For-example-energy-mass-%2A-speed_of_light-2-instead-of-E-mc-2/answer/Matt-Harbowy?srid=hoC6

matt harbowy is a scientist, activist, and data management expert. He is one of the founders of the non-profit Counter Culture Labs, working to bring fairness and egalitarian ideals to people interested in learning about science and biotechnology. He is also a top writer on the question and answer site, Quora.




no job too dirty for the f*%&ing scientists. --Burroughs

Love podcasts or audiobooks? Learn on the go with our new app.

Automatic local domains: Setting up dnsmasq for macOS High Sierra to Big Sur using Homebrew

How to make your own Retro Console with a Raspberry Pi

5 Minute DevOps: Continuous Delivery FAQ

UPFI Network Testnet on Near Protocol

Run as Administrator — Windows 7 Lock Screen Changer


Blog 7 CS373 Fall 2021

Evasive VBA — Advanced Maldoc Techniques

FORESIGHT(2022): Placement at AlphaGrep| Satyam Sharma

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
matt harbowy

matt harbowy

no job too dirty for the f*%&ing scientists. --Burroughs

More from Medium

The Software Fem-gineer

The issues with Marriage Culture within Desi Muslims

What are Cap Rates?

Introduction to Dynamic Programming on Grids: