- Published on
TCWOTD: Mechanical Sympathy
- Authors
- Name
- Teddy Xinyuan Chen
https://www.google.com/search?q=mechanical+sympathy
Mechanical sympathy is when you use a tool or system with an understanding of how it operates best. You don't have to be an engineer to be be a racing driver, but you do have to have Mechanical Sympathy.
- Jackie Stewart, racing driver.
Where I First Encounter this Term
In this book by Teiva Harsanyi, where the author talks about gaining a deeper understanding (sympathy) to optimize Go code.
https://github.com/teivah/100-go-mistakes
https://livebook.manning.com/book/100-go-mistakes-and-how-to-avoid-them/chapter-12/9
12.1 #91: Not understanding CPU caches Mechanical sympathy is a term coined by Jackie Stewart, a three-time F1 world champion:
You don’t have to be an engineer to be a racing driver, but you do have to have mechanical sympathy.
In a nutshell, when we understand how a system is designed to be used, be it an F1 car, an airplane, or a computer, we can align with the design to gain optimal performance. Throughout this section, we discuss concrete examples where a mechanical sympathy for how CPU caches work can help us optimize Go applications.
we can easily be fooled by our gut feeling if we lack mechanical sympathy—in this case, for how CPUs cache data.
This understanding comes from the fact that we don’t consider a machine a black box; instead, we try to have mechanical sympathy with underlying levels.
This example demonstrated how mechanical sympathy can help us optimize a Go application.
All these quotes are from Teiva Harsanyi's book.
My Thoughts
This is one of the terms that once you know it, you'll find your chance to use it. I love how the idea gets captured by a simple yet beautiful term.