Sql Comments Style
Should we stop using
-- in SQL comments?
Interesting blog post from Brent Ozar on whether we should stop using
-- for SQL Comments. I use these comments a lot because they are quick and easy for me to type. I don’t like voluminous comments but this is a good point.
If clicking the link is too much effort for you, he is saying you should do this
instead of this
Seems fine in Sentry One
I just tried it in Sentry One and it looks fine to me.
However, if I remember, I will stop using them from now on. However it’s a big burden.
/* */ is six key presses (remember the shift) and
-- is only two on the same key, so the typing overhead is substantial. 😊
What about PowerShell?
Makes me wonder about
PowerShell as well because that is not a compiled language, it is interpreted. I never run monitoring tools against PowerShell code though, so maybe one-liner comments are fine?
Consider the following code.
I can’t see a problem with that, can you? Let me know in the comments below.
Send a tip. Try it!