Tag: AI

  • Using AI for the First Draft

    At the Redgate Summit in London, I ran a panel talking about Platform Engineering and how we can make developers more productive. One of the questions from our audience revolved around AI (Artificial Intelligence) technologies and how they might assist. As a note, AI tech includes a lot of different things, like machine learning (ML) among other things, but a lot of people seeing the media and hype around LLMs (large language models)  think those are AI. They see AI as what is implemented in ChatGPT and Copilot, which is correct, but incomplete.

    One of the panelists, Jeff Smith of Redgate, said that he views the output from AI as a first draft, something that bootstraps further work by a human. This can save time and can help someone be more productive, but it’s a starting point and a boost, not a final product.

    I had not thought of AI this way, even though I expect to have to test, refine, and edit the results I’ve gotten from various assistants. While it might be possible for me to keep refining my prompt and perhaps generate better results (code and/or text), I don’t know that it’s often worth the time to do much of this. I might do a little, but it’s much easier to take the result of AI as a first draft and then make it fit my requirements.

    In much the same way I use Stack Overflow or SQL Server Central for code snippets. They often give me a starting point and something I can then adapt to my needs without all of the time and effort spent on reading an API or SDK, experimenting with the syntax, and then actually using this in some code I’m writing. Similarly, I can get a head start on writing a summary or a pitch, though I’ll admit I’ve found it less useful there. In fact, for many of my editorials, I’ve tried to use it to summarize an article or web link, and it does a very poor job (IMHO).

    Some of you might be concerned or worried about this, and some might not. To me, the average-to-poor code produced isn’t any different than the legions of Stack Overflow developers or SQL Server Central DBAs who take code from an online forum and fail to test it. Anyone using any code (or prose) should test (proof) it and verify it works appropriately in their situation. We have a lot of people who don’t do that now and AI might exacerbate that with more code, but I don’t know if we are in a worse situation. We certainly seem to be able to produce lots of average tech professionals now who turn out plenty of average code.

    Ultimately AI is a tool that does exist in the world and will continue to exist. We have to learn to work with it and use it to our advantage. Good developers and DBAs will do that. I’d like to think that many organizations will look to hire and use those people as their staff and use fewer of the people who don’t bother to test and improve the results from their tools.

    Steve Jones

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

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

  • Common Algorithm Concerns

    When we build software, many of us use the same algorithms to solve problems. We might choose a similar method for a quicksort or a lambda validation or a regular expression. For database work, your code for a running total (or other common challenge) is likely very similar to many other people. At least on the same platform. You might solve this differently in SQL Server and Oracle, but for the same type of database, many of us write very similar code.

    Actually, many developers might copy and paste an answer from SQL Server Central, Stack Overflow, or another site. I’m not sure if I think this is good or bad, as it’s a good idea to reuse code if it solves the same problem. If you copy it and don’t test it, that’s bad. After all, the code might not solve your slightly different problem if you don’t check it.

    In the modern world, if we build software for our business using an AI assistant, could our company be liable if we knew our competitors were using the same AI service? Is this any different than a human developer performing a copy/paste from SQL Server Central? I don’t think it is in many cases, though the same concerns about intellectual property might be present in either case.

    The concerns over AI seem murky in some sense, especially as the AI might “generate” code that isn’t directly available on some public resource. I do think that this is more of a collusion using a service than an algorithm. Still, in the hyper-connected world, where many of our applications might look to take advantage of some service instead of implementing it ourselves, this could be an issue.

    I ran across a piece that discusses a lawsuit about a common pricing algorithm being used by different hotels. In this case, it’s not that the developers at different hotels used the same code, but rather that the hotels used the same service from a company, which of course, used the same code for all their customers. Whether you think this is a valid lawsuit or not, this is the type of legal action that others might bring if two competitors ended up using the same AI service and developed very similar code that might behave the same way.

    I don’t think that AIs (at present) can actually develop new algorithms or solve problems in a new way. Instead, they predict the likely solution based on how they’ve been trained by similar scenarios. In that case, how concerned are we about how getting common solutions in disparate pieces of software? For most of us, I think we’ve be pleased that we have well-tested (hopefully) code that runs efficiently (again, hopefully) being re-used in many places. That would be better for most systems in the world.

    What isn’t better is if humans become more adept at specifying prompts and producing software without lots of specialized expertise. For many developers that might be average, or even slightly below average, this might cause them concern for the security of their position. With good reason, as labor is one of the most expensive parts of building software.

    Ultimately, just as with any other position, the best way to build a safe, secure career, is to continue to build your skills and produce value for your employer. That way it’s unlikely any AI will ever outperform you.

    Steve Jones

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

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

  • Copilot Reminded Me How To Find a File Handle

    Recently I was trying to delete a folder and kept getting the “something is using this, try again” dialog. It was annoying, but I couldn’t figure out what process had this folder locked. I know there are ways to do this, but I decided to ask Copilot how to do this.

    I did this in the Edge browser, since that’s the easy thing. Note: I was actually on Windows 10, not 11.

    I got this response.

    2024-05-21 11_28_16-2023-John S & Atieh V Jones-Workpapers-12.31.23 Jones, John S Organizer 23486 V1

    I then hit Ctrl+Shift+Esc and got the Task Manager. From there, I can see Resource Monitor at the bottom of the Performance tab.

    2024-05-21 11_32_12-Task Manager

    I opened this and it started in the CPU tab. I typed in the name of my folder, and I saw that there was a CMD window open with the handle. I then realized I had a window in my list, which I exited.

    2024-05-21 11_33_08-Resource Monitor

    Once I did this, I could delete the folder.

    It This Better?

    Not necessarily. If I run a search, I see lots of results. In this case, any of these could be clicked, but in the past, I’ve often had to click multiple results to find something that works. I supposed Copilot could have given me a poor answer, and I’d have to refine the prompt, so the process might be the same.

    Except.

    Here I am working in one place and not clicking other links, potentially finding down sites, 404s, or other issues. It feels slightly cleaner. It also means I can have context if I refine my search.

    I don’t know if it’s better, but I find myself leaving an Edge tab open to Copilot to try stuff.

  • T-SQL Tuesday #173–The AI Job Helper

    tsqltuesdayThis month I had a new host, Pinal Dave. I was surprised to see he hadn’t hosted, but I didn’t see him in the list. His invite is interesting, as AI has been on his mind. I pinged him after listening to him on a webinar, and his invite reflects the topic: Has AI Helped with Your SQL Server Job?

    It seems that our topics stray a bit further from core SQL topics as the world becomes more complex, and honestly, as more and more of us do things beyond just managing a server.

    In any case, that’s the topic, and if you want to host, ping me.

    AI Assistance

    Has AI helped me? I don’t do a lot of SQL Server work, but I continue to learn about the platform and I do find myself writing code or helping customers find ways to build database software. I also started a short series on AI stuff as I experiment with tools and techniques.

    In general, I don’t find Copilot or ChatGPT (or other tools) that helpful with SQL Server. I think I haven’t spent enough time, but honestly, I struggle to create prompts and work with things. However, I know there is something. If you watch Pinal’s webinar, AI isn’t perfect, but it’s like a coworker making some suggestions of things you might not have thought of.

    Where I have found it useful is doing a question of an AI, often in Bing/Edge chat, and using that as a first search engine for what I want to look for rather than getting a list of results and clicking through them. In that sense, it’s saved some time.

    However, I know I still need to evaluate what comes back and make an informed decision if the suggestion or code will actually work.

    And of course, I need to test it.