22 min listen
163. SOLID - Open-Closed Principle
163. SOLID - Open-Closed Principle
ratings:
Length:
14 minutes
Released:
Jul 8, 2020
Format:
Podcast episode
Description
As part two of our series that explores the SOLID software design principles, this episode dives straight into the topic of the open-closed principle — that’s the ‘O’ of SOLID for those who are counting. As a software principle created in 1988, back in the days of C++, the essence of this principle states that you should create code that’s “open for extension but closed for modification.” Using the example of needing to create a calculator that measures the areas of rectangles, we talk about how the open-closed principle makes it easier to create an extension to your area calculator if you suddenly need to calculate the area of a circle. While this principle makes it easier for developers to add features to your software, we discuss how needing to perform “shotgun surgery” on your code may be a sign that you haven’t adhered to the open-closed principle. For a real-world example, we share how we’ve implemented the open-closed principle into an intranet project that we’re developing. Near the end of the episode, we talk about how following the open-closed principle helps ensure that you’re following the other SOLID principles. Listen to this episode and learn how important the open-closed principle is to writing good code.
Released:
Jul 8, 2020
Format:
Podcast episode
Titles in the series (100)
10. Books: In this episode of the Rabbit Hole podcast, we talk about software development books and literature. We talk about tow of our favorites in some detail, but also discuss the concepts of software development books more broadly (in the sense of what they... by The Rabbit Hole: The Definitive Developer's Podcast