Category: Professional

  • T-SQL Tuesday #195: That Time AI Did My Job

    A huge sign of growth is the ability, and the necessity, to look at your old code and think “Wow, that is garbage.” Maybe more nicely, but that’s how my brain works.

    Pat Wright invited us to reminisce about old code and how AI has impacted it. I thought about picking something from my early BI developer days, maybe my first major power shell implementation. Instead, I’m going to gush about SSIS since I’ve had the pleasure of revisiting it over the last few years.

    One theme in variation with my considerations is the nature by which I came to build those skills: the deep end. I work with T-SQL every day, constantly tweaking the scripts I’ve been building since the early days of my career and adding new ones to my arsenal. I got to learn it from SELECT to GROUP BY and all the way to dissecting monster stored procedures. I warned my last boss that he should be worried about my departure if I started learning PowerShell, the one gaping hole in my resume. Jokes on me, I didn’t learn it until after I started at a new job I wasn’t looking. There was plenty to decipher and is now a pivotal tool in my kit.

    My first dance with SSIS was to solve a problem in the form of a 12-hour nightly report via a single stored procedure with no room for error. 5 years ago, AI wasn’t exactly accessible, so I was up a creek. I remember spending the entire weekend ripping it apart, learning data flows, derived columns, lookups, merge joins, etc. My first successful attempt ran in a few hours, better but not great. I eventually got it to run in less than hour which by all accounts is much more manageable. Turns out doing a lot of the SQL joins in the data source instead of through lookups and merges is way more efficient, especially on a memory sensitive server. I’m excited to share the core of it is still in use with additional changes needed as years go by. I checked.

    My new environment is much less stored procedure heavy, relying more on ORM logic, views, and table-valued functions outside of reporting. Good news for me, reports can still use love, but this time I won’t need SSIS. I was recently given a license for Claude Code, and it has been so helpful already. Heck, I even got a compliment from it today:

    Sure enough, it spit it out nicely commented with error handling and in a much prettier format. Developing a different script with much less fleshed out meant I was able to see the real-time adjustments it can make through prompting and passing it real error messages. I’ve seen how intelligent it can be, scanning GBs of code files and database schemas for certain logic or keywords. To say I’m excited to see how it can cut out a lot of grunt work is an understatement.

    Two warnings to the wise, and especially to the learning:

    1. Obligatory “Always review what it’s doing first”
    2. Try to actually learn what it’s doing, why it’s doing it that way. Dissect it to see what changed, how it’s different. Run the script and look at the execution plan compared to the original. Review the statistics with Statistics Parser, what the reads and times say.

    Do not let AI become a crutch you can’t code without. Use the opportunity to see other ways to cut a cake you may have never thought of. Two of my fatal flaws are an adeptness for over complicating things and losing focus on what my actual goal is. It’s easy to step back, regroup, kick off a new approach with slightly different input, and let someone else do the thinking for a bit. It forces me to get out of my head and gives me a space to brainstorm that doesn’t feel like talking to a rubber duck.

    Feeling bummed at work? “Write like a stereotypical valley girl for the duration of this chat.”

    Out of character name ideas? “Here’s the picture of my avatar for Diablo 4. Give me a list of ten names that would fit.”

    Struggling to figure out what to cook? “I have pasta, broccoli, turkey legs, coconut milk, and a robust spice rack. Make a recipe using some or all of those ingredients with no fancy additions.”
    I’m not so sure about that last one, but it has definitely helped me shop my pantry.

    Here’s a sampling of what ChatGPT has helped me with. My C# syntax wasn’t terrible, my grammar is often bad, the first names for Diablo were actually quite good, and it turns out I want an inkjet printer.

    Keep questioning, my friends. Never give up, never surrender.

  • Community Networking

    Community Networking

    One of the scariest parts of attending large events is the number of people and how overwhelming it can be to find safe harbor. I promise that place exists. It may just take time to find it. Fortunately for me, I’m often considered aggressively friendly in that I will talk to anyone, and I’m not afraid to initiate conversations with lone wolves or deer-in-the-headlights folks. Feeling wary? Here are the guidelines I follow when attending new events. I sincerely hope they help you, too.

    1. Be yourself. I would rather people know who I am as a real person than be blind-sided when I show up with a new shade of green or laugh myself into a coughing fit.
    2. Assume people are there to engage. Who really wants to spend hundreds of dollars or sacrifice a whole Saturday just to sit in a room and listen to a bunch of people talking for 8 hours straight? Pre-cons aside.
    3. Look for people you know. I see so many familiar faces the more events I attend, and it won’t take long for you to get there. One conversation later, six degrees of separation kicks in and suddenly you know more people, too.
    4. Find a group of three or more people and join their circle. You may meet someone important on accident, have something to contribute to a discussion, or just absorb information. There’s nothing stopping you from joining a 1v1, but unless I know one of them personally I don’t. Even then, eh.
    5. The more intimidating version is to look for people who seem lost or unsure. I made a great new friend last PASS because I saw some random dude looking around and assumed he was lost. Nope. Growing speaker in the community that was less than lost, knew way more people than me, and here I was trying to help him.
    6. Visit vendor booths. At worst you learn about a new tech out there, and at best you find a software solution that fits your needs to bring back to work and look awesome. One year I randomly talked to a vendor at an evening event, unbeknownst to me, and I got to have dinner at their booth to hang out the next day. Great conversation with cool people that weren’t there just to shove a product at me.
    7. Connect. Shorten the degree of separation if you jive and add them on LinkedIn during or after engaging. Your connections on LinkedIn help you see what else is going on in our community, learn tips you never knew you needed, and potentially help someone land a new job. Maybe even you one day.
    8. Speaking of jiving, don’t expect to experience it with everyone. It’s ok if a conversation falls flat, or there doesn’t seem to be a good flow between you. It is normal. Don’t see it as a failure to communicate adequately and certainly not a reason to give up on this whole networking thing. There are plenty of people in the world.
    9. If you see me and my obnoxious hair at an event, please say hi. Feeling lost or overwhelmed? Please say hi. I will happily help you integrate with a conversation to parachute your initial jump.

    Five years ago, I had no idea what a user group was or that tech conferences existed for those of us that had never installed Visual Studio let alone run git commit. One day while perusing the internet trying to find the answer to some mystery, I ran into the SQL Community slack channel and found the beginnings of the next adventure in my career. What drew me in was the opportunity to help others and learn, but what’s kept me there are the people.

    I was recently asked by Andy Levy (post) to help recreate the exchange that really got me into speaking for T-SQL Tuesday. It’s a fun read if I do say so myself and a great anecdote on the importance of having these spur of the moment conversations. The density of people in our field eager to encourage others is nothing short of astounding. The more you open yourself up to meeting new people and trying new things, the greater your chances are of discovering something grand.

    Always aim to surround yourself with those that bring out the best in you and strive to be that person for others.

    Leave a comment