SQLServerCentral Editorial

Your Code Is Your Standards

,

The MERGE statement is controversial, though I think you should avoid it. Aaron does as well, and Paul White demonstrates potential issues. Recently I also saw Cyndi Johnson give a few reasons not to use this in your code.
However, there's a part at the end of Cyndi's post that says this: " Your code is your standards. Repeat it with me: YOUR CODE IS YOUR STANDARDS."
The context is that while you might document why MERGE is only used in certain situations, new developers might look at the code, see it, and not remember the standards.
I'm sure many of you think, surely we've documented standards, so everyone ought to know them. Do they? How many standards do you have? Are they consistent or maybe some of them might have changed over time or across projects?
I've built standards, and I've often found that while I internalize many of them, I make mistakes. I might not remember certain things. Usually there are a few that are very important, and I remember them. Or I make mistakes a bunch and someone chastises me enough to get me to remember.
I do agree that in some sense your code does represent your standards, but I also know that code changes. Habits, patterns, and knowledge change, so I doubt that your entire codebase actually adheres to all your standards at any point in time. It's just in too much flux.

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating