Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Software Design

API Error Messages for a GOOD Developer Experience

Debugging and troubleshooting are a big part of a developer’s day-to-day. Because of this, when designing your APIs, provide good API error messages as well as guide developers down a path of success and makes it easier for them to understand issues when they need to troubleshoot. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Meaningful Error Messages When designing an API, it’s important to consider the experience of the developers who will consume it. A well-structured error message can serve as a guiding light, illuminating… Read More »API Error Messages for a GOOD Developer Experience

Enums aren’t evil. Conditional statements everywhere are

Are you seeing the same conditional statements (if/switch) against enums littered everywhere? There are different ways of handling that, but a lot of it comes down to your context. Conditionals around type checking, extension methods, Inheritance, and Polymorphism are all options. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Enums The original examples of this problem come from a video by Nick Cosentino, which he tagged me in. The gist is that there are a lot of conditional, in this case “if statements,” throughout a codebase… Read More »Enums aren’t evil. Conditional statements everywhere are

Locking In On Concurrency Control

Concurrency in a multi-user collaborative environment can be challenging. However, understanding the use case is crucial in picking a solution for handling concurrency. Let’s dive into different solutions for concurrency control in various situations. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Last Write Wins The first strategy is that there is no strategy. That might sound odd, but not all situations require concurrency controls. “Last write wins” means whatever the client writes to the database will succeed. If you’re using a relational database, this means… Read More »Locking In On Concurrency Control