How do you feel when you invite your friend for a private family function and he brings along a dozen strangers (his friends) ? Entourage Anti-Pattern This is similar to the scenario when you want to add a library as reference and in turn ends up referring a different set of libraries which you … Continue reading Stairway Pattern
Tag: Design Principle
Looking back at DRY
Continuing with our series to bring together the common design patterns and principles, we will, in this particular post, look into arguably the most famous design principle known to programmers - DRY. Don't Repeat Yourselves - or DRY, is possibly the easiest to practice, at the same time, one that could go wrong in the … Continue reading Looking back at DRY
Command Query Separation(CQS)
One of the side effect of using a method out of a library (for which you do not have source code) is that you are not pretty sure if it changes state of a related object. And if it did, when you are least expecting them to, you might have more headaches than you could … Continue reading Command Query Separation(CQS)
YAGNI Principle
We developers have a common problem - We tend to overthink and over engineer. We tend to over think into the future attempting to foresee some of the features that we might require in the project. But most often than not, those features might require a lot of changes resulting in technical debt, or not … Continue reading YAGNI Principle
Fail Fast Principle
There are 3 keys ways a developer usually approaches error handling in code. Ignore Fail Safe Fail Fast We have, at different point of writing code, used all three approaches. There are times when have good reasons to ignore a particular exception scenario, while at other times, we are opt for Fail Safe approach. Fail … Continue reading Fail Fast Principle
Patterns,Principles and Programming.
Have been thinking about putting together a collection of Jump Start Tutorials on some core concepts on Programming, finally getting everything together Design Patterns GOF: Adapter Pattern GOF: Strategy Pattern GOF: Singleton Pattern (Lazy) GOF: Fascade Pattern GOF: Chain Of Responsibility Pattern (CoR) GOF: Template Method GOF: Null Object Pattern GOF: State Pattern GOF: Decorator … Continue reading Patterns,Principles and Programming.
SOLID : Open / Closed Principle
The Open / Closed Principle focuses on one basic requirement, the classes should be Open for extensions, but closed for modification. The better way to explain the principle would be to first express the issue in hand. Consider the below class. The class itself looks good, but what if in future one needs to add … Continue reading SOLID : Open / Closed Principle