Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

321–330 of 479 posts

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

#321
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…

> It's like trying to retype calculus solutions — you don't learn from it

???

i entirely learned all the math and applied math by working through problems whether myself or copying down from the solutions manual or text book over and over again until it stuck

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

#322

Lots of reactions here, but if it works for you then that's great. For me I feel that LLMs have exploded (in a good way) my cognitive capabilities. I'm now the general of an army, rather than playing the role of a soldier. Of course that means that I lose the experience of being the lonely soldier, but it is a no-brainer tradeoff for me. Anyway, I have to go now so I can push my car to the grocery store (so I don't f…

I feel like you think the car analogy was a clever parallel to draw here but looking at a car centric north american population and the dimensions of a non trivial slice of them that are unable to walk a 5k, id say you made the opposite point.

If a computer is a bicycle for the mind, perhaps LLMs are the cars for the mind…

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

#324

Earlier quoted context omitted.

I feel like you think the car analogy was a clever parallel to draw here but looking at a car centric north american population and the dimensions of a non trivial slice of them that are unable to walk a 5k, id say you made the opposite point.

You have a point based on the way I wrote it. What I was trying to get at: If you're going to walk to the store, don't push you car there! Just walk. So if you want to write code, don't retype what the LLM said, create your code from your own brain.

Haha, your analogy reminds me of one I often make to highlight just how much we undervalue fossil fuels.

Imagine filling your car with $1 worth of fuel and then driving it on flat terrain as far as it will take you. Now get out and push your car back. Friction and momentum aside, that's the astounding amount of energy/work we get from a dollar's worth of fuel.

Now imagine your car is actually an LLM model. It gets you a great distance on $1 worth of tokens but what happens when you run out and for whatever reason (I can imagine quite a few) further LLM use is not possible. You have to push your car/LLM back all by yourself to finish what was supposed to be a quick, convenient trip to the grocery store. Might've been better off walking.

Seriously though, I do think there is a real risk that LLMs are going to lure a lot of people far beyond their ability to swim back. It might even be the case that LLMs help strand people in situations that even the LLMs can't help rescue them from.

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

#325

This will cause cognitive debt anyway. As mentioned in https://arxiv.org/pdf/2509.21972v1 : "When students rely on these outputs as a substitute for their own reasoning or critical engagement, the learning process is fundamentally compromised. Genuine learning requires the active construction of meaning, integration of knowledge, and reflective engagement with content. These processes cannot occur through passive con…

In a way it's not so different from learning in school. There were definitely times I read a textbook for a programming or other CS course and reused some example code or whatever to solve homework problems.

I think the helpful part is taking something that already exists, learning how it works, and rewriting it yourself to internalize it.

Again as usual the more important thing is that you know what you're using otherwise it's just copying.

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

#326

Earlier quoted context omitted.

It's simple enough: If you don't use it, you lose it. The more you have, the more there is to lose and the longer it may take. But skills and knowledge fade, just as easily as fitness, or a tan. It's an insidious rule too. Insidious in the sense that you may not realise you're not exercising a skill. You may think that your just doing it slightly differently, but you will adapt. In whatever way you made your life eas…

I don't know how much I agree, I've been in and out coding for different periods of my life. At each point few days of practice brought me back where I was.

The key is, as you said, practice. I think it's fine to use AI to write code for you, as long as you occasionally force yourself to write code manually. Not only does it help you retain your skills, but it feels more satisfying than prompting, even if arduous.

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

#330
Same idea with Stack Overflow solutions before that.

But I don't just retype that code verbatim, I rewrite it in my style, add or remove comments, add or remove some checks, sometimes even tweak the algorithm. I want to own the thing. Some copy-pasting may be involved, I am not trying to improve my typing here, but the important thing is to understand every character of it.

Post reply on HN