- cross-posted to:
- hackernews@lemmy.smeargle.fans
Interesting to see the benefits and drawbacks called out.
- uthredii ( @uthredii@programming.dev ) English34•8 months ago
In this regard, AI-generated code resembles an itinerant contributor, prone to violate the DRY-ness [don’t repeat yourself] of the repos visited.
So I guess previously people might first look inside their repo’s for examples of code they want to make, if they find and example they might import it instead of copy and pasting.
When using LLM generated code they (and the LLM) won’t be checking their repo for existing code so it ends up being a copy pasta soup.
- Gamma ( @GammaGames@beehaw.org ) English8•8 months ago
Makes sense, even if it’s not good practice.
It is really useful for hobby projects! I needed a recursive function to find a path between two nodes in a graph and it wrote me something that worked with my data in a few seconds, saved a bit of time
- MonkderZweite ( @MonkderZweite@feddit.ch ) 10•8 months ago
saved a bit of time.
For now.
- Gamma ( @GammaGames@beehaw.org ) English2•8 months ago
?
- MonkderZweite ( @MonkderZweite@feddit.ch ) 9•8 months ago
Best practices exist to save you time and nerves in debugging.
- magic_lobster_party ( @magic_lobster_party@kbin.social ) 4•8 months ago
Good practices don’t matter much for small hobby projects.
- MonkderZweite ( @MonkderZweite@feddit.ch ) 5•8 months ago
Training bad habits… vs. fun, i get it.
- Gamma ( @GammaGames@beehaw.org ) English3•8 months ago
Meh, I knew that my graph would never have loops and would only ever have one path from A to B, so it did it well enough. Pretty easy to test!
- silasmariner ( @silasmariner@programming.dev ) 5•8 months ago
I find that code way too fun to write to let someone or something else do it for me 😂
- redcalcium ( @redcalcium@lemmy.institute ) 4•8 months ago
Actual time spent micromanaging the AI until it produces the perfect code may or may not exceed writing the code yourself.
- Gamma ( @GammaGames@beehaw.org ) English1•8 months ago
That’s fair, and if I were getting paid for it I’d do the same! But it’s for a project that’s essentially a pomodoro timer 😆 so it’s harder to justify the time
- MaoZedongers ( @MaoZedongers@lemmy.today ) 10•8 months ago
what a shocker
- chepox ( @chepox@sopuli.xyz ) 9•8 months ago
I use it mostly as a help menu. Details of the function and parameter settings. Also fixing errors. I don’t use it to generate code for me though.
- conciselyverbose ( @conciselyverbose@kbin.social ) 17•8 months ago
Using it to generate code isn’t inherently bad (outside of copyright concerns). Especially in “stupid amount of boiler plate” languages/etc.
But the problem is that people are lazy. They don’t bother understanding the output, making sure it does what you want it to, etc. It’s not that different than people copy pasting code from reference material. Part of the beauty of software development is that you don’t have to solve every problem someone else has already solved. But you do need to know what your code is doing and why.
Copilot is a shortcut to code that “works” with less requirement to know what’s happening.
- evatronic ( @evatronic@lemm.ee ) English8•8 months ago
I thought we solved the boilerplate issue with templates and snippets like 30 years ago.
- lemmyvore ( @lemmyvore@feddit.nl ) English5•8 months ago
Not only that, but we solved it in a deterministic manner. The way LLMs go about it, by picking something they think sort of maybe looks like the right thing is more bother than it’s worth.