jaredpar's WebLog

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

    Using Live Mesh to Synchronize Favorites

    • 3 Comments
    I'm a huge fan of customizing my environment.  As a developer my productivity is tied to access to my favorite tools, documentation, scripts, plug-ins and generally being happy with the look and feel of my computer.  This runs against me using...
  • jaredpar's WebLog

    Reserved words: Good for your sanity

    • 2 Comments
    Paul Vick posted a recent entry exploring the necessity, or lack there of, for having reserved words in a programming language. It's an interesting mental exercise to go through. At the end you'll realize that many reserved keywords aren't needed from...
  • jaredpar's WebLog

    Equality isn't easy

    • 1 Comments
    After my recent postings on the rules of Equality , I thought it would be a good idea to post a simple example of equality. The class in question, Example, has only one field of type Integer name m_field1. Two instances of Example are equal if m_field1...
  • jaredpar's WebLog

    IEquatable(Of T) and GetHashCode()

    • 0 Comments
    This is a bit of a follow up to a previous post we discussed how to properly implement equality in VB. Several users commented/asked that IEquatable(Of T) could be used in place of overriding Equals(). Since IEquatable(Of T) doesn't define a GetHashCode...
  • jaredpar's WebLog

    Saved by PowerShell

    • 0 Comments
    Recently I made a very large update to our code base.  Our code base lacked a standard way of guarding entry and exit points into the various components.  Having said guards is useful for error handling, tracing, reducing redundancy, etc .....
  • jaredpar's WebLog

    C++ Programming Books

    • 0 Comments
    I was reading a post on Coding Horror the other day about programming books and how developers don't read enough of them.   I readily agree with the first two points in the article that 1) most programming books suck and 2) books are sold by weight...
  • 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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

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

    Missing API: List(Of T).BinaryInsert

    • 3 Comments
    One API that seems to be missing from List(Of T) is a BinaryInsert method.  Especially since there is already a BinarySearch method. Binary insert is a method for inserting a value into an already sorted list.  Since the list is already sorted...
  • jaredpar's WebLog

    ActiveObject

    • 0 Comments
    I've been busy lately and neglected my series on Active Objects .  It's been a fairly busy time for me both in and out of work.  Enough excuses, back to the fun. With the basic PipeSingleReader class, we now have the last piece necessary to...
  • jaredpar's WebLog

    API Problems: CComObject::CreateInstance

    • 2 Comments
    CComObject::CreateInstance is a light weight method for creating instances of COM objects in your code. Unfortunately the design of the API makes it easy to introduce subtle errors into your code. The two problems are it encourages manually ref counting...
Page 7 of 13 (321 items) «56789»