Live data from Hacker News

Writing code is easy, reading it isn't

idiallo.com

1–10 of 76 posts

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

#2
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 an AI tool could help a user interactively learn the mental model I think that would be a great step in the right direction.

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

#4

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…

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.

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

#5

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?

Practice, context and domain-specific knowledge.

#1 is easy, #2 requires some investigation, #3 requires studying.

If you're looking at say, banking code - but you know nothing about finance - you may struggle to understand what it's doing. You may want to gain some domain expertise. Being an SME makes reading the related code a heck of a lot easier.

Context comes down to learning the code base. What code calls the part you're looking at? What user actions trigger it? Look at the comments and commit messages - what was the intention? This just takes time and a lot of trawling around, looking for patterns and common elements. User manuals and documentation can also help. This part can't be rushed - it just comes to passing over it again and again and again. If you have access to people very familiar with the code - ask them! They may be able to kick start your intro.

#1 will come naturally with time.

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

#6

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?

Like everything else, practice. I like to clone repositories of open source tools I use and try to understand how a particular feature is built end to end. I find that reading code aimlessly is not that helpful. Try to read it with a goal in mind. When starting out, pick a tool/application that is very simple and lean on LLMs to explain only the bits you don't understand.

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

#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, that would care to say "pause" in either of those situations.

Out of principal I would not share or build coding tools for these people. They literally did not care all these years about code quality, and the last thing I want to do is enable them on any level.

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

#9

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?

When you're debugging issues, read the code for the libraries you're using before going to their documentation. It's a great way to get exposed to other people's code.

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

#10
post #4

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…

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
Post reply on HN