Manually retyping LLM-generated code prevents cognitive debt

Prevent cognitive debt by manually retyping LLM-generated code

Despite earlier skepticism, the author uses coding assistants on personal projects but limits them to chat suggestions, manually typing every edit. This slows him down to 2x speed instead of 10x, but builds a deep mental model and spatial map of the codebase, catching hallucinations and adapting code to his taste. He argues this preserves comprehension and fights industry-wide cognitive debt.

I might not personally be able to change the course of the entire industry, but I can at least make sure I completely understand the software I put out into the world.
  1. bigbuppo

    Also... if your workflow is "think hard, let LLM write it, read what AI wrote, think hard about what AI wrote, re-type what AI wrote, fix what AI wrote"...

    Where in the heck are the efficiency gains? Couldn't you just drop the LLM part of it and save the company a trillion dollars in tokens?

  2. ablob

    So we are reduced to code monkeys mindlessly re-typing what an LLM wrote to increase potential understanding...

    Whatever this approaches, it is not a state of software engineering I find desirable.

  3. GuB-42

    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.

  4. wahern

    Good advice yesterday, good advice today, and good advice tomorrow.

    I don't remember if I read this advice or just intuited it myself (perhaps after some hard lessons), but it's a programming habit I've kept for as long as I can remember (I started coding in the 90s). If I feel rushed, e.g. someone looking over my shoulder, and I copy+paste something, it always leaves me with a sense of unease. It creates a memory & comprehension hole that sticks out like a sore thumb, even for seemingly simple snippets. You can't really be sure it's simple without stepping through it carefully, and simple can be deceptive because it's usually the interactions and assumptions wrt surrounding code that lead to surprises. Typing out code manually gives you time and space to consider the broader picture.

  5. 3dsnano

    “prevent cognitive debt by manually setting type.”

    we need to move on

  6. Syzygies

    "In theory, theory and practice are the same. In practice, they're not."

    I tried this, long ago. I just wasn't getting Haskell, so I'd retype my programs from memory and reconstruction. Obvious for music, why not for code?

    All these untested opinions? You'd think we were discussing BMWs.

  7. WhyComboNadir

    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 forget how to walk), me and my giant calves will be back in a few hours.

    All meant in good spirit. Keep doing what you're doing, thanks for sharing, and hope people are kind and only give good natured ribbings.

  8. system2

    While your competitors ship out million-line software, you are going to write down the LLM code. This approach will make a software engineer homeless in a very short time.

  9. npras1

    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 number than the former. llms code in only the specific ways they've been trained on. So you won't ever come across of other ways.

    Off the top of my head.. here's RubyQuiz.com [0] which I came across when I was learning ruby more than a decade ago. Looking at the many user-submitted solutions (you have to download the zip file!) you'll see completely different ways the problems were solved.

    Sure, many won't be deemed efficient or standard by today's llm or rubocop checks, but looking at their code.. and retyping them and seeing them work.. was crucial in how I was able to think in Ruby for solving coding problems.

    I did the same with Go too, with the "learn go with tests" guide [1].

    [0] - http://rubyquiz.com/

    [1] - https://quii.gitbook.io/learn-go-with-tests

  10. estebarb

    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 consumption of syntactically correct but

    semantically hollow responses. Without this deeper cognitive work, learners risk mistaking linguistic fluency for

    understanding, thereby undermining the very goals of education".

    Personally, I don't think we will ever be able to reconcile using LLMs and cognitive debt. 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...

More from this day

2026-08-03