To Face the Dinner Rush, Keep Your Code Clean

An organized station begets a proper workflow. At tech companies, clean code frees up engineering teams to handle shifting goals and pressing changes.

Written by Anderson Chen
Published on Nov. 21, 2022
Brand Studio Logo

The kitchen is a battlefield. 

As the clock strikes six, dinner guests pour into the restaurant, inundating the cramped hostess stand. The exhausted line cook, whose consciousness is taped together by three hours of sleep and pure caffeine, surveys the chaos before him — billowing steam, clanging pots, splashes of oil, the roared orders of the chef amid leaping flames — and prepares to face the night’s onslaught, as well as the ticket machine sputtering out orders. 

It’s just another Friday evening, one in which a million factors could reasonably derail the dinner shift. But in this unpredictable culinary maelstrom lies an oasis of control: The restaurant’s mise en place, or pre-cook setup, in which a clean station ensures proper organization of ingredients and a clear mindset for fast-paced environments.

Mise en place’s broader meaning has been used in industries beyond the chef’s table — including technology. For instance, software engineers at dynamic tech companies often face trials by fire that necessitate clean, well-functioning code and processes that reflect such best practices. 

“Though these are standard across the industry, they are still worth mentioning as they provide a foundation to further build your standard of quality,” said Jonathan Black, software architect at Sysco LABS. Much like in a professional kitchen, having an immaculate baseline can mean the difference between a normal day and catastrophic failure. 

While clean code enables engineering teams to work quickly and interchangeably, it is also not the crux of their mission. For Site Reliability Engineer Ryan Hendricks of Unit 410, focusing too much on the code itself can blur the bigger picture. “Always remember that perfect is the enemy of good, and use automations or tools where possible to reduce developer burden.”

For a closer look at the tech-based mise en place that empowers engineers to tackle broad and collaborative problems at their companies, Built In Austin sat down with leaders at Sysco LABS and Unit 410 to see how they’re able to navigate the proverbial Friday dinner rush. 

 

photo of Sysco LABS' kitchen area with stocked fridge, chairs and dining tables
Sysco LABS

 

Image of Jonathan Black
Jonathan Black
Software Architect • Sysco LABS

 

Sysco LABS is a tech division within Sysco focused on foodservice innovation. Food distribution is a key part of the foodservice ecosystem worldwide, and the company wants to reimagine the ecosystem with data-driven insights, as well as customer and market intelligence. When it comes to clean code, the engineering team takes on the same innovative mindset to stay on the cutting edge. “When you are given the time to engineer a solution properly, strive to put the system in a better place than when you started,” advised Jonathan Black, software architect.    

 

When it comes to writing clean code, what are some best practices you follow, and why?

I’d be remiss if I didn’t mention the seminal Clean Code by Robert C. Martin up front, and a related quote: “The purpose of a good architecture is to delay decisions. Why? Because when you delay a decision, you have more information when it comes time to make it.”

I regularly cite the principle of least astonishment. Write code to be read by other engineers, and not just your compiler. Even when you have a clever implementation for something, maybe save it for the The International Obfuscated C Code Contest if it means requiring a few paragraphs of comments to explain it.

I also build to the interface, and not to a concrete implementation. At the code level this helps with decoupling, law of demeter and Dependency Injection. At an architectural level, this means designing your services in the style of Hexagonal or Clean Architecture.

It helps to have a mature approach to testing as well. A quick look through your test suite should give a new engineer a good grasp of what the code base is meant to do, and can double as a documentation of requirements when done well.
 

On the other hand, what are some bad coding habits that you wish every developer would stop doing, and why? 

Don’t be so quiet when it comes to decisions you don’t agree with. Amazon includes this in their leadership principles as “Have backbone; disagree and commit.” Decisions that affect your code and the way you write it should be able to withstand some scrutiny, and if done early enough can also save your organization time and money.

Also, stop making the easy change to fix a bug without thinking about the larger design. Or as Kent Beck puts it: “For each desired change, make the change easy, then make the easy change.” Sometimes you have to get a quick win, or maybe you have an incident that you need to resolve — this advice is not for those moments. When you are given the time to engineer a solution properly, strive to put the system in a better place than when you started.

Stop making the easy change to fix a bug without thinking about the larger design.”

 

How does your team make clean code a priority? What are the benefits of this approach to software development?

Sysco LABS aligns well with best practices here: unit tests to certify locally and on the build server how your changes have affected the code base, integrated linting for maintaining a good baseline level of code quality and a review process. Though these are standard across the industry, they are still worth mentioning as they provide a foundation to further build your standard of quality.

Something that Sysco does that I don’t see as often is a focus on professional development for upskilling on new tools and technologies when they are onboarded into the system. Some teams have even introduced knowledge sharing sessions to show off new things they have learned or brought back from conferences.

I believe this helps drive a collaborative, outcomes focused culture where we can learn from each other, the industry and our own system to help define the future of foodservice and supply chain.

 

 

group photo of Unit 410 employees with most wearing white cowboy hats
Unit 410

 

Image of Ryan Hendricks
Ryan Hendricks
Site Reliability Engineer • Unit 410

 

Unit 410 is a cryptocurrency company that builds staking systems for clients to store their digital assets. Aside from infrastructure, the team of engineers also provides tech consulting and administrative services to facilitate users’ participation in blockchains. As with any product that deals with client funds, due diligence is important. “We make clean code a priority mainly through code reviews and automated testing pipelines whenever new code is added or existing code is changed,” said Site Reliability Engineer Ryan Hendricks. 

 

When it comes to writing clean code, what are some best practices you follow, and why?

Always remember that perfect is the enemy of good, and use automations or tools where possible to reduce developer burden. Our business model requires that we move quickly, but many of our projects also need to meet a high standard in terms of safety and quality since any bugs, in the worst case, can lead to irreversible loss of client funds.

 

On the other hand, what are some bad coding habits that you wish every developer would stop doing, and why? 

Unnecessary code changes or churn. Time spent making code perfect that was already deemed good enough is time that might be better spent elsewhere.

Always remember that perfect is the enemy of good, and use automations or tools where possible to reduce developer burden.”

 

How does your team make clean code a priority? What are the benefits of this approach to software development?

Good judgment is one of the criteria for just about any engineer we hire. The ability to determine whether code under review influences critical aspects of our business or is more along the lines of toil is important. This allows us to prioritize clean code in our critical systems over clean code in every system. Maintaining this balance helps us maintain the ability to support bleeding edge networks in a safe and secure manner

 

Responses have been edited for length and clarity. Images provided by Shutterstock and companies.