Conformance vs Comprehension
2 points by adsouza
2 points by adsouza
There’s a lot of food for thought here, especially as I’m recently dipping my toes into AI-assisted coding.
Are we ok with code that humans will never read or edit directly? That’s what Sam Ruby is pushing on here. We’ve been doing it a long time; what came to my mind first was the C code generated by a yacc/bison type parser generator. The grammar is the spec, the code is unreadable spaghetti. You never edit the code, you just edit the spec and rebuild. The same can be said of almost any compiler, of course.
I don’t think I’m willing to go there with AI yet. We had AI port a medium-size codebase to Rust a few months ago, and the output passed basic tests but was architecturally a mess. It also lost many subtle optimizations in the original architecture, so it wouldn’t have performed well. (To be fair we told the LLM to build a prototype, a PoC, not finished code. But I think it’d have made similar mistakes.)
Now I’m reminded of Usenet debates from the late 80s that video games have to be coded in assembly not C, because a C compiler can’t optimize well enough and the game will run too slow. Of course faster CPUs and better compilers fixed that, but also the faster development time in C became worth the performance hit. I assume there were similar debates on the hardware side, about VHDL vs laying out gates by hand.
At the moment I’m happy treating Claude as a bright junior developer who's RTFM'ed everything and can take on limited tasks like “port this C++ code into this Rust file where I’ve already defined the public API stubbed out with todo!()s.” And this is saving me a lot of time. But I still read, and plan to edit and maintain, the code it generated.