I am kind of weird. I love clickbait. It is the simplest (and cheapest) form of gambling. I see a headline that says “Walt Disney World is closing all operations immediately” and I have to click on it, after I guess what it is means. If you clicked on this with the morbid curiosity of “what kind of stupid thing will this post be about?” Well, I want to make the point that blaming the device for doing the operation or answering the question you asked… is dumb.
It is much like the case when you ask someone “What are you doing this weekend?” on Sunday morning and them telling you what they are doing later that day…and then you blaming them for not telling you what they had planned the next weekend. Why how dare you answer the question I actually asked, you knew what I meant. With people, perhaps a case could be made that you might say “you mean today?” but certainly not with computer programs. I will focus on a SQL where we ask questions and it answers, but it pertains to any programming task.
It wasn’t SQL’s fault it was wrong
It is you. If you write a query that says:
SELECT CASE WHEN 1=1 THEN 'All' WHEN @value > 10 THEN 'Over 10' ELSE 'All' End AS GRP, COUNT(*)FROM TableGROUP BY CASE WHEN 1=1 THEN 'All' WHEN @value > 10 THEN 'Over 10' ELSE 'All' End
And you are surprised that it returned ‘All’ for every row in the table, that isn’t SQL’s fault. It isn’t it’s fault that CASE expressions work that way, and it isn’t it’s fault that it gave you the answer to the question you asked.
Of course, we know that the seasoned pros never make such mistakes (or at least we know that seasoned pros catch this kind of error before it ships at the very least.) But there are many places in a multi-user system that can be the culprit for errors that you should always consider when you get small errors. Either way, blaming SQL is like blaming the guitar for playing the wrong notes.
AI is just going to make this worse
I know this happens occasionally when I use AI to ask general questions. I ask one question, and it answers what seems like something else. Siri does this quite often, and it won’t even tell me what I asked.
It also happens when I try to generate code. Sometimes it is amazing and does exactly what I ask of it. Sometimes the answers are as good as if I asked the door to my office to generate code. Perhaps worse of all are the cases where the answer is close. Beause as I discussed in this blog, the first two tests are the most important (code compiles and does something that “feels” like it is doing what you asked.)
But the more complex the task, the more that you need more than feelings.
Point the finger at yourself first
The big point here, is that instead of first thinking that SQL Server/PostgreSQL/.Net/AI/etc are behaving incorrectly, ask yourself
- “Did I ask the right question?”
- “Did I specify the right amount?”
- “Have we tested this more than it seemed like it was right?”
Almost every single bug in every piece of software is not a compiler error. It isn’t that the language is too hard. It is that we didn’t think about a problem in the right way or we accidentally asked the wrong question. And that is okay. No matter how much you like to amid you are wrong, you are the same about of wrong. Check that first and fess up, or prove that it was the fault of the system.
Or blame some form of concurrency fail, that could be it!



Leave a Reply