Tag: AI

  • Stupid Things I Did With AI: ASCII Art

    I ran across this article recently (https://www.gatesnotes.com/meet-bill/source-code/reader/microsoft-original-source-code) and it has a great opening piece of ASCII Art. I have a screenshot here:

    2026-01_0243

    For some reason, I thought, “I should do this in SQL”.” Then I thought, can the AIs help?

    Let’s see.

    This is part of a series of experiments with AI systems.

    SQL Prompt AI

    My first instinct is to use Claude first, but here I decided to ask SQL Prompt AI for help. I generically asked for a function that would take a word as a parameter and then produce ASCII Art. I ended up with a function and a procedure. I won’t show all the code, but I ended up with this result.

    2026-01_0238

    I thought this might be cutting off the message, but “Hello” produced “Helo”. So I asked SQL Prompt AI to alter the function to fix this. It tried, but it put a CTE in a subquery, which isn’t valid.

    2026-01_0241

    I pasted in the error message, but it returned me advice, not new code.

    2026-01_0239

    I suspected this might be because I had a few batches in this query window, so I copied just the function to another window, then pasted in the error and things got fixed.

    2026-01_0242

    Claude

    While SQL Prompt was working, I opened a tab for Claude and asked a question: I want a generic MSSQL function that returns ascii art for a character passed in

    I got the results, which were good, but only for one letter. Good, but I realized I had done a poor job of specifying my intention.

    2026-01_0244

    I then added another prompt to this chat: can I get a wrapper here that let’s me pass in a word and get the word returned as one result set?

    This returned me a wrapper function with an explanation. The code is in my repo (linked below).

    2026-01_0245

    When I tested this a bit, it worked well, including with spaces.

    2026-01_0237

    Summary

    I added this to my AIExperiments repo under the ASCII Art folder. You can check out the code and play if you want, or ask your own AI to do this.

    This is a big waste of LLM compute, and really SQL Server core compute, but it’s fun. It was something I could have written, but how tedious is it to produce a function to do this? Even if I were to try and write an algorithm to produce letters from art, I could, but it’s not really worth the effort other than as an exercise to solve the problem.

    This is also something I would guess many programming students work through. I haven’t had this, but I had to shuffle a deck of cards and other types of simulation exercises to help me learn to think in algorithms.

    I do think working through algorithms is a good use of your time. It helps you think and learn and doing this will absolutely help you better judge the quality of other code, including that written by AIs.

    However, I have done some of this work, and it’s not a good use of my time. Or likely the LLMs, but it was fun. I’ll likely use this in some Question of the Days in the future somehow.

  • Eight Minutes

    When I was at the Small Data 2025 conference, one of the speakers was talking about their work with AI technologies. This person uses it a lot in their day job, often to complete tasks that they would have struggled to work on in the past, mostly because of time constraints, but also a lack of resources. Sometimes this person has an idea, but doesn’t want to distract themselves or others by having them work on a side project.

    During a recent ride in a Waymo (self-driving car), this person had their laptop out and running Claude Code. They gave it a prompt, asking it to build a small app for some data analysis. During the 8-minute ride, the agent had spit out the code, a Readme, and committed this to a git repo. Later, the speaker tried it and found it solved most of his requirements, and then did some other work on the project, as well as having Claude write more code to get something that was beyond a minimally viable app.

    He then gave us this William Gibson quote: “The future is already here — it’s just not very evenly distributed.” I’ve thought about this quote a lot during the last few decades, especially as mobile phones and apps have become prominent. In Colorado, the bandwidth and connectivity have lagged behind other places. When I get frustrated with the mobile network, I want someone to put a copy of that quote above every developer’s desk at Google, Microsoft, Meta, etc. so they realize the way things work in Silicon Valley isn’t how they work elsewhere.

    I’ve been feeling that way about AI tech lately. It’s the future, and it’s not well distributed. There are some successes out there, among lots of failures, but I suspect that some of this is that we’re all working with unevenly distributed models, knowledge, and problems. Some of us are learning to use things better than others.

    So I’m wondering, what do you think you could do in 8 minutes with a coding agent? Take a Waymo if you want, but you might be more comfortable with Claude Code (or another agent) at your desk. Take a problem you’ve been working on and give it to the AI agent. See what happens. Maybe even tackle a side project you can’t seem to find time on which to work and see what happens.

    As I started this, I actually kicked off Claude Code and asked it to load some data from messy files into a database. Across a couple of days (I started late one afternoon), I estimate I spent 10 minutes approving actions, but for less than $5, I had a lot of data loaded (88 files) and the code to do it committed in a repo. With very little effort from me.

    Think about what you could do in a few minutes with an agent. You might get something useful, with little effort or cost. It probably would not be a production-ready app, but it would be something to test an idea, or maybe some code that might inspire others to tackle some of their own backlog.

    What do you want an agent to help you build?

    Steve Jones

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

    Note, podcasts are only available for a limited time online.

  • Flyway Tips: AI Generating Migration Script Names

    AI is a big deal in 2026, and at Redgate, we’re experimenting with how AI can help developers and DBAs become better at their jobs. One of the areas we’ve started to add some AI is in Flyway Desktop (FWD), with a few features designed to help reduce the cognitive load and context switches needed while developing code, and help users better understand what changes they’re making in their systems.

    I wrote about summaries of migrations scripts last week, which are helpful when you or your colleagues don’t generate good script names, or commit messages. This post looks at another of those changes, which is the generation of the script name.

    I’ve been working with Flyway and Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.

    Generating Complex Scripts

    In Flyway, we call the deployment scripts “migration scripts”, but they are the same thing. These are scripts that are changing, altering, or evolving our database schema in some way. New or altered objects, various schema items, and more.

    Our guidance for a lot of customers is to keep the migration scripts simple and easy. That can work, but sometimes we want to put a few things into a script to ensure that we deploy all the changes at once. In the last article, I had this list of changes in one script.

    2026-01_0168_thumb[1]

    I generated this in the last post with a poor name.

    2026-01_0175

    Let’s fix that.

    Using the Power of AI

    I’m going to delete that script and get my list of objects in the Generate tab. I’ll select a few, as shown below.

    2026-01_0177

    Now I’ll generate the script.When the script completes, I see my default “Steve” name for the description. However, look to the right. There’s a looping circle at the far right side of the Description box. I didn’t capture a good image, but it’s actually moving in a circle.

    2026-01_0178

    When it completes, I have a better description for my changes.

    2026-01_0179

    Let me save this and repeat it for the other changes to the customer tables.

    2026-01_0180

    That’s a way better description than I would typically write.

    Enabling AI Features in Flyway

    This is a preview feature as of Jan 5, 2026 as I write this. To get this in your FWD, your organization needs to have enabled AI features in your portal. I’m just a member, but whoever is an admin for your Redgate products would find it here.

    2026-01_0173_thumb[1]

    In FWD, you need to look at the Preview Features item under the config menu.

    2026-01_0171_thumb

    In this area, you can enable or disable features as needed. I see these marked as Red-gate only, but I think they are supposed to be released to some customers by this time. It’s likely I need to upgrade my FWD, which I’ll do when I have time.

    2026-01_0172_thumb[1]

    Once you do this, you should start seeing some AI stuff with the purple/pink shaded area and the sparkle icon that we’re all seeing everywhere.

    2026-01_0174_thumb

    Summary

    Getting good migration script descriptions, or really any good descriptions, is hard. Developers get tired, they aren’t always creative, they forget things, and they sometimes just take the default.

    Witness my repo.

    2026-01_0181

    This feature reduces the burden on developers and auto-generates a name for the file. It can be edited and changed, but the dev doesn’t have to.

    This feature is documented, but we are likely to enhance and change it a bit, so all feedback is welcome. If your organization doesn’t want you using AI, and you could share some schema from a migration script, I’d be happy to test it for you and see what summary is produced and send it back to you. Ping me on X/LinkedIn/BlueSky if you want.

    Flyway is an incredible way of deploying changes from one database to another, and now includes both migration-based and state-based deployments. You get the flexibility you need to control database changes in your environment. If you’ve never used it, give it a try today. It works for SQL Server, Oracle, PostgreSQL and nearly 50 other platforms.

    Video Walkthrough

    See a video of me looking at this feature below.

  • Flyway Tips: AI Deployment Script Descriptions

    With the AI push being everywhere, Redgate is no exception. We’ve been getting requests, demands, suggestions, and more about how to add AI into our products and help developers and DBAs be more productive.

    One of the areas we’ve started to add some AI is in Flyway Desktop (FWD), with a few features designed to help reduce the cognitive load and context switches needed while developing code, and help users better understand what changes they’re making in their systems. This post looks at one of those changes, which is in preview (as of Jan, 2026).

    I’ve been working with Flyway and Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.

    Understanding Deployment Scripts

    In Flyway, we call the deployment scripts “migration scripts”, but they are the same thing. These are scripts that are changing, altering, or evolving our database schema in some way. New or altered objects, various schema items, and more.

    When a developer creates a migration script, they often do this close to the time they are making the changes in development. Not always, but I find a lot of customers change something, test it, and then make the migration script. Guidance for a lot of customers is to keep the migration scripts simple and easy. For example, here’s one I have that creates a simple table. If you look in the image on v23, which says “Create Product Table” in the description, that is what it does.

    2026-01_0161

    If I click on this line, I see the script shown below the name (V23__Create Product Table.sql). The new thing just below in this image is that an AI summary is being generated.

    2026-01_0162

    In a few seconds, this changes. I get the summary of the table. In this case, it says I have a new table with some columns.

    2026-01_0163

    If I expand this with the drop-down on the right, I see the full summary. This includes telling me a PK is being created, which is good info. I could look through the code, but the settings, the PRINT statements and more make this harder than it should be.

    2026-01_0170

    What about a more complex script? If I pick a different one, such as V24__Removed Territories and Region tables and related constraints and procedures, I get an OK description that lets me know a few things are being changed. I wish this had a little more detail in it, such as the tables on which FKs are being dropped, and maybe a list.

    2026-01_0164

    Let me create a whole new set of objects. In this case, I’ve added some discount features in a bunch of tables. Here is the list of objects I added to the migration script.

    2026-01_0168

    When I generate the migration script and then click on it in the Migration Scripts tab, I see this description.

    2026-01_0169

    That’s an interesting description, as I see that there are territory and customer tables, which I’d forgotten I added. I was working on them and added them, but hadn’t committed them. I added the discount stuff (3 tables and a view) in a dev session today, and then selected everything to save and include in a migration script.

    This is one of those areas where the summary helps me remember what’s in here, and in this case, I’d want to delete this script and re-generate it with a different set of object changes. Then a second migration script with other changes.

    Enabling AI Features in Flyway

    This is a preview feature as of Jan 5, 2026 as I write this. To get this in your FWD, your organization needs to have enabled AI features in your portal. I’m just a member, but whoever is an admin for your Redgate products would find it here.

    2026-01_0173

    In FWD, you need to look at the Preview Features item under the config menu.

    2026-01_0171

    In this area, you can enable or disable features as needed. I see these marked as Red-gate only, but I think they are supposed to be released to some customers by this time. It’s likely I need to upgrade my FWD, which I’ll do when I have time.

    2026-01_0172

    Once you do this, you should start seeing some AI stuff with the purple/pink shaded area and the sparkle icon that we’re all seeing everywhere.

    2026-01_0174

    Summary

    This post shows one of the Flyway AI features that we’re adding to help you deal with the chaos and complexity of database development in your environment. This features tries to summarize the details in your migration script and provide you a summary.

    This isn’t perfect, but as you look at scripts, it fairly quickly gives you a look at what’s included without you having to read all the code. You should double check the code and be sure it’s what you expect, but if you’re looking through a few scripts for a particular change or impact, this might help save you time.

    There is a limit to the amount of stuff we send to the LLM to summarize. I can’t remember (or find) the limit, but very large scripts aren’t summarized, and you’ll see a message to that effect.

    This feature is documented, but we are likely to enhance and change it a bit, so all feedback is welcome. If your organization doesn’t want you using AI, and you could share some schema from a migration script, I’d be happy to test it for you and see what summary is produced and send it back to you. Ping me on X/LinkedIn/BlueSky if you want.

    Flyway is an incredible way of deploying changes from one database to another, and now includes both migration-based and state-based deployments. You get the flexibility you need to control database changes in your environment. If you’ve never used it, give it a try today. It works for SQL Server, Oracle, PostgreSQL and nearly 50 other platforms.

    Video Walkthrough

    See a video of me looking at this feature below.