Doing a Little Research

  • Comments posted to this topic are about the item Doing a Little Research

  • There's been some good things since 17 hit the streets.  They did, however, break copy'n'paste.  I have a special color (Red) that I use for ALL constants and a special color for ALL operators (Blue instead of that weak Gray/Grey that they use) along with other special colors and making the font bold to make it easier to read.  It used to be that a copy'n'paste from SSMS to Word or Power Point would do a nice WYSIWYG copy but it hasn't worked correctly since 17 came out (before Erin got there).

    One has to wonder... how do you break such a thing to begin with?  It seems to me that should be in a fairly bullet proof object of some sort.  Did THEY do the research they needed to?  Patently not.  Again, they broke it before Erin came in.

    I haven't suggested that they fix it on Feedback.  I mostly gave up on that a decade or so ago because "they" (people at MS) could NOT see (according to the questions they asked on Erland Sommarskog's good suggestion that he and I both answered in detail) what the use of a "sequence generator" would be starting in, IIRC, 2009.  THEY didn't do the research!  And then, when they did finally come out with it (14 years later), it kills minimal defeats Minimal Logging.  It's not as bad as FULL logging (which takes 147 Giga-bytes of logging) but having it generate 88 Giga-bytes of log file to create a 52.3GB test table instead of the 600 Mega-byte log file when Minimal Logging comes into play.

    And speaking of things Microsoft did NOT research, look at the condition the released the STRING_SPLIT() function in back in 2016 and then to 6 YEARS to add the missing split element ordinal.

    I realize that Erin has been there for a bit, now.  Maybe I'll suggest the fix when she does another "Friday" post on LinkedIn instead of using Feedback.

    And when code even a simple, memory-only Cross Join takes 30% longer to run in SQL Server 2022 than it does in 2017 on the same box with the same disks, you've just gotta know that THEY missed something serious because THEY didn't do the research (and it's been that way since 2019 came out).

    So, even though Erin didn't have anything to do with what I speak of above, no one at Microsoft has the right to bust anyone's chops about not doing the research (reading the documentation is a part of that but not all of it).

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • There's been some good things since 17 hit the streets.  They did, however, break copy'n'paste.  I have a special color (Red) that I use for ALL constants and a special color for ALL operators (Blue instead of that weak Gray/Grey that they use) along with other special colors and making the font bold to make it easier to read.  It used to be that a copy'n'paste from SSMS to Word or Power Point would do a nice WYSIWYG copy but it hasn't worked correctly since 17 came out (before Erin got there).

    One has to wonder... how do you break such a thing to begin with?  It seems to me that should be in a fairly bullet proof object of some sort.  Did THEY do the research they needed to?  Patently not.  Again, they broke it before Erin came in.

    I haven't suggested that they fix it on Feedback.  I mostly gave up on that a decade or so ago because "they" (people at MS) could NOT see (according to the questions they asked on Erland Sommarskog's good suggestion that he and I both answered in detail) what the use of a "sequence generator" would be starting in, IIRC, 2009.  THEY didn't do the research!  And then, when they did finally come out with it (14 years later), it kills minimal defeats Minimal Logging.  It's not as bad as FULL logging (which takes 147 Giga-bytes of logging) but having it generate 88 Giga-bytes of log file to create a 52.3GB test table instead of the 600 Mega-byte log file when Minimal Logging comes into play.

    And speaking of things Microsoft did NOT research, look at the condition the released the STRING_SPLIT() function in back in 2016 and then to 6 YEARS to add the missing split element ordinal.

    I realize that Erin has been there for a bit, now.  Maybe I'll suggest the fix when she does another "Friday" post on LinkedIn instead of using Feedback.

    And when code even a simple, memory-only Cross Join takes 30% longer to run in SQL Server 2022 than it does in 2017 on the same box with the same disks, you've just gotta know that THEY missed something serious because THEY didn't do the research (and it's been that way since 2019 came out).

    So, even though Erin didn't have anything to do with what I speak of above, no one at Microsoft has the right to bust anyone's chops about not doing the research (reading the documentation is a part of that but not all of it).

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I had a heck of a time getting FileTables to work. There are four different places that require setting up a special name or alias, and NONE of the documentation I ever found explained it all properly. It took lots of digging around through multiple web sources, joining together fragments of information and hours of experimentation before I figured it all out. Of course, the name they chose for the feature didn't help - searches on the subject always uncovered loads of hits on files or tables, which had nothing to do with what I was after.

  • "Something doesn't work" is quite broad in scope.  Not expected output/result at one end through to some form of error being thrown at the other.

    With errors there is a clear path that starts with "read the error message".  This will get me to the offending line of code.  Sometimes its an embarrassing PEBCAK error (Problem Exists Between Chair and Keyboard).  If not then I start by looking at the inputs to the offending line and where they come from.  Hopefully this won't be a big ball of string.

    There are times when I look at the error message and think "what the hell does that mean".  Then its Google, ChatGPT, StackOverflow, Reddit etc.  I'm finding Google isn't as good as it was, ChatGPT can be good but its responses can also be hallucinations.  In all honesty, I find it best to engage with the online community.  Plus ca change.....

    Having diagnosed the problem the questions are: -

    • Could this have been prevented?
    • Is there some hole in the process logic or some unforeseen condition that wasn't known at the time?
    • Is there some mechanical test that could have been added that would have detected this and if so, can we take the opportunity to consider other possible edge cases?

    I find that considering edge cases so long after the code was originally written allows me to view the problem with a fresh pair of eyes.  The equivalent of a really good sleep on it, albeit with a rather savage awakening.

     

     

  • I may be old school. I still try to read any available documentation when I get a new toy or new device to play with. Then I like to start with a general search on the subject I am trying to solve. Hopefully, that leads me to documentation links and if I don't understand the available documentation, then I start looking for examples. For SQL Server, the documents online often provide enough examples to allow me to try, test, and evaluate the code I need to write. For C# I also start with the Microsoft online documentation, and then go look for examples.

    If I find examples through links other than Microsoft (or other vendor) I try to remember to comment in the code where I found it (and the author) to help me find it again, as well as give credit to the author for their assistance.

     

  • I learned (from a great mentor DBA!) early in my career the need to use experiments to prove out the way things work.  It is a habit I've found invaluable throughout my career and has contributed greatly to my success.

    My experience with MSPs shows that most these folks have no ability to find things out via documentation or experimentation.  If there is any uncertainty, the automatic response is to open a ticket with the vendor so that the vendor can tell them how to complete the task.

    For myself, I use documentation when looking for something specific, but I rarely just read it to understand how something new works.  I will say that it feels like there is a big difference in documentation style and use between Microsoft and Oracle.  I find Oracle documentation hard to read, and there is much less supporting info such as blog posts and help threads.  The standard response online when asking a question about Oracle database is "did you read the documentation?"  For SQL Server it is "Let me show you how that works."  I think that is why SQL Server is wildly more popular than Oracle.

    Be still, and know that I am God - Psalm 46:10

  • My usual method is as follows:

    Exhaust every possible avenue of research.

    Triple-check everything to ensure I am correct and won't look silly if I have to post a question somewhere.

    Repeat the above 5 times.

    Only then, when I am 100% sure I've tried everything but still don't have an answer, will I write a post on a forum etc. asking for help.

    The answer will then materialise directly inside my noggin approx. 5 seconds after hitting the submit button, but too late for me to not look silly!

    Obviously, that's a little tongue-in-cheek, but it's not far from the truth on occasion!

  • This is such a great topic and one I've struggled with for decades! My problem is I can identify my failing, but do NOT have an answer. I've come to consider this a character flaw of mine, and I wish I knew how to stop it.

    My issue is sometimes, when I encounter an error of some sort, I will become laser focused upon the problem. Way too laser focused. I'll illustrate with the most recent incident.

    Six weeks ago, while working on a software project at home, I was retrieving values from a table and displaying them on the web page I am working on. These are all values from a table in a database I have. All the text values were fine. All the numeric values were zero (0). All of them. I struggled and stared at it for weeks trying to figure out what was wrong. I became certain that something was wrong with Entity Framework Core, but I couldn't figure out where. Finally, after several weeks of focusing only upon one C# file in the API project, I actually looked at the UI code. Trust me, this is NOT NORMAL for me to look elsewhere. I will spend YEARS focused upon only one file. So, looking at the UI code I discovered that I had used the wrong table to try and display the data on the page. The wrong table happened to have some columns named the same as the table I thought I was trying to display from, all text fields. None of the numeric values were in the wrong table, so C# (or EF Core) was just returning zero for columns that didn't exist in the table. In other words, in this case, the fix was extremely simple.

    This is example is far and away NOT TYPICAL of the problems I encounter! Normally, I don't try to retrieve queries against the wrong table. But I do focused so narrowly upon one small area that I suspect I've missed the answer, whatever it may be, like I did in this case. And often the solution is not simple. However, long experience also shows me that I have missed the problem in the area where I am focused. In fact, probably more than 50% of the time it is in the small area I am focusing upon, which is why I have learned to have a laser focus upon one small area of code.

    I do the try to read the documentation, but this often has its own problems for me. I can, sometimes, see as much as 5 different interpretations of the documentation. Then I sit there wondering which of the five interpretations, if any I've thought of, are correct? I'll try asking the authors, if I can find them, which interpretation I should use. And I've found that only about 15% of the time will the author respond. So, 85% of the time I'm left to struggle alone. I'll try my local .NET user group, but that normally doesn't result in any answers. And forget going to Stack Overflow. That has become, to me, the most toxic of places on the Internet to get any help as the "help", so called, is normally conveyed in a message that comes across as, "Who the hell do you think you are asking this question??? Only the most esoteric of questions are allowed here!!! I will disallow all answers to your question and mark your question as far down as I can get it and make sure others will mark it down as well so you'll realize you're nothing more than an %^&@#%!!!!!!!!!!!".

    So, ignoring for the moment the toxicity of Stack Overflow, the unwillingness or inability of groups like local groups to answer or respond, etc., how do I break away from remaining too laser focused upon one very tiny portion of the code? I've become very distrustful of myself, which contributes to remaining focused upon one or two lines of code , for weeks or months. I've lost confidence in being able to do many things. I've no idea how to get out of this, whatever it is.

    Kindest Regards, Rod Connect with me on LinkedIn.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply