Generative AI is a Unicorn

Kendra Little | September 28, 2023

I use GitHub CoPilot quite a lot lately, mostly when working on this static website or writing SQL demos for upcoming sessions.

I love CoPilot for CSS and working with Hugo

I truly love CoPilot’s help any time I need to change CSS. It’s generally pretty low stakes, and although CoPilot’s advice doesn’t always work, the experience has been wayyyyy better than web searching for me. Perhaps this is because I’m so unabashedly ignorant about CSS that I don’t even know the correct terms to search on, but it feels like CoPilot helps me a lot here.

I feel pretty similarly about making changes to any of the Go templates used by my Hugo sites, or learning to use built-in features of Hugo: chatting with CoPilot usually gets me unstuck pretty fast, and it gives me more tailored output than I get from web searches. (Again, sometimes the tailored output doesn’t work, but it often does.)

I like it for writing TSQL, but it’s also kind of a pain

My feelings are more mixed when it comes to using CoPilot in Azure Data Studio. At times, it predicts what I want to write and saves me a bunch of keystrokes. ​ But a lot of times, I accidentally trigger its auto-complete features when I don’t mean to (and it’s way off track), and then struggle with it in a little battle where it keeps suggesting and I keep accidentally accepting the suggestion. There’s some muscle memory here on auto-completion I need to work out! I think this doesn’t tend to happen as much with CSS and Go templates because I’m not writing as much code from scratch in that case, usually just hacking something into shape based on an existing version.

I find some of the suggestions to be completely wrong

For example, I don’t know about you, but I’ve always had a hard time misremembering that there is no ATTACH DATABASE command in SQL Server. I mean, you can attach a database, but not with that syntax. You need to use CREATE DATABASE … FOR ATTACH or sp_attach_db (warning: deprecated). But I think about this rarely enough that I often forget and think there’s an ATTACH DATABASE command.

So at one point recently, I needed to attach a database within a Docker container on my mac, and I started typing the words ATTACH DATABASE into Azure Data Studio. Here’s what it suggests:

attach database [C:\Users\jason\Downloads\stackoverflow\stackoverflow\stackoverflow.db] as stackoverflow;

I had a bit of a moment here:

  • Oh, that’s the syntax!
  • No wait, isn’t this the command that I always think should exist but doesn’t?
  • But maybe it IS real now and I missed it?!@?!?
  • Who is jason? Why are we looking at his file system? This doesn’t feel right.
  • Why is there only one file with the extension db?

Jason, if you’re out there, this didn’t work for me either.

Overall, I’m more impressed than I am inconvenienced. I definitely see this as something where all the code needs to be heavily verified, but I feel the same way about human, code, too. (Including my own, 100%)

Copyright (c) 2024, Catalyze SQL, LLC; all rights reserved. Opinions expressed on this site are solely those of Kendra Little of Catalyze SQL, LLC. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.