Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

31–40 of 479 posts

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

#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 your intuition.

A better option is to write it yourself first and ask LLMs for better options. They are pretty good at it, especially when you need to optimize hot loops.

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

#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.

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

#33
nah thanks;

my workflow:

- ask not only for a solution to a problem but also for specific code (= tell the agent about your mental model of the codebase)

- ask for small stacked 'PRs/branches' and review/refactor heavily also using the agent (= refine your mental model of the codebase)

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

#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.

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

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

Writing reinforces. You won't learn from blind uncomprehending rewriting, sure, but when you already know the field, writing gives you the space to comprehend and digest. Certainly more than copying and pasting or blind acceptance of generated code. It doesn't have to be fun to be better.

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

#39
The most I enjoy working with AI is my special workflow.

I ask it to plan the feature in a separate worktree.

In parallel I start coding without being biased by AI and vice versa.

At some point I read its plan and iterate on it all the while I am in implementation mode. This helps me improve my own vision.

Finally I ask the AI to review my implementation. It flags off bugs and gaps which are usually straightforward for it to fix.

Post reply on HN