Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

171–180 of 479 posts

Re: Prevent cognitive debt by manually retyping LLM-generated code

#172

Earlier quoted context omitted.

> Cooking a steak and then flushing it straight down the toilet outperforms all the slow and tedious business of eating and digesting it, too. That would be more equivalent to writing the code and immediately deleting it. Except this code is being deployed, and it is still (mostly) functional, at least functional enough to satisfy your employer (their “hunger” in your analogy). > Why should I use an LLM to write code…

> Except this code is being deployed, and it is still (mostly) functional, at least functional enough to satisfy your employer (their “hunger” in your analogy). Bzzzt. Wrong. I don't give a fuck who's satisfied by my code. I only care about writing it. > Because your employer is convinced that it can do the job they want it to Bzzzt. Wrong. The code is incorrect because it is not precisely the code I would have writt…

"I am the world hence everything i say must be correct and there can be no counter opinions because i know everything. bzzzt."

Re: Prevent cognitive debt by manually retyping LLM-generated code

#173
post #34
post #31

This does not sound fun. It's better to work on your side projects with manual coding. You will learn more. Retyping things is inefficient for learning. It's like trying to retype calculus solutions — you don't learn from it. Even if there is an explanation of why the code is written in such a way, you did not come up with it, and you don't know alternative solutions. It is a practice for memorizing, not for building…

I had fun and also learned a lot when I retyped programs from magazines back in the day. I am not sure if it's suitable now but there is certainly some merit to the idea.

After typing in the program, I found that single stepping the program in a debugger greatly helped with understanding.

Re: Prevent cognitive debt by manually retyping LLM-generated code

#174
post #31

This does not sound fun. It's better to work on your side projects with manual coding. You will learn more. Retyping things is inefficient for learning. It's like trying to retype calculus solutions — you don't learn from it. Even if there is an explanation of why the code is written in such a way, you did not come up with it, and you don't know alternative solutions. It is a practice for memorizing, not for building…

I think it depends on what type of cognition you want to stimulate. It's probably useful to familiarize yourself with a suite of API calls, or get a big picture view of how an algorithm runs.

Re: Prevent cognitive debt by manually retyping LLM-generated code

#175
I don't understand the concern about "cognitive debt". I frequently have to maintain code I wrote, or someone else wrote, weeks/months/years ago and I have NFI what's going on. Now I say to the LLM "tell me what's going on" and it tells me. I can ask it some follow up questions, and build up my understanding. It's SO much faster than grepping through the source myself and I can do it for as multiple issues in parallel. The notion of reading every line of code is absurd to me, the notion of RETYPING it beggars belief. Surely this is satire.

Re: Prevent cognitive debt by manually retyping LLM-generated code

#176

Earlier quoted context omitted.

> Except this code is being deployed, and it is still (mostly) functional, at least functional enough to satisfy your employer (their “hunger” in your analogy). Bzzzt. Wrong. I don't give a fuck who's satisfied by my code. I only care about writing it. > Because your employer is convinced that it can do the job they want it to Bzzzt. Wrong. The code is incorrect because it is not precisely the code I would have writt…

Again, unless you’re the employer, then you’re getting paid by someone that cares more about productivity than whether you think LLMs produce incorrect code. All that matters is whether they agree with you. The only control you have over this is to either a) work for yourself, or b) keep looking until you find an employer that agrees with you. My argument is that the number of employers that fall under (b) is shrinki…

> My argument is that the number of employers that fall under (b) is shrinking.

That's great. Sucks to be them. I've doubled my prices and doubled my time estimates and I'm still turning work away.

Re: Prevent cognitive debt by manually retyping LLM-generated code

#178

Earlier quoted context omitted.

> Except this code is being deployed, and it is still (mostly) functional, at least functional enough to satisfy your employer (their “hunger” in your analogy). Bzzzt. Wrong. I don't give a fuck who's satisfied by my code. I only care about writing it. > Because your employer is convinced that it can do the job they want it to Bzzzt. Wrong. The code is incorrect because it is not precisely the code I would have writt…

Thing is, companies don’t care if it’s not your code or your view of it. If it works, that’s what they want. Since I stopped typing code I’ve been using my time to play some video games, read some books etc while the agents do the boring stuff (work itself). I get paid, the company is more productive, I got a bonus and a raise, everyone’s happy.

With the rise and rise of LLM slop in code, I've just had to jack my prices through the roof.

The first thing I do when I'm asked to clean up the LLM slop is "rm -rf ." and start from scratch.

You will pay a fortune for this.

Re: Prevent cognitive debt by manually retyping LLM-generated code

#179
post #171

Jack Kerouac famously sat down and typed "Anna Karenina" on a typewriter because he wanted to feel what it was like to "write a great novel".

I think you're thinking of Hunter S Thompson, Kerouac really doesn't seem like the person that would have the time or care about doing that.

Re: Prevent cognitive debt by manually retyping LLM-generated code

#180

Earlier quoted context omitted.

> No, you didn't have to explicitly say it in words. My mind doesn't run on internal monologue. Many people can just do their work without ever having reflected on it in words. Were you a solo developer? I think the amount of reports and explanations (either written or verbal) dwarfs by large the amount of code I’ve written. From training juniors to drafting a design specs for a feature. That is why people say code i…

I'm in academic ML research. Coding is mostly scoped to myself. And it's often nontrivial. My communication is more in papers, reports on experimental results, deciding what to try next, but how the code is organized is rarely the focus of discussion. Of course this may be entirely different in a software shop building routine features where the difficulty is indeed the social part and the software itself is more cle…

> Of course this may be entirely different in a software shop building routine features where the difficulty is indeed the social part and the software itself is more clearly understood. But I'd say that's when AI can be even more effective since it can do mundane coding even better proportionally than research code

And here’s another fallacy that is always thrown around. Always underestimating the other’s tasks when you are not an expert in it and don’t know intimately what’s involved.

Post reply on HN