Skip to content

Durability

Jeff Humphreys edited this page Aug 4, 2020 · 1 revision

Why It May Last

I can't say for sure about the future. I'm not a consistent person. I drop projects like hot rocks all the time.

But I've always loved SQL Server, mostly the T-SQL side, and I loved SQLCLR the moment it came into being. I hate to write complex repetitive code that no-one can understand when I just want a simple name to explain it.

So for example, the following:

"RTrimC" rather than "SUBSTRING(s, 1, IIF(s IS NOT NULL AND LEN(s) > 0, CHARINDEX(s, '.')-1, s)"

What does this give me? For one, The risk of error in the "SUBSTRING" technique is massive. The debugability is minuscule. And the likelihood that I as a developer will skip some validation ('well, I know it's always at least one characters') is incredible!

And if you think of a validation later, guess how many places you won't add it in?

Also, I'm old(er). So I don't have much life left (???) so I want to leave something, and not a book about Life and Everything. Something that my brain seems fairly smart about.

I do take criticism much better than I did, so if someone says "Why the dumb names?" I'll just apologize, and perhaps add an clone function with a name they like. Then "Why do you have functions that do the same thing?" I'll explain that sometimes when I'm calling a function, I have a variation in the use case that I want to describe in the name even though the actual function isn't any different. So I have "FirstWordBefore" and "LeftOf", which are similar. It is more confusing, but also the use case code implementation is more meaningful in business language.

Another reason (I know, this should be a bullet list) is that I need these to do my job on DBA stuff, and it speeds my development. Any method that doesn't help gets changed or ignored, or even deleted (oops, I meant obsoleted).

Yet another: I like to opine. I think I'm brilliant. And opining on social media anymore is an incredible destructor of self. Opining on things I think I'm brilliant about is actually quite engrowthening.