jaredpar's WebLog

Code, rants and ramblings of a programmer.
Posts
  • jaredpar's WebLog

    VsVim Update Released (Version 0.9.3)

    • 9 Comments
    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. Link: http://visualstudiogallery.msdn.microsoft.com/en-us/59ca71b3-a4a3-46ca...
  • jaredpar's WebLog

    Why are thread safe collections so hard?

    • 52 Comments
    Writing a collection which is mutable, thread safe and usable is an extremely difficult process. At least that’s what you’ve likely been told all through your schooling. But then you get out on the web and see a multitude of thread safe lists, maps and...
  • jaredpar's WebLog

    ComboBox SelectedItem, SelectedValue, SelectedWhat???

    • 0 Comments
    ComboBox has a lot of helpful properties that allow you to get access to items selected by the Control. The problem is knowing which one is best in which scenario. The documentation is not 100% clear on what the values will be in various situtations....
  • jaredpar's WebLog

    If you implement IEquatable<T> you still must override Object’s Equals and GetHashCode

    • 0 Comments
    CLR 2.0 introduced IEquatable<T> which is an interface that allows for type safe equality comparisons.  Previously, the best available method for comparing equality was the virtual Object Equals method.  The method is loosely typed since...
  • jaredpar's WebLog

    When to use Type Inference

    • 27 Comments
    Occasionally the debate will come as to when it's OK to use type inference in order to declare a variable.  There appear to be three groups in this debate. Whenever it's possible Only when it's absolutely clear what the type is Never, type inference...
  • jaredpar's WebLog

    Part of being a good programmer is learning not to trust yourself

    • 8 Comments
    ... and to actively guard against yourself. Over the years I've found that I can be my own worst enemy when I code. Part of the problem stems from paranoia Early in my college days, a professor of mine, Jim Greenlee, instilled in me the virtue of paranoid...
  • jaredpar's WebLog

    Why is LINQ absent from debugger windows?

    • 9 Comments
    As the owner of the VB.Net portion of the overall debugging experience, I frequently hear the request from customers to add LINQ support into the Watch / Immediate and Locals window. Virtually every other type of expression is available in the debugger...
  • jaredpar's WebLog

    PowerShell Tutorial

    • 0 Comments
    PowerShell is an exciting product coming out of Microsoft. It's a shell technology many old *nix junkies will find refreshing and very intuitive. It's based on .Net and has a syntax feels like a mix between Pearl, C# and VB. I've blogged about it before...
  • jaredpar's WebLog

    COMException error messages

    • 4 Comments
    Quick caveat; I am not a hardcore COM guy. I do work with COM quite a bit but most of it is hobbyist work at home. So if I make any COM errors here please let me know and I will correct them. Now onto the fun stuff. Pure COM uses HRESULTS to indicate...
  • jaredpar's WebLog

    C++ New Operator and Placement New

    • 5 Comments
    Originally I was going to write this article to detail a particular problem I had recently with placement new in C++. A page or two of writing later I decided it would be best to start with an introduction to the "new" operator itself and the in/outs...
  • jaredpar's WebLog

    A more usable API for a mutable thread safe collection

    • 17 Comments
    In my last post we discussed the problems with designing a safer API for mutable thread safe collections that employ only an internal locking system. The result was an API that was more difficult to mess up, yet pretty much unusable. Lets take a look...
  • jaredpar's WebLog

    DebuggerDisplay attribute best practices

    • 1 Comments
    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...
  • jaredpar's WebLog

    Custom Exceptions: When should you create them?

    • 5 Comments
    I think the best answer is: rarely.   It's really hard to go straight to a justification here though.  I find that answering a different question will eventually shed led on when to create a new exception. "What are the benefits of...
  • jaredpar's WebLog

    When can you catch a StackOverflowException?

    • 0 Comments
    Answer: When you're the one who threw it.  Starting with the CLR version 2.0, the policy for handling a StackOverflowException was changed.  User code can no longer handle the exception[1].  Instead the CLR will simply terminate the process...
  • jaredpar's WebLog

    Switching on Types

    • 9 Comments
    One action I find frustrating in C# is where a particular action needs to be taken based off of the type of a particular object. Ideally I would like to solve this with a switch statement but switch statements only support constant expressions in C# so...
  • jaredpar's WebLog

    Vim Emulator Editor Extension Released

    • 17 Comments
    I just released version 0.5.0 of VsVim: a vim emulation editor extension for Visual Studio 2010 Beta1 written in F#. This is a hobby project I’ve been working on for awhile now. I expect to continue updating this release as time goes on as I use it on...
  • jaredpar's WebLog

    Dvorak keyboard … is it really faster ???

    • 9 Comments
    Most people discover I’m a Dvorak user because they’re in my office, attempt to drive during a conversation and find they are typing gibberish. I take the keyboard, hit CTRL+LEFT_SHIFT and they’re on their way again. Well at least until they open up a...
  • jaredpar's WebLog

    ISynchronizeInvoke ... now

    • 1 Comments
    ISynchronizeInvoke is an interface which allows you to execute a delegate synchronously or asynchronously. The implementer of the interface can control how the delegate is executed. In particular the implementer controls on which thread the delegate is...
  • jaredpar's WebLog

    Marshaling Nested Data Structures Part 1

    • 11 Comments
    A frequent question that pops up on newsgroups such as microsoft.dotnet.framework.interop is how to Marshal nested structures (and arrays of nested structures) via P/Invoke. The documentation on the subject that I have found usually only covers structures...
  • jaredpar's WebLog

    Mixing SEH and C++ Exceptions

    • 1 Comments
    Recently I had a half day adventure trying to catch a SafeIntException in code I was writing. The particular function involved a bit of math with user controlled values. Writing a bunch of IfFailGo's with several TryAdd style API's was getting tiresome...
  • jaredpar's WebLog

    Building a WeakReference Hashtable

    • 9 Comments
    Recently I ran into a situation on a personal project where I needed a hashtable like structure for a set of WeakReference values.  When poking around for an existing implementation I saw found several versions which were very thin, type safe wrapper...
  • jaredpar's WebLog

    If it's not broken, maybe you should fix it anyway

    • 2 Comments
    I know this is goes against conventional wisdom but it's something I believe in.  Every sufficiently large project has that section of code nobody wants to go near.  The mere mention of it causes people to leave the room.  It usually has...
  • jaredpar's WebLog

    Regular Expression Limitations

    • 0 Comments
    I'm struggling with an introduction line to this blog post so I'm just going to go for bluntness:  Regular expressions are limited and it's important to understand these limitations.  Ok, now that the premise is out of the way, lets go to a...
  • jaredpar's WebLog

    Why is LINQ absent from debugger windows (Part 2)?

    • 8 Comments
    Some readers may remember an article I published almost half a year ago about LINQ being absent from the debugger windows.  That post explored the initial design of the feature, it’s limitations and ultimately why it was absent but promised a future...
  • jaredpar's WebLog

    VsVim 1.0 Released

    • 9 Comments
    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] Link: http://visualstudiogallery.msdn.microsoft.com/en-us/59ca71b3...
Page 1 of 13 (321 items) 12345»