Recent Posts

Entity Framework conditional includes

If you've ever worked with Entity Framework, then you're probably familiar with the .Include(...) function. You've probably also wondered if it's possible to perform a conditional include (i.e. including only those entities that match a certain predicate). The include function itself doesn't allow for this, and I thought it simply wasn't possible until a coworker ... read full post

More Windows Phone annoyances

There's lots to love about Windows Phone, but since I'm nitpicking stuff anyway I figure I might as well rant about the rest of my annoyances. 1. Headphone volume The EU has some dumb rule about audio devices not being allowed to output more than a certain dB level without nagging you every 20 hours. My Windows Phone ... read full post

PIN required: a Windows Phone usability annoyance

When you power on your Windows Phone, it automatically prompts you for your SIM PIN to unlock, well, the phone part of the phone. Of course it's possible to cancel out of this dialog, because unlocking the phone is not required to access the rest of the device. When you do this, the OS will indicate that the phone hasn't been unlocked yet: There's nothing wrong with any of this. The ... read full post

Sony MDR-1000X first impressions

The Sony MDR-1000X are wireless, over-ear headphones with support for active noise cancelling. I've owned them for a few weeks now and want to share some of my first impressions. This won't be a formal review; I'll just talk about my own, subjective experiences with these headphones. Active Noise Cancelling The reason I bought these headphones is for their Active ... read full post

Targeting multiple .NET platforms in a single NuGet package with Visual Studio 2017

As the proud owner of a NuGet package (72 downloads and counting!), I'm interested in targeting the new .NET Standard, in order to make my package available on a wider variety of platforms. In a previous post, I showed how to create and publish a simple NuGet package. However, this only covered the ... read full post

C# 7: what's new?

Visual Studio 2017 hit RTM this week, so it's time to take a look at all the new features that made it into C# version 7. There's quite a lot to get through, so let's dive right in... Tuples The .NET framework has known tuples through the System.Tuple type since .NET 4. In C# 7, tuples are made an actual language feature. This is done through the new System.ValueTuple type, which is a mutable struct (System.Tuple is a class). This type is not part of the ... read full post

Implementing an async producer/consumer queue using BlockingCollection

In this post, I'd like to shine some light on a relatively unknown class from the .NET framework: BlockingCollection. I'll use this powerful class to implement an asynchronous, multi-threaded, in-memory producer/consumer queue using just a few lines of code. Use case First off, let's consider an extremely common real-world use case: logging. Every app or service ... read full post

Fireworks in the fog

With New Year's Eve upon us once more, I suddenly realized that because I now own a camera, I'm required by law to take pictures of the fireworks. It would prove quite the challenge. I had never taken pictures of fireworks before, and I obviously didn't get any time to practice. I read some tips online, set up my tripod, and hoped for the best. There was a nasty fog that had lingered all throughout the day on December 31st, and by the time evening rolled around it ... read full post

Algorithmic complexity: when does it matter?

I watched an interesting video the other day about the coding interview process at Google. I don't know how accurate of a representation this is (the problem seems a bit easy), but it was interesting non the less. They have the following question: Given an unordered list of integers and some target value, find out if there are any two values in the list that sum up to the target. ... read full post

Creating and publishing a simple NuGet package

I publish my first NuGet package the other day, and I figured I'd do a short write-up of the steps involved. It's actually really easy, there are no difficult technical challenges to overcome here, nor are there challenges of any kind. So, this post is mainly meant as just a quick reference for myself, in case I decide to publish more stuff in the future. Prerequisites Number one: get ... read full post