Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

121–130 of 479 posts

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

#121

Earlier quoted context omitted.

> you don't learn from it Except that you do. Otherwise you could just sit in school or university and just listen and do nothing, but that way you just learn A LOT less, instead of taking down the lecture/lesson.

Taking down the lesson/lecture does relatively little, you can do it on autopilot. If anything, it distracts from listening to the content. When I took computer science at university (mid naughties) we were given digital lecture notes anyway. (Mathematics lectures did have to be written down but there were no typed notes to start with so it was just out of necessity.) It's the exercises afterwards that are useful for…

When I did a CS degree in the 1980s we had one lecturer who handed out copies of hand-written notes but then would talk about stuff that wasn't really in the notes - sort of verbal annotations.

Guess what he would ask about in the exams?

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

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

Wouldn't it maybe make more sense to try to use Cursor-style auto complete if you are trying to learn a language in this day and age?

Having Codex/Claude write all of it won't really benefit you imho.

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

#124
post #90
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…

When I was learning to code at college, by myself (I did a Business degree), I bought a book on iOS development[0]. This book mandated that you type all the examples out line-by-line. I thought the idea was a pretty silly one, but I stuck with it because I didn't know what I was doing and wanted to learn. 14 years later, as a software engineer, I still think about that book and the way I can trace back a lot of my in…

I like coding katas (or even trying leetcode problems) when learning new languages.

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

#125

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…

What do you think would be the effect on people that already have the skills and abilities. The LLM would build these systems using the skills that are largely understood by the programmer but piece them in new ways suitable for the system. This could lead to new enmergent behaviors that are not understood by the programmer. I still think that you can build this model in your head even with LLM's but I'm not sure nei…

There's always some component of a skill that is not merely knowing something but practising something seemingly procedurally. Even if I understand integration well and have done it thousands of times, if I don't continually practise it from scratch, I begin to forget tiny bits and pieces and that accumulates to an eventually lack of understanding. So it is true for all mental tasks. There really isn't such a thing as understanding something completely without working it out by hand, from scratch. AI exacerbates a lack of understanding in this regard, although admittedly layers of abstraction in the coding realm already do that to some extent...

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

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

> As prompts get deeper, LLMs are already producing PhD-level code—and that's been shown in research. This gave me a chuckle, "PhD-level code" is gross actually. Have you ever looked at the code of research papers?

I see it 'very often.' Most research paper code has no reusability—they just implement the algorithm.

So I can see why it might be considered low-quality. They don't use things like Result or policy types like we do in production code. But they're modifying or creating new algorithms, right?

The thing is, they don't need to do those things, so it looks lower-level—but the algorithm implementations themselves are actually pretty good, aren't they?

PhD thesis code often looks low-quality simply because there's no reason to reuse it like production code. The tensor computations inside are things that typical programmers can't easily do.

The point I'm making is that the core algorithmic work is something most programmers can't handle. And that's natural—highly skilled programmers have already built deep libraries for that.

When I talk about PhD-level code, I'm not referring to overall code quality. I'm talking about the level of the algorithms themselves.

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

#127

It seems to me this is the same problem we previously had: how do we understand codebases we didn't write? Creating while writing allowed us to build a mental context but in a unproductive way, it never scalled. I believe we need to move onto a new way of reading codebases that go beyond reading line by line. I know people have explored representing code in 3D spaces. I don't know the solution. But I believe that is…

Ask your AI to chart the data flow through the program. Not that that's a magic solution but it's a pretty good start.

By default, if you ask an AI to "generate documentation for this code" it generates the same broken documentation all the humans do too; an enumeration of all the modules in the code and what their API is. I'm not surprised, the training data is biased probably at least 25:1 in favor of this rather than the useful data flow documentation. Fred Brooks was complaining about this over 50 years ago and the discipline as a whole still gets this wrong.

I'm not saying this is a future solution to all problems, but it is a now solution to some problems.

3D doesn't help. We live in a 3D world but our vision is 2D with a bit of augmentation from a second view point just a bit away. We derive some depth information from that, but we don't really "see in 3D". To do that we'd need to be 4D beings. There's a lot less juice in the 3D squeeze than meets the eye.

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

#128
post #120

Big no for retyping llm generated code by hand. But a big yes for still typing code by hand, and not leaving it to the llm. Except it has to be the code generated by your brain. That is what will create new neurons and new connections, which is what will keep away the cognitive decline. And the constraint of not having to use llms will enhance creativity. Actually, the constraints llms add to your code are more in nu…

There are jobs where llms can massively speed up delivery. Think about tiny/one man indie games for example, they can also get (stolen) assets almost for free. Helping with hobby projects, a subtype of that one man show.

Then there are sluggish corporate jobs. Here, even 10x speed up of development won't change delivery dates significantly or at all. I am in one such job, team leader has claude code higher tier and basically uses it for some more complex bash scripts and thats mostly it. Given this topic, I dont complain much, I value my long term senior skills way more than those new agentic ones.

The middle is... well somewhere middle.

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

#129

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…

[deleted]

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

#130

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…

What do you think would be the effect on people that already have the skills and abilities. The LLM would build these systems using the skills that are largely understood by the programmer but piece them in new ways suitable for the system. This could lead to new enmergent behaviors that are not understood by the programmer. I still think that you can build this model in your head even with LLM's but I'm not sure nei…

To repeat their last two sentences:

> Even before LLMs we were aware if it: we knew people moving to managerial/PM roles eventually get their coding skills rusted. Well, now we are all in those managerial roles...

Post reply on HN