Monthly Archives: May 2009

Anti-Patterns and Worst Practices – Heisenbugs

As I mentioned before, a Heisenbug occurs when trying to check the state of an object. These types of defects are common with concurrency issues are present. Microsoft has put out a library to help diagnose these problems: CHESS (http://msdn.microsoft.com/en-us/devlabs/cc950526.aspx). … Continue reading 

Posted in Best Practices, Design Principles, Legacy Code, Testing | 8 Comments

Anti-Patterns and Worst Practices – Monster Objects

Monster objects (or God objects) know too much, or do too much; monster objects are nasty beasts. The term God object was coined because these objects are said to be “all-knowing”. I’m in favor of the term Monster objects because … Continue reading 

Posted in Design Patterns, Design Principles, SOLID, Testing | 6 Comments

Anti-Patterns and Worst Practices – The Arrowhead Anti-Pattern

This anti-pattern is named after the shape that most code makes when you have many conditionals, switch statements, or anything that allows the flow to take several paths. You’ll commonly see these nested within each other over and over, thus … Continue reading 

Posted in Best Practices, Design Principles, DRY, Legacy Code | 8 Comments

Anti-Patterns and Worst Practices – You’re Doing it Wrong!

When shown ideal code, I think developers understand why it is favorable. When it is regarding Separation of Concerns (SoC) or Single Responsibility Principle (SRP) the consensus is something along the lines of “of course, that makes sense”. But not … Continue reading 

Posted in Best Practices, Design Principles, Development, DRY, Legacy Code, SOLID, Testing | 22 Comments

Understanding the Problem

In my previous post I supplied a riddle entitled “Where’s the Dollar?” and asked for the problem with its logic. This may seem ridiculous but these things come up all the time in software development when translating what our customers/clients … Continue reading 

Posted in Project Management | Leave a comment

Unit Testing “Where’s The Dollar?”

I was given the following riddle today. I thought I’d right a unit test in C# to “prove” it. Three guys enter a hotel to stay for a night.  The desk clerk tells them that one room is $30 per … Continue reading 

Posted in For Fun, Testing | 6 Comments