jaredpar's WebLog

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

    do {} while(0) what?

    • 3 Comments
    A recent check in of mine raised a few eye brows during reviews. I checked in a few macros which ended with/contained a "do{}while(0)" and people were curious as to why. In my experience there are two main uses for it. Insert an empty statement...
  • jaredpar's WebLog

    Outdated Comments are better than no Comments

    • 4 Comments
    While investigating our locking infrastructure a few days ago I ran across an odd comment.  I was looking at a particular usage of a lock and the comment said that "Using lock type X because we must pump messages here."  Contrarily...
  • 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

    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...
Page 1 of 1 (9 items)

May, 2008