In search of DRY SPOT
I realized there is a concept I come back to often in a lot of my software implementation and in a lot of my discussions. It goes by two common acronyms that are pretty much interchangeable.
DRY: Don't Repeat Yourself.
SPOT: Single Point of Truth.
DRY is articulated in the book The Pragmatic Programmer, although Eric Raymond likes to call it SPOT.
How does this exist in our world of C# and .NET? Well, every time you define a private const string or private const int instead of sprinkling magic values all over your code, every time you generate documentation from your source files, every time you develop a clever data structure to represent both the execution and the description of a process, you are practicing SPOT.
Quite often, my SPOT will live in a static class Util that I create for almost all of my software projects. If I have one way to handle errors, one pay to deal with collection, one way to handle user input, centralizing it makes bug fixing so much easier. It actually minimizes bugs in a lot of cases, which minimizes the need to fix them.
If you haven't heard of these concepts, they are great to add to your software vocabulary.
For many, I'm sure the idea has always been floating around, just without a good name.
Now you have a good shorthand when you are mocking someone else's code.