On the use of AI

The Precedent compiler is the product of many years of software development, which began long before LLMs became useful for programming tasks. The fundamental components of the tool were written from scratch, by hand, with no third party dependencies. That means an Intel x86-64 encoder which was written from scratch, manually copying opcode bytes from the Intel reference manual, and over 10k tests written to verify that the encoder selects the intended encoding for each requested instruction. It means an Aarch64 encoder built in almost the same way, using the published XML specifications to derive the opcode table. It means a Linker written to create PE32(+) or ELF32/64 format executable files, written from scratch, a parser from scratch, and so on.

This has been quite an exhausting effort, and along the way, I did attempt to use AI when it became available, to ease the development – unfortunately, it did not work, and worse, it had a detrimental effect on my motivation too. Early development capable AI simply could not be trusted to generate good and sensible code. Later AI models became much better at generating good code locally, but they are still not perfect, and to this day (written June 2026) they are not good at working on large code bases with deep architectural requirements. I know that there are those that would claim otherwise, but, I’ve had the experience first hand.

On one occasion I allowed an AI to perform a refactoring task across the compiler code-base. I had believed that what it had done was good, it passed tests, and behaved as expected still, and so I continued development. It was perhaps two weeks later that I noticed the mistakes that had been made, deep in the code base, and propagated across it. It wasn’t that the AI had made anything stop working, it was that it had missed many of the architectural decisions that I’d made, and therefore provided its own solutions, poor quality solutions that just happened to compile. Now that I was many commits ahead of that refactor, I had a decision to make – roll back to before the refactor, and re-implement my more recent changes, or, rebuild the code base from scratch, keeping only the good code. This was not a simple case in which I could cherry pick commits, the damage had run deep, and it taught me a painful lesson… that I still couldn’t trust AI on my code base.

I am not opposed to using AI fundamentally. There are moral and ethical questions around where its data was sourced for training, and there are moral and ethical questions around its environmental and economic costs. Each of these concerns does concern me deeply, but I also believe that the technology is here to stay, regardless of any “anti-AI” positions, I believe that this technology will forge on. And so the ethical question has become quite difficult for me to reason about, and I’m sure this remains true for many. Perhaps I’ll resolve that internal conflict and decide that the use of AI is not worth the ethical cost, but for the moment, I’ve not resolved it, and so I’ve considered how and where I might be able to make use of the technology. The answer, is actually that I can’t make use of it much at all.

You see, I can’t trust AI to write code still. For this reason I decided, perhaps I could use AI to review my code, or as a consultant on my code base. In some respects this is possible, and I have used it as a consultant on occasion, to remind me of things that I’d written and forgotten. This has become a little more common for me as the code base has grown very large, and my mind is not what it once was with regards to remembering it all. Still, that’s quite a narrow task, since I can usually simply search the code for the information I need – the required search pattern must become quite complex before I need to rely on a more capable search tool such as an AI model.

So I considered, could I use the AI to review my code, looking for mistakes. To some degree the answer is yes, but it comes at a cost. Suppose I ask an AI to review my code, it does, and it finds 5 or 6 questionable lines, or perhaps a few minor bugs that I’ve introduced. Isn’t it just far too easy for me to then follow that up with the prompt “Please give me back the same code with those issues corrected.” – And that right there is the problem. Humans don’t maintain their skills by offloading work to other people or to machines, they maintain their skills by struggling through the work themselves. Yes, I have the knowledge and experience to review what the AI does and to know if it is correct or not, but, every opportunity that I miss to do the work myself, is an opportunity for my own skills to atrophy. I plan to maintain my code base for a long time, I do not want to become unfamiliar with it, or inept at maintaining it myself. You might think that the argument “Don’t worry about maintenance, let the AI maintain it later” makes sense, but it does not. As I’ve discovered and already mentioned, I can’t trust the AI to do a good job of any maintenance task on the code… and eventually, as I’ve discovered with many attempts to prototype systems using AI, the code quality becomes so bad that even the AI becomes unable to maintain it – inevitably.

So AI realistically just isn’t useful to me in terms of writing and maintaining a large code base, at least for the time being, and I believe for the foreseeable future.
There is one area in which I am however, allowing myself to use AI – and you will see it as you read this website. I’m asking AI to review my writing, excluding this particular page. You see, since childhood my spelling and written grammar have always been a challenge for me. I had the kind of mind to learn to write computer code, but natural language just didn’t seem to fit my wiring. I’ve maintained blogs over years, and in the past I even had quite a healthy audience of readers for earlier blogs. Each blog post that I wrote however, became a multi-hour chore of reviewing what I’d written to correct spelling or grammatical mistakes, in my best efforts to write well. I was complimented by many on my writing, which I appreciated more than any of them might have expected, because for me in particular, that writing was a difficult challenge. AI therefore helps to lift that challenge for me a little. I don’t let the AI write for me, only to review, find mistakes, and suggest alternate wording for sentences that I lose control of.

Allowing AI to review and assist in my writing still comes at a cost! Some sentences that I would write in a more personable sense, the AI suggests rewriting in a more formal sense for example. It’s often easy to tell what has been written by an AI versus what was written by a human, because AI writing comes across as quite stale or bland. Still, in those cases in which I write personable, but illegible sentences, I favor the AI suggested alternatives. Developing a cross-platform, multi-architecture, native binary compiler from scratch, by hand, without using any off-the-shelf components, and even based on a from-scratch RTL, is a huge task for a solo developer. It consumes every free moment of my time, and so if I can offload some of the writing about it to an AI, well, I at least get a productivity gain from doing so.

So the answer to whether AI is used in the development of the Precedent compiler is essentially no, but with some fringe use cases where it creeps in.