The Importance of Mechanical Sympathy

The Importance Of Mechanical Sympathy

Meet the Team Cognira Series

We’ve all heard the saying coined by Francis Bacon, ‘knowledge is power.’ But is that saying actually true? As Eric Thomas brilliantly puts it, “Knowledge isn’t power, applied knowledge is power.” When we have the opportunity to not only grasp a concept but also apply it to the work we do, efficiency and innovation is born.

In our fifth installment of the Meet the Team series, Greg Brooks, VP of Software Engineering at Cognira, shares the importance of mechanical sympathy, and how it should be integrated into any company.

Meet Greg

Greg Brooks’ passion for software engineering started early in high school where he learned to build computers from scratch, and developed arcade games and educational programs (which were produced professionally)! This experience alone taught Greg that he needed to code at the most efficient level in order to produce something that is not only usable but valuable.

With this impressive skill set under his belt, Greg went on to pursue a degree in computer engineering at the University of Waterloo in Ontario, Canada. During one of his work terms at Microsoft, he constructed a real-time 3D graphics demo that landed on the front page of InfoWorld and PC Week for a pre-release of OS/2. This demo was made possible by an efficient implementation of floating point functions for commonly available integer-only CPUs (A stellar example of mechanical sympathy).

Since graduating from university, Greg has been involved in many different corporations. Some of his most successful opportunities include working for Retek, where he helped develop the Retail Predictive Application Server (RPAS) platform, a platform still used and sold by Oracle today. After the acquisition of Retek, Greg continued to pursue the startup life with Mark Bloemeke, and became co-founder and lead software engineer at LogicBlox. He later went on to work at Cisco as team lead and senior software engineer. However, Greg longed for the opportunity to build something up from the ground, which ultimately led him to Cognira as VP of Software Engineering.

What is Mechanical Sympathy?

Before we dive into the importance of mechanical sympathy, we first have to understand what it means. The term was coined by Jackie Stewart, a British racing driver, where he states, “You don’t have to be an engineer to be a racing driver, but you do have to have Mechanical Sympathy.” Essentially, you need to understand enough about how a car works in order to tap into its true capabilities and understand its limitations. This simple, yet exceptional concept can be applied to anything…especially software engineering.
Jackie Stewart

Mechanical Sympathy Within Software Engineering

When building a system, it is important to understand enough about how the underlying system works in order to make more calculated decisions. The key phrase to note is ‘enough’. It is not about being a hardware or software component expert, but understanding when to look deeper into a problem, to create a more scalable and effective solution.

Memory hierarchy of modern computer architecture:

Cache memory is on chip with the central processing unit (CPU), and is incredibly fast. Random-access memory (RAM) is about 100 times slower, and persistent storage (eg. SSD and HDD) is a hundred-thousand to a million times slower. Also, a solid-state drive (SSD) is faster to read than write, and much slower to erase. Armed with an understanding of the memory hierarchy and its implications, software engineers can make wise choices that affect the efficiency of their software designs.

Synchronous and asynchronous messaging:

Communication overhead (eg. network latency) in sending and receiving individual messages often result in engineers applying a technique of batching multiple messages together to reduce the cost of this overhead. However, a more effective and efficient way is to have the system communicate asynchronously.

Related to this, it is important to understand messaging formats and the costs and benefits of various text and binary serialization methods.

Caching techniques:

Depending on performance constraints of a system and opportunities to maintain and serve commonly accessed data, an in-memory cache can help tremendously. However, engineers must grapple with complexities of cache coherency and synchronization with remote sources of data.

Implications of chosen software libraries and platforms:

Consider a data processing engine such as Apache Spark. It provides powerful high-level abstractions for processing data at large scale in a resilient manner. When it works well, it is a pleasure to use. However, it can be difficult to master and tune without an appreciation of some of the inner workings, such as the shuffle operation and partitioning, memory caching behaviors, columnar data organization, or the cost of embedded custom code.

Applying Mechanical Sympathy

It may seem like a no-brainer for an engineering team to apply mechanical sympathy. However, many do not due to the complexity of modern computer hardware and the software abstractions built upon it. Today, computer hardware is so fast that it can be difficult to comprehend the nuances. However, by not investing in the underlying knowledge of computer hardware and software abstractions, many systems have inefficiencies that greatly impact the overall performance and usability.

Here are a few tips on how to apply mechanical sympathy within software engineering:

  • Have a good grasp of the fundamentals. A new software engineer doesn’t need to immediately know the ins and outs of the solution they are building. However, it is important to come armed with knowledge of techniques and patterns, with an understanding of when hardware or software abstractions work well (or when they don’t).
  • Keep up with the changes. As technology continues to grow and evolve, it is crucial for engineers to spend time and energy learning about which techniques are still relevant and what new techniques are more advantageous.
Cognira Logo White

About Cognira

About Cognira

Cognira is the leading artificial intelligence solutions provider for retailers. Cognira is passionate about helping retailers unlock valuable, transformative business insights from their data.

We know retail. We love data.

To learn more, check out our website at cognira.com or contact us today to get started. 

Subscribe To Our Newsletter

Get the latest updates about retail technology

Share This Post

+ More To Explore

No more posts to show