Category: Blog

  • Learning and Building Skills

    This is completely off topic and feel free to stop reading if you don’t care about how to tap a bolt, but it was something that I had to a) learn, b) spend time practicing, and c) get done to save money.

    tl;dr it’s not hard, but it was interesting.

    Bear with me as I’ll explain the situation, what happened, and what/how I learned.

    We have this building on the ranch.

    IMG_2882

    That’s not a great show, but it is cool at night. Here’s a better shot.

    20210315_161916

    This is a fabric building, made of a steel frame that’s anchored to the ground and fabric pulled around it. The fabric is actually secured by weaving straps through the frame. Here’s a good shot of how this works, albeit with a broken strap. We actually had to climb up here and tie a new strap to the existing one to secure things. Another skill, but a simple one. Mostly climbing and tying strings.

    messages_0 (1)

    At the bottom of the the fabric, there is a pocket. It’s actually a loop that runs horizontally along the material. Similar to how a hoodie has a pocket around the hood in which a string is threaded. In this case, there’s a steel pole in there. You can see this below, as the white material at the bottom is doubled over and a different color. There is a small pocket cut out towards the middle left where you can see the steel pole.

    20230225_161501

    This steel pole is secured to the bottom frame with a threaded rod. You can see a couple of these in the image, with a washer and nut on it. These go through the pole and screw into the frame that’s on the ground. The nut is tightened and holds the walls down in the wind. There is some space in some places where the wind and go in and out, which allows pressure to equalize inside and outside the building, and also helps the frame resist strong winds by having it flow through.

    I didn’t think much of this when the building was built, but at some point my wife told me a rod had broken and the building was flapping. In this case, part of the wall was moving, which wears the fabric down and can tear it.

    Not an easy thing to fix and potentially something that will cost a lot.

    Repairs

    When I examined the rod, I saw it had broken off in the base frame. I don’t have a great picture, but this is roughly what I saw, albeit in a round steel frame. This picture shows a bolt head broken, but for me, it was a longer rod.

    2023-04-26 13_45_07-bolt broken off in hole - Google Search

    I did what I often do. I triaged the scope and scale of this problem. I saw articles like this one from Bob Vila. That didn’t look took hard, so I decided to see if I could remove the old bolt with a left handed bit and easily fix things.

    I bought a left handed bit and tried and failed. The old bolt is exposed to dirt and the weather and I think it slightly rusted in the nut, or perhaps it was too clogged from dirt, but I couldn’t get it out.

    My thought was to call a service person, but I also know this is a small job. Likely someone can do this in minutes, which means it’s not much $$ and hard to get someone to come.

    A little more research led me to videos like this one, which shows how to make a mark and drill out the screw. In checking with the costs of the tools, I found some that weren’t expensive, and certainly less costly than getting a handyman out.

    So I tried this. I took the broken rod to the store, found it was 1/2”, bought a slightly smaller drill bit (29/64) and a tap/die set.

    I got a hammer and a metal drill bit and drilled down into the hole. I used a little gear oil to keep things cool and worked my way down.

    2023-04-26 13_53_10-Photo - Google Photos

    Once I had a hole, I read instructions, watched a video, and then tapped new threads into the space. This is really keeping this tool aligned and screwing it down into the hole. It’s hard, and definitely tiring on the hands.

    82580967_10220563234979744_3451612706077933568_n

    Once I have this through the metal, I usually can easily go up and down a bit, threading it into and out of the hole. This is really only about 1/2-3/4” of metal as the horizontal tube below is hollow.

    The last part is threading in a new rod and tightening down the not on the bolt to hold the base.

    Reusing New Skills

    Once I did one, I felt confident in doing others. In fact, the first time my wife pointed out the problem, there were 2 to fix. Since then, I find that I need to fix 2-3 every year, in different places. Some from weather, some perhaps from horses or people kicking the base.

    I found that after the second time, I didn’t even need to go look up the process, as I internalized what needed to be done.

    There are quite a few skills like this I’ve learned in my lifetime, and plenty here at the ranch, that save money, and more importantly, time. They also give me a sense of satisfaction.

    On the list this year is to teach my daughter this skill as she’s hoping to come work on the ranch after college and this is something she can do.

  • Why Learn PostgreSQL?

    At Redgate, we’ve spent a lot of time adding PostgreSQL functionality to our DevOps tools. We’ve also hired an advocate, Ryan Booz, to help us spread the word and educate everyone about the platform.

    How important is this? It’s hard to know. I know all the major vendors offer flavors of PostgreSQL. Azure has Azure Database for PostgreSQL, AWS has Aurora and RDS, and Google has AlloyDB. I also see plenty of customers using PostgreSQL in some way.

    On Redgate.com, there is an article on What is PostgreSQL, and why do businesses need to know more about it? This is a general, high level article that highlights a few things from perspective of business usage. While there aren’t a lot of details, I do find more companies embracing PostgreSQL and other platforms outside of Oracle/SQL Server.

    I also noticed a webinar coming tomorrow, PostgreSQL 101: Why PostgreSQL in 2023?, that I am going to try and watch.

    I’ve been working with PostgreSQL lightly, and it’s in my Flyway PoC series. I find it both interesting, and in many ways, the same as working with SQL Server. Much of my knowledge transfers, so I’m not worried about learning to use it more in depth if needed.

    If you’re worried about your company leaving SQL Server, maybe you want to spend time working with another platform, if for no other reason that you can build some familiarity with tools. However, I don’t know I’d recommend many SQL Server spend time here without a pressing need, and I don’t know that I would advocate for my company to switch. There is a lot to learn, and I think the time spent converting knowledge could outweigh licensing costs.

  • Exporting SQL Data Compare Results to Excel

    I had someone ask recently about getting SQL Data Compare results in Excel. It’s easy to do and this post looks at the process.

    Exporting a Comparison

    I won’t go into the details of making a comparison. I have another post that looks at this with joins, but the tool is fairly intuitive (ingeniously simple) to use.

    Once you have a comparison, you should see something like this image. Here I have two tables that are different (I selected all tables). The first, dbo.CountryCodes, has a difference in a row, different values in the name.

    2023-04-14 13_47_56-SQL Data Compare - E__Documents_SQL Data Compare_SharedProjects_(local)_SQL2017.

    The second, dbo.Status, has some rows in the source (left) that are not in the target.

    2023-04-14 13_48_02-SQL Data Compare - E__Documents_SQL Data Compare_SharedProjects_(local)_SQL2017.

    To export these results, I use the Tools menu. There is an option you can see below:

    2023-04-14 13_48_08-

    Once I pick this, I get a dialog with options. I can pick certain tables, or all. The defaults are all tables, and only show differences. Note the identical button is not selected.

    2023-04-14 13_48_17-Export CSV files

    If I open the folder in the dialog above (after clicking Generate), I see my files. There are separate files for each table and one with a summary.

    2023-04-14 13_48_24-Reports

    If I double click the dbo.CountryCodes.csv file, Excel opens, but not the way I like it. I see this:

    2023-04-14 13_58_46-dbo.CountryCodes.csv - Excel

    However, if I File | Open the file, I get the wizard for delimited files.

    2023-04-14 13_59_00-Expenses 2023.xlsx - Excel

    When I go to the second page and click “comma” as the delimiter, I see a better preview.

    2023-04-14 13_59_05-Text Import Wizard - Step 2 of 3

    I can finish this and I see my data. In this case, the first column lets me know this is changed data that has the same row with the same PK in both databases.

    2023-04-14 13_59_22-dbo.CountryCodes.csv - Excel

    Similarly, I get open the Status table file and see this. Here the first column lets me know this data is only in the first database, the source or left database, that I set in my SQL Data Compare project.

    2023-04-14 13_59_50-dbo.Status.csv - Excel

    The summary also needs the same open process and this shows me all tables, with lots of zeros. However, for my two tables, you can see there is 1 row noted in the Different column for CountryCodes and 3 rows only in the source (SimpleTalk_1_Dev) database.

    2023-04-14 14_00_35-Results Summary.csv - Excel

    I can then save these in Excel format if I like and send them around to colleagues.

    Summary

    You’ve seen how you can review SQL Data Compare results in Excel. I don’t know if your Excel will open the CSV with values in separate columns, or if you need to perform a File | Open as I did.

    This is useful for sending to a business user that might need to make decisions about what data needs to be synched where. The hardest part here is explaining the _s and _t names for source and target.

    SQL Data Compare is very handy for single GB data sets to compare. I wouldn’t recommend this for > 10GB, but under that, with good hardware, you should have success comparing tables or views.

    If you’ve never tried it, download an evaluation today.

  • A Tale of Two Drives

    One of the things I haven’t thought about much with my Tesla is range anxiety, even in winter. However, I recently had two almost identical trips with vastly different temperatures. This post looks at what I learned.

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

    The First Drive

    In early April I took a day off to go skiing. I used to do this often based on weather, picking sunny and cool days. However, in 2023 I’m more schedule driven. I had to do this particular day because I had the free time.

    I woke up and it was about 12F outside. The forecast for Keystone for the day was a low of 1F and a high of 41F. A wild day, so I set out from home. I’d charged the car to 90% the night before, which was a failure on my part. The car had been set to 90, and I had meant to change this to 98, but forgot.

    I drove up, stopping a few times for coffee, food, and the restroom. I arrived at the resort parking lot with 35% charge left. It was 7F, and I was a little worried about skiing, but I assumed it would warm up. This also meant I’d used 55% of my charge getting up to the mountain.

    It was a nice day, and I enjoyed skiing, leaving around noon. At this point it had warmed up to 34F. I actually showed 36% on the battery driving home. When I mapped going home, the car recommended a charging stop in Idaho Springs for about 5 minutes. Since I planned on lunch from Beau Jos, that was fine.

    I parked, walked to the gas station to get a soda and then picked up my pizza. I charged for about 12 minutes, getting 27kW added. More than I needed. I arrived home with 37% left. With all the stops, I ended up going 221.4 miles on 91% charge.

    Possibly I could have made it on a single charge.

    A Spring Ski Day

    A few weeks later, I went again. This time it was around 50F when I left home. I arrived at the resort, where it was about 25F, but warming quickly.

    This time I’d charged to 96% the night before. I got to the parking lot with 49% left. Around 47% used. When I left for home, same lunch stop but not charging, I felt comfortable. I pulled into the garage with 22% left on an 80F day near my house. This trip was 217.7 miles.

    Summary

    There is a huge difference between a 30-40F day skiing and a 10-20F one. The car definitely loses some range in the cold. It’s worth paying a little attention here, but I probably could have avoided Super Charging, or at least done less, if I had charged more at home before the first trip.

    In terms of comparison, the drives up were roughly the same, same stops. I used 55% in extreme cold and 47% in cool weather. 8% difference here.

    The drives back had a few different stops as I ran different errands, but 36% returning from the mountains in the cold. In warmer temps, it was 38%. One thing to note is that the return trip in the cooler weather was more like the going up in warmer weather. Coming home the second time the AC ran a bit.

    I got this car because it had the range that I thought would let me day ski without an inconvenient charging time on the way home. I don’t know other EVs would do that, but with the Tesla Superchargers in Idaho Springs, Silverthorne, and Park Meadows on my journey, I had some leeway to stop quickly. Even in cold weather, and skiing in 15F weather is rare for me, I likely could have made this without stopping.

    However, life is life. Sometimes things don’t go your way. The charging stop wasn’t inconvenient at all since I needed a restroom and lunch. I actually got the notification from the car it was charged enough while walking to get my lunch.

    EVs are interesting, and they have a different paradigm. I have ceased thinking about range almost all the time, but I do plan differently than I do with ICE cars.