Author: way0utwest

  • Do as I say, not as I do

    A common saying from parents, teachers, and many managers, is that you should follow their instructions and not necessarily their behavior. This is a very human thing to do, with many of us struggling to follow the behavior that we ourselves want. Instead, we follow the vagaries of our moods and desires. We do this even as we tell others to do things that we don’t bother to do.

    It’s not just human behavior, but it applies to how many companies deal with their customers. Microsoft talks often about taking advantage of new features in code and using the platform to solve problems. They dislike adding simple “syntactic sugar” (like a numbers table), and instead prefer you build the code to handle some of these simple tasks.

    However, they don’t really follow this advice, as Andy Mallon showed with a recent post on why not to use a couple of their “recommended” stored procedures. They’re not well written for modern code, they have limitations (or bugs), and could be considered a security risk.

    To be fair, I know that changing code in something that works is always dicey, but at the very least, moving from varchar() to nvarchar() shouldn’t break anything. If there are edge cases, then write some tests and rebuild the code to work better. Maybe, more importantly, these procedures ought to model good code, as Microsoft would recommend to their customers.

    There are a lot of places where different products at Microsoft might not use SQL Server well, and I understand. These might be software developers that don’t know a lot about how to perform good data modeling or even how to take advantage of SQL Server code. However, at a company with the resources Microsoft has, I’d expect them to form teams to handle these tasks and then review and suggest changes to software like Dynamics, Sharepoint, etc. Even if they can’t use the latest features in the SQL Server codebase, they ought to model good practices for all versions.

    For many of us, we might act similarly inside a company. Often we write code out of habit, and perhaps, to expeditiously get work completed, even when we know better. Using SELECT *, leaving out error handling, and more are habits that far too many of us embrace, far too often.

    Start making some changes today. If you know there are better practices you should follow, then take the few extra moments to implement them. If you don’t know of good practices, start compiling a list, asking questions, even post an idea or question in the discussion for this editorial. We all could write better code, and that starts with us actually making an effort to model the behavior we might preach to others.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

  • Daily Coping 4 Aug 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

    Today’s tip is to remember we all struggle at times as humans.

    Empathy is a feeling that I suspect many people would like to have. Or maybe not. I know some people seem to have little and not want to give any to anyone outside their family. Or maybe even their family.

    To me, I think it’s important to look at the world from other points of view, and consider how others feel. During this last year, a lot of my pandemic talks with people are remembering to counsel them to remember their view isn’t mine. Nor is it many others.

    Today, what’s on my mind is Simon Biles. She withdrew from Olympic competition recently. This was a hot topic in the volleyball group I am a part of with other coaches. I was amazed by the very polar opposite reactions from people. Some empathized and applauded her for talking about mental health and the impact it has. Others castigated her severely for not competing no matter what.

    Both are valid views, though I think one ignores empathy. It ignores that we are human and we can struggle. I don’t know what the best choice was, but I respect someone else’s ability to make that choice.

    I had a kid quit during a match. The moment become too big for her and walked off the court, leaving the game, abandoning her teammates. At that moment, my first thought was concern for her. Actually, first thought was who goes in and how we manage the game, but as soon as I had a sub, I was concerned.

    We coaches talked with her after, and know that difficult times in life are hard. They are difficult. There are reasons to stop, and in our mind, this wasn’t one. She wasn’t in physical harm, and she could have played a different role, or let us change her responsibilities ,but walking away wasn’t a good response. Ultimately, she had to apologize to everyone for what happened. We forgave her, moved on, and competed the next time.

    In another situation, maybe walking off makes the most sense. There’s a balance between commitment and self-preservation, and I don’t think this case was the latter.

    However, the point today in coping is to remember everyone else is coping. They are coping in different ways, and with a different world. They live a different life. I want to help, support, counsel, and even push them. They have responsibilities, and are accountable, but they are also human.

    I have empathy for them, and try hard to understand the world from their view.

  • Daily Coping 3 Aug 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

    Today’s tip is to reach out to a family member, friend, or colleague.

    I did this recently for a trip. I actually took a business trip, the first one since 2019. Before I did so, I sent a few notes out to friends I know in the company, but I also reached out to a friend who lives in the LA area. I wanted to check on him, as it’s been months. I also was hoping he might be free for dinner.

    He was, we got together, and it was wonderful.

  • Interconnected Temp Files

    The other day I went to cook dinner for the family. I had picked a new recipe (everyone loved it), and it was going to be a bit of prep. Before I started, I turned on the speaker in the kitchen, connected my phone, and started Spotify. I got 2 sec into the song, just enough for me to turn and reach for the cutting board when the music stopped. I turned back, started it and everything repeated.

    I tried a few times, but it kept happening. I opened Spotify on the iPad we have in the kitchen, where the recipe was displayed and tried there. I had the same experience. At this point, I was getting annoyed and a little stressed. I needed to get cooking, but I also wanted some music. Maybe a little bit of OCD coming out as I checked my desktop with the same result. I updated the credit card and had my daughter check her app.

    A little searching around had me try different things (rebooting, log out/in, etc.). Finally, I found one person that noted clearing the temp files on my desktop might help. I did that, deleting a few GB and cleaning out the UserData folder for Spotify. I restarted the app, and things worked. I walked back to the kitchen and the iPad, and music played there as well. Finally, I could get dinner started.

    I’ve been enamored with some of the Spotify-connected features, allowing a few of us to listen together. I like when I listen in the car (or desktop) and then move to the other location, I can pick up where I left off. However, I hadn’t expected something like corrupt or data problems on my desktop to affect me on another device. As we start to interconnect more apps, it’s possible that a problem on one device might affect others.

    We do interconnect some systems in the data world. We have clusters and Availability Groups, and we certainly sometimes have instances or databases that create dependencies  between two systems. I doubt that many of you have one instance cause a problem with another, but it’s worth keeping in mind. We want connected systems, but we don’t want failures in one place to cascade throughout all the nodes.

    I like connected things, but I want loose coupling. I want one system to run on its own if the other has an issue, but I do want them to share data or status to improve the operation of the software. The big thing is that I don’t want one device (my desktop) to affect the operation of another (my phone). At least not while I’m cooking.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.