C# – Why you should never use the checked keyword – Unless absolutely necessary

So, some of you may not know about this keyword at all, but at one point in your life you may find out and feel that it will be useful to use it when you are doing mathematical operations in your code. Let’s start by discussing what this keyword provides. According to Microsoft documentation, the checked keyword is provided to explicitly enable arithmetic overflow for integer mathematical operations. In the past we have discussed how arithmetic overflows can cause problems and unexpected outcomes from our code. A prime example we mentioned is why Ghandi was a nuclear asshole in Civilization Continue reading C# – Why you should never use the checked keyword – Unless absolutely necessary

Multiple Inheritance and the diamond problem

Starting this thread I assume everybody knows what inheritance is in Object Oriented programming and what benefits it can provide. I will not delve into the basics of objet inheritance. This post rather is focused more on multiple inheritance and the problems it faces.

Continue reading Multiple Inheritance and the diamond problem

C# Multithreaded Resource access – Concurrent Collections


Concurrent collections are a feature added in .Net 4.0 and allow developers to create thread safe collections without worrying as much as they had to worry with Generic Collections.
They do not remove any possible concern the developer should have while working with resources that are accessed from multiple threads, but removes many of the common ones.

Continue reading C# Multithreaded Resource access – Concurrent Collections

C# Multithreaded Resource Access – Locks, Monitors and Mutex

C# provides us many ways to safely handle shared resources from than one threads/tasks. In this blog post we will discuss some of the different types that exist (and they are many), the different programming patterns they are used for, their benefits and their drawbacks.

Continue reading C# Multithreaded Resource Access – Locks, Monitors and Mutex

Why is Gandhi a nuclear asshole in Civilization?

Didn’t you ever notice that India’s peaceful leader, Gandhi, has been dropping nukes around? From the first game up to today he is dropping nukes.
This is not just our mind playing tricks on you, noticing things that are not there, nor a myth being accepted as a fact.

Continue reading Why is Gandhi a nuclear asshole in Civilization?