Extension Methods Guidelines in C# .NET

Extension methods are awesome, right? They are probably most widely used in the LINQ feature. But when should we use them? And when shouldn't we? Let's talk guidelines.

8 Techniques to Avoid GC Pressure and Improve Performance in C# .NET

Poor memory management can hurt performance in many ways. One such effect is called GC Pressure. This article will show 8 techniques to minimize GC pressure, and by doing so, improve performance.

Cache Implementations in C# .NET

One of the most commonly used patterns in software development is Caching. It's a simple, yet extremely effective concept. The idea is reuse of results. When performing a heavy operation, we will save the result in said cache

Class Instantiation Guidelines in Object Oriented Languages: When to choose Singleton, Static, Extension methods or Dependency Injection

I'd like to tackle an old dilemma: Class instantiation. Which pattern do you use to create a class? Do you always use a new statement? Do we still need to use Singleton or Factory? Should we always use dependency injection? How about static classes, are they truly evil?

Performance Showdown of Producer/Consumer (Job Queues) Implementations in C# .NET

I recently wrote 3 blog posts on different Producer/Consumer (Job Queues) implementations. In this article, we will compare performance of all the approaches, including...

7 Debugging Techniques for when your .NET application Freezes (hangs)

How many times did you use a desktop application to end up with a frozen unresponsive window? This article is about what we are to do when our .NET application freezes. We're going to explore tools and debugging techniques to see where the program is stuck and to find the core cause of the issue.

8 Ways You can Cause Memory Leaks in .NET

Memory leaks are sneakily bad creatures. It's easy to ignore them for a very long time, while they slowly destroy the application. With memory leaks, your memory consumption grows, creating GC pressure and performance problems. Finally, the program will just crash on an out-of-memory exception.

C# Job Queues (part 3) with TPL Dataflow and Failure Handling

In this article, we'll see how to implement Job Queues with TPL Dataflow, including implementations of several of the said variations. We will dive into the Dataflow mindset along the way, figuring out this awesome library.

How to Beat Array Iteration Performance with Parallelism in C# .NET

Let's consider a simple programming challenge: Summing all items of a large array. Now it stands to reason that this can be easily optimized by using parallelism...