• the_toast_is_gone@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    39 minutes ago

    Preface: If all you want is to get a simple script/program going that will more or less work for your purposes, then I understand using AI to make it. But doing much more than this with it will not help you.

    If you want to actually learn to code, then using AI to write code for you is a crutch. It’s like trying to learn how to write an essay by having ChatGPT write the essays for you. If you want to use an API in your code, then you’re setting yourself up for greater failure the more you depend on AI.

    Case in point: if you want to make a module or script for Foundry VTT, then they explicitly tell you not to use AI, partly because the models available online have outdated information. In fact, training AI on their documentation is explicitly against the terms of service.

    Even if you do this and avoid losing your license, you run a significant risk of getting unusable code because the AI hallucinated a function or method that doesn’t actually exist. You will likely wind up spending more time scouting the documents for what you actually want to do than if you’d just done it yourself to begin with.

    And if the code works perfectly now, there’s no guarantee that it will work forever, or even in the medium term. The software and API receive updates regularly. If you don’t know how to read the docs and write the code you need, you’re screwed when something inevitably gets deprecated and removed. The more you depend on AI to write it for you, the less capable you’ll be of debugging it down the line.

    This begs the question: why would you do any of this if you wanted to make something using an API?

  • Nomecks@lemmy.ca
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    3
    ·
    edit-2
    2 hours ago

    Good. There’s a lot of non-programmers who are now bad ones and are using AI to make their ideas real. It’s made programming way more accessible to people who would never learn before.

    • Sabata@ani.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 minutes ago

      I got back into programming because I can ask an Ai my stupid questions I’m too dumb to google correctly. I haven’t otherwise wrote code since college and kinda revived a long dead hobby. It removes a barrier to entry that I otherwise gave up on. Been working on a project to teach myself python the last few months, with Ai replacing the roll of google for the most part.

      Copy-pasting Ai code still blows up in your face just as much as code you stole from stack overflow…

    • raker@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 hour ago

      Can confirm. Using AI for coding for a couple of months now. There sure is a lot of copy and paste, trail and error, but without the assistance I would not have been able to enhance and customize code like that. Now I am some steps further and was even able to question the AI output, correct it, made it better. I am getting there: learning, optimizing, creating new stuff. It is fun. And when I compile the code, it runs. If not, I debug. Unthinkable for me a year ago.

  • TimeSquirrel@kbin.melroy.org
    link
    fedilink
    arrow-up
    59
    arrow-down
    3
    ·
    4 hours ago

    Try programming for a day without syntax highlighting or auto-completion, and experience how pathetic you feel without them. If you’re like me, you’ll discover that those “assistants” have sapped much of your knowledge by eliminating the need to memorize even embarrassingly simple tasks.

    That’s…how the world works. We move on. We aren’t programming computers by flipping toggle switches or moving patch cables around anymore either.

    ‘Try directly hand-coding bits into regions of memory without a compiler/linker and experience how pathetic you feel without it.’

    • Sinuousity@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      31 minutes ago

      What a dumb take (in your quote). Autocompletion showing me all the members of an object is nothing like ChatGPT hallucinating members that don’t exist. Autocomplete will show you members you haven’t seen, or aren’t even documented.

      Not to mention they said syntax highlighting is a bad thing… Why use computers at all? Go back to the golden days of punchcards

    • DreamButt@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      22 minutes ago

      Without syntax highlighting?? Sorry I guess my pretty colors are a weakness. Some people just want to be curmudgeons

    • kameecoding@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      I use it to generate repetitive patterns that’s easy to guess what’s next, but PITA to write, eg. asserts in Unit tests

  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    22
    ·
    4 hours ago

    I’ve never had AI create working code anyway.

    But it will generally point me in the right direction. It’s useful for:

    1. Helping get your train of thought back in the right direction
    2. Automating what would be a lot of boilerplate/repetitive coding. Just beware you will still need to check it over.

    You need to be skilled to spot the mistakes it will definitely make.

  • tias@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    2
    ·
    edit-2
    4 hours ago

    I’ll confess I only skimmed the article, but it seems like just a bunch of unsubstantiated opinions and I don’t buy it.

    Using AI generated code is like pair programming with a junior programmer. You tell the junior what to do and then you correct their mistakes by telling them how to do better. In my experience, explaining things to someone else makes you better at your craft. Typically this cycle includes me changing the code manually at the end, and then possibly feeding it back to ChatGPT for another cycle of changes.

    Apart from letting me realize and test my ideas quicker, this allows me to raise the abstraction level of my thinking. I can spend more time on architecture and on seeing the bigger picture, and less time being blinded by the nitty gritty details. I would say it makes me both a faster and a better programmer.

    • ourob@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 minutes ago

      I’ve seen the comparison to pair programming with a junior programmer before, and it’s wild to me that such a comparison would be a point in favor of using AI for improving productivity.

      I have never experienced a productivity boost by pairing with a junior. Which isn’t to say it’s not worth doing, but the productivity gains go entirely to the junior. The benefits I receive are mainly improving my communication and mentoring skills in the short term, and improving the team’s productivity in the long term by boosting the junior’s knowledge.

      And it’s not like the AI works on the mundane stuff in parallel while I work on the more interesting, higher level stuff. I have to hold its hand through the process.

      I feel like the efficiency gains of AI programming is almost entirely in improving your speed at wrestling a chatbot into producing something useful. Which may not be entirely useless going forward - knowing how to search well is an important skill, this may become something similar, but it just doesn’t seem worth the hassle to me.

    • Sage1918@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      2 hours ago

      Bugs never occur in the high-level/big picture land, it usually come up in the low-level/implementation land. Should you entrust these to AI ?

      • tias@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 hour ago

        Only because bugs are defined as errors in implementation details. You can still have errors in your design (sometimes referred to as design bugs).

        It’s not about “entrusting” to AI any more than I would be entrusting important code to a junior developer to just go off and push to production on his own. We still have code review, pair programming etc. As I said, I read the output code, point out issues with it, and in the end make manual adjustments to fit what I want. It’s just a way of building up the bulk of the code more quickly and then you refine it.

  • half_built_pyramids@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 hour ago

    AI and the discussion around it doesn’t live in a vacuum.

    Occasionally you’ll get shit opinions like this. Easy slutty greek frat bro strawmen that’ll sleep with anything that moves and then dodge child support payments.

    We all have to remember the true Chad argument against AI is that it’s built on degenerate theft and corporate soulless shills. AI is the Shikrelli of creativity.

    • catloaf
      link
      fedilink
      English
      arrow-up
      8
      ·
      4 hours ago

      Unironically, yes. It’ll generally generate working code, but not necessarily the most correct or efficient. And it may not do exactly what you want.

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    47
    arrow-down
    1
    ·
    edit-2
    7 hours ago

    Our computer science professor in some programming course at university told us we were not supposed to take advice from the internet or answers from Stack Overflow for half a year… Until we learned the ropes. And could asses for ourselves what’s right and what is wrong. (And I believe that was some C/C++ course where you get lots of opportunuties to do silly things that might somehow work but for all of the wrong reasons.)

    I think he was right. There is lots of misinformation out there that isn’t a proper design pattern. And with copy-pasting stuff, you don’t necessarily learn anything. Whereas learning with some method is efficient and works.

    And I’m pretty sure I’m not super intelligent, but all of that isn’t really hard. I mean if someone codes regularly, they might as well learn how to do it properly. It takes a bit of time initially… But you get that time back later on. Though… I’d let AI write some boilerplate code. Or design a website if I’m not interested at all how the HTML and CSS works… I think that’s alright to do.

      • wewbull@feddit.uk
        link
        fedilink
        English
        arrow-up
        4
        ·
        4 hours ago

        Debugging only teaches logic. Not structure. No amount cut, paste, debug with teach you the factory pattern.

      • peopleproblems@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        5 hours ago

        Debugging and being able to interpret documentation when it exists.

        But good lord, the amount of programmers I work with that never use an IDE debugger is unreal. I get that you don’t have to, but Jesus Christ, if yout not getting an expected result, it’s way fucking faster to step through the code and see where the data changes then to slap logging into every line and attempt to read the output.

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        14
        ·
        edit-2
        7 hours ago

        I mean it also contains great stuff. Niche workarounds, ways to do something more efficiently than some standard library function does.

        You just need a means of telling apart the good and the bad. Because there’s also people smashing their forehead on the keyboard until it happens to be something that compiles. And people repeating urban legends and outdated info. You somehow need background knowledge to tell which is which. AI didn’t invent phrasing some nonesense with full conviction. It is very good at doing exactly that, but we humans also have been doing that since the beginning of time.

  • Random_Character_A@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    4
    ·
    7 hours ago

    Not a coder. I can understand most python code and powershell scripts that others have done, but I don’t remember syntax, if I need to make something from scratch. Doing that involves ton of googling and reading awful documentation that still leaves some things out. I do this maybe twice a year.

    For someone like me AI coding is a god sent.

    • peopleproblems@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      5 hours ago

      doing that involves a ton of googling and reading awful documentation

      Yes. That is programming.

      To most of us, the syntax is the easy part to remember, and our IDEs take care of most of it. Being able to bang our heads through the documentation and experiment with libraries is pretty much what our jobs are.

      AI coding is basically a shortcut to some of the stuff we have to repeat with slight changes in our software. It’s also useful for setting up more complex code that we know we’ll have to tweak.

      Expecting it to produce something with the desired results is a recipe for disaster. It’s basically a cheaper outsourcing method that can’t actually compile and run it’s code before giving it to you.

    • Dot.@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      4
      ·
      7 hours ago

      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.

  • 9point6@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    2
    ·
    7 hours ago

    Agree on the application side, but when it comes to the test suite, I’m definitely gonna consider letting an AI get that file started and then I’ll run through, make sure the assertions are all what I would expect and refactor anything that needs it.

    I’ve written countless tests in my career and I’m still gonna write countless more, but I’m glad I can at least spend less time on laborious repetition now and more time on the part of the job I actually enjoy which is actually solving problems.

    • MeatsOfRage@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      5
      ·
      5 hours ago

      Things like unit tests I just have AI do it all now. Since running the test tells you your coverage you can verify if it got everything or not.

      • wewbull@feddit.uk
        link
        fedilink
        English
        arrow-up
        4
        ·
        3 hours ago

        Here’s something that might blow your mind. Coverage is not the point of tests.

        If you your passing test gets 100% coverage, you can still have a bug. You might have a bunch of conditions you’re not handling and a shit test that doesn’t notice.

        Write tests first to completely define what you want the code to do, and then write the code to pass the tests.

  • pHr34kY@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    4
    ·
    edit-2
    4 hours ago

    The same logic can explain why Teslas crash so often. You turn on all the assists, and eventually forget how to change gears.

    • ContrarianTrail
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 minutes ago

      I haven’t seen any statistics suggesting Teslas crash more often than other vehicles.

  • iopq@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    16
    ·
    7 hours ago

    I’d rather be a bad programmer that gets stuff done than a good programmer who’s just jerking off about proper design

    t. good programmer

    • TimeSquirrel@kbin.melroy.org
      link
      fedilink
      arrow-up
      5
      ·
      3 hours ago

      Once you move past a couple thousand LOC, you’ll appreciate having an easily modifiable, modular design you had the foresight to plan out.

      Or you can just trawl through thousand of lines of unstructured spaghetti code trying to figure out where to shoehorn your new feature in like a QBasic/Arduino kid.