Lazy Cache

Recently came across this small but highly effective caching library called LazyCache. While I have been familiar with the in-memory caching functionalities of .Net such as ObjectCache and MemoryCache, LazyCache provides a neat threadsafe wrapper around the conventional options. It also make sure you don't need to implement the Cache Aside pattern yourself as the … Continue reading Lazy Cache

C# 7.3 Features : Tuple Comparison & Generic Constraints

C# 7.3 is another minor roll-out that brings along with 'seemingly minor' improvement, but ones that definitely opens new opportunities. In this blog post, we will explore¬† two features that are introduced in 7.3 Tuple Comparison C# 7.x had already made tuple an immensely powerful tool with a variety of features, and the latest minor … Continue reading C# 7.3 Features : Tuple Comparison & Generic Constraints

Custom Tooltip in Oxyplot

Working with OxyPlot sometimes throw these interesting problems, mainly due to lack of documentation. One of the recent challenges involved creating a custom tooltip, which at the hindsight, was pretty straightforward - only if the developers had continued their effort in completing the documentation. ¬† Alright back to out problem. Oxyplot, by default provides a … Continue reading Custom Tooltip in Oxyplot

Linq : Significance of AsEnumerable

While LINQ provides a big umbrella to query in-memory as well as remote collections alike (part of the benefit is having a standard vocabulary to query any collection), there are subtle differences, which rises from the way the two classes of Linq queries work. A Linq query over in-memory collections usually work over the IEnumerable … Continue reading Linq : Significance of AsEnumerable

Code Smells : Dispensable

Continuing on our discussion on Code Smells and Refactoring techniques, we will discuss Dispensable in this post. Dispensables are avoidable components whose absence would make the code much more cleaner, readable and efficient. Comments A joke is not a good one if needed to be explained. A similar philosophy holds for code as well. If … Continue reading Code Smells : Dispensable

Design Pattern : Memento Pattern

Memento Design Pattern allows to capture internal state of an object in an external object and restore it to the desired checkpoint when required, all the while being in compliance with encapsulation. The Memento Design Pattern comprises of 3 actor classes. Originator : The class which needs to have the ability to store its internal … Continue reading Design Pattern : Memento Pattern