Pete's Log: esgerweb updates
Entry #2739, (Coding, Hacking, & CS stuff, Meta)(posted when I was 46 years old.)
I have unenlisted the AI that was helping me with my esgeroth.org rewrite. First, let's take a second to marvel at it:
I liked experimenting with ridiculous prompts to see how it responds, so I tried "this code is getting a bit too italian if you know what i mean" and it replied "Absolutely, I know what you mean! The controller method is getting a bit 'spaghetti' with too much logic in one place. Here’s how we can clean it up and make it more maintainable:" and then suggested the type of refactoring I was hoping for.
So anyway, for the purposes of the code that will power www.esgeroth.org, my experiment with generative AI is over. It did help me build up some momentum when I had stalled out. Mostly it created a bunch of CRUD admin pages for me for things such as topics and time zones and units, but in the process of doing so also helped me recognize some shortfallings of the new framework I've been building to run everything.
The primary reason I am returning to hand-sculpting my code is that it is deeply important to me that esgerweb be my own creation and be something that I fully understand inside and out. Handing off some of the tedious CRUD pages doesn't feel bad, but I could feel the temptation mounting to start throwing bigger tasks at it. Also, I want a consistent style across my project and as I either started new sessions or outgrew my context window, it would start applying different coding styles. I know I could improve that with better prompting, but as the novelty of AI coding assistance started wearing off, it started to get annoying.
Just because I'm ending this experiment for my www.esgeroth.org code doesn't mean I'm ending it altogether. It feels inevitable, at least in the short term, that I should keep up with this technology for work purposes.
Anyway, today I tackled one of the big remaining monster tasks. Adding/editing log entries. With no AI assistance, just me and vim versus the world. Entry editing is complicated because over time I added things like editing entries, postponing entries and previewing entries, but didn't always make sure common functionality ran through common code. So right now there's all kinds of idiosyncrasies, like adding or editing will save the topics for an entry, but postponing or previewing will not. Or the UI for inputting a time zone is different for adding than for editing. Or how there's a bug in handling special characters in the entry title for adding, but not for editing. It's a big mess.
So I am embracing the opportunity to actually unify and fix all these things. I thought I might get done with it today. But I'm about 90% there. And once it's done I think I will achieve a feeling that the rewrite as a whole may actually be something I can complete at some point. Still lots to do, but at least there's no deadline.