The Daily WTF
When we’re laying out code standards and policies, we are, in many ways, relying on “policing by consent“. We are trying to establish standards for behavior among our developers, but we can only do this with their consent. This means our standards have to have clear value, have to be applied fairly and equally. The systems we build to enforce those standards are meant to reduce conflict and de-escalate disagreements, not create them.
But that doesn’t mean there won’t always be developers who resist following the agreed upon standards. Take, for example, Daniel‘s co-worker. Their CI process also runs a static analysis step against their C# code, which lets them enforce a variety of coding standards.
One of those standards is: “Catch specific exceptions. Don’t catch the generic Exception type unless explicitly necessary.” If it is explicitly necessary, their CI system attaches “Comments” (not code comments) to the commit,
To read the full article click on the 'post' link at the top.