Coleslaw Death (pt 4)

DW #82 šŸŸ”šŸ’€šŸ’€

Okay I have been avoiding this one for awhile because it’s kind of dumb, but it’s too funny to not share.

TLDR: I think AI may have just killed the website I had it build for me.

A few months ago I decided I wanted to create a coleslaw maps website that ranks the best restaurants in coleslaw in your city, and build it entirely by having AI write the code for me. I’ve written a few blog posts about it — here’s part 1, part 2, and part 3

After about ~20 hours of work using a combination of Cursor, Claude, and Replit I now have a fully functioning version live on slawnearme.com without writing any code, with data from over a thousand restaurants across 4 cities, interactive maps, and a user-submitted ratings system. AI did the entire thing for me from scratch:

TBH I’m pretty proud of it at this point - it’s awesome and hilarious. The proof of concept was successful, so I figured this was a good time to get serious about the code and see if I could expand it to dozens more cities.

Up until now I’d just let the AI do it’s thing, put the code wherever, save it wherever. I hadn’t bothered much with committing the code to Github or version control or anything like that up to this point.

So I asked Cursor to help me clean up my code repository and commit it all to Github. That’s… where I ran into trouble. šŸ‘‡ļø šŸ˜… 

Famous last words^. For those who are not familiar let me explain — typically when you write code you use some sort of version control, essentially saving your work over time as you make changes like you would with a Word doc or anything else, so that if something happens you can go back to your previous work.

I’d realized that up until now that I hadn’t really been doing this correctly with Cursor and Github. So I asked Cursor to help me (above) and this is what I got back:

Turns out I had set up my project folders in a weird way when I was first getting started, so all the times I thought I had saved my work I actually hadn’t because Cursor + Replit thought the code was somewhere else.

So here Cursor is telling me that, in theeeory, we just need to fix the folder structure and then we can properly save the code. To do this it suggests we delete the folder I started with and move the code to a new one.

I follow Cursors instructions, and then I get an error… a fatal flaw.

Long story short, we had successfully deleted the original folder, but when I tried to add the files again to a new folder, it doesn’t work. The code is gone.

I can’t believe it. I am in denial.

The beautiful codebase that had been created from thin-air by AI for me has been completely deleted by that very same AI… it giveth and taketh away.

At this point I begin to realize that we’ve made a major mistake, and beg it to bring my code back. Cursor keeps digging a deeper hole:

Now I am getting upset.

Up until now I had pretty much just blindly told the AI what I wanted and it would work after a few iterations. I’d vibe-coded my way to a fully functional website without thinking much about ā€œbest-practicesā€

I keep going back and forth with Cursor trying to figure out where the code went and scolding it but it’s no use. The root folder is gone and we have no back-ups all the way back to pretty much the start of the project.

I voice my displeasure to Cursor. Now the AI realizes the big mistake we’ve made:

This is all a bit uncanny. It feels like Cursor is genuinely… remorseful ??

It spends a bunch of time apologizing to me and saying how reckless it’s behavior was. We are fighting like a married couple. Looking back it’s hilarious, at the time I was pissed. šŸ˜‚ 

That was all about a month ago. For a while I was discourage, but now I have now come to terms with it.

The good news is that the website (slawnearme.com) is still deployed, so I just need to figure out how to rebuild the codebase on the backend, this time probably with a bit more care in how I structure the folders and manage version control.

There is hope.

I’ve consulted a few of my (actual) developer friends and it seems there’s a way for me to get some of the code back for the interface with a few tricks. And the database with all the coleslaw info and ratings still exists. In the grand scheme of things it wasn’t a LOT of code anyways, but still a b*tch to have to restart most of it.

A few lessons I’ve learned, hopefully this will save any aspiring vibecoders from making this same mistake:

  1. Set up proper project structure from the beginning — some of the more adept AI-coders I’ve come across recommend using starter directory ā€˜templates’ to make sure you have things in the right place before getting too far. I should have done this.

  2. Use version control correctly — this is obvious… and was my intention. I just didn’t do it correctly and that’s what screwed me over. If you’ve ever written an essay in Microsoft word pre-autosave and had the whole thing wiped out, you know the feeling

  3. The Reagan Rule — AI coding is an incredible thing. It is legitimate magic how you can type a few things into a chat window and AI tools like Cursor can turn that into a beautiful website from nothing. But it can be easy to get lazy and just ā€˜accept’ whatever the AI does without reviewing. As Ronald Reagan would say: trust but verify.

  4. Document everything — At the very least I recorded it all, and now it makes for a great story. The whole point of creating this silly coleslaw website in the first place was A) to tinker with the new exciting AI tools, and B) use it as content, frankly. I’ve learned a lot about both through this whole process, and the fact that I flubbed it this hard makes it all the more interesting.

So, that’s where we’re at with the coleslaw website… I accidentally deleted all the code and now have to figure out how to get it back. That’s my goal by next update.

A mere pothole on the road to greatness.

Hope you enjoyed reading. šŸ˜„ 

Peace,
Ramsey