News for hackers. Stuff that matters.
Re:My Experience with Claude Code After 2 Weeks of Adventures by darkwater on Friday July 18, 2025 @03:15AM (#44602083)
And how do you actually know that those 20k line of codes have no glaring bugs, or bugs that you can find yourself, or be able to understand it completely at some point?
Re:My Experience with Claude Code After 2 Weeks of Adventures by rovr138 on Friday July 18, 2025 @04:09AM (#44602382)
The way I do this is by still writing tests.
Re:My Experience with Claude Code After 2 Weeks of Adventures by darkwater on Friday July 18, 2025 @04:10AM (#44602389)
Do tests let you understand a codebase you have not written?
Re:My Experience with Claude Code After 2 Weeks of Adventures by koolba on Friday July 18, 2025 @05:51AM (#44602880)
They can. Particularly if you use them to validate your assumptions about the code.
Re:My Experience with Claude Code After 2 Weeks of Adventures by intrasight on Friday July 18, 2025 @08:10AM (#44603810)
this desire to understand code will be soon be seen as rather anachronistic. What's important is that you understand your tests. Let the AI generate the code.

The spec and the test are your human contribution.

Re:My Experience with Claude Code After 2 Weeks of Adventures by darkwater on Friday July 18, 2025 @08:47AM (#44604114)
I understand your point of view but I think it's too "optimistic", i.e. it will not happen soon, at least not outside AI maximalists.
Re:My Experience with Claude Code After 2 Weeks of Adventures by chasd00 on Friday July 18, 2025 @09:03AM (#44604231)
you're describing TDD and it never turned into the panacea that was promised. I'm excited to try claude code, i even have a decent little personal project lined up for it but someone somewhere will always need to understand the code because tests are never 100% exhaustive and major flaws come up.
Re:My Experience with Claude Code After 2 Weeks of Adventures by two_tasty on Friday July 18, 2025 @09:41AM (#44604556)
Ah yes, can't wait to tell my auditor / regulator "I don't understand the code because Claude wrote it, but it's fine, because understand the code is for boomers." That will get a big laugh in a deposition.
Re:My Experience with Claude Code After 2 Weeks of Adventures by intrasight on Friday July 18, 2025 @10:55AM (#44605340)
That'll be anachronistic too obviously. Your tests will be audited.
Re:My Experience with Claude Code After 2 Weeks of Adventures by jimbokun on Friday July 18, 2025 @02:11PM (#44607999)
If the tests are written with sufficient detail that you don't need to look at the code, the implementation of the code is such a small part of the overall work that you are gaining very little in terms of overall productivity.
Re:My Experience with Claude Code After 2 Weeks of Adventures by intrasight on Wednesday July 30, 2025 @07:26PM (#44740733)
I agree
Re:My Experience with Claude Code After 2 Weeks of Adventures by jimbokun on Friday July 18, 2025 @02:09PM (#44607975)
I would say yes.

To have useful tests, you must write the APIs for the functions, and give examples of how to wire up the various constructs, and correct input/output pairs.

Implementations of those functions that pass the test now have significant constraints that mean you understand a lot about it.

Re:My Experience with Claude Code After 2 Weeks of Adventures by theshrike79 on Friday July 18, 2025 @02:13PM (#44608032)
That’s called Test Driven Development.

First you write the tests, then you write code until tests pass.

Re:My Experience with Claude Code After 2 Weeks of Adventures by NeutralCrane on Friday July 18, 2025 @10:25AM (#44604971)
How do you know your own handwritten 20k lines of code have no bugs, or that 20k lines of code written by coworkers have no bugs?
Re:My Experience with Claude Code After 2 Weeks of Adventures by actinium226 on Saturday July 19, 2025 @02:01AM (#44612954)
I'm not the person you're replying to, but I have a lot more confidence in my own 20k lines of code than an AIs. I've built up skills to write performant, readable, functional, maintainable code. I build it up slowly and I can anticipate bugs as I write. I'm not perfect, but when bugs do arise, since I've built up the code, I have some idea of where to look and where not to look in order to fix them.

As for coworkers, I would really try to get them to work in chunks smaller than 20k loc. But at some point you have an expectation that coworkers will be accountable for their area of responsibility. If there's a bug in their code, they're expected to fix it. If there's a bug in the AIs code, I'm expected to fix it....