Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

271–280 of 479 posts

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

#271
What's the right middle ground approach to this? I agree that inevitably my more advanced software approaches at work have been compromised by reliance on LLMs, especially given encouragement from management. Are there specific prompts/instructions people find that allow for learning and iterative development without slowing down the actual development cycle too much? I want to keep learning and keep my skills sharp but it feels like a losing battle.

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

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

I used to type in the programs from Commodore 64 Magazine back in the day. If you just touch type them in you learn very little. If I wanted to understand them, I wouldn't do it while typing. Sure a bit rubs off and probably more if you have to understand where to put the code rather than just start typing from the top, but still not enough. If you "make it your own" then you're probably at the right level of understanding.

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

#273

What's the right middle ground approach to this? I agree that inevitably my more advanced software approaches at work have been compromised by reliance on LLMs, especially given encouragement from management. Are there specific prompts/instructions people find that allow for learning and iterative development without slowing down the actual development cycle too much? I want to keep learning and keep my skills sharp…

Use it not just as an output tool but as an input as well.

You could try doing the high level design yourself at least. Ask for its review and iterate without asking it to do it all.

Once it has generated some implementation, critique it and ensure you understand its approach And you agree with it, steer it otherwise.

If there’s anything unclear to you say so and have it rewrite it in an easier way to understand.

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

#274
Pretty crazy idea. I know I sometimes just "wave through the motions" when I'm taking notes.

For example, when I am reading a book, I often take notes of my favorite quotes/sentences/things that stick out or perk up my ears. Usually if I own the book or it's a used copy of mine I make a note of the page number on the very last blank page(s) and write out the full sentence/quote. Then when I go back months or years later I just open to the last page and can find all my favorite/important quotes. Most 200 page books typically have ~20 useful sentences for me to reference [going forward] - it's basically like making your own index or table of contents.

That long aside, just to say, if I'm not "very aware" or "consciously mindful" of what I'm copying down or writing, I'm able to do it very well on autopilot without etching anything into my memory -- as if no recallable moment gets etched into the wet cement of the brain unless I'm actively "hip to it." I wonder if others have this "autopilot" problem.

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

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

I think people use these tools in varying ways, sometimes in the same session, and there are no hard-and-fast correct answers.

For example:

Sometimes I just need to blast something out which works well enough so I can either consider the output or play with the tool it generated to see if I'm on the track for solving my bigger problem. In these instances, I just say, do it, and don't focus too much on the code it produces.

Sometimes I am using languages or tools I am not an expert in. In many of these cases, I do manually type out the LLM's suggestions so that I am more intimately familiar with the syntax, libraries and idioms being used. Frequently pausing to look at actual documentation or find examples of sample code. It's a more interactive version of what I might have been doing a couple years ago googling solutions on stack overflow.

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

#276

What's the right middle ground approach to this? I agree that inevitably my more advanced software approaches at work have been compromised by reliance on LLMs, especially given encouragement from management. Are there specific prompts/instructions people find that allow for learning and iterative development without slowing down the actual development cycle too much? I want to keep learning and keep my skills sharp…

Yes, use Matt Pocock's /grilling skill to make sure you're thinking about and understanding and signing off on the _technical design_.

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

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

An entire generation of programmers was created in the 1980s from typing code from magazines. OTOH the only way to run it was to first type it in. Today people have too many options to be bothered I suppose.

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

#279
I've been asked several times how I use AI. My answer is - pretty much the same way I worked with developers on my team. I give a task, review the result for a reasonable amount of time - which might be close to zero for a minor front-end change - and then either accept it, change it myself, or ask for revisions.

That approach works well for me, so why would I retype AI-generated code? I wouldn't do that with code written by another developer, and their code can be just as buggy or weird in theory. You could argue that at least the developer knows how it works. That's true - for a week, a month, or a few years if you're lucky. Until he forgets or leaves.

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

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

> 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. 100% agree with this. The problem is, your employer doesn’t care whether your brain is creating new neurons and connections. They care about productivity and profit. I feel lik…

Not shocked to see here that people believe "manually writing code" is the way to build brain power.

How about moving up the stack?

Post reply on HN