Category Archives: Software

Abstract Factory Pattern Explained

By | July 13, 2015

This is going to be a simple C++ based tutorial on Abstract Factory Pattern. The sample used easy to understand and relate to. This pattern is closely related to Factory Method Pattern. I have a small post dedicated to it. I will encourage you to read it first before taking up this one. For a… Read More »

Mahapps controls customization

By | July 8, 2015

This is a brief tutorial on how to change the look and feel of Mahapps controls. I will be making a small change to Mahapps datagrid to demonstrate the steps. Anyone who has been working with WPF for a reasonable amount of time must have come across Mahapps. In case you haven’t then you must… Read More »

Decorator Pattern Explained

By | July 2, 2015

This is going to be a brief c# based Decorator pattern tutorial. It will not be a techincal UML heavy “Chewing Dry straw” kind of tutorial. It will be Caveman Style. Fun, Simple  and informative. The Decorator Pattern example used is simple yet powerful enough to highlight its key points.

Dependency Injection Explained

By | June 26, 2015

This is going to be a short c# based tutorial on Dependency Injection. Newcomers find it difficult to grasp concept of Dependency Injection. I will attempt to explain in simplest terms possible. As usual, I will deal first with “WHY” and then the “HOW”.

WPF Commands Explained

By | June 22, 2015

WPF has many delightful features. Commands are one of them. Somehow they have remind me of pointers in C and Delegates and Events in C#. If you want to know more about WPF custom command implementation which takes parameters then refer to this blog post. However if I were you, I would simply stop here… Read More »

Factory method pattern

By | June 15, 2015

Design patterns. And that book. I will not say anything more. I plan to do a whole series on Design Patterns. But this is a plan not a commitment. I will start out with the “Hello World” of design patterns: “Factory Pattern”. For the impatient, a Factory method pattern sample implementation in C++ is at… Read More »

Binding WPF Textblock to two properties using Multibinding

By | June 10, 2015

In the ancient and cruel world of WPF you might want to populate a TextBlock with a string which will contain data from different sources. For example, you might want to display song and band in a single textBlock like, “Where Do You Go – No Mercy”. The song name and band name can be… Read More »

WPF Dependency Property vs INotifyPropertyChanged

By | May 26, 2015

When to use WPF Dependency Property vs INotifyPropertyChanged? A little background: WPF databinding has two essential parts: Source and Target. Now Target has to be a Dependency Property. But source can be a simple property with INotifyPropertyChanged implemented. Or a Dependency property. In both cases, any change to the property will see the UI getting… Read More »

FakeItEasy and verifying method parameters

By | May 16, 2015

How about checking if the method was called with right parameters as a part of your unit tests ? You can do it in many ways. Using FakeItEasy, it is easy to verify that the expected parameters were used to make the function call.

Strict mocking vs Loose mocking

By | May 6, 2015

Strict mocking vs Loose mocking is a question something which comes up often when various mocking frameworks like Moq, NSubstitute, Rhino Mocks, FakeItEasy are compared. So what is it? Suppose you create a fake of a class and do not configure the behavior of one of its method or property. Strict mocking:  If the test… Read More »