antirez (@antirez) on X

X (formerly Twitter) ·

2 min read Original article ↗

user avatar

Let's start from this censored amount of code of the *finished* implementation. I'll call it "foo" as I don't want to tell what it is till final internal approval: $ wc -l t_foo.[ch] foodatastruct.c 4093 t_foo.c 1857 foo.c 5950 total So, first things to focus is: just 6k LoC.

user avatar

How those 6k lines where obtained: 1. One month of just .md specification writing. 2. Specification included *exact* details about the data structure, implementation tricks to save memory, multiple indirection levels to handle a vast amount of use cases. (continue)

user avatar

3. Documentation level specification for *each* command of the new data structure. C structures to show the layout of data, and exact details about the algorithms. 4. Asked Claude to implement a first draft, then refined it strognly with Codex.

user avatar

5. Since I could go so fast, decided to make things more complex: a level of complexity I would normally *not* accept, but with LLMs I could make this data structure kinda "magical" from certain POVs compared to other Redis stuff. Huge memory saving, sparsity, ...

user avatar

So, many other weeks of iterating with new ideas, benchmarks, to go faster, save memory, in a continuous loop. Then a few weeks ago I started to review *each single line of code*, and, guess what? I found a lot of things I didn't like enough in the details.

user avatar

So I hand-modified or prompt-modified every function, every comment, in order to make everything high quality. I believe the result is excellent, also because with LLMs I was able to write a very complete test suite. But, as you can see, that's not exactly vibe coding.

user avatar

Btw, this time, I don't feel like to leave the agent as co author of the commits. When you are just a tool, I'm thankful for the help, but no way the commit of my ideas, design, attempts is going to be shared ;D

user avatar

Also note that if you are doing good work with automatic programming, you likely can find a proxy on the number of lines of code of the project: the more lines of code compared to the actual output, the worse. 6k lines of code can be reviewed, 100k? I don't think so.

user avatar

I don't claim this is the only way. I myself code certain stuff totally automatically, but for certain domains, like system programming in a software as popular as Redis, I believe this is the only way to ensure real quality.