Live data from Hacker News

Using AI Generated Code Will Make You a Bad Programmer

slopwatch.com

31–40 of 57 posts

Re: Using AI Generated Code Will Make You a Bad Programmer

#32

1972: Using Anything Other Than Assembly Will Make You a Bad Programmer 1995: Using a Language with a Garbage Collector Will Make You a Bad Programmer 2024: Using AI Generated Code Will Make You a Bad Programmer

Don’t forget copy and pasting from stack overflow! I have to do it every time matplotlib cuts off part of my saved figure when using tight layout.

Re: Using AI Generated Code Will Make You a Bad Programmer

#33

1972: Using Anything Other Than Assembly Will Make You a Bad Programmer 1995: Using a Language with a Garbage Collector Will Make You a Bad Programmer 2024: Using AI Generated Code Will Make You a Bad Programmer

2044: "What's a programmer?" the child asks his father innocently. "Well you see son, humans used to be needed to instruct the machines on what to do..."

Re: Using AI Generated Code Will Make You a Bad Programmer

#34

1972: Using Anything Other Than Assembly Will Make You a Bad Programmer 1995: Using a Language with a Garbage Collector Will Make You a Bad Programmer 2024: Using AI Generated Code Will Make You a Bad Programmer

To me the issue with AI generated code, and what is different than prior innovations in software development, is that it is the the wrong abstraction (or one could argue not even an abstraction anymore).

Most of SWE (and much of engineering in general) is built on abstractions -- I use a Numpy to do math for me, React to build a UI, or Moment to do date operations. All of these libraries offer abstractions that give me high leverage on a problem in a reliable way.

The issue with the current state of AI tools for code generation is that they don't offer a reliable abstraction, instead the abstraction is the prompt/context, and the reliability can vary quite a bit.

I would feel like one hand it tied behind my back without LLM tools (I use both co-pilot and Gemini daily), however the amount of code I allow these tools to write _for_ me is quite limited. I use these tools to automate small snippets (co-pilot) or help me ideate (Gemini). I wouldn't trust them to write more than a contained function as I don't trust that it'll do what I intend.

So while I think these tools are amazing for increasing productivity, I'm still skeptical of using them at scale to write reliable software, and I'm not sure if the path we are on with them is the right one to get there.

Re: Using AI Generated Code Will Make You a Bad Programmer

#37
My ChatGPT use falls into two categories:

1. Having it perform mechanical refactorings where there's no creativity involved. I'm hacking on a program that was written in the early 2000s. It predates language support for formatted IO. I had ChatGPT replace many manual string concatenations with the equivalent of sprintf. It's easy enough to test the replacements at the REPL.

2. Questions that would be unreasonable or impossibly tedious to ask a person.

Describe in detail the changes from language version X to language version Y.

Which functions in this module can be replaced by library functions or made tail recursive? This definitely misses things, but it's a good starting point for refactoring.

Is there a standard library equivalent of this function? I regularly ask it this, and have replaced a number of utility functions.

Give examples for using function.

Re: Using AI Generated Code Will Make You a Bad Programmer

#38

1972: Using Anything Other Than Assembly Will Make You a Bad Programmer 1995: Using a Language with a Garbage Collector Will Make You a Bad Programmer 2024: Using AI Generated Code Will Make You a Bad Programmer

2 out of 3 of those maxims are Reasonably Correct?

Re: Using AI Generated Code Will Make You a Bad Programmer

#39
post #28

While I agree with the spirit of this post, it seems a bit misguided on several points. 1) I do not believe AI will ever replace programming as a practice, because people will still need to read/review the code (and no, I don't personally believe LLM's are going to be able to do that themselves in the vast majority of cases) 2) while the "script kiddie" characterization is a bit of an unfair generalization, there is…

For the record, some of us have tools which comprehensively solve all of your concerns (even #1). Generating 100% reliable self-analyzing deterministic code is already possible and will become mainstream within the next two months. When you see how it’s done, you’re going to smack yourself in the forehead. Programmers in particular seem extremely vulnerable to dismissing technology that they are not intimately famili…

Interesting, I would've thought that to be impossible. Would you happen to have any places I can learn more about tools that can do that?

Re: Using AI Generated Code Will Make You a Bad Programmer

#40

This has been my concern for a while, that switching from basic autocomplete to ai generated code, copilot or switching the Cursor ide will make me stupid and forget how to write the most basic stuff without needing those tools again. I am very scared of losing my ability to write the code by myself again thanks to ai. If it wasn't for that, I'd switch to Cursor or use copilot in a instant, because honestly, I've ask…

> and forget how to write the most basic stuff without needing those tools again

This is a reality for some of us already - but it's not about tools. I'm working with 5+ different languages and likely between 20+ projects. I had to lookup in the docs how to (for example) lowercase a string every single time, because every language has to invent their own name/case for it. Now I'm free - just write tolower() and it gets fixed. New string array - ["foo"] and it gets fixed. etc. etc.

There's a huge number of things that are not necessary to remember, but you just do if you see them consistently every day. But now I'm free. If I ever need to do them manually again, I'll check the docs. But today I'm enjoying the time saving.

Post reply on HN