Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

51–60 of 479 posts

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

#51
> manually retyping LLM-generated code

This is just a miserable career of "paint-by-number" because people can't be bothered to have a creative thought about their professional work or programming hobbies.

Software developers think that they are being clever with these kinds of strategies to "keep their skills sharp", but unfortunately the entire industry knows about this, and especially the upper management who are already eliminating these assembly line, JIRA-ticket-taker software jobs en masse.

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

#53
Manually typing in code is an underappreciated trick in a lot of circumstances. It's one of the fastest ways to get to grips with a certain piece of code, a new library, or some methodology.

This was true when I first learned to program, and is still true today. And I do find myself manually typing in really critical code. In those cases even if I do have an LLM alongside these days, LLM suggestions also then get manually typed.

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

#54
post #19
post #16

Earlier quoted context omitted.

I think there are far more people who can't write better code than an LLM. Of course, there are a few exceptions, but it's a fact that LLMs are already handling PhD-level mathematics and papers. I also think I write better code than an LLM in certain areas, but in most programming domains, the LLM knows more than I do across many dimensions. As prompts get deeper, LLMs are already producing PhD-level code—and that's…

> I also think I write better code than an LLM in certain areas, but in most programming domains, the LLM knows more than I do across many dimensions. Remember that the quality of the LLMs code in the areas you don’t know is as good as the quality as the area you do know. You’re only able to gauge the quality of what you do know.

Your main target seems to be the view that software quality is a matter of 'aesthetic intuition,' but I see it differently. I think because it's 'engineering,' there must be measurable indicators.

Executable specifications

Unit, integration, and property tests

Official API documentation

All of these provide ways to judge quality. There are so many metrics that the problem is actually choosing which ones to use.

1.Does it produce output A for input B? 2.Can it process 100,000 records within 5ms? 3.Is memory usage within the defined limit? 4.Does the protocol handle error conditions properly?

You don't need to be an expert to test these. People forget that programming is one of the few fields where judgment criteria can be easily translated into machine executable tests.

The biggest problem with epistemological objections is that they often assume a binary: 'experts can judge, non-experts cannot.' But in reality, it's a continuous process.

You run the code, notice something odd, look up the terminology, compare it with official documentation and reference implementations, add tests, and gradually build up judgment in that area. Rewriting LLM generated code compresses that entire learning curve.

In the past, entering an unfamiliar domain meant starting from a blank file and reading documentation. Now, you start with a working hypothesis and modify it. That's far cheaper than starting from scratch.

If you treat LLM generated code as executable teaching material and a falsifiable hypothesis, it's a very powerful resource.

I feel uncomfortable when people reduce programming to aesthetic quality alone. We were all trained to measure things.

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

#55
post #10
post #2

[dead]

It could easily be the other way around - religious addiction for people can't let go of the code.

I don’t think so, because it’s being used as a way to try to remedy one of the new problems brought in by agentic coding - loss of context of what code does.

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

#56
post #32
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'm not sure I agree about retyping calculus solutions. I often find that writing out a proof or derivation forces me to engage with some minor detail that I hadn't fully appreciated beforehand. That usually raises productive questions.

In which case it would be the engagement with minor details that does the productive work. Retyping is merely a gateway to (sometimes) trigger the engagement.

The solution in TFA feels like an on-ramp to cargo culting somehow; observing that manual typing and good results often go together, but then thinking that it's the typing that directly causes the good results rather than the thought process that accompanied the typing.

There's a much better article hiding inside the current one that's titled "Prevent cognitive debt by understanding deeply the code that your LLM spits out", but that sounds like hard work and would probably not be very popular. It's much better for audience engagement to provide a simple solution that anyone can do and does not require a lot of deep thought like "manually retype everything the LLM generated", even if it doesn't actually work.

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

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

[deleted]

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

#58
I am also worried about "cognitive debt". I hardly remember what I had Claude do, even hours later. Back in May, I advised of a similar mitigation, citing the "generation effect" as the reason typing the code would make you remember it better:

> For your next ticket or feature, engage with your LLM as you normally would to produce a design and implementation plan, but with that plan in hand, make the mechanical edits yourself...You can expect this to improve your knowledge retention compared to merely reading a diff. You want to go slower now so that later you can go at all.

https://www.slater.dev/2026/05/type-your-code/

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

#59
I never had so little free time as I have these days. Most of my time is spent at work or with my lovely family.Love my family, and work is great.

The thing is that, probably like many of you, I love going deep in a side project, even if it lands nowhere. With so little time, working on them has become a very frustrating activity.

This is where I found my trap... do more with very little time by delegating to an LLM. You get dopamine shots, the feeling of achieving something but the cognitive dept is just crazy. So much that the activity becomes almost meaning less. After couple of months doing this, I'm not even sure it's a good use of this time. I get very little satisfaction on the long run.

I don't have a solution to this problem, not even sure there one. I think I have to accept that this is an activity that takes time, and only time gives the real gratification.

Post reply on HN