Category: Software Design

FizzBuzz In Too Much Detail

— Category: Software Design

I know. FizzBuzz has been done to death. But I want to use it as a familiar base upon which we can explore some of the common tradeoffs involved in writing and maintaining software. In this article, I'll show multiple implementations of FizzBuzz, all designed to achieve different goals, and discuss the implications of each.

Resource Acquisition is Initialisation (RAII) Explained

— Category: Software Design

In the competition to make the worst acronym, RAII probably comes second after HATEOS. Nevertheless, it is an important concept because it allows you to write safer code in C++ — a harsh, unforgiving language that is all too happy to help you shoot yourself in the foot.

This article will explain exception-safety and common pitfalls in C++. As we work out how to avoid these problems, we will accidentally discover RAII. Then, we will finish by defining exactly was RAII is, and where it is already being used.

SOLID Class Design: The Dependency Inversion Principle

— Category: Software Design

This is part four of a five part series about SOLID class design principles by Robert C. Martin. The SOLID principles focus on achieving code that is maintainable, robust, and reusable. In this post, I will discuss the Dependency Inversion Principle.

The Dependency Inversion Principle (DIP): High level modules should not depend upon low level modules. Both should depend upon abstractions.

SOLID Class Design: The Liskov Substitution Principle

— Category: Software Design

This is part three of a five part series about SOLID class design principles by Robert C. Martin. The SOLID principles focus on achieving code that is maintainable, robust, and reusable. In this post, I will discuss the Liskov Substitution Principle.

The Liskov Substitution Principle (LSP): functions that use pointers to base classes must be able to use objects of derived classes without knowing it.

Model View Controller Explained

— Category: Software Design

Model view controller (MVC) is a very useful and popular design pattern. If you're writing software, you should know it. Unfortunately it's also one of the hardest to truly understand. In this article I will provide what I think is the simplest explanation of MVC, and why you should use it.