LLMs are here to stay and if we believe Kurzweil's law of accelerating returns proposed in his book The Age of Spiritual Machines, then theoretically, they will improve at an exponential rate. However, their utility will depend on how proficient one gets at using them. LLMs are, in my opinion, a superset of a tool—much like a Swiss Army knife but with seemingly infinite sub-tools.
When I started writing code for Paylias, vibe coding wasn't as mainstream and the models weren't as sophisticated as they are today. I think GPT-3.5-turbo had just launched and people had started to scratch the surface of using LLMs for code generation, but agentic coding didn't exist (or if it did, I was too cheap to buy the subscription). So this meant that when Zed (my editor of choice) integrated agents into their editor, the codebase for Paylias had already grown to over 80,000 lines of Go code.
Given this, I wasn't going to let an AI model immediately start editing the codebase that I had, for the past 2 years, painstakingly worked on—but I was intrigued. I started getting help from LLMs to improve existing architecture for certain services, find bugs in my existing code and, on the rare occasion, let it write some unit tests.
To be honest, it was like a drug at first. The speed of the output and the confidence in the LLM’s own answers made me start using it more and more. Up until the point my free credits ran out. I think not purchasing a paid version of Cursor or Zed has prevented me from becoming an addict, so to speak. But I may be hindering my own velocity when it comes to shipping code—a dilemma I'm still coming to terms with.
Then OpenAI launched Codex.
Originally too expensive for me to purchase on their Pro plan, I shrugged it off and stuck with Zed for the time being. But when they released it to their Plus plan, boy was I ready to give it a shot. By this time, I had improved my prompting skills and figured out what works and what spits out garbage, so I figured Codex could really be useful for me. The thing that excited me about Codex over Zed and Cursor is that if you configure an environment and give it some instructions, Codex will run in the background, attempt to follow and implement your instructions, and create a pull request for you. While it sounds skeptical to leave an LLM to its own whims and expect polished output as opposed to incremental changes while vibe coding, I've found that if you're specific with what you want, Codex will get you 90% of the way there—and while it's working in the background, I can, in parallel, work on defining the next task.
Let me give you an example. The other day I wanted to modify our Customer resource to also accept both individuals and businesses (currently, only individuals were supported). After I had defined the properties that I wanted to support for businesses, I knew that the implementation was a fairly monotonous task. I could do it myself, as I've done countless times for other resources—but I had to go out with my wife, and so I wouldn't have the time to sit and implement the changes. Instead, here's the prompt I came up with:
To be honest, it took me about 60 minutes to write this prompt, which is short relative to the amount of time it would have taken me to implement it, but it’s a decent amount of time investment. Add to this that I wanted Codex to implement this in a single shot, so I was focusing on being accurate and ensuring that I hadn't missed a step.
I'm what the Swedish call a tidsoptimist and that day was no different. With the clock ticking and my wife giving me angry looks, I pasted this into Codex and closed my laptop. In the evening when I returned home, I checked the output and to my surprise, Codex had done exactly what I wanted it to. A quick review, merge, and slight manual modifications later, I was able to push up support for business customers in a day while still being able to spend time with my family!
Most code, once your repository gets to a certain point, can be seen as a series of steps that can be repeated to an extent. For example, if you're building a CRUD API, almost always you'll have to:
- Create a migration file to store data to and retrieve from a database
- Generate a model (optional depending on whether you're using an ORM)
- Create an internal representation of that model and one that can be exposed to the client
- Create repository functions to CRUD that model from the database
- Create functions to manage the business logic around this model—for instance, ensuring uniqueness, ownership, etc.
- Create representations of how you expect data to be sent to your APIs from the client to interact with your model
- Expose the endpoints through your routing layer
- Wrap the routes in any authentication middleware you have
Add to this any files you want to modify or create, and tools like Codex can manage almost 90% of this work to a surprising degree of accuracy. Add to this an AGENTS.md file that locks in your coding preferences, choices of libraries, and coding conventions, and you've got yourself a pretty good setup.
I've been using Codex quite frequently when these kinds of repetitive tasks come up, but I want to improve my prompting techniques. I've been looking at this guide from Foundry and the now infamous Lyra prompt to see what I can borrow and try with my setup.
Curious to know what's worked for you and what hasn't. I do still think that autocomplete suggestions in code editors have a long way to go...