Author: way0utwest

  • Using Git Prune–#SQLNewBlogger

    As I’ve been working with SQL Saturday and managing changes to events, I’ve accumulated a lot of branches. Even though I’m a solo developer, I decided to use branches, as I expect others to share this load in the future. This post looks at how to start cleaning those up.

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. You can see all posts on Git as well.

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

    Finding Old Branches

    When I ran the git branch command, I saw this. There are a lot of old branches in there.

    2024-04-11 10_44_53-cmd

    I decided that I should reduce this number. After all, even removing stale branches means I have a lot of events in flight.

    We use GitHub, and when I go on the site, I see lots of branches, some of which date back to last year. Those events are done, so I decided to delete some branches. In the image below, there are three branches. To the right, there are delete icons on the bottom two as I’ve already pressed the one to delete the remote branch on the top one.

    2024-04-11 10_51_00-Branches · sqlsaturday_sqlsatwebsite — Mozilla Firefox

    Now, how do I delete the local branch? Let’s start by removing it.

    Git Prune

    There is a command to remove references to remote branches that are deleted: git prune. I deleted a few older branches, and then ran git prune for remotes, with the –dry-run option. This tells me what would happen. As you can see, a number of branch references would be deleted.

    2024-04-11 10_51_57-cmd

    Nothing in here I’m worried about or that is active. I’ve deleted these on GitHub, so I’ll re-run the command without dry run. This removes the references.

    Unfortunately, the local branches still exist. We don’t remove these, as it’s possible I have work on a local branch not sent to the remote, so doing this automatically, even if I do it, is dangerous.

    I’ll do another post on removing the local branches.

    Automating the Removal of Remote references

    I might want to remove local references for branches that get deleted on the remote. This is useful if you delete branches on merge. I don’t in this case, as I’m often using the same branch for multiple changes for an event, rather than a new branch for every one.

    One way to do this is to change the config with this:

    git config remote.origin.prune true

    This will then run the prune on each fetch or full. This helps keep things cleaner, though local branches still exist. However, if I commit to a local branch and push, I’ll get an error that I need to configure the upstream. That helps with me being aware of what’s active or not.

    SQL New Blogger

    Using version control is a core skill for anyone in technology. Even database people. You could write posts on how you use or learn about git (or something else) and showcase your skills.

    This post took me about 15 minutes to write, even with screen shots.

  • Missing the Office

    Recently I traveled to visit a customer who has an in-the-office culture. They have multiple large buildings outside a major US city and almost all their employees (7000+) live nearby and are expected to be in the office the whole week. More senior people can opt for 4 10-hour shifts rather than 5 8-hour shifts, but with few exceptions, they have people in the office.

    I hadn’t seen that in a long time. Almost every customer is mostly remote or some level of hybrid (usually 2-3 days a week in the office). What’s more, they have an open culture, with rows of desks for teams and spaces between the rows for managers and directors. No cubes!

    Everyone below a senior VP/C-level is at a desk. There are conference rooms and smaller quiet pods, but mostly everyone works in wide open spaces. From developers to sales to finance to human resources. It’s both chaotic and loud, but also refreshing. I also loved seeing so many people wearing company logos on t-shirts, jackets, hats, and more.

    The environment reminds me of my time at JD Edwards. We had cubicles, but mostly open ones with half walls to the side and one full wall at the back where two cubes met. However, it was a very strong culture of comradery and closeness that I hadn’t seen at any large company before or since: until now. Teams might be close in some places I’ve worked, but the entire company at JD Edwards felt like a family of people who were working together. We didn’t always get along and argued, but we were all united. It was a great feeling.

    I miss that. Redgate is a great company, and I enjoy my co-workers, but I miss going to an office and seeing everyone inside it. Most people come to the office once or twice a week, but I miss my visits when most everyone was there every day. I’ve worked remotely for over twenty years, but I do still miss the office some days. Certainly my visits to the various Redgate offices, while good, have me wishing I saw more people there every day. I’m heading there tomorrow, and I hope I see lots of people.

    I don’t know that mandating everyone in the office is a better choice, but I do know there are good things about gathering groups of people together. Strong leadership, empathy, a clear vision, and a balanced workload are important for any organization, but especially important if you want everyone in the office these days. This customer did a great job with it, and I think they would still have a strong culture with remote work, but their choice works, and I’m a little jealous.

    Steve Jones

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

  • Familiar Sights

    Yesterday was a long day in London. I arrived late in the am, and as I was walking from the plane to the border check, I went down the escalator on the entering-the-country side of the terminal. I had this view:

    20240415_121436

    There’s nothing special here, but through the glass there are the outbound escalators that I’ve taken up and a Caffe Nero coffee shop. That’s a place I used to stop often on my way out of the UK early in my time at Redgate.

    I used to always stay at a hotel near the airport, first the Renaissance Hotel with Brad McGehee and later at the Hilton or DoubleTree with Grant. I’d often have an early flight, which meant getting up and trying to catch the Hoppa bus or get a cab. The hotels usually didn’t have breakfast ready then, so I’d stress over the transport, which could be funny, get to the airport and through security and then stop here for a cup of coffee and a chocolate croissant.

    Hectic, but very impressionable trips on me. So many memories of sitting near a gate, eating and looking forward to coming home. I didn’t travel much those early days outside of a few UK trips, and it was a relief to be going home.

    The last 5-6 years, with a direct flight to Denver and more airline status, I get a late flight, enjoy the lounge, and skip Nero, but I always reflect on my memories there as I think of the early days, paying with coins or bills, or swiping my American credit card and having to sign, something so few European travelers did.

    Hotel Confusion

    I spent the night in the Hilton at T4, which is one of two hotels I use now. There is a Garden Inn at T2 as well, which I often pick when leaving since I can walk to the terminal. Yesterday, arriving tired in the morning, I was on autopilot and walked to the Garden Inn. They said they didn’t have a reservation for me.

    Doh! I hadn’t even checked, assuming I was there, but when I looked in the app, I realized I was at the T4 Hilton, which is a nicer hotel, just a bit of a trek. I walked back, found a train and was at the Hilton 30-45 minutes later. Not a long time, but also not quick for a tired traveler.

    A nap, some work, and a workout made me feel more human, but still a long day. Plus I had a 730p call in Denver, which was 230a in London. It’s been a long 24 hours.

    However, I had a quiet dinner in the hotel and snapped this picture after.

    20240415_220258

    This large atrium has a lot of memories for me. I’ve been here often, including quite a few times with my wife. We’ve eaten in this spot, grabbing dinner after a trip in the EU somewhere, having a quiet night before a morning flight. While this hotel is a walk and train to T2, in the morning, it’s an early morning and stressful, so an early night here is often on our agenda.

    This hotel also has a special place in my mind as the gym is on the ground level (this is the first floor), but it’s on the side of the hotel with no windows. It’s a dark, quiet spot, and it’s where I once got up at 430a to run.

    I had a long running streak (day 1000 here) where I ran at least a mile every day. I did this for 1564 days, over 4 years. During that time I had a few trips to the UK and back, with the return trips back being hard. Depending on weather and equipment, I’ve had 20+ hour trips. Most of the time I’d get home and manage a jog at home, though one time at 1130p at night. Rather than chance things, I got up one time in this hotel, the only person on a treadmill at 435a trying to get a mile done before heading to the airport.

    That sticks with me.

  • Starting a Wild Stretch of Travel

    Today starts a wild stretch of travel for me. I land in London today, having left the US after coaching the final volleyball tournament of the season yesterday. I’ll spend the week in London for the Redgate Summit, with a quick trip to the office for a day to see some colleagues. I return home Friday and then leave Monday for Australia.

    That doesn’t sound too crazy, but I’ll be back in London the first week of June and on the road most of the time until then. My schedule:

    • Apr 15-19 – London
    • Apr 19-22 – Denver
    • Apr 22-May 10 – Australia
    • May 10-May 13 – Denver
    • May 14-20 – New York
    • May 20-28 – Denver
    • May 28-30 – Chicago
    • May 30-Jun 1 – Denver
    • Jun 1 – June 15 – UK and EU

    Then I’m home. At least I think I’m home for a few weeks. Nothing planned yet, but things might change.

    It’s not all work. My wife and I will take about 8 days to of holiday in AUS, and another 6 in the EU. The NY trip is to see my daughter graduate college.

    Overall, it’s a wild time, it will be hard, but also very exciting.

    My plan is to rest regularly and work out regularly, likely with walking and biking so I’m not overloading myself, but not sitting still either. I’ll be looking to drink water and eat lots of salads and proteins as well, trying to limit the carbs, though I’m sure I’ll indulge a few times. I’m also packing lots of vitamins to try and keep myself healthy through this stretch.

    Hopefully I don’t drop any balls along the way.

    BTW, think this thing will get from Denver to the UK?