Live data from Hacker News

Writing code is easy, reading it isn't

idiallo.com

21–30 of 76 posts

Re: Writing code is easy, reading it isn't

#21
post #17

I have the opposite experience. After years in appsec and pentesting, I can read any codebase and quickly understand its parts, but I wouldn’t be able to write anything of production quality. LLMs speed the comprehension process up for me even further. I guess it comes down to practice, if you practice reading code, you get good at reading code.

reading production code that is known to work can be done with faith and skimming. You don't have to understand every function call because they've each been tested and battle hardened, so it's easy to get an overview of what is happening. LLM code is NOT like this at all, but it's like a skilled liar writing something that LOOKS plausible, that's what they're trained to do. People like you do not have the ability to…

You are being gaslit if you think "production code that is known to work" covers any reasonable proportion of code in production.

Re: Writing code is easy, reading it isn't

#22

Earlier quoted context omitted.

reading production code that is known to work can be done with faith and skimming. You don't have to understand every function call because they've each been tested and battle hardened, so it's easy to get an overview of what is happening. LLM code is NOT like this at all, but it's like a skilled liar writing something that LOOKS plausible, that's what they're trained to do. People like you do not have the ability to…

You are being gaslit if you think "production code that is known to work" covers any reasonable proportion of code in production.

well played, but of course inevitably whatever it's doing in production (whether to spec or not) is "working" for somebody.

Obligatory XKCD https://xkcd.com/1172/ "Workflow" reference

Re: Writing code is easy, reading it isn't

#23
post #8

This is a challenge which I don't think AI tools like Cursor have cracked yet. They're great for laying "fresh pavement" but it's akin to being a project manager contracting the work out. Even if I use Cursor (or some other equivalent) and review the code I find my mental model of the system is much more lacking. It actually had a net negative on my productivity as it gave me anxiety at going back to the codebase. If…

but it's akin to being a project manager contracting the work out. And that's probably the difference between those who are okay with vibe coding and those who aren't. A leader of a company that doesn't care about code quality (elegant code, good tradeoffs, etc) would never have cared if 10 monkeys outputted the code pre-AI or if 10 robot monkeys outputted the code with AI. It's only a developer, of a certain type, t…

Well, now they can have their way without a pesky developer second-guessing every decision of them.

I don't want to participate on it either, but I'm glad they'll have the chance to make things their way with all the consequences it brings unfiltered.

Re: Writing code is easy, reading it isn't

#24

This is not unique to the age of LLMs. PR reviews are often shallow because the reviewer is not giving the contribution the amount of attention and understanding it deserves. With LLMs, the volume of code has only gotten larger but those same LLMs can help review the code being written. The current code review agents are surprisingly good at catching errors. Better than most reviewers. We'll soon get to a point where…

I wonder if the paradigm shift is the adoption of a higher level language. Akin to what python did to blackboxing C libraries.

Re: Writing code is easy, reading it isn't

#27

I am really bad at reading code to be honest (especially other people's code). Any tips on how I can go about becoming good at this like starting from baby steps?

It's far easier to read diagrams then it is to read code.

To get a good mental model, I'll often get an LLM to generate a few mermaid diagrams to help create a mental model of how everything pieces together

Re: Writing code is easy, reading it isn't

#28
post #4

Earlier quoted context omitted.

An AI tool can both navigate a legacy codebase and help explain it to you successfully currently, right now, if you're doing it correctly. I've contracted some of this understanding of pieces/intellectual work out to Claude code many, many times successfully.

Yes it’s definitely possible now. My point was that people need to move past “vibe coding” to using the AI as what it should be, an assistant

I don't think people are realistically "vibe coding" production apps. You see a lot of hype, and I'm sure there is growing number of people without software development skills using Claude Code, but those are not the people writing important software. Even the people from Anthropic encourage programmers to first use CC as analytics/research tool, not for writing code. Once you get a feel what it can do, you will feel comfortable feeding it chunks of work you want to delegate, but realistically never more than you can review. Yes, you can ask it to build the next Instagram, but you will very quickly find out it's not going to work.

Re: Writing code is easy, reading it isn't

#29
post #16

This is not unique to the age of LLMs. PR reviews are often shallow because the reviewer is not giving the contribution the amount of attention and understanding it deserves. With LLMs, the volume of code has only gotten larger but those same LLMs can help review the code being written. The current code review agents are surprisingly good at catching errors. Better than most reviewers. We'll soon get to a point where…

> We'll soon get to a point where it's no longer necessary to review code, either by the LLM prompter, or by a second reviewer (the volume of generate code will be too great). Instead, we'll need to create new tools and guardrails to ensure that whatever is written is done in a sustainable way. The real breakthrough would be finding a way to not even do things that don’t need to be done in the first place. 90% of wha…

[deleted]
Post reply on HN