Comment by ethmarks
8 hours ago
I guess it depends on whether you're only executing the code or if you're submitting it for humans to review. If your use case is so low-stakes that a review isn't required, then vibe coding is much more defensible. But if code quality matters even slightly, such that you need to review the code, then you run into the same problems that you do with AI-generated prose: nobody wants to read what you couldn't be bothered to write.
There’s lots of times where I just don’t care how it’s implemented.
I got Claude to make a test suite the other day for a couple RFCs so I could check for spec compliance. It made a test runner and about 300 tests. And an html frontend to view the test results in a big table. Claude and I wrote 8500 lines of code in a day.
I don’t care how the test runner works, so long as it works. I really just care about the test results. Is it finding real bugs? Well, we went though the 60 or so failing tests. We changed 3 tests, because Claude had misunderstood the rfc. The rest were real bugs.
I’m sure the test runner would be more beautiful if I wrote it by hand. But I don’t care. I’ve written test runners before. They’re not interesting. I’m all for beautiful, artisanal code. I love programming. But sometimes I just want to get a job done. Sometimes the code isn’t for reading. It’s for running.
What is it about the tests that make you not care about how it’s implemented versus other code? Just the fact that it isn’t interesting to you? I happen to like spec-testing code and find it an interesting design space. It is vital to review it thoroughly for correctness. But I also think that whether I find something interesting or not doesn’t have much bearing on whether code quality is important. Code quality can even be more important for uninteresting code, because due to the lack of interest I’ll have a lower attention span when reviewing it.
> What is it about the tests that make you not care about how it’s implemented versus other code?
Huh this is a thought provoking question.
I think there's a few reasons. In a test suite:
- I don't care about performance.
- I don't care (as much) about reliability. My users aren't affected by crashes and other failures in my tests.
- I don't care (as much) about correctness. Erroneously failing tests will get human attention. Tests that erroneously pass are a bigger problem, but my test suite is not the last line of defence against bugs reaching users.
- If I had infinite time, I'd love every line of code to be a mathematically beautiful work of art. But I don't. Writing this test suite by hand would have taken me about 3 weeks. Instead, I did it in 1 day with claude. This let me spend 14 productive days working on other things. I would rather have a good-enough test suite and 14 days of productive work than an excellent test suite and nothing else. I could spend those 14 days fixing all the bugs it found. Or writing more tests. Or getting claude to write more tests. Or going outside with my friends. These are all better uses of my time.
If I was writing the core of a new game engine, the scheduler of an operating system or the data storage engine for a new database, then I would think hard about every line of code. But not all code is like that. We must adapt ourselves to the project at hand. Some lines of code matter a lot more than others. Our workflow should take that into account.