When Not-True Doesn’t Equal False

Tags: C#, Bug Patterns

There is a strangely common, reoccurring bug I’ve seen return, again and again, in most projects I’ve worked on in recent years. I call it the “Not True != False” bug, and it crops up, usually, when passing query parameters to a search service of some sort, when you want to search for entities who match a certain condition, and you end up not being able not to search by that condition.

Confusing? Let’s back up for a second.

[Continued on Bits and Pieces, the new location of my blog]

No Comments