Stairway Pattern

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

Git stash

Git is arguably the most versatile version control system around and one cannot resist falling in love with this awesome piece of code every time you use it. One of the lesser known features in Git, especially for individual developers/teams who have recently migrated from other tools is the "stash" command. You might often find … Continue reading Git stash

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

A Closer look at DateTime Operations

There are many ways you could round off a DateTime to the nearest Hour. You could create a new Instance of DateTime, ignoring the current instance's Minute/Seconds parts. You could also use the Add Minute method as seen in the following code. Constructor Vs Add Method But which of the two is more efficient ? … Continue reading A Closer look at DateTime Operations

Unit Testing Asynchronous Code

Unit Testing Asynchronous methods in older days were pretty tough, but thanks to the advances made in the Unit Testing Frameworks, this is now all the more easier. We will begin by writing an async method, which we could use for writing our Unit Tests against. The advancements in Unit Testing Framework has made it … Continue reading Unit Testing Asynchronous Code

Design Patterns : Bridge Pattern

The essence of Bridge Pattern lies in the fact that it not just decouples the abstraction from implementation, but in doing so, allows both to evolve independently. Let's consider the examples of smartphones. The underlying OS (for sake of example, let's assume its Android) improving every year. The Android has seen atleast 7 versions in … Continue reading Design Patterns : Bridge Pattern