Author: way0utwest

  • Daily Coping 10 Sep 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 plan a fun or relaxing activity and make time for it.

    This was something I did this week, and it was a nice break. Typically I work hard on the weekends, tackling lots of chores. This past weekend I had to dissemble a winch to get it working again, cut grass, measure some things, clean manure out of sheds, and more. I was way more tired going into Sunday night than I was on Friday night as work ended.

    Monday was a holiday, though my wife had things scheduled, as did a kid and his partner. However, they could all get Tuesday off. Since I tend to work semi-disconnected often, I traded Tuesday for Monday, worked during Labor Day, and then had plans Tuesday.

    Our plans were a hike up the Manitou Springs Incline, which I’ve done before. I didn’t expect to get up this time, at least not anywhere near as quickly as the others. My plan was to enjoy the drive down, start up with them, and likely about halfway duck into the down trail and meet them at the bottom. These old knees don’t like stairs as much anymore.

    Things worked out well, I enjoyed time with them, got some alone time when they kept going, and then we had a nice fun meal afterwards, which doesn’t happen often enough.

    Glad we made the time for this.

  • Daily Coping 9 Sep 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 forgive yourself when things go wrong. Everyone makes mistakes.

    This week has been a number of tips related to emotional growth, and this is one of them. It’s especially close to my heart right now.

    Recently I got annoyed with my wife and snapped at her a bit. I played the childish “you do this, too” when she complained. We were mad for day or two, and then made up, but really, I was wrong. I let myself get upset over nothing, and then continued to let things grow, when I didn’t contain my emotions.

    Perhaps worse, once we’d decided to talk again, I was beating myself up a bit for a couple days, which isn’t something I should do. That continues to make the issue about myself, and it isn’t helpful for me growing and learning how to better be in a relationship.

    I thought about things a bit, I read a bit, and I’m working to let my mistakes go here, and at the same time try to avoid repeating them again.

  • Patterns and Potential Problems

    I saw a post recently from a developer that needed to refactor and rename a table in a live system. The post describes a pattern for doing so and gives the steps taken, though not the actual code. I like the pattern overall, and I think it can work well in many situations. It’s for a PostgreSQL table, so I don’t know what restrictions might be different from SQL Server, but this type of pattern can work for SQL Server as well.

    It also could be problematic. Using the famous “it depends”, there could be issues with this pattern, depending on your workload and how your application is structured. The triggers in use could also be an issue in some environments, as they create an additional load.

    The biggest concern I have with this pattern is the copying of the data. Likely this is something that always works on a developer’s machine with a few dozen or even hundreds of rows of data. If this is millions, or tens of millions, the copy could end up taking substantial time. There is also the issue of changing data, with data being added or changed in the table, separately from being copied out. Depending on your locking and concurrency schemes, you could miss data.

    Or you could just lock the table and cause issues for clients. Both things that might not show up in developer testing. The lesson here is that changes to big tables need to be tested in a big way.

    This isn’t to say the pattern is bad, but that you should be aware of the potential pitfalls and then develop mitigation strategies. One way to get around the data issue might be choosing a way of copying over new or changed data after the initial data movement, or maybe even a cleanup load later after the new table is online. There are many possible ways to mitigate issues, if you take some time to think about the potential issues and then come up with a solution.

    When we are looking to make changes to our system, patterns are important to help us and others adopt the processes that work well. As we find and develop patterns, we need to ensure that we understand the strengths and weaknesses, and choose what’s best for us, with mitigation strategies to get around the potential problems. There often isn’t a perfect solution, and ensuring you and your team understand the limits of your chosen approach, helps ensure that we deploy code that not only works, but is deployed without causing issues.

    Steve Jones

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

  • Daily Coping 8 Sep 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 let go of self-criticism and speak kindly to yourself.

    This is hard. Being critical and unsatisfied with how I do things have driven me to work hard and focus. It’s something that I think has been important for my success.

    However. I am working to be realistic in criticism and not “beat” myself up or chastise myself. I’m learning to better accept the choices I make, listen to my mind and body, and accept the choices I make. Often, my self-criticism is something related to a choice or priority, and I need to evaluate it as such.

    I’m also human and flawed. I make mistakes, I offend people, I snap at my wife and kids, and I certainly let emotions take hold of me at times. I’m working to accept mistakes, think about if I’d do something differently, recognize when something isn’t the priority I wish it were, and then move forward.

    Try to stay positive, accountable for mistakes, but working to improve the future, not dwell on the past.