• @Korne127@lemmy.world
    link
    fedilink
    641 year ago

    In my experience, you can’t expect it to deliver great working code, but it can always point you in the right direction.
    There were some situations in which I just had no idea on how to do something, and it pointed me to the right library. The code itself was flawed, but with this information, I could use the library documentation and get it to work.

    • @uhN0id@programming.dev
      link
      fedilink
      English
      141 year ago

      ChatGPT has been spot on for my DDLs. I was working on a personal project and was feeling really lazy about setting up a postgres schema. I said I wanted a postgres DDL and just described the application in detail and it responded with pretty much what I would have done (maybe better) with perfect relationships between tables and solid naming conventions with very little work for me to do on it. I love it for more boilerplate stuff or sorta like you said just getting me going. Super complicated code usually doesn’t work perfectly but I always use it for my DDLs now and similar now.

      The real problem is when people don’t realize something is wrong and then get frustrated by the bugs. Though I guess that’s a great learning opportunity on its own.

    • @xia@lemmy.sdf.org
      link
      fedilink
      English
      141 year ago

      It can point you in a direction, for sure, but sometimes you find out much later that it’s a dead-end.

      • @EatATaco@lemm.ee
        link
        fedilink
        English
        31 year ago

        Which is, of course, true for every source of information that can point you in a direction.

    • @danc4498@lemmy.world
      link
      fedilink
      English
      6
      edit-2
      1 year ago

      It’s the same with using LLM’s for writing. It won’t deliver a finished product, but it will give you ideas that can be used in the final product.

  • @Snapz@lemmy.world
    link
    fedilink
    271 year ago

    Except AI doesn’t say “Is this it?”

    It says, “This is it.”

    Without hesitation and while showing you a picture of a dog labeled cat.

  • @Deceptichum@sh.itjust.works
    link
    fedilink
    English
    121 year ago

    So what it’s really like is only having to do half the work?

    Sounds good, reduced workload without some unrealistic expectation of computers doing everything for you.

    • @takeda@lemmy.world
      link
      fedilink
      81 year ago

      From my experience all the time (probably even more) it saves me is wasted on spotting bugs and the bugs are in very subtle places.

    • nickwitha_k (he/him)
      link
      fedilink
      191 year ago

      So what it’s really like is only having to do half the work?

      If it’s automating the interesting problem solving side of things and leaving just debugging code that one isn’t familiar with, I really don’t see value to humanity in such use cases. That’s really just making debugging more time consuming and removing the majority of fulfilling work in development (in ways that are likely harder to maintain and may be subject to future legal action for license violations). Better to let it do things that it actually does well and keep engaged programmers.

      • @jaybone@lemmy.world
        link
        fedilink
        51 year ago

        People who rely on this shit don’t know how to debug anything. They just copy some code, without fully understanding the library or the APIs or the semantics, and then they expect someone else to debug it for them.

        • AFK BRB Chocolate
          link
          fedilink
          English
          21 year ago

          We do a lot of real-time control software, and just yesterday we were taking about how the newer folks are really good at using available tools and libraries, but they have less understanding of what’s happening underneath and they have problems when those tools don’t/can’t do what we need.

          • @jaybone@lemmy.world
            link
            fedilink
            21 year ago

            I see the same thing with our newer folks. (And some older folks too.) and management seems to encourage it. Scary scary stuff. Because when something goes wrong there’s only a couple of people who can really figure it out. If I get hit by a bus or laid off, that’s going to be a big problem for them.

            • AFK BRB Chocolate
              link
              fedilink
              English
              11 year ago

              Yep, you get it. And it’s really hard to get people to understand the value in learning to do that stuff without the tools.

  • @Auzy@beehaw.org
    link
    fedilink
    151 year ago

    My workmate literally used copilot to fix a mistake in our websocket implementation today.

    It made one line of change… turned it it made the problem worse

    • @MagicShel@programming.dev
      link
      fedilink
      71 year ago

      AI coding in a nutshell. It makes the easy stuff easier and the hard stuff harder by leading you down thirty incorrect paths before you toss it and figure it out yourself.

  • @xia@lemmy.sdf.org
    link
    fedilink
    English
    441 year ago

    This is the experience of a senior developer using genai. A junior or non-dev might not leave the “AI is magic” high until they have a repo full of garbage that doesn’t work.

  • Ziglin (it/they)
    link
    fedilink
    2
    edit-2
    1 year ago

    My new favourite is asking GitHub copilot (which I would not pay for out of my own pocket) why the code I’m writing isn’t working as intended and it asks me to show it the code that I already provided.

    I do like not having copy and paste the same thing 5 times with slight variations (something it usually does pretty well until it doesn’t and I need a few minutes to find the error)

  • @NegativeLookBehind@lemmy.world
    link
    fedilink
    English
    201 year ago

    When I used to try and ask AI for help, most of the time it would just give me fake command combinations or reference some made-up documentation

    • @Drewelite@lemmynsfw.com
      link
      fedilink
      English
      3
      edit-2
      1 year ago

      The best one I’ve used for coding is the InelliJ AI. Idk how they trained that sucker but it’s pretty good at ripping through boiler plate code and structuring new files / methods based off how your project is already setup. It still has those little hallucinations especially when you ask it to figure out more niche tasks. But It’s really increased my productivity. Especially when getting a new repo setup. (I work with micro services)

      • @Passerby6497@lemmy.world
        link
        fedilink
        English
        31 year ago

        Yeah, formatting is the only place that I really enjoy using AI. It’s great at pumping out blocks of stuff and frequently gets the general idea of what I’m going for with successive variables or tasks. But when you ask it to do complex things it wigs out. Like yesterday when it spit out a regex to look for something within multiple encapsulation chars just fine, but telling it to remove one of the chars it was looking for was impossible, apparently. Spent 5 min doing something I figured out in 2 minutes on a regex test site.

  • crossmr
    link
    fedilink
    341 year ago

    Gen AI is best used with languages that you don’t use that much. I might need a python script once a year or once every 6 months. Yeah I learned it ages ago, but don’t have much need to keep up on it. Still remember all the concepts so I can take the time to describe to the AI what I need step by step and verify each iteration. This way if it does make a mistake at some point that it can’t get itself out of, you’ve at least got a script complete to that point.

    • Exactly. I can’t remember syntax for all the languages that I have used over the last 40 years, but AI can get me started with a pretty good start and it takes hours off of the review of code books.

    • @Auzy@beehaw.org
      link
      fedilink
      61 year ago

      I actually disagree. I feel it’s best to use for languages you’re good with, because it tends to introduce very subtle bugs which can be very difficult to debug, and code which looks accurate about isn’t. If you’re not totally familiar with the language, it can be even harder

      • crossmr
        link
        fedilink
        21 year ago

        I test all scripts as I generate them. I also generate them function by function and test. If I’m not getting the expected output it’s easy to catch that. I’m not doing super complicated stuff, but for the few I’ve had to do, it’s worked very well. Just because I don’t remember perfect syntax because I use it a couple of times a year doesn’t mean I won’t catch bugs.

  • @nikaaa@lemmy.world
    link
    fedilink
    451 year ago

    My dad’s re-learning Python coding for work rn, and AI saves him a couple of times; Because he’d have no idea how to even start but AI points him in the right direction, mentioning the correct functions to use and all. He can then look up the details in the documentation.

      • @EatATaco@lemm.ee
        link
        fedilink
        English
        91 year ago

        And before stack overflow, we used books. Did we need it? No. But stack overflow was an improvement so we moved to that.

        In many ways, ai is an improvement on stack overflow. I feel bad for people who refuse to see it, because they’re missing out on a useful and powerful tool.

        • It can be powerful, if you know what you are doing. But it also gives you a lot of wrong answers. You have to be very specific in your prompts to get good answers. If you are an experience programmer, you can spot if the semantics of the code an ai produces is wrong, but for beginners? They will have a lot of bugs in their code. And i don’t know if it’s more helpful than reading a book. It surely can help with the syntax of different programming languages. I can see a future where ai assistance in coding will become better but as of know, from what i have seen, i am not that convinced atm. And i tested several, chatgpt (in different versions), github co-pilot, intellij ai assitant, claude 3, llama 3.

          And if i have to put in 5 or more long, very specific sentences, to get a function thats maybe correct, it becomes tedious and you are most likely faster to think about a problem in deep and code a solution all by yourself.

          • @EatATaco@lemm.ee
            link
            fedilink
            English
            11 year ago

            but for beginners? They will have a lot of bugs in their code.

            Everyone has lots of bugs in their code, especially beginners. This is why we have testing and qa and processes to minimize the risk of bugs. As the saying goes, “the good news about computers is that they do what you tell them to do. The bad n was is that they do what you tell them to do.”

            Programming is an iterative process where you do something, it doesn’t work, and then you give it another go. It’s not something that senior devs get right on the first try, while beginners have to try many times. It’s just that senior devs have seen a lot more so have a better understanding of why it probably went wrong, and maybe can avoid some more common pitfalls the first time around. But if you are writing bug free code in your first pass, well you’re a way better programmer than anyone I’ve met.

            Ai is just another tool to make this happen. Sure, it’s not always the tool for the job, just like IoC is not always the right tool for the job. But it’s nice to have it and sometimes it makes things much easier.

            Like just now I was debugging a large SQL query. I popped it into copilot, asked if to break it into parts so I could debug. It gave a series of smaller queries that I then used to find the point where it fell apart. This is something that would have taken me at least a half hour of tedious boring work, fixed in 5 minutes.

            Also for writing scripts. I want some data formatted so it was easier to read? No problem, it will spit out a script that gets me 90% of the way there in seconds. Do I have to refine it? Absolutely. But if I wrote it myself, not being super prolific with python, it would have taken me a half hour to get the structure in place, and then I still would have had to refine it because I don’t produce perfect code the first time around. And it comments the scripts, which I rarely do.

            What also amazes me is that sometimes it will spit out code and I’ll be like “woah I didn’t even know you could do that” and so I learned a new technique. It has a very deep “understanding” of the syntax and fundamentals of the language.

            Again, I find it shocking that experienced devs don’t find it useful. Not living up to the hype I get. But not seeing it as a productivity boosting tool is a real head scratcher to me. Granted, I’m no rockstar dev, and maybe you are, but I’ve seen a lot of shit in my day and understand that I’m legitimately a senior dev.

      • @monkeyman512@lemmy.world
        link
        fedilink
        English
        31 year ago

        Have you used Google lately? At least chatGPT doesn’t make me scroll past a full page of ads before giving me a half wrong answer.

  • @Blackmist@feddit.uk
    link
    fedilink
    English
    141 year ago

    I guess whether it’s worth it depends on whether you hate writing code or reading code the most.

    • AwkwardLookMonkeyPuppet
      link
      fedilink
      English
      2
      edit-2
      1 year ago

      I give instructions to AI like I would to a brand new junior programmer, and it gives me back code that’s usually better than a brand new junior programmer. It still needs tweaking, but it saves me a lot of time. The drawback is that coding knowledge atrophy occurs pretty rapidly, and I’m worried that I’m going to forget how to write code without the AI. I guess that I don’t really need to worry about that, since I doubt AI is going anywhere anytime soon.

    • @Knock_Knock_Lemmy_In@lemmy.world
      link
      fedilink
      7
      edit-2
      1 year ago

      Shitty engineers that can do grunt work, don’t complain, don’t get distracted and are great at doing 90% of the documentation.

      But yes. Still shitty engineers.

      Great management consultants though.