Pragmatic Paranoia

Couple of months back, I took a session on Being A Pragmatic Programmer. To prepare the content I read through a book by Andrew Hunt and David Thomas called “The Pragmatic Programmer”, but there was this particular section that took my attention – The Pragmatic Paranoia, this section focused on the depressing reality that perfect software does…

Structural Design Pattern: Decorators

As per Wiki structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships among entities. In this post we will discuss Decorators. Decorators, add additional features to object dynamically without using sub-classing Let’s consider an analogy here, our bakery needs some automation, everyday I spend few hours setting up appliances like pre-heating…

Creational Design Pattern: Prototype

Prototype Pattern is another creational pattern that clones objects as per the prototype. Basically it lets you make copies of existing object. Prototyping is important when we creating many similar objects, but this process can be expensive so the solution is ‘Cloning’ instead of making individual objects. Lets consider an analogy here, we are mass…

Creational Design Pattern – Builder Patterns

Another creations pattern that lets you construct complex objects is the builder pattern, it is the solution for Anti Pattern called Telescoping Constructor. This anti pattern occurs when developer attempts to create a complex object with excessive use of constructors, Builder pattern tries to solve this issue. Lets have an analogy here,  Our cake business…