---
title: "Discussion on \"Open-Closed Principle: The Hard Parts\" | Hashnode"
description: "Discussion on \"Open-Closed Principle: The Hard Parts\". The Open-Closed Principle is the second principle of SOLID. Let's know what OCP is, its limitations, and how can we follow it correctly"
url: "https://hashnode.com/posts/open-closed-principle-the-hard-parts/633559e4ca459a43ece9df23"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Open-Closed Principle: The Hard Parts](https://mayallo.hashnode.dev/open-closed-principle-the-hard-parts?utm_source=hashnode&utm_medium=feed)

The Open-Closed Principle is the second principle of SOLID. Let's know what OCP is, its limitations, and how can we follow it correctly

Sep 29, 2022 · 14 min read · mayallo.hashnode.dev  
Updated Apr 18, 2023  
Read the article

-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#solid-principles](https://hashnode.com/tag/solid-principles)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#developer](https://hashnode.com/tag/developer)

## Written by

[Mohamed Mayallo](https://hashnode.com/@mayallo)

@mayallo

  
[View profile](https://hashnode.com/@mayallo)

Self-taught Software Engineer

I'm a Software Engineer Passionate about Clean Code, Design Patterns, and System Design. Learning something new every day. Feel free to say Hi on LinkedIn at https://www.linkedin.com/in/mayallo

## Responses 2

Markdown supported · ⌘↵ to post

[Kishan Galgotra](https://hashnode.com/@Evolutsoft)

[Oct 1, 2022](https://hashnode.com/posts/open-closed-principle-the-hard-parts/633559e4ca459a43ece9df23/comment/633856fdfa20fa4bc8e57632)

I found it quite interesting, how it explain the ways to maintain the code standard.

[Mohamed Mayallo](https://hashnode.com/@mayallo)

[Oct 1, 2022](https://hashnode.com/posts/open-closed-principle-the-hard-parts/633559e4ca459a43ece9df23/comment/633856fdfa20fa4bc8e57632#reply-6338c814e594fa4ba3b908c8)

Thanks [Kishan Galgotra](https://hashnode.com/@Evolutsoft)

[Sanjay Rajesh](https://hashnode.com/@sanjayrjs)

[Sep 30, 2022](https://hashnode.com/posts/open-closed-principle-the-hard-parts/633559e4ca459a43ece9df23/comment/63373664fa20fa4bc8e562de)

Amazing article! Love your style of writing, learned a lot. 👏

[Mohamed Mayallo](https://hashnode.com/@mayallo)

[Sep 30, 2022](https://hashnode.com/posts/open-closed-principle-the-hard-parts/633559e4ca459a43ece9df23/comment/63373664fa20fa4bc8e562de#reply-63375b93e594fa4ba3b8f044)

I am so pleased to hear that. Thank you so much 🙏
