Specification Pattern – Essentials

Specification pattern is DDD specific way of building simple predicates/filters on top of domain entities.    To correctly define specification pattern and find an applicable area for it, we should describe 4 categories every software falls into: Large amount of data (big data) Performance critical (e.g. stock market apps) Complex business logic (ERP like SAP) […]

Continue reading


 Covariance

Covariance & Contravariance are one of the most confusing terms in C#, no surprise it’s very popular for geeky questions in job interviews. Any time someone mentions those terms, it takes quite a while to refresh my knowledge about it. So, I decided to write a couple posts explaining them in the simplest and shortest […]

Continue reading


 Code Contracts & VS Extensibility

  Many times I’ve seen repetitive and obsessive validation of input parameters. It may be a consequence of confusion in what “defensive programming” paradigm really is. I will give a simple example – Let’s say we have a following code snippet: public class HashWriter : IHashWriter { public bool SaveHashItem(int duration, string hashId, string itemKey, T item) { var retVal = […]

Continue reading


 Smile

Don’t smile at people. Smile through them. Let your happiness share itself.Smile like you wish to tap their shoulder so both of you can gaze at the stars.This way you create affection, admiration, pride and joy, not for others,but for Creator himself – by your own example and seeds of other’s happiness. “Smiles are soul’s kisses” […]

Continue reading