Don't mix await and compound assignment

The 5.0 release of C# introduced the await keyword which makes it extremely easy to use Task in a non-blocking fashion. This allows developers to replace either blocking calls to Task.Wait() or complicated combinations of ContinueWith and callbacks with a nice simple, straight forward expression

Not all "true" are created equal

During a review of some low level bit manipulation logic a developer raised a question about the correctness of a piece of code which allowed any arbitrary byte to be seen as a bool. No one could recall if true was defined as not 0 or simply 1. If it was the latter then the code was allowing for a large range of invalid bool values to be created. A quick look at the CLI spec revealed the immediate answer (partition III section 1.1.2)

Authoring a Utility Library for Visual Studio

As I’ve developed VsVim over the years I’ve authored quite a few reusable Visual Studio components. For the last 6 months I’ve had many of these factored out to a separate utility library and this last week I decided to publish them as a separate NuGet package. Even if no one else every uses the library I want to reuse the utilities in other projects I’m working on and NuGet is the perfect distribution mechanism. For those interested I’ll be blogging about these components and why I authored them in the coming weeks (hint: perf, perf and more perf). I wanted to blog about my the rules I learned from this exercise because even as a seasoned extension author I hit a couple of very surprising problems along the way. Hopefully the lessons I learned will help out the next person to attempt this

VsVim 1.0 Released

I just released an update to VsVim for Visual Studio 2010. This is available on the extension manager in Visual Studio or can be downloaded directly at the following link. 1

  1. The update was actually released a few weeks ago but in my excitement I forgot to blog about it. 

DebuggerDisplay Attribute Best Practices

The DebuggerDisplayAttribute is a powerful way to customize the way values are displayed at debug time. Instead of getting a simple type name display, interesting fields, properties or even custom strings can be surfaced to the user in useful combinations