6 ms·
Using AI Generated Code Will Make You a Bad Programmer
- cranberryturkey 2y agofun fact: after 25 years as a software engineer in silicon valley, I'm convinced nobody cares about code quality and they never have.
- stuckinhell 2y agoI have 23 years,and I'm convinced too.
- souldeux 2y agoOnly a dozen but same. Just ship the shit. Quality never mattered.
- mewpmewp2 2y agoAlso most attempts at code quality lead to even worse code - into overengineered abstraction layers that no one will be able to adjust once it's inevitably realized that the assumptions were all wrong.
- fragmede 2y agoTotally. YAGNI - you ain't gonna need it. That beautiful framework you spent extra weeks writing, designing from first principles, turns out to be the wrong layer of abstraction because of a bad assumption. the client left off critical business logic details, or a pivot to a more popular feature of the program. The only question then is how to get out of that tech debt.
- everforward 2y agoThey do, but very few people are good enough to either write a pull request or review one well. I wouldn’t put myself in the really good category for either. Most people write pull requests that are scoped too poorly to tell what they’re doing. Like I get a single function with unit tests, so the best I can do for a review is check whether there are any obvious missed edge cases for a function whose purpose I don’t understand. On the review side, most people review by doing basically what a linter does. I joke with people that if they want to nitpick my variable names then I’ll start DMing them to ask what name they want every time I need a variable. A meaningful review would analyze whether abstractions are good, whether there is behavior that relies on an unspecified part of an abstraction (timing), etc. Nobody does those.
- Koshkin 2y agoYeah, no, things have changed in the last 30 years...
- anonzzzies 2y agoHow/where? We see a lot of companies inside as nature of business our business; almost no one cares. Some say they care but in the end it's money and shipping fast. If that can get code quality for the same price, they feel they are overpaying and they can ship faster.
- Koshkin 2y agoI mean, things seemed a little different 30 years ago.
- anonzzzies 2y agoSome care but most don't or cannot care as talking code quality means to managers that you could be doing more, faster and cheaper that is relevant to the bottom line. In large corps, everything is slow and expensive as it is, so 'wasting time' on things that are hard/impossible to measure is not something that is a great sell.
- JohnMakin 2y agoWhile 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 some truth to this. I disagree that using AI to generate code puts you in that realm automatically, but I have seen quite a few cases of this actually happening to give this point some merit. 3) Using AI generated code atrophies your skills no less than using someone's imported library/module/whatever. Yes, I probably couldn't write a really good merge sort in C off the top of my head anymore without thinking through it, but I don't really have to, because a bazillion people before me have solved that problem and created abstractions over it that I can use. It is not inherently bad to use other people's code, the entire software world is built on that principle. In fact, it's an extremely junior mindset (in my view) that all code you use must be written by your own hand. 4) "code being respected" is not really a metric I'd ever go for, and I'm not sure in my career so far I've ever seen someone push a big pull request and not have a bazillion nitpicky comments about it. Respecting other people's code doesn't seem to be very common in the industry. I struggle to think why I personally would even want that. Does it work? Is it readable/maintainable by someone other than me? Is it resilient to edge cases? If all yes, good, that is all I really care about. 5) > If you're someone who has no actual interest in learning to code, and instead see AI as more of a freelancer—telling it stuff like "make a kart racer game," and "that sucks, make it better"—then none of this really applies to you. I mean, sure. I have very little interest or joy in "coding." I like building, and coding is a means to that end. Again, seems like a very junior mindset. I know people do find an enormous amount of joy in it for the sake of it, I am not one of those people, and that's fine. Usually it drives me to create better abstractions and automation so I don't have to write more code than I want to.
- cheevly 2y agoFor 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 familiar with.
- BugsJustFindMe 2y ago> You May Become Dependent on Your Own Eventual Replacement If you're going to be eventually replaced, and I absolutely believe that even the best of us will, you may as well get in on the ground floor to extract value for a bit before that happens. Not writing your own code doesn't need to mean turning your brain off. You still need to look at what came out, understand it, and spot where it didn't match your needs.
- baw-bag 2y agoI agree with that entirely. Using the current tools available to make your life easier while picking up a decent pay check is a no brainer. I probably expect my next job is using said tools primarily followed by complete redundancy. By that point, having never used any of the tools makes you almost no different from anyone off the street. In a way I welcome it. Writing the same menial code as everyone else slightly differently becomes a pretty stale existence.
- artemsokolov 2y ago1972: 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
- dwaltrip 2y agoGeneralized version: Using tool to do thing makes you bad at doing thing without tool. I get where this is coming from and it is true sometimes (e.g. my favorite example is Google maps). But it’s quite silly to assume this for all tools and all skill sets, especially with more creative and complex skills like programming. Wise and experienced practitioners will stay grounded in the fundamentals while judiciously adding new tools to their kit. This requires experimentation and continual learning. The people whose skills will be impacted the most are those who didn’t have strong fundamentals in the first place, and only know the craft through that tool. Edit: forgive my frequent edits in the 10 minutes since after initially posting
- m463 2y ago2035: Using simplified english will make you a bad prompt engineer.
- ted_bunny 2y ago2069: Ascension will unmake you
- stonethrowaway 2y ago>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 Both of these remain true to today, which is why we always interview people at one layer below the requirement of the job so they know what they’re doing. Writing C/C++ - know how the output looks like. Using GC-based languages? Know the cleanup cycle (if any). I would wager the third also holds true.
- giraffe_lady 2y ago
- marginalia_nu 2y agoYeah I don't think this is a good take. In a learning context, sure, you probably should not be using copilot or similar, the same way you shouldn't be using a calculator when doing your basic arithmetic homework. Beyond that, this just seems like a classic scrub mentality hangup. If a tool is useful, you should use it where appropriate. You'd be a fool not to. If it's not useful, then don't use it.
- Alifatisk 2y agoThis 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 asked some ai tools like Claude for help a couple of times, and those has been for tasks that I know more than one would need to be involved in to complete that, but with Claude, I solved it in a couple of hours, incredible stuff! Also, if it wasn't obvious, I am not claiming that this is the case, these are just my feelings, I would love to be convinced otherwise because then I might switch and try out the luxury QoF others are having.
- viraptor 2y ago> 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.
- idopmstuff 2y agoYeah, probably true, but joke's on you - I'm just a B2B SaaS PM so making me a bad programmer is a huge step up! But in all seriousness, these models are getting to the point where they're really useful for me to just build one-off tools for my own use or to prototype things to show other people what I'm looking for (like an interactive mockup). That's the power of turning a non-programmer into a bad programmer, and it's certainly worth something!
- budududuroiu 2y agoThis sucks so absolutely bad because even a shitty demo or POC sticks, and now you’re stuck with that, when it would’ve been faster and easier to just rewrite from scratch. Also exacerbates the problem of A teams that get assigned to greenfield work and B teams that thanklessly maintain and actually productionise said greenfield work
- mjtechguy 2y agoUsing AI generated code will also make me a programmer I could never be. Been an infra and cloud guy, so this has been a game changer for me to actually create MVPs of things that have only ever existed in my head. I love it.
- Rzor 2y agoI guess you could extrapolate this in _some_ scenarios as: not using AI-generated code could get you fired. The conversation about how people are doing their work 90% faster feels exaggerated, but 20-30%? I can definitely vouch for that. Some employers will certainly want you to deliver results faster, especially if they are seeing results with your colleagues. Buckle up, LLMs are here to stay and will likely continue improving for a while before they plateau.
- anarticle 2y agoTL;DR: shipped More specifically, I think code quality is a luxury that not everyone has if you work for dumb corpos who think that moving the gantt chart block left will speed up development. The answer there is probably don't work for those people, but salaries cap out at some point and the allure of megacorps is there. I'm a CS old head, who has manually allocated / managed memory, and built what would be considered stupid data structures to support scientific efforts. For me, using AI and getting 0 to 1 experience in languages/frameworks I don't know is ultra. Combining those skills has made me some money in shipping small software, which has been fun.
- budududuroiu 2y agoCopilot and AI generated code 100% has degraded code quality, judging simply by the now infamous metric about code churn in repositories shooting up after copilot was introduced. The thing that bothers me is that your colleagues will use AI, your bosses will see it as progress, yet not realise the time saved now is going to be wasted down the road
- m2024 2y ago[dead]
- chairmansteve 2y agoUsing an excavator will make you bad at shovelling.
- throw16180339 2y agoMy 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.
- rerdavies 2y agoYou might want to try Claude 3.5 Sonnet instead of Chat GPT. Claude 3.5 Sonnet seems to be a generational advance over earlier AIs like Chat GPT. I find that I can reliably uses it in cases where Chat GPT produces pure hallucinatory nonsense. I've only seen Claude hallucinate once, and that after I had incorrectly told it that its answer was wrong. It's not the only AI that does code well, but at this particular snapshot in time (Oct 2024), general concensus seems to be that it is currently the best. It has fundamentally changed the way I write code. And I'm still exploring the boundaries of what kinds of tasks I can feed it. (45 year veteran senior programmer). Sorry for the TLDR post, but I find it difficult to briefly make the case for why Claude 3.5 Sonnet (and other similarly modern and capable AIs) are fundamentally different from smaller and older AIs when it comes to use as a coding assistant. I do use it for simple tedious things like "Convert an ISO date string in GMT to a std::chrono::systemclock::timepoint" (requires use of 3 generations of C/C++/Posix library functions that would take about 15 minutes of wading through bad documentation and several false starts to get right). But have also had success with larger fragments ranging up to 100 or 200 lines of code. It still has distinct limitations (bizarre choices of functional composition, and an unpleasant predilection for hard-coded integer constants, which can be overcome with supplementary prompts. Seems to be brilliant tactically, and shows a terrifyingly broad knowledge of APIs and libraries across the the three platforms I use (android/javascript, typescript/React/MUI, C++/linux). But doesn't yet have a good sense of strategic coding (functional and class decomposition &c).And usually requires three or four supplementary prompts to get code into a state that's ready to copy and paste (and refactor some more). e.g. "Wrap that up in a class; use CamelCase for classnames, and camelCase for member names. ... &c &c. And have also used it help me find solutions to problems that I've spent months on ("android, java: unable to connect to an IoT wi-fi hotspot without internet access when the data connection is active"; Claude:" blah blah ... use connectivityManager.bindProcessToNetwork()"!!!). Or "C++/linux/asound library: why does this {3000 lines of code} fail to reliably recover from audio underruns". And had some success with "find the wild memory write in this 900 line code fragment". Doesn't always work, but I've had success with it often enough that I'm going to use it lot more often. And used it to write some substantial bash scripts that I just don't have the skills or literacy to deal with myself (long time Windows programmer, relative newcomer to linux).
- rerdavies 2y agoOn the other hand, not using tools that increase your productivity by up to 50% will make you an unemployed programmer. <shrugs>
- ErikBjare 2y agoI take issue with the first and major point: "You Rob Yourself of Learning Opportunities" My experience has been quite the opposite: it speeds up my rate of work as I get answers faster, and thus gives me more learning opportunities in a workday.
- solsane 2y ago[dead]