Live data from Hacker News

Prevent cognitive debt by manually retyping LLM-generated code

ankursethi.com

211–220 of 479 posts

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

#211

Earlier quoted context omitted.

Well there’s a lot of middle ground between “don’t use AI” and “generate everything, exclusively.” When the bill for the latter lands with a heavy thud, moderation and common sense start to look like a pretty good idea.

> Well there’s a lot of middle ground between “don’t use AI” and “generate everything.” Sure, but again, this assumes both that handwriting code sometimes outperforms LLMs, and also that your employer agrees with this. I think it’s only a matter of time (again, if we’re not already there) before LLMs outperform handwritten code nearly all of the time. And, even if that’s not the case, I’m pretty convinced nearly all…

this pure speculation. maybe you're right that it's a matter of time but /maybe you're wrong/. neither of us can actually know, because you're making predictions about the future rather than claims about what is true today

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

#212

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 f…

y'all have to come up with a better argument than "LLMs are cars"

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

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

> I feel like the folks that believe we can continue to write code by hand are either in denial that LLMs will eventually (if not already) outperform handwritten code...

They certainly don't today. Perhaps they will in the future, but based on the lack of improvement thus far it seems unlikely that they will get to this point. But whether or not they do improve to that point, the reality is that today, LLMs do not give you a productivity boost unless you give up on quality and just YOLO stuff the LLM gives you without actually checking it. And nobody should be willing to do the latter, because that is how you get software/infrastructure that doesn't actually work.

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

#214
post #126

Earlier quoted context omitted.

> 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 actu…

> there's no reason to reuse it like production code.

This strikes me as a self-fulfilling prophecy. There are probably many people who would like to use the code published with PhD level research, but they don't because the code is not easy to adapt (or sometimes even to get running).

Then a decade later someone implements that same algorithm in a library with a well-designed interface and it suddenly becomes a useful tool for others. So ultimately there was a reason to reuse it, it was the quality of some aspects of the code that held it back.

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

#215

Earlier quoted context omitted.

> long term maintainability Did business ever cared about this? Like ever?.. I've seen too many code bases with awful code by humans, now AI simply exacerbated the issue but this is nothing new in our field. I just don't see how this is going to be a battle engineering departments can win. As long as AI is brining money to the business, they are not going to listen.

LLMs aren't perfect and they have problems, but often they write better code than humans. At least this human. It seems they run into problems with larger concepts and general organization and need guidance at the moment but for a single code file they often do better then I would have.

If an LLM writes better code than you, that says more about you than anything else (either your ability to write code or your ability to evaluate LLMs). The code they write is garbage.

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

#216

Do mathematicians and physicists put away the calculator and computer (this always reminds me of the last scene from Star Wars) and do the computation by hand? A physicist isn't going to manually invert a 10,000x10,000 matrix. Exactly as we don't write machine code letting the compiler do that, now and in the near future we won't be writing high level programming language code. We are moving towards working on a high…

I feel like we're doomed to respond to these lazy analogies ad infinitum. Knowledge abstractions have historically been built by people with a detailed understanding of a problem domain and with a period of vetting the abstraction by many people. That is simply not true with LLM-generated code. We do not really understand what techniques LLMs are using to understand directions, value aesthetic/legibility characterist…

[deleted]

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

#219

Earlier quoted context omitted.

Thing is, companies don’t care if it’s not your code or your view of it. If it works, that’s what they want. Since I stopped typing code I’ve been using my time to play some video games, read some books etc while the agents do the boring stuff (work itself). I get paid, the company is more productive, I got a bonus and a raise, everyone’s happy.

With the rise and rise of LLM slop in code, I've just had to jack my prices through the roof. The first thing I do when I'm asked to clean up the LLM slop is "rm -rf ." and start from scratch. You will pay a fortune for this.

This is cope.

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

#220

Do mathematicians and physicists put away the calculator and computer (this always reminds me of the last scene from Star Wars) and do the computation by hand? A physicist isn't going to manually invert a 10,000x10,000 matrix. Exactly as we don't write machine code letting the compiler do that, now and in the near future we won't be writing high level programming language code. We are moving towards working on a high…

I feel like we're doomed to respond to these lazy analogies ad infinitum. Knowledge abstractions have historically been built by people with a detailed understanding of a problem domain and with a period of vetting the abstraction by many people. That is simply not true with LLM-generated code. We do not really understand what techniques LLMs are using to understand directions, value aesthetic/legibility characterist…

A computer used to be a term for an occupation. [0]

> I have concerns that you'll have a job in a year

Me too because I might be the best TypeScript coder on Earth and there is no demand for those skills. I'm doing a pivot.

[0] https://en.wikipedia.org/wiki/Computer_(occupation)

Post reply on HN