Category: Blog

  • Choosing to not drive the Tesla

    I started a short thread on Twitter/X and Bluesky recently after leaving the Tesla at home recently. A few people asked me about it, so I decided to do a short update, as this is my computer on wheels.

    This is part of a series that covers my experience with a Tesla Model Y.

    A Busy Weekend

    A few weeks ago, we traveled to Greeley, CO to coach in a tournament. My wife and I coach two teams this year with our daughter and it’s very busy. This particular weekend, we were coaching the afternoons on Saturday and Sunday and Monday morning in Greeley. The catch was our second team had a Sunday morning tournament in Golden.

    We had booked a hotel in Greeley and decided to take two cars as we knew the Sunday morning event might run long and we needed to be back in Greeley. Our schedule of places, times, and drives was:

    • Saturday 11am – practice (17 miles from home)
    • Saturday 2pm – Greeley (72 miles from the gym)
    • Sunday 7am – Golden (64 mi drive from hotel)
    • Sunday 2pm – Greeley (64 mi from Golden)
    • Monday 3pm – Leave Greeley for home (83 miles)

    Around this, there likely are a few short trips of a few miles. Dinner, etc., so these are estimates.

    The other caveat on this weekend was the weather was predicted to be in single digits (in the F scale) overnight. Either positive or negative, but cold. The highs were 11F Sat, 15F Sun, and 8F Mon.

    Planning the Trip

    We already knew we needed two cars, so the question was: is the Tesla one of the two cars?

    Some snow was expected, and I didn’t worry, but my wife had a bad experience heading to the mountains one weekend in heavy, wet snow and the Tesla defroster didn’t work well. Neither did the wipers.

    That was a minor concern for me, especially as I learned how to get hot air rather than the default cool air for the front defroster.

    The bigger issue was time. In trying to get up to Greeley, we would be tight on time. I’d be asking to go over 200 miles without a charge in very cold weather, across 2 nights.

    Or we’d be looking to stay up late one night to charge at the Loveland supercharger, which is a 20 minute (each way) drive from Greeley. There are some chargers in Greeley on a map, but when we tried them last year we found:

    • 1 didn’t work
    • 1 was very slow (level 1 slow)
    • 2 were busy

    These were separate locations in the town, where businesses had set up fast charging. This isn’t a knock on Greeley, it’s just the reality of EV charging in some places. This is an unfamiliar place and I don’t trust most charge stations owned by various companies.

    At least not when time is a factor.

    The Final Decision

    I didn’t want to be stressed about charging, so we decided to leave the Tesla home. It wasn’t that important, certainly not to worry about charging time or having enough charge in a very cold environment. I took our old Suburban and my wife took her diesel truck.

    There ended up not being much snow, just a few flurries, but it was very cold, and we were racing from place to place. In coming back Sunday to Greeley, we had a 10 minute cushion according to Google Maps and lots all that trying to get a cup of coffee and some lunch from a stop. Even if we’d have aimed for the Supercharger for 10 minutes, they don’t have food service nearby. There is a hotel at the supercharger, but they’re a) slow and b) expensive.

    I’m happy with the decision. I missed driving the Tesla, but it made sense to skip it for this trip.

  • Advice I Like: Transactions and Relationships

    Life gets better as you replace transactions with relationships. – from Excellent Advice for Living

    This is incredible advice. I think that much of the complaints about the US from the rest of the world is how transactional we are. Whether this is with stuff we buy or neighbors or how we eat dinner or how we treat sports, we’ve often become transactional. What’s the best, fastest, easiest, most convenient, etc. We often want a quid pro quo for things we do.

    When you spend more time with others, when you value the experience and what you get from it, life is better.

    It can be harder, slower, etc., but I think it’s better.

    I’ve been posting New Words on Fridays from a book I was reading, however, a friend thought they were a little depressing. They should be as they are obscure sorrows. I like them because they make me think.

    To counter-balance those, I’m adding in thoughts on advice, mostly from Kevin Kelley’s book. You can read all these posts under the advice tag.

  • Adding Manual Relationships Between Tables in the TDM Subsetter

    I wrote about getting the Redgate Test Data Manager set up in 10 minutes before, and a follow up post on using your own backup. One of the things I didn’t show from my own database was that it had no FKs, so the subsetting didn’t quite work as I wanted.

    A previous post showed how add starting tables for the subsetter to look at, however that didn’t get me a good data set for testing. This post continues looking at the subsetter by adding manual relationships to our configuration.

    This is part of a series of posts on TDM. Check out the tag for other posts.

    Declaring a Relationship in the Options File

    In my previous post, I’d picked a starting table and had reduced the dbo.players table from 16564 to 1800. However, I only had player information. If I query my subset database, I see there is a player, but I have no batting statistics for this player.

    2025-01_0196

    This is because my table has no declared FKs in it. If I check the dbo.batting table, I can see only a PK.

    2025-01_0197

    Let’s fix this.

    Declaring Manual FK Relationships

    In the options file documentation, there is a section that notes manual relationships can be declared with a key called “manualRelationships”. If I copy/paste the example section into my options file, I’ll see this:

    2025-01_0198

    I don’t have a SourceTest table, so let me edit things. I’ll set a relationship between dbo.players.playerID and dbo.batting.playerID. This gives me the following in my options file.

    2025-01_0199

    Before I run my subsetter, here are the row counts by table.

    2025-01_0200

    I’ll re-run this subset command, which includes my option file at the end.

    rgsubset run --database-engine=sqlserver --source-connection-string="server=localhost;database=BB_FullRestore;Trusted_Connection=yes;TrustServerCertificate=yes" --target-connection-string="server=localhost;database=BB_Subset;Trusted_Connection=yes;TrustServerCertificate=yes" --target-database-write-mode Overwrite --options-file E:\Documents\git\TDM-Demos\rgsubset-options-bb.json

    When I do that, I know see these row counts. Note I now have batting rows.

    2025-01_0201

    My player query won’t work, so I still need to declare another relationship with the dbo.teams table. That is shown below:

    2025-01_0202

    I can re-run the same command above, and then I see this set of rowcounts (original on left, subset on right).

    2025-01_0203

    There is teams data, and if I re-run my queries from the top, I can see stats now.

    2025-01_0204

    Now I have a dataset that I can perform development work with in terms of players, teams, and batting.

    I can also add more relationships as needed, for example, I’ll add this section to include pitching, batting post, and fielding. Here’s my complete options file:

    {
      "jsonSchemaVersion": 1,
      "startingTables": [
        { 
          "table":
          {
            "schema": "dbo",
            "name": "players"
          },
          "filterClause": "birthState = 'CA'"
        }
      ],
      "manualRelationships": [
        {
          "sourceTable": 
            { 
              "schema": "dbo", 
              "name": "players"
            },
          "sourceColumns": [ "playerID" ],
          "targetTable": 
            { 
              "schema": "dbo", 
              "name": "batting" 
            },
          "targetColumns": [ "playerID" ]
         },
         {
            "sourceTable": 
              { 
                "schema": "dbo",
     
                "name": "batting"
              },
            "sourceColumns": [ "teamID", "yearID", "lgID" ],
            "targetTable": 
              { 
                "schema": "dbo", 
                "name": "teams" 
              },
            "targetColumns": [ "teamID", "yearID", "lgID" ]
           },
           {
              "sourceTable": 
                { 
                  "schema": "dbo", 
                  "name": "players"
                },
              "sourceColumns": [ "playerID" ],
              "targetTable": 
                { 
                  "schema": "dbo", 
                  "name": "battingpost" 
                },
              "targetColumns": [ "playerID"]
             },
             {
                "sourceTable": 
                  { 
                    "schema": "dbo", 
                    "name": "players"
                  },
                "sourceColumns": [ "playerID" ],
                "targetTable": 
                  { 
                    "schema": "dbo", 
                    "name": "pitching" 
                  },
                "targetColumns": [ "playerID"]
               },
               {
                  "sourceTable": 
                    { 
                      "schema": "dbo", 
                      "name": "players"
                    },
                  "sourceColumns": [ "playerID" ],
                  "targetTable": 
                    { 
                      "schema": "dbo",
     
                      "name": "fielding"
                    },
                  "targetColumns": [ "playerID"]
                 }
      ]
    }
    

    After re-running the subsetter, I have these row counts. Note there are rows in all the tables defined in the options file.

    2025-01_0205

    I can keep adding in more tables as needed to ensure the subsetter can walk down the data relationships I need in my database to produce a useable dev/test dataset that’s smaller than production.

    TDM can help your devs build better software and with the subsetter, this can create lots of agility to ensure the data you need to accurately build this software is available.

    Give TDM a try today from the repo and a trial, or contact one of our reps and get moving with help from our sales engineers.

    Video Walkthrough

    Check out a video of my demoing this below:

  • Creating a GitHub Actions Self-Hosted Runner

    I had to demo the Flyway Autopilot system recently and created a GitHub Actions runner as a part of that. This post documents how this went.

    First, if you go to the settings in a repo and click the Actions area, you see a Runners item. Click that. Notice I have no runners.

    2025-01_0235

    In the upper right corner, I can click a button to create one.

    2025-01_0236

    This gives me the instructions to get a new one. Note, these are PowerShell commands, and the first command doesn’t quite work right. Still, this is what I need.

    2025-01_0237

    I opened a CMD window and stared running these. Note, I need to repeat the change directory.

    2025-01_0238

    Now start PowerShell as the next commands are PoSh ones. When I copy the next command, it starts downloading a zip file. As of this writing, this is a 600-ish MB file.

    2025-01_0239

    Once this is done, you can run the next commands, which unzip and configure this. For the config, I just hit enter as I don’t have multiple groups or tags, and I leave it named as my machine. I also don’t bother to run this as a service.

    The last command runs the runner agent.

    2025-01_0240

    If I go back to the Runner screen in Settings, I see I have an idle agent set up.

    2025-01_0241

    And that’s it. If I pick one of my workflows in the Actions tab, I can run it and I’ll see the job started in my runner folder. Here are my actions with the Run workflow button on the right.

    2025-02_0284

    If I click this, I see the job start in the CLI.

    2025-02_0285

    If I get back to the Actions, I’ll see things in progress. As you can see, I was slow here.

    2025-02_0283

    That’s about it. Now I can run local automations in my repo that connect to things like local databases, which can be handy.

    Video Walkthrough

    I’ve got a video of this process if you want to watch it.