Nick Guerrera's blog

An FxCopper's eye view

  • Nick Guerrera's blog

    I Don't Like Arrays

    • 5 Comments
    The number one reason that I dislike arrays in .NET is the fact that they implement IList<T> explicitly, thereby burying useful members like IndexOf behind a cast or equally ugly calls to static methods on System.Array, and needlessly renaming the...
  • Nick Guerrera's blog

    Exceptions, exceptions, exceptions....

    • 0 Comments
    I've made my first contributions to the FxCop team blog on a subject that's near and dear to my heart and often controversial: the perils of catch (Exception). Take a look here and here . Update: The saga continues ...
  • Nick Guerrera's blog

    Opening the Coding Style Can of Worms

    • 6 Comments
    I find it troubling when different portions of code from the same project use different indentation and bracing styles. In my opinion, it's much easier to read and maintain code that's uniform in style. However, you won't find me arguing that any one...
  • Nick Guerrera's blog

    Presenting WeakDictionary[TKey, TValue]

    • 10 Comments
    This morning, I posted a base class to assist with implementing IDictionary<TKey,TValue>. As I mentioned this was just the first chunk of work required as part of my goal of building a generic dictionary which uses weak references for its keys and...
  • Nick Guerrera's blog

    Implementing IDictionary[TKey, TValue] Isn't Trivial

    • 3 Comments
    I recently needed a dictionary which uses weak references to store both its keys and values, but which otherwise tried its hardest to look and feel just like any other IDictionary<TKey, TValue>. Since there's no such collection available in the...
  • Nick Guerrera's blog

    Think Twice Before Throwing from Attribute Constructors

    • 0 Comments
    I had an interesting discussion recently about a subtle issue with custom attributes and I thought I'd share my conclusion. The question is whether it's a good practice to throw ArgumentException from an attribute constructor as in the following example...
  • Nick Guerrera's blog

    Mmm... Hungarian Notation...

    • 1 Comments
    I'm not a fan of Hungarian notation for variable names, particularly the variety where static type information is encrypted into impenetrable acronyms and repeated redundantly with every variable access. As the authors of The Pragmatic Programmer would...
  • Nick Guerrera's blog

    Hello? Is this thing on?

    • 12 Comments
    Allow me to introduce myself... I'm a developer on the Visual Studio Code Analysis team. I joined Microsoft in September of 2003 after completing my Computer Engineering degree at McGill University in my home town of Montreal and I've been working...
Page 1 of 1 (8 items)