Tag: T-SQL Tuesday

  • T-SQL Tuesday #125 Unit Testing

    tsqltuesdayThis month T-SQL Tuesday is hosted by Hamish Watson, quarantined down in New Zealand. Like me, he has a ranch, and kids, so he has space to move around a bit.

    Hamish is a DevOps and testing advocate, just like me. His topic this month is to ask “So now that I have introduced unit testing – is it valuable for implementing with databases? “

    I think it’s a great topic, and here is my take.

    Database Unit Testing Documents

    My big take is that database unit testing best documents what you, as a developer, think your part of the database code should do. You expect these things:

    • The API a table will provide
    • The way a CASE statement decides what to return
    • The formulas you use for aggregation
    • The manipulation a function uses to return a value

    And more. Ultimately, we interpret a requirement, whether written down or told to us. We often may slightly mis-interpret what someone told us, or not think of certain cases. A test forces us to document the way we think our code behaves with certain data.

    This isn’t perfect, as we still may not account for certain cases of data, we may have bugs, or we may interpret things incorrectly. However, the test documents what we think. When there is an issue, we can go look at the test and verify this behavior is what is expected. Or we can add a new test (or enhance ours) to handle the case we didn’t expect.

    There are plenty of other reasons, but I believe that testing helps improve quality because it forces us to think, it documents our actions, and it helps ensure we don’t create regressions of code that already works.

  • T-SQL Tuesday Live 14 Apr

    Last week was a bust, which was disappointing for me. I look forward to touching base with a few people and seeing friendly faces. Somehow the meeting had an error, which must have been an issue with me editing the recurring meeting to add a password, a Zoom change, or something else. My money’s on Steve making a mistake.

    In any case, I’d like to do this again this week. I created a new meeting and tested it from a VM with none of my credentials. It appeared to work, so my fingers are crossed.

    Details

    Date: 14 Apr 2020

    Time: 13:00MDT/15:00EDT/19:00UTC/20:00BST (1 hour)

    Meeting: https://redgate.zoom.us/j/420898102

    Password: Cast this as in int –  0x000E418E (you should get a number starting with 9 and ending with 6.

    Issues: DM me on Twitter @way0utwest

  • T-SQL Tuesday Live–7 Apr 2020

    Last week went a little crazy, and I learned something: don’t post a Zoom link on Twitter. My apologies to anyone that wanted to join and had things go sideways. It took me about five minutes to mute everyone and kick people off.

    We ended up having a great call with just 4 of us, and it was good to touch base and talk through some of the changes in the world.

    This week I’m going to continue with the call. We had very little technical discussion, and I’m going to skip a technical theme this week and stick with a general touch base, health check, and community connection focus. We’re going to try and keep things civil and interesting.

    To try and prevent any craziness, I’m going to put a password on the meeting. Those of you that are data professionals should be able to answer this question for the password: what is the name of the type of index that isn’t stored in a row store? Enter just the first part, lower case (Hint: ______store index).

    The meeting isn’t hotlinked on purpose, as it’s not a complete URL. Zoom security is a thing.

    Call Details:

  • T-SQL Tuesday Live–31 Mar 2020

    I’m hosting another live T-SQL Tuesday event tomorrow, which is really just a casual video meeting for anyone that wants to join and take a break from work, life, or anything else.

    In this time of difficulty, I think this is a great coping mechanism that might help you keep in touch with the community. I know it’s certainly good for my mental health.

    This week the theme is: Securely connecting

    Most of us are remote now, and we’re often at home. This can prevent some challenges. Networking aside, security is still a concern. What you are doing? Jump boxes, rdp to servers or your desktop at work or something else?

    We’ll start with this theme, but we’ll see where the conversation goes. We’ll also do a health check with people, talk about anything good that’s happened?

    I’ll use Zoom with this meeting URL: Removed (see the most recent post for the URL)

    The date: Tuesday, March 24, 2020, and time:

    • 13:00MDT
    • 15:00EDT
    • 19:00UTC

    Just an hour. Jump on, say hi, give us your thoughts, problems, or just listen.