Have you ever looked at some tsql code and thought–How does even run? I know I have and it can be daunting to take a piece of code and review it for performance or to make a change to it. I enlist the help of Jen McCown from the MidnightDBA team to discuss approaches to unraveling code. We tackle the issues of nested views, documentation, formatting, Hungarian Notation, and visualizing how all the code pieces fit together.
Thinking of modeling your database after the system tables? Well, Jen has a few thought for you there and share her pet peeves about where things went a bit awry with the internal tables.
At the end of the day, we just want our code to be understandable and usable for the next person who has to review it, because that next person just might be you. This episode packs in a little humor with some nuggets of thought on how you might go about unraveling your next code snippet.
What is your biggest pain point when it comes to unraveling code? Do missing semicolon’s just drive you up the wall? Lets us know in the comments below.
Jen McCown is a 20-year SQL Server DBA, Microsoft Certified Master, speaker, and CEO. 7 years ago she and Sean launched MinionWare LLC to build software that manages, audits, and maintains dozens or hundreds of SQL Server instances. She lives near Rocky Mountain National Park in Colorado with Sean and the kids, and an actual menagerie of pets.
Book a chat with Jen at Calendly.com/JenniferMcCown, and connect on LinkedIn at Linkedin.com/in/JenniferMcCown. She is @MidnightDBA on Twitter.
Just look at the code . . Well, as nice as that sounds, sometimes just looking at the code is not good enough to understand what is going on.
Meet the Hosts
With more than 10 years of working with SQL Server, Carlos helps businesses ensure their SQL Server environments meet their users’ expectations. He can provide insights on performance, migrations, and disaster recovery. He is also active in the SQL Server community and regularly speaks at user group meetings and conferences. He helps support the free database monitoring tool found at databasehealth.com and provides training through SQL Trail events.
Eugene works as an independent BI consultant and Pluralsight author, specializing in Power BI and the Azure Data Platform. He has been working with data for over 8 years and speaks regularly at user groups and conferences. He also helps run the GroupBy online conference.
Kevin is a Microsoft Data Platform MVP and proprietor of Catallaxy Services, LLC, where he specializes in T-SQL development, machine learning, and pulling rabbits out of hats on demand. He is the lead contributor to Curated SQL, president of the Triangle Area SQL Server Users Group, and author of the books PolyBase Revealed (Apress, 2020) and Finding Ghosts in Your Data: Anomaly Detection Techniques with Examples in Python (Apress, 2022). A resident of Durham, North Carolina, he can be found cycling the trails along the triangle whenever the weather's nice enough.