The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
46 views

Peculiar architecture interfacing .NET to AutoCAD out-of-process

I have written a set of classes to interact with AutoCAD from an out-of-process .NET assembly, but it seems like my class architecture and interactions are unusual. I am struggling to find a better ...
0
votes
3answers
147 views

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 ...
1
vote
1answer
103 views

Open closed principle vs abstraction leaking (Java enums)

In Java, an enum is not a plain replacement for a number (like in C/C++), but a family of objects which can have properties. For instance public enum Order { NAME("Ordering by name"), ...
4
votes
2answers
373 views

Does agile contradict to Open/Closed principle?

O/C principle dictates that production code should not be changed if system behavior augmention is required. Otherwise it becomes hard to trust tests. Following it as a dogma we are going to end with ...
0
votes
1answer
50 views

Interfaces between multiple projects

I'm slightly confused over the following: ProjectA -------- GetUsers (Implements IDBConnector) -------- IGetUsers -------- UserModel ProjectB -------- Main I have two projects one main project ...
0
votes
3answers
99 views

In the light of the open / closed principle, is shared code ownership still important?

I was recently thinking about the following. According to the open / close principle, once a piece of code X has been implemented and tested, it should not be modified any more. X can still be ...
4
votes
2answers
391 views

Does this factory method pattern example violate open-close?

In Head-First Design Patterns, they use a pizza shop example to demonstrate the factory method pattern. public abstract class PizzaStore { public Pizza orderPizza(String type) { Pizza pizza; ...
0
votes
3answers
259 views

Doesn’t active record violate SRP and OCP?

I have watched the active record classes in our project grow into large, do-it-all classes. When you need anything about a user, for example, you should go to the Person class. While this makes ...
3
votes
1answer
1k views

Protocol for closing a socket connection

I'm rolling my own application protocol on top of TCP. I'm using Linux and C. I'm wondering whether there is an advisable sequence to closing a socket connection. The client will always initiate ...
6
votes
6answers
1k views

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). One of the principles advertised by this site is the Open Closed ...
11
votes
5answers
724 views

Is overloading an example of the Open/closed principle?

Wikipedia says "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification" The word functions caught my eyes, and I now wonder if we can ...