Programming with AI: One Year Later (Guest Post)

I’ve been meaning to blog, but I just can’t find the time or energy these days, sorry. But don’t worry, here’s a guest post from AI! I gave Claude some example posts from this blog and told it to write a new one. Below is what it came up with. However, I’m interjecting my own real-life human comments and corrections in the italicized and colored brackets. OK, here’s the AI:

Last year [it wasn’t really that long ago] I wrote about remaking Trovedex with Claude’s help, and since then I’ve had quite a journey exploring AI-assisted programming. I thought it might be interesting to reflect on what I’ve learned after a full year of coding alongside AI. [It hasn’t been a full year.]

The biggest surprise has been how the AI assistant’s role has evolved in my workflow. Initially, I treated it like a magical code generator – “Make me a login system!” or “Add a delete function!” [No, I didn’t.] But I quickly learned this approach leads to a lot of debugging headaches. The AI might give you working code, but understanding how to maintain or modify it is another story entirely. [Not really, just ask the AI to do that too!]

These days, I use AI more as a programming mentor or rubber duck. [No, I don’t. Maybe more like a nerdy friend who knows a lot and will answer even really dumb questions without judgment. And honestly I’m not sure I’ve ever even heard of “rubber duck debugging” until now, ha!] Instead of asking it to write entire features, I’ll describe my implementation plan and have it point out potential issues or suggest alternative approaches. [No, I don’t. Maybe I should?] This has actually made me a better programmer, since I’m forced to think through the logic myself while still having a knowledgeable guide to bounce ideas off of.

That said, AI still shines at certain tasks. Need to figure out the correct syntax for a particularly gnarly regex? [I’m not sure I’ve ever needed to write my own regex syntax, but that does sound like something Claude would be great at.] AI’s got your back. Want to quickly transform data between different formats? AI can save you a lot of time compared to manually writing parsing logic. [This is true and I’ve used it for that quite a few times.] It’s especially helpful with those “I know this is possible but I can’t remember how to do it” moments that used to send me down long documentation rabbit holes. [Also true.]

The hardest lesson was learning to be more specific in my requests. “Add user authentication” might get you some code, but “Add email/password authentication using bcrypt for password hashing, with rate limiting on failed attempts” will get you something you can actually use. I’ve found that the more detailed I am about requirements up front, the less time I spend fixing issues later. [Actually, I’ve found the opposite. In my experience, it’s more likely to mess something up or implement something in a way I don’t want if I give it too many requirements up front. I find it better to start small.]

There have been some amusing mishaps along the way. Like the time I asked for help adding file upload functionality and got a beautiful implementation… that stored everything in memory instead of writing to disk. [Haha, what? No.] Or when I requested “mobile-friendly styling” and ended up with a UI that looked great on phones but was completely unusable on desktop. [No.] These experiences taught me to always verify the assumptions being made before implementing AI-suggested code. [Huh?]

Looking ahead, I’m excited about how AI coding assistants will evolve. [True dat.] They’re already getting better at understanding project context and maintaining consistency across multiple requests. But I hope they’ll develop better ways to explain their suggestions and help developers understand the “why” behind different implementation choices. [Sure, why not.] After all, the goal isn’t just to write working code – it’s to write code we can confidently maintain and extend. [Yeah, sure.]

For now, I’ve found my sweet spot: use AI as a collaborative tool to enhance my own programming abilities, rather than trying to outsource the actual thinking to it. [No, I’m outsourcing thinking!] It’s not quite the “AGI will make programmers obsolete” future some predicted, but it’s a pretty useful present.

Though I still occasionally catch myself asking it to “just fix all the bugs” when I’m feeling particularly frustrated. [Haha, no.] Hey, a developer can dream, right?

Thank you for that great post, AI!

AI generated podcasts from NotebookLM

I recently played around a bit with Google’s new AI-powered NotebookLM site.

When you upload the documents that are central to your projects, NotebookLM instantly becomes an expert in the information that matters most to you.

Its most interesting feature is its ability to create a 10-minute audio conversation about the material you uploaded, sort of like a podcast episode. It nicely extracts key points from your sources, but pads it with natural but annoyingly banal commentary, like SNL’s NPR parodies.

Still, as podcast lovers know, that kind of natural conversation style can be a very effective way to learn.

So here’s the AI’s audio “deep dive” into the Wikipedia article on Frances Hodgson Burnett:

(The AI apparently thought the asterisks in the text were part of the titles.)

And then here’s the AI’s conversation about an older blog post of mine, My approach to music composition:

Wow, AI bots talking about me, and pretending to be impressed! Amazing! Ha!

I may use the site for something serious in the future, but at the moment, it’s a lot of fun to experiment with.


ETA: Here’s its conversation based on a single sentence: “I don’t know why, but everything seems great!” It manages to blather for 5 minutes about this sentence. Highly amusing.

Mixing my own music with AI

Suno AI has an “upload audio” feature, allowing users to upload up to 60 seconds of their own content to be extended by the AI. So earlier this month I had some fun feeding it 45-60 clips of my own music and having the AI write lyrics and turn the clips into choir songs. It’s interesting to hear how the AI uses the melodies, chord progressions, and orchestrations provided in its own creations. The lyrics are a bit amateurish, but serviceable; I was too lazy to write my own. I’m calling the project Hannifin x AI. Here’s the first installment, based on my classic piece “Hour by Hour”; the first 60 seconds are from the original piece, while the rest is AI-generated.

I did the same with 18 other of my pieces. Some things I noticed:

  • The AI works best with simple 8-bar melodies, or 4-bar phrases. It doesn’t seem to “parse” weirder phrase structures very well.
  • It’s not very good at extended the input instrumentally, in my opinion; it quickly starts to sound too repetitive. Having it produce lyrics and turning the music into a song seems to work better. (Melodic repetition seems easier to bear with alternating lyrics.)
  • If you want the AI to generate the voice of a choir, feeding it music from the louder, more energetic and melodic parts of a piece seem to work better, especially if it features a prominent string section. Otherwise you’re more likely to get a soloist, and the music it generates is less likely to sound like a natural continuation of the music you provide.
  • For whatever reason, some tracks just seem to work better than others; maybe it depends on how “familiar” the AI is with the melodic and harmonic patterns? For some tracks, it gave me some pleasant results right away. Other times I had to roll the dice over and over to get something acceptable.

There were some pieces I tried for which I could not get any output that I was happy with, including The King’s AssassinThe Moon Dreamed By, and On the Edge of a Dream. And there was one track, Silver Moon Waltz, for which I got a couple songs I was pleased with. Anyway, I’m done trying for now.

As for the video above, I made it with Blender 4.2, which took a little time figuring out, mostly with various tutorials on YouTube. I’m not completely satisfied with the results. What’s supposed to be “dust” looks perhaps too much like snow and moves a bit too fast, and the text looks a bit weird. Turns out trying to create a sort of “drop shadow” effect on text in Blender is pretty much impossible; I had to sort of fake it with compositing cheats, and I’m not sure I did the best job. (I could’ve just put the text on the background picture and used an image editor to create the drop shadow, but I wanted the animated frequency bars to have it too.) Also, the text might be a bit too bright, but I blame that on the VR display I get with Immersed in the Meta Quest 3.

I’ll upload the other 19 songs I created soon!

 

My first AI music album: “The Shadow Age”

I’ve been enjoying writing songs with AI songwriting tool Suno for the past few months, and recently put together a full-length album of some of my favorite tracks so far. While AI wrote the music and provides the performance, I wrote the lyrics, which are very deep and profound. (Though two of the tracks are from old famous poems.) The symphonic metal album is free to download here (ZIP file, MP3 V0, 111.2MB) or on Bandcamp.

Don’t like AI music? Well, I’m sorry, but I’m going to create even more AI albums, bwahaha!

Fun with Suno: AI Song Generator

Wow, this is my first blog post of the year. That’s pretty sad.

This week I’ve been playing around with Suno, an AI song generator. As far as music-generating AI goes, it’s definitely the best I’ve seen so far, as it actually generates melodies, which is what most musical AIs stink at.

Of course, it’s got its weaknesses, but this is new tech, so that’s to be expected. And I haven’t seen competition that really does anything similar yet, though I’m sure that will come.

Anyway, here are some of the songs I’ve generated with the app. You can have it generate its own generic lyrics, but I find it more interesting to provide my own.

The first three are symphonic metal, one of my favorite genres. Maximus is an epic choir singing in another language. A Song Unsung and The Road Inside are some relaxing indie folk. The Owl and the Dragon is a folk-ish lullaby. A boys’ choir sings The Crystal KnifeAbout the Cats is in the style of a generic 90s pop song. Finally, Boop! is an Irish folk song with nonsense lyrics. Links to the lyrics for each song can be found at the bottom of this post.

Weaknesses

Perhaps the biggest weakness is lack of control. Other than providing the lyrics and style, you don’t really have much control over the details, which you’d likely want if you were a serious composer or songwriter.

Styles are also limited; I asked it for the style of a Russian folk song (“The Owl and the Dragon”), and it just gave the singer a Russian accent.

The format is limited. For best results, it seems good to stick to four-line verses and chorus, from which generates standard generic 8-bar melodies.

It’s text-to-song isn’t perfect. Sometimes it repeats a syllable, ignores a syllable, or puts emphasis on a weird syllable. Sometimes it will sing a line from a verse as though it’s part of the chorus; its “parsing” makes mistakes.

Sound quality is another weakness. You can probably tell from the examples that it outputs some pretty low-quality sounds, especially with the bombastic symphonic metal, which can sometimes make the lyrics hard to understand. But musical sound data has even more information than images, and image AI generators themselves still output a lot of noise. With images, however, it’s easy to discount the noise as texture or something. With musical sound, noise gets in the way; with professional recordings (especially if you’re an audiophile), we’re used to hearing nice clean sounds; even the hissing high frequencies of cymbals matter to a degree.

In some output (not the ones I’ve showcased here), I could swear I could hear overtone artifacts of other words or singers faintly in the background; I’m guessing the AI is doing diffusion with frequencies / Fourier transforms, and generating little fragments of training data it should be ignoring. Or it could just be weird auditory illusions.

Is it useful?

Given all these weaknesses, is Suno a useful tool? Honestly, it’s probably not super useful for professional musicians yet, perhaps other than a quick and easy way to get some ideas. Otherwise, it’s perhaps still more of a toy at its current stage.

Granted, such a musical toy can still be a lot of fun, and I’m excited to see the app develop further. I’m not sure who’s behind it or even what country it’s from, but I do hope they don’t get bought out too easily.

TuneSage

What about my own music AI, the development of which I’ve been procrastinating on? Has Suno beat me to the punch?

My approach is a lot different as I’m not really dealing with the sound of music. My focus with TuneSage is more about the actual notes and musical structures of a piece.

Lyrics

Here are links to each song on Suno, where you can see my profoundly beautiful lyrics:

Close Your Eyes
A True Heart
The Shadow Age
Maximus
A Song Unsung
The Road Inside
The Owl and the Dragon
The Crystal Knife
About the Cats
Boop!

AI generated images are getting better!

Last year I posted about creating AI art. The website I mentioned, NightCafe, is still around and has added interesting new features, but the images it generates still primarily lean to the abstract side. It doesn’t generate much I would consider of very practical use beyond having fun.

But just a few weeks ago, OpenAI announced DALL-E 2, and the images it generates are much more mind-blowing and exciting. Here’s a brief overview of the tech from Two Minute Papers:

What a time to be alive!

Granted, the examples shown in the video and on OpenAI’s website are cherrypicked. There are some other examples out there that look a bit more wonky. It still doesn’t seem to be great with human faces, for example, or things requiring a lot of finer details, and it’s awful with generating text in images.

Here’s another video describing the tech:

Despite its weaknesses, it still looks enormously more useful, fun, and exciting than the AI image generators I looked at in that post from last year. I of course added my name to the waitlist. I’d love to experiment with it, but I probably won’t get access anytime soon. But DALL-E 2 definitely looks like something I’d be more than willing to pay for (assuming the price isn’t overly expensive). I can at least imagine creating useful images to accompany blog posts, short stories, book or album covers, or something.

Amazing stuff!

ETA: Also check out this mind-blowing art book of 1,000 robot paintings by DALL-E 2 in various styles: 1111101000 Robots

Fun with AI generated art

Over the past week I’ve been having some fun generating bizarre digital art with AI via a couple of websites. You generate the art by simply giving the AI a text prompt, such as “castles in the sky” and, after a couple of minutes, out pops the AI’s somewhat abstract but interesting interpretation:

Castles in the Sky

Since the results are rather abstract, it helps to use words that lack specific forms, such as clouds and landscapes. If you ask for an animal or human, you’re probably not going to get anything that actually resembles their shape, but rather only some abstract colors and textures that resemble them. For instance, here is “dolphins eating sandwiches”:

Dolphins Eating Sandwiches

It also helps to give the AI some hints as to what the result should look like. For instance, the exact prompt for “castles in the sky” above was actually: “An enormous castle floats in the sky beautiful artwork”. Adding the tags “beautiful artwork” help give it a more painterly look.

The art is also limited in resolution; the AI just takes too much memory for larger pics, so the smaller resolutions are the norm.

I’ve been using two websites to create such art:

  1. NightCafe Studio’s AI Art Generator. The site features a very nice user interface, lets you set some optional settings, and allows you to save and share your work while exploring the works of others. It does make you create an account and limits how much you can create with it using a credit system. You can buy credits or earn some. You can check out my profile here: https://creator.nightcafe.studio/u/Seanthebest
  2. NeuralBlender has no user interface or options, but does not seem to limit use. You do have to wait for the AI to finish its current image before starting a new one if you want to see it in your browser.

I have not yet tried it, but if you do a bit of Googling, you can find resources on how to set up your own AI art generator without having to use one of the websites above; the tech is called VQGAN+CLIP and is available to all. A “GAN” is a generative adversial network … and I have no idea what the other acronyms stand for (obviously you can Google that too). So I’m not sure how long the above websites will stay in service considering the tech is not proprietary, nor do I think the AI produces artwork of enough controllable quality to be of widespread use beyond offering an amusing spectacle.

Still, it’s fun to play with. Here are some of my favorites that I’ve generated so far:

Colorful Clouds

Airship

The Sky Is Cracked

Blue Sky at Night

Stone Palace

Library

Library 2

Library 3