Category: Blog

  • Daily Coping 17 Apr 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is to have a tech free day. Stop scrolling and turn off the news.

    That’s not so easy for many of us. We’re embedded in technology and if we communicate with others, things leak through, whether on social media, bulletin boards, or even internal company communications.

    I struggle with this, but I have gotten better on the weekends. I’ll tackle projects around the house or do things with family and try to avoid the news and ignore tech. I don’t know I can ignore it completely, as I read on my phone, but I’m going to try tomorrow and just put my phone away and have an analog day.

  • Daily Coping 16 Apr 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is to put your worries into perspective and try to let them go.

    Easier said than done.

    Much easier said than done.

    I think part of the problem for me is that I’m just always on uneven footing. One day I think things are fine, the next I wonder if the world is really going to crash around me.

    I really, really try hard to keep things in perspective. Getting to talk to other people has been good. We had a great, 4-5 person call for T-SQL Tuesday Live this week, and apart from some technical discussions, we got to help each other keep perspective on the world as it is today.

    Which is vastly different from two weeks ago, even more different from Mar 1, and an almost indescribable different from last September.

    Putting things into perspective is hard. As an example. I go to the grocer every 3-4 days, mostly to get more fresh fruit and veggies. Since Mar 15 or so, every time I walk into the store, I feel like I’m getting sick. My throat starts to feel dry or sore. My nose might run. Eyes itch more. I feel like I’m breathing thick, germ filled air. It’s eerie.

    I leave, and I mentally chastise myself for the silliness.

    I’ve started wearing a bandana, and I’ve felt slightly better, but still it’s disconcerting, and all in my head. I tell myself to keep perspective, but I still struggle.

    Writing this helps. Maybe it helps some of you. Maybe you can say something that helps me, other than “just stop.” I don’t need that and neither does anyone else right now.

  • SQL Prompt Fixes Poor Order By Coding

    SQL Prompt is a fantastic coding aid, but it does more than format your code and provide intellisense. Over time, the team has enhanced SQL Prompt to also guide you along and fix some bad code that your team might write out of habit.

    SQL Prompt 10.1 released recently, and one of the recent fixes is for an issue that we’ve denoted as BP002. This is where someone writes this code.

    SELECT arts.ArticlesID
          , arts.Title
          , arts.Description
          , arts.PublishDate
          , arts.URL
      FROM dbo.Articles AS arts
      WHERE arts.PublishDate > DATEADD(WEEK,-2,arts.PublishDate)
      ORDER BY 1

    I don’t see this a lot from Microsoft stack developers, but PHP, Java, and some other languages will do this.

    This has been deprecated, but it’s a poor practice as well. The dependency between the ordering and column list is not good. This is an easy place to make mistakes over time as code is refactored.

    If I do this, SQL Prompt gives me a green squiggly line below the constant.

    2020-04-02 11_49_05-SQLQuery7.sql - Plato_SQL2019.SimpleTalkDev_Steve (PLATO_Steve (63))_ - Microsof

    If I put the cursor here, I get a lightbulb in the sidebar. Clicking that will give you some options.

    2020-04-02 11_49_13-SQLQuery7.sql - Plato_SQL2019.SimpleTalkDev_Steve (PLATO_Steve (63))_ - Microsof

    If I click the first item, this will give me a placeholder where I can choose a column. We could replace this with the first column in the column list, but if you detect this during refactoring, the first item from the column list might not be the one you want.

    2020-04-02 11_51_20-SQLQuery7.sql - Plato_SQL2019.SimpleTalkDev_Steve (PLATO_Steve (63))_ - Microsof

    I can start typing and intellisense takes over.

    2020-04-02 11_49_29-CandidateList

    It’s a small thing, but this is a one way that increases code quality for developers that might not know better.

    If you haven’t tried SQL Prompt, download an eval and see what you think. If you have it, upgrade and ensure you have all the code fixes.

  • Daily Coping 15 Apr 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is to send a letter or message to someone you can’t be with.

    I’ve actually been doing this on a lot of days. I’ve been reaching out through text, Facebook, or email to various friends, family, and colleagues that I would often see at different times during the year, but I haven’t seen in awhile. It’s a quick way to just touch base with some people and see how they’re doing.

    I should just do this more often.