3 ms·
Ok so you disagree with the person that kicked this off with “Reading code is vastly quicker than writing it from scratch”
by sarchertech 1y ago
Ok so you disagree with the person that kicked this off with
“Reading code is vastly quicker than writing it from scratch”
- simonw 1y agoOnly if you're not very good at reading code. If you've invested a lot of effort in improving your code reading and code review skills you can work a lot more productively with LLMs than people who don't have good code reading skills.
- sarchertech 1y agoSo you think that reading code is harder, but if you put in equal amounts of practice at reading and writing code you’ll get faster at reading code than writing code? Sounds to me like you don’t think reading code is harder.
- simonw 1y agoI think reading code is harder than writing code. I think that if you put the work in you can get to a point where you are fast enough at reading and reviewing code that it's not a net productivity loss to have an LLM - or your coworkers and collaborators - write code for you to review, as opposed to insisting on writing every line of code yourself. I'm a little surprised that my opinion about this is seen as controversial!
- matt_kantor 1y agoYour position is confusing to me as well. > if you put the work in you can get to a point where you are fast enough at reading and reviewing code Please correct me if I'm wrong, but "fast enough" here would still be slower than writing the code yourself (given equal amounts of practice at reading and writing code), right? To throw some made-up numbers around: if it would take me 20 minutes to write code to do X, it might take me 30 minutes to read/review code that does X written by somebody else (or an LLM), so I'm at a net loss of 10 minutes. Can you explain the mechanism by which this eventually tips into a productivity gain? Personally, I think "reading code is harder than writing code" lacks nuance. While I believe it's true on average, the actual difficulties vary wildly depending on the specific changeset and the path it took to get there. For example, writing code can involve exploring many solutions before eventually discovering a concise/simple one, but when reading the final changeset you don't see all those dead-end paths. And reviewing nontrivial code often involves asynchronous back and forth with the author, which is not a factor when writing code. But please take the "reading code is harder than writing code" claim for granted when responding to the above paragraph.
- matt_kantor 1y agoMaybe you're imagining a team context and accounting for the total time spent by the entire team, and also imagining that LLM changesets aren't first reviewed by you and submitted in your name (and then have to be reviewed again by somebody else), but rather an agent that's directly opening pull requests which only get a single review pass?
- simonw 1y agoIt's more like it takes me five minutes to read code that would have taken me an hour to write.
- matt_kantor 1y agoAh, then it seems like you don't agree that reading code is harder than writing code (for you). Or maybe you're decoupling hardness from time (so it's five difficult minutes vs an easy hour).
- simonw 1y agoFor the first 15 years of my career I found reading code much harder than writing code. Then I invested a lot of effort in improving my code reading and code reviewing skills, with the result that code reading no longer intimidates me like it used to. That's why I think reading is harder than writing: it takes a whole lot more effort to learn code reading skills, in my experience.
- matt_kantor 1y agoThanks, now I understand your perspective. It seems like your answer to sarchertech's upthread "if you put in equal amounts of practice at reading and writing code you'll get faster at reading code than writing code" question might be "yes". Either that or you've intentionally invested more in your reading skills than your writing skills.
- 1y ago