A New Word: mahpiohanzia

mahpiohanzia – n. the frustration of being unable to fly, unable to stretch out your arms and vault into the air, having finally shrugged off the burden of your own weight, which you’ve been carrying your entire life without a second thought.

Isn’t everyone other than Michael Jordan and a few others feeling this? I know the kids I coach in volleyball dream of flying, not for long, but always more than they can do.

I’ve felt this as well when I was in my 20s and trying to dunk a basketball. I did it a couple times, but then I struggled as I got even slightly older (and heavier). AS I moved to volleyball, I used to wish this. Now I worry about landing on these 50+ year old knees, so I don’t think about mahpiohanzia.

From the Dictionary of Obscure Sorrows

Posted in Blog | Tagged , | Comments Off on A New Word: mahpiohanzia

The Redgate DevOps Roadshow–Houston

I’m heading to Houston today for the Redgate Database DevOps in a Day workshops. This is the first of many on the US tour. I’ll be at 5 of them, but there will be another 5 where Ryan, Grant, or our Solutions Engineers will run the show.

If you’ve registered, please say hi, introduce yourself, and ask lots of questions. Hopefully you’ll enjoy the day.

Just a quick trip for me, coming back Friday, which is good. I head to the Chicago DevOps in a Day workshop next week.

Posted in Blog | Tagged , , , | Comments Off on The Redgate DevOps Roadshow–Houston

ADS Copilot Experiments with XML

I sent some code to a customer recently to help them decrypt some stored procedures. I sent a quick and dirty set of code, noting at the bottom that the results were in XML and needed to be extracted.

The customer wrote back that my code produced XML and the procedure code had to be copied and pasted into SSMS to create a decrypted procedure.

1f926-2642

Before I spent time on this, I decided that I should play with Copilot here. This is the perfect place and it’s what I’d hope at some point if I sent that code, the other person would use some sort of AI to help them fix things.

Maybe not, but here’s what happened.

This is part of a series of experiments with the ChatGPT and other AI systems. Lots of Copilot lately.

Asking for Help

I could look up the syntax for working with XML, but what about Copilot? Let’s see what happened.

2023-08-03 15_37_47-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

An interesting suggestion. One problem: when I run this, the result isn’t great.

2023-08-03 15_38_41-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

If I cast this as XML, or declare it, things work. At least, they don’t produce errors. But they don’t do what I wanted.

2023-08-03 15_39_52-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

I wasn’t sure what to do, so I opened the completions panel for Copilot and saw other suggestions.

2023-08-03 15_40_47-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

Let’s try these.

Suggestion 1 looks good. If I change my declaration to be XML, this works (or cast things).

2023-08-03 15_41_51-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

Some points for Copilot here, and I’d hope a junior would get to change the declaration or ask how to convert the variable to XML. 

Suggestion two doesn’t work.

2023-08-03 15_43_57-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

Suggestion three looks like a copy paste from a forum somewhere. However, the code works. I don’t know how this gets into the suggestions, but I am interested to know what’s happening here.

2023-08-03 15_45_03-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

Four and fix aren’t great. They look like repeats. However, six accounts for my declaration.

2023-08-03 15_46_25-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

Does the code work? It does.

2023-08-03 15_46_46-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

I accepted solution 6 to see what happens. The code was added to the query window.

A Repeat

I’ve given feedback, so let’s try again. I went back to the prompt and got the same suggestion again, however when I opened the panel, I saw different items.

2023-08-03 15_50_38-● SQLQuery_1 - Aristotle_SQL2022.sandbox (Integrated) - VCS_Primer-1 - Azure Dat

One doesn’t make any sense and doesn’t work. Two and three are nonsense. Four is really interesting, but not useful.

2023-08-03 15_52_17-GitHub Copilot - VCS_Primer-1 - Azure Data Studio

I don’t think Copilot learned anything, and I’m not even sure it is all that well trained. I don’t know if it doesn’t recognize it’s in a database editor or what. The type of language for the ADS file is SQL, so I don’t know what X# and Java are added.

I’m out of patience today. I know how to do this, so I’ll just write the code.

Posted in Blog | Tagged , , , , , | Comments Off on ADS Copilot Experiments with XML

Shift Right

Earlier this year I was watching someone present on DevOps and IaaC (Infrastructure as Code). The speaker was showing how they had worked with clients to implement tests and checks that evaluated whether their systems were deployed and the code was working as expected. They did this as the CI/QA environments weren’t maintained, but rather spun up as needed when code was committed or tested.

What I found fascinating was the part in the talk where the speaker said they were “shifting right.”

That had me sitting up and paying closer attention. After all, for ten years I’ve been working in DevOps where we try to shift everything left. Shift testing to the developers, shift infrastructure into the repository, shift pen testing into some automated CI stage. We want to know about issues sooner. What is this shift right stuff?

It turns out that the speaker was using this as a way of smoke testing. They didn’t completely trust that CI/QA were configured the same as production. They were performing many of the same tests in production after a deployment. In a few instances, they’d spin up a copy of production, deploy changes, and then run tests against that. They wanted to get a real-life view of how the system worked.

For some parts of the infrastructure, this seemed like overkill. After all, if I’m updating an app and perhaps adding a web server to check, verifying this was the same size as a previously deployed web server seems silly. However, they included other checks like security. Was the new, or even old, server configured with the same security that was required by the org? They had policies around various authentication and authorization items and these were constantly rechecked. Someone alter a file share or enable anonymous access? If this was against policy, someone was notified when the next deployment caught this.

What was interesting about this methodology was that deployments weren’t often failed. Instead, when something failed, there was a report sent to a group and the incident was logged, but the deployment still occurred. That’s an approach that I actually like. Don’t stop things, but make sure someone follows up. Of course, like many nagging problems, if this happens constantly or it can’t get fixed, then this isn’t helpful information.

I haven’t thought much about the idea of shifting things right, but I have advocated for the same ideas. Create smoke tests that evaluate if things still work after deployment. Get feedback to people right away. Much like a unit test, I’d want to know if simple things are broken. I’d also approach these tests the same way. Don’t write a lot to start, but every time there is an issue, add a unit test and a smoke test to prevent regressions.

And be careful of which frameworks you use. Some database unit testing frameworks alter tables, which can’t happen in production.

Steve Jones

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

Posted in Editorial | Tagged , | Comments Off on Shift Right