Mach’s principle

  2023-07-02



The mystery of inertia

…inertia originates in a kind of interaction between bodies…

Albert Einstein, letter to Ernst Mach, Zurich, 25 June 1913

If you have ever tried to move a closet, you know how much sweat you must shed before the damn thing ends up where you want it to be. Physicists call this mysterious property of objects inertia More formally, inertia is the tendency of a body to stay at rest or continue moving in a straight line unless some force acts on the body. .

Believe it or not, physicists have no idea where inertia comes from. Sure, there is the first Newton’s law postulating inertia, but its source remains obscure.

Newton believed in absolute time and space. In his worldview, inertia is the resistance of bodies to forces accelerating them relative to the eternal cosmic frame of reference.

Ernst Mach, an Austrian physicist and philosopher, disagreed with Newton’s position. In his mind, all the interactions in nature, including the laws of motion and inertia, should be relative.

The difference between Newton’s and Mach’s views is subtle. According to Newton, if all objects in the universe simultaneously started spinning around some axis, we would immediately observe inertia as centrifugal force. In Mach’s view, we wouldn’t notice the rotation because the relative positions of bodies wouldn’t change.

In Mach’s universe, space is meaningless without matter. If only one body is flying in an empty universe, inertia disappears because no other objects are around to measure movement.

I first learned about Mach and his ideas from a controversial book by Alexander Unzicker:

Mach had also argued that a body’s inertial resistance to acceleration, and hence the concept of mass itself, should depend on the body’s motion relative to the rest of the universe. Even remote galaxies would influence the speed at which an apple falls from the tree!

Once that idea settled in my mind, I had an epiphany. It gave a form to my implicit intuitive knowledge about the world. I started seeing the principle’s consequences everywhere: in human relationships, project management, team dynamics, and software development.

Relations as inertia

…once you get up steam, you are carried helplessly along.

Attributed to Aleksandr Solzhenitsyn

Imagine you’re twenty-three, single and live in a rented apartment. A respectable company offers you a dream job on the other side of the globe. The compensation is so high you don’t feel comfortable saying the number out loud. Will you take the offer?

You take some time to contemplate the offer. The prospect of moving far away makes you feel scared, excited, and somewhat sad. You will miss your neighborhood and weekends with friends and parents. But the offer is too tempting to pass on.

But what if you got the offer when you’re forty, have three kids and a mortgage? The kids will have to abandon their plans, leave their friends behind, and learn a foreign language. The change is unlikely to affect them positively In Pixar’s Inside Out, teenage Riley starts losing her integrity after her parents move to San Francisco. . You’ll have to lose contact with your parents, in-laws, and the few good friends you and your partner still have. Furthermore, you’ll have to leave your family’s house and rent an apartment abroad. Is the offer still as attractive as it would be two decades ago?

Or you may find yourself caught up in a dysfunctional relationship. You feel lonely and depressed, yet you can’t find the strength to quit. You still get some scraps of affection from your partner, a shared household is somewhat convenient, and you don’t want to decide what to do with Charlie, your Labrador.

Relationships are the source of inertia in our lives. These include your loved ones, friends, community, church, and places you enjoy visiting. Relationships make our lives worth living, but they also resist drastic changes.

Inertia in software

Complexity is caused by two things: dependencies and obscurity.

Changing software is hard. Ask a programmer to add an innocent looking feature and watch them throw up their hands. They might even tell you it would be easier to write a new program than to change the existing one.

Programmers often call a hard-to-change program spaghetti code, Big Ball of Mud, or tangled mess. Notice anything unusual about these names? They all indicate intricate and unexpected relations among the program components.

Programmer’s folklore teaches us that explicit is better than implicit, the coupling should be low, global variables are bad, and code should be easy to delete. In other words, software component’s inertia and complexity come not only from component’s absolute size, but also from the number and nature of its relations to other components.

That’s what Mach’s principle predicts if we apply it to software engineering: the more connections a piece of software has, the harder we must work to change it.

Consider a lonely program nobody uses. It has no inertia, no matter how much code it contains. Such a program is analogous to a sole body in an empty Machian universe.

Similarly, we can often remove unused functions without affecting the program’s meaning Unless we write in C and trigger undefined behavior, of course. See Debugging Optimized Code May Not Make Any Sense in What Every C Programmer Should Know About Undefined Behavior #2/3. . However, the more callers a function has, the harder it is to change anything about it.

Interestingly, we can see regression testing as a way to increase software’s inertia. The ultimate goal of such tests is to make destructive changes harder to make. Unfortunately, tests often turn into change detectors, making any change unnecessarily complicated.

The default Git branch renaming is one of my favorite examples of inertia in software. The idea behind the change is trivial; it would take Linus about a minute to change the default branch name from master to main back in 2005. Fifteen years later, the sheer amount of existing software and data referring to the old branch name makes a complete migration practically infeasible.

Conclusion

We are ready to formulate Mach’s principle in its general form after seeing how it applies to physics, software, and life.

Resistance to change is proportional to the strength of affected relations.

We can draw a few practical implications from this principle.

Firstly, we must account for hidden relations when we estimate project costs. The approach most people employ is to base estimates solely on the change to be done. It seems reasonable and rational, but it doesn’t work. Any change worth doing is trapped in a web of dependencies hidden from an unsuspecting observer; even minor changes might require herculean efforts. The best predictor of project completion time is the time it took to complete similar projects in the past.

Secondly, we can achieve goals faster by reducing dependencies. Minimizing the number of teams involved in a project can drastically reduce the lead time. Fred Brooks observed similar dynamics while managing a large team at IBM: Adding more people to a project running late tends to increase its inertia, further delaying the delivery.

Lastly, we must address bad decisions before they get tangled in dependencies. We want to fix our mistakes quickly before others rely on them. The tighter the feedback loop, the cheaper our mistakes become. Tinkering, experimentation, and incremental delivery almost always trump theorizing and planning.

Was Mach right in the physics domain? We don’t know. Mach never formulated a theory that would allow us to test his ideas experimentally Other physicists tried turning Mach’s ideas into tangible theories. The relativity of motion became the cornerstone of Einstein’s special theory of relativity. D. W. Sciama’s book The Unity of Universe provides an excellent overview of Mach’s principle (see pages 98–105). R. H. Dicke and C. H. Brans developed a gravitational theory featuring Machian inertia. . Despite all the progress in theoretical physics, inertia seems just as puzzling to modern physicists as it was to Newton. There is no consensus on whether Mach’s principle is the right piece in this puzzle, but its connection to everyday experience makes it compelling nevertheless.