Learning with Peter

Last week I was lucky to host my good friend Peter Kofler in his visit to Gran Canaria, where he came to facilitate the Glodal Day of Code Retreat and also to work together a couple of days in our biggest project at the moment. We’ve been working in the same...

Object references, state and side effects

C#, Java and other languages have the same behaviour when it comes to reference types. public class SomeClass { public string someField; } var instance1 = new SomeClass(); // instance1 is a reference to an object in memory var instance2 = instance1; // instance2 is a...

Using C# Collections

There are many ways to work with collections. We are following Microsoft Guidelines for Collections  plus some ideas that Kent Beck explains in Implementation Patterns. I’ve created a repository with code examples so that anyone can play with them. All the unit...

Polymorphic Equality

The default generation of Equality members provided by Resharper let you choose three different implementations when overriding the “Equals” method in a class (Alt+Insert -> Equality Members): The default choice is “Exactly the same type as...