Author: way0utwest

  • Social: Using Tech to Raise Money

    In 2020 for the first time, I donated to a few political campaigns. I’ve never done that before, though my wife has. I was inspired, and I was glad I helped out, and the candidates I supported went 1-1. That’s fine, as I believed in both of them.

    Last week I saw a tweet from Jeff Atwood, fellow UVA alum and founder of Stack Overflow. He was raising money for the Georgia Senate run-off in January.

    2020-11-30 15_28_03-Jeff Atwood on Twitter_ _It's Monday, so that means it's time to raise money for

    I’d seen a note from him the week before, but was busy and ignored it. This time, I decided to donate. I did so immediately, and got a text from my wife right away. She watches our money closely and asked if I’d actually donated to the GA campaigns. I had, and got a thumbs up back.

    I was stunned when I got a PM from him informing me that I’d won the iPad. I’ve almost never won anything, but I often don’t even bother to enter contests.

    Jeff has been running contests to help raise money for the Democratic candidates, and he’s giving away tech gifts to inspire people. This week the prize is a Macbook Air, with the M1 processor, courtesy of Brent Ozar.

    If you believe in Jon Ossoff, and want to prevent some gridlock in DC during the next few years consider donating. The chance to win a prize is icing on the cake, but the chance to affect change is more important. I’ve listened to the Democratic candidates, and I think they are good people, looking to improve their state and our country. Character is important, and I think both candidates have that character.

    My opinion, I also think that remarks from their opponents lack the character I prefer, putting their party above the well-being of the country and its citizens.

  • Daily Coping 1 Dec 2020

    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.

    Today’s tip is to set aside regular time to pursue an activity you love.

    For me, I don’t know I love a lot of things, but I do enjoy guitar and I’ve worked on it a lot this year. The last month, I’ve let it go a bit, but I’m getting back to it. I try to remember to bring it downstairs to my office, and I’ll take some 5-10 minute breaks and play.

    I’ve also started to put together a little time on Sat am to work through a course, and build some new skills.

  • Basic JSON Queries–#SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    Recently I saw Jason Horner do a presentation on JSON at a user group meeting. I’ve lightly looked at JSON in some detail, and I decided to experiment with this.

    Basic Querying of a Document

    A JSON document is text that contains key-value pairs, with colons used to separate them, and grouped with curly braces. Arrays are supported with brackets, values separated by commas, and everything that is text is quoted with double quotes.

    There are a few other rules, but that’s the basic structure. Things can next, and in SQL Server, we store the data a character data. So let’s create a document:

    DECLARE @json NVARCHAR(1000) = N'
    {
      "player": {
                 "name" : "Sarah",
                 "position" : "setter"
                }
      "team" : "varsity"
    }
    '

    This is a basic document, with two key values (player and team) and one set of additional keys (name and position) inside the first key.

    I can query this with the code:

    SELECT JSON_VALUE(@json, '$.player.name') AS PlayerName;

    This returns the scalar value from the document. In this case, I get “Sarah”, as shown here:

    2020-11-21 14_58_17-SQLQuery3.sql - ARISTOTLE_SQL2017.Compare2 (ARISTOTLE_Steve (58))_ - Microsoft S

    I need to get the path correct here for the value. Note that I start with a dot (.) as the root and then traverse the tree. A few other examples are shown in the image.

    2020-11-24 14_49_16-

    These show the paths to get to data in the document.

    In a future post, I’ll look in more detail how this works.

    SQLNewBlogger

    After watching the presentation, I decided to do a little research and experiment. I spent about 10 minutes playing with JSON and querying it, and then another 10 writing this post.

    This is a great example of picking up the beginnings of a new skill, and the start of a blog series that shows how I can work with this data.

  • Delivering Patches Quickly

    I love cars. In my life, I’ve owned and regularly driven well over 20 cars. If I count the ones I purchased for my kids and lightly drove, it’s over 30. Just writing this paragraph gets me a little itchy about looking for another car. Actually, I’m looking lightly now, as I expect two kids to move on next year and handle their own expenses. So, next year I’m hoping to add another vehicle.

    Recently I saw a note that there was an exploit against Tesla cars, which are rarely stolen, but there have been a few issues. This one was against the fobs that communicate with the car. Tesla is working on a patch, which is interesting. They’ve not only devised their cars, but also their fobs to get firmware updates. Good, and bad, as this increases attack surface area,

    Tesla can patch their cars in real time, and they do this fairly quickly. I have a 2012 BMW, and I have updated the firmware in it, but patches are rare, and most of them seem to be stuck in the “visit a dealer” paradigm. It seems many other makes of cars fall into the same paradigm, and aren’t built for regular updates.

    In some sense, this reminds me of the way many people deal with the their SQL Server databases. We put code out there, in tables, functions, procs, etc., and often we struggle to update that code quickly. This becomes especially true with applications that use our objects. I often find that changes seem to come slower and slower over time, much like the traditional way that your car is updated by a dealer only.

    Ideally, we’d be able to more quickly update code when there are issues. This is especially true if you have procs or other code that could potentially have security issues. DevOps asks us to move towards this type of flow, making changes, and adjusting quickly. There are certainly still challenges with changing code and adapting applications, but if front end developers and database developers worth together, we can deploy code quicker.

    Our customers don’t care about our challenges we face with writing and deploying code. What they want are new features, functions, better performance, and meeting their needs. DevOps helps, but it’s not easy. You have to automate things, deploy code sooner AND be willing to fix your code mistakes. You not only need testing, but testing that improves over time.

    It is, however, worth the effort.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher or iTunes.