Musings of an LLM Using Man
I know, the internet doesn’t need more words about AI, but not addressing my own usage here feels like an omission.
A good deal of the DC Tech Events code was written with Amazon Q. A few things led to this:
- Being on the job market, I felt like I needed get a handle on this stuff, to at least have opinions formed by experience and not just stuff I read on the internet.
- I managed to get my hands on $50 of AWS credit that could only be spent on Q.
So, I decided that DC Tech Events would be an experiment in working with an LLM coding assistant. I naturally tend to be a bit of an architecture astronaut. You could say Q exacerbated that, or at least didn’t temper that tendency at all. From another angle, it took me to the logical conclusion of my sketchiest ideas faster than I would have otherwise. To abuse the “astronaut” metaphor: Q got me to the moon (and the realization that life on the moon isn’t that pleasant) much sooner than I would have without it.
I had a CDK project deploying a defensible cloud architecture for the site, using S3, Cloudfront, Lambda, API Gateway, and DynamoDB. The first “maybe this sucks” moment came when I started working on tweaking the HTML and CSS, I didn’t have a good way to preview changes locally without a cdk deploy
, which could take a couple of minutes.
That led to a container-centric refactor, that was able to run locally using docker compose
. This is when I decided to share an early screenshot. It worked, but the complexity started making me feel nauseous.
This prompt was my hail mary:
Reimagine this whole project as a static site generator. There is a directory called _groups, with a yaml file describing each group. There is a directory called _single_events for events that don’t come from groups(also yaml). All “suggestions” and the review process will all happen via Github pull requests, so there is no need to provide UI or API’s enabling that. There is no longer a need for API’s or login or databases. Restructure the project to accomplish this as simply as possible.
The aggregator should work in two phases: one fetches ical files, and updates a local copy of the file only if it has updated (and supports conditional HTTP get via etag or last modified date). The other converts downloaded iCals and single event YAML into new YAML files:
- upcoming.yaml : the remainder of the current month, and all events for the following month
- per-month files (like july.yaml)
The flask app should be reconfigured to pull from these YAML files instead of dynamoDB.
Remove the current GithHub actions. Instead, when a change is made to
main
, the aggregator should run, freeze.py should run, and the built site should be deployed via github page
I don’t recall whether it worked on the first try, and it certainly wasn’t the end of the road (I eventually abandoned the per-month organization, for example), but it did the thing. I was impressed enough to save that prompt because it felt like a noteworthy moment.
I’d liken the whole experience to: banging software into shape by criticizing it. I like criticizing stuff! (I came into blogging during the new media douchebag era, after all). In the future, I think I prefer working this way, over not.
If I personally continue using this (and similar tech), am I contributing to making the world worse? The energy and environmental cost might be overstated, but it isn’t nothing. Is it akin to the other compromises I might make in a day, like driving my gasoline-powered car, grilling over charcoal, or zoning out in the shower? Much worse? Much less? I don’t know yet.
That isn’t the only lens where things look bleak, either: it’s the same tools and infrastructure that make the whiz-bang coding assistants work that lets search engines spit out fact-shaped, information-like blurbs that are only correct by coincidence. It’s shitty that with the right prompts, you can replicate an artists work, or apply their style to new subject matter, especially if that artist is still alive and working. I wonder if content generated by models trained on other model-generated work will be the grey goo fate of the web.
The title of this post was meant to be an X Files reference, but I wonder if cigarettes are in fact an apt metaphor: bad for you and the people around you, enjoyable (for some), and hard to quit.