jaredpar's WebLog

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

    Immutability and ReadOnlyCollection<T>

    • 1 Comments
    I am a huge fan of read only/immutable collections and data. Hopefully the increased exposure through the blogosphere alerted users to the advantages of this type of programming for the appropriate scenarios. I wanted to discuss ReadOnlyCollection<T>...
  • jaredpar's WebLog

    Properly Implementing Equality in VB

    • 6 Comments
    Many developers want to implement equality functions for their objects.  DotNet made equality a deep part of the framework and added support all the way up to System.Object with Equals and GetHashCode .   In addition to the strongly enforced...
  • jaredpar's WebLog

    Thread Local Storage template

    • 1 Comments
    Thread local storage is another method of synchronization between threads. It is different that most synchronization cases because instead of sharing state between threads it enables developers to have independent, thread specific pieces of data which...
  • jaredpar's WebLog

    Gotcha: Generic overload resolution when called generically

    • 1 Comments
    Both VB and C# have a feature of generic overload resolution that is fairly helpful and yet a source of gotchas. Lets say you have two methods with the same number of arguments. One method has arguments with generic types and the other does not. For Example...
  • jaredpar's WebLog

    Have an IComparer<T> but need an IComparable<T>?

    • 0 Comments
    Previously we discussed the opposite problem.  This is a lesser but often more frustrating problem because there is no, AFAIK, built in solution for the BCL.  However it's problem that can be solved once and reused with a generic solution. IComparable<T>...
  • jaredpar's WebLog

    Design Guidelines: Provide type inference friendly Create function for generic objects

    • 3 Comments
    Really this guideline is a bit longer but putting it all in a blog title seemed a bit too much.  The full guideline should read: "If a generic class constructor arguments contain types of all generic parameters, provide a static method named...
  • jaredpar's WebLog

    Reference values in C++

    • 2 Comments
    Reference values are a powerful feature of C++ but I find they have one significant detractor. A developer can not look at an API call and determine if a parameter is being passed by reference or value (VB has the same problem). IMHO this is one item...
  • jaredpar's WebLog

    Me, MyBase, MyClass and MyPost on the subject

    • 0 Comments
    Recently we had a good discussion on an internal alias about the use of Me, MyClass and MyBase in VB. Me, MyBase and MyClass are all ways to access instance member data in a VB class or structure. There was a little bit of confusion on the actual workings...
  • jaredpar's WebLog

    Gotcha: CComAutoCriticalSection and copy constructors

    • 0 Comments
    While investigating a crash during a suite run I found the stack walk included the destructor for a CComAutoCriticalSection . This is a fairly reliable class so I immediately suspected my code. I did a couple of quick checks for a double free and didn...
  • jaredpar's WebLog

    Have a IComparable(Of T) but need an IComparer(Of T)?

    • 0 Comments
    IComparable(Of T) is an interface saying "I can compare myself to other objects of the same type".  And IComparer(Of T) is an interface saying "I can compare two objects of this type.".  Often API's which need to perform...
  • jaredpar's WebLog

    Gotcha: CComPtrBase<T> assignment

    • 2 Comments
    Today what started out as a crash due to a pure virtual call turned into finding a gotcha in CComPtrBase<T>. Essentially the code in question boiled down to the following. Can you spot the problem? void GetAStudent(CComPtrBase<T> &spStudent...
  • jaredpar's WebLog

    BinaryInsert Part2

    • 7 Comments
    Previously I discussed a potential missing API in List(Of T).BinaryInsert. One of the items I mentioned was it had better performance because it was O(Log N) vs Insert and Sort which is O(NLogN). Several users correctly pointed out this was incorrect...
  • jaredpar's WebLog

    Get-TfStatus

    • 4 Comments
    Been far too long since I blogged about a new PowerShell script. This is not to say I've stopped using PowerShell, more that I've been too busy playing with other tools to spend a significant amount of time updating my scripts. This is a simple, yet straight...
  • jaredpar's WebLog

    What's the purpose of this blog?

    • 0 Comments
    I've had a couple people ask me this question about my blog.  The simple answer is: to explore my adventures in code, coding, patterns and pretty much anything else related to programming.  I realize from a readers perspective my topics may...
  • jaredpar's WebLog

    RantPack - A utility library

    • 1 Comments
    I often post code examples, samples and snippets on this blog. Many of these samples are a part of a utility library I've been writing and maintaining for many years now. Essentially since I got involved in DotNet programming. I write a lot of code...
  • jaredpar's WebLog

    Short Post

    • 0 Comments
    In an effort to post more often and with greater effect, I've been trying to divide my posts into short, targeted posts and longer in depth posts. Thus far my short posts aren't nearly as short as I'd like them to be and end up being much closer to my...
Page 1 of 1 (16 items)

April, 2008