Back To Schedule

Developing Better Code by Isolating Decisions

11:00 - 12:30 Tuesday 30th April 2024 MT Bethe Hall
API Design

Among the hallmarks of quality software are readability, extensibility, maintainability, and testability. Some of the most widely known guidelines for achieving these are the SOLID principles, but applying the Single Responsibility Principle and Open-Closed Principle can often be challenging in practice. In this presentation, I will share a technique my team is trialing, which attempts to simplify the process: Decision-Making Isolation (DMI).

The basis of DMI is employing a set of simple heuristics to separate the core logic of the software into small, decoupled C++ entities (classes/structs/functions). The remaining code is "wiring," which is typically easy to read and exempt from unit testing. The application of DMI leads to code that facilitates fewer unit tests with more value and avoids some of the common pitfalls of unit testing--coupling, brittleness, and high reliance on test doubles. After presenting the concepts of DMI, we will go through some examples of applying them and discuss the resulting code and unit tests.

View Slides

Michael Okyen

Michael is a Staff Software Engineer at Plexus in Raleigh, NC, where he primarily focuses on developing embedded software for medical devices. Over a decade of experience at contract engineering companies has given him opportunities to work on a variety of projects ranging from green-field design to final verification testing. Michael is passionate about software design, architecture, and unit testing, and he is always looking for opportunities to learn.