Remix.run Logo
andybak 10 hours ago

Personally I've found one of the biggest gains with coding agents is in helping me read code. Actually - that's a lie. I don't read the code. Mostly (unless my spidey-sense goes off) I ask the LLM to read the code and tell me what it does.

And then I make a decision based on that.

I guess I'm wondering if the article is missing half the picture. Yes - AI is wrong some of the time (and that % varies based on a host of variables). But it can read code as well as just write it. And that does matter as it changes the trade-offs this article is weighing up.

foobarian 9 hours ago | parent | next [-]

It's been pretty great for ramping up into codebases too. "Give me a summary of project in current checkout in markdown form."

copperx 9 hours ago | parent [-]

do you enjoy reading markdown? I don't, even with the editor in preview mode.

kuboble 9 hours ago | parent [-]

I'm actually asking claude to make me eli5 htmls with svg diagrams of the code I want to understand.

Once I even asked him to create for me a manim video about it.

Aurornis 8 hours ago | parent | prev | next [-]

There are times when reading the code is necessary, but oh boy are LLMs so much faster at finding the part of the codebase I want to read.

Several projects I work on call into or interact with gigantic codebases. A couple years ago I would have to allocate 30 minutes some times to either trace through the code base or setup and attach a debugger to step through the code until I found the part I needed to know about.

Now I send an LLM to go find it and it comes back with a list of files and line numbers in minutes.

It’s still not perfect. I had a codebase walk this morning where even GPT-5.5 extra high failed to find something I knew was in there on the first pass. It got it with some more directed prompting. If you delegate trust 100% to an LLM you will get bit eventually.

dilyevsky 8 hours ago | parent | prev | next [-]

The "It’s harder to read code than to write it" was always silly. The example spolsky gives to support it is basically "devs like to rewrite other devs code, therefore reading is hard" which is obviously bunch of nonsense. That's like saying reading poetry is harder than writing poetry because poets keep writing new poems despite the fact that Shakespeare already wrote it. Now that you can recruit LLM to explain any complicated codebase to you it's even less true.

pixl97 8 hours ago | parent [-]

This isn't a great analogy. The thing about code is it is part of a whole. While often code can be read in smaller pieces and understood, quite often you have to understand a very large part, if not all the work to really see what is going on.

This is why things like SAST are topical. They miss all kinds of exploits because they don't understand the program. The more in depth you try to scan the more the memory requirements explode.

Now LLMs are much better at this, but between context windows and costs you can bankrupt yourself pretty quick putting code bases in context memory.

dilyevsky 8 hours ago | parent [-]

This analogy directly addresses spolsky’s botched argument. The point is devs went into this career to dev not read other people’s code whether it makes business sense or not. What you said applies to writing code just as well as reading it so clearly writing cant be easier than reading - it’s at least as hard and most definitely harder

BosunoB 8 hours ago | parent | prev | next [-]

Exactly, and that's why this maxim about "understanding the code base" being the bottleneck is also somewhat misleading.

Claude is even better at helping you understand the code base then it is at writing code! It can look at a bunch of files and give you an accurate run down in ten minutes.

y3ahd0g 9 hours ago | parent | prev | next [-]

I like to constrain it as much as possible to ignore variables and function names; the human stuff.

With a new code base my first goal understand how it CRUDs state. What structures and what operations?

Less concerned at the outset if its sorting carrots or processing orders for shirts.

AI seems to work way better for me when I tell it to ignore the use case and focus on surfacing runtime and mathematical operations embedded in the code.

Constraints on new abstraction and telling it to stick to math terms and types and objects also seems to help avoid hallucinations and layers of useless indirection.

esafak 9 hours ago | parent | prev [-]

It lets you understand the code base at reduced granularity when you want. Or zoom in beyond the written lines to explain _why_ some code is the way it is.

chris_st 9 hours ago | parent | next [-]

I asked Claude to tell me why something was implemented the way it was, and got an excellent response. One data point, would love to hear more examples.

rectang 8 hours ago | parent [-]

I agree, Claude has been pretty great at explaining code. It even does well at explaining to me old code that I wrote by hand — including both non-intuitive quirks and flaws.

Claude in its default configuration has untapped potential for explaining and documenting code because it defaults to writing no comments. I added this to my global CLAUDE.md and so far so good:

    # Comments

    Keep existing comments unless they're wrong
    or stale. Err slightly toward adding short
    explanatory comments for non-obvious code.
ai_fry_ur_brain 9 hours ago | parent | prev [-]

Why not just read the code.. Ya'll are literally letting your brain atrophy by using llms this way.

andybak 8 hours ago | parent | next [-]

Despite you using "literally" purely for emphasis, I would dispute this based on both the literal and popular meaning of "literally".

casper14 9 hours ago | parent | prev | next [-]

How do I know this comment isn't just AI?

aspenmartin 9 hours ago | parent | prev [-]

Why not just read the assembly?