All About Iterators

Design patterns have been all of the rage for a number of years now.  We have design patterns for concurrency, user interfaces, data access, object creation, and so many other things.  The seminal work on the topic is the Gang of Four’s book, Design Patterns.  When used appropriately they are a fantastic way to codify…

17

Performance Engineering

Recently, many people have asked me about the performance of Linq.  The questions have ranged from the broad, “How can I analyze the performance of code using Linq?”, to the very specific, “Why is the performance of this code sample not what I expected?” I want to address these questions.  So before I dive into some…

8

Extending the World

When people think of C# 3.0 and Linq, they commonly think of queries and databases.  The phenomenal work of the Linq to SQL guys provides ample reason to think of it this way; nevertheless, C# 3.0 and Linq are really much much more.  I have discussed a number of things that can be done with lambdas,…

26

Immutability, Purity, and Referential Transparency

How often do you write code that just works?  It seems to happen so rarely that I find myself suspicious if code does just work.  When was the last time that you wrote a non-trivial program that had no compile errors on the first try and then ran fine as well?  If it happened recently then congratulations.  If…

32