Refactoring and Open / Closed principle
I have recently being reading a web site about clean code development (I do not put a link here because it is not in English).
LSP vs OCP / Liskov Substitution VS Open Close
I am trying to understand the SOLID principles of OOP and I’ve come to the conclusion that LSP and OCP have some similarities (if not to say more).
Clean Architecture: Why are the request (input)/response(output) data structures not consider dependencies of the interface?
In Uncle Bob’s Clean Architecture, he provides the following diagram:
Clean Architecture: Why are the request (input)/response(output) data structures not consider dependencies of the interface?
In Uncle Bob’s Clean Architecture, he provides the following diagram:
Does this factory method pattern example violate the OCP?
In Head-First Design Patterns, they use a pizza shop example to demonstrate the factory method pattern.
Is updating a macro value in the Xcode preprocessor’s macros violating the open–closed principle?
For example, for some Xcode projects, if I have some places that defines a number at some .cpp files:
Trade-offs between applying the open-closed principle and type safety
There’s lots of questions about the open-closed principle here, but none that I found satisfied this particular problem. At $job
, I’m teaching my team Rust, but I believe the nature of this question extends beyond Rust. We have a training problem that we use to kick the tires on new ideas, because we can all imagine a few canonical solutions to it. One small aspect of this problem is that an embedded target needs to communicate with a host PC over a serial port. Naturally, I used Rust’s famous enums to describe the protocol (domain terms have been erased from the example):
Understanding Bob Martin’s Closed For Modification Explanation
“Closed for modification.” Extending the behavior of a module does not
result in changes to the source or binary code of the module. The
binary executable version of the module, whether in a linkable
library, a DLL, or a Java .jar, remains untouched.
Understanding Bob Martin’s Closed For Modification Explanation
“Closed for modification.” Extending the behavior of a module does not
result in changes to the source or binary code of the module. The
binary executable version of the module, whether in a linkable
library, a DLL, or a Java .jar, remains untouched.
Understanding Bob Martin’s Closed For Modification Explanation
“Closed for modification.” Extending the behavior of a module does not
result in changes to the source or binary code of the module. The
binary executable version of the module, whether in a linkable
library, a DLL, or a Java .jar, remains untouched.