• chicken@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    42
    arrow-down
    23
    ·
    1 year ago

    If you can’t take 10 - 30 minutes to search for, read, and comprehend information on stack overflow or docs

    A lot of the time this is just looking for syntax though; you know what you want to do, and it’s simple, but it is gated behind busywork. This is to me the most useful part about ChatGPT, it knows all the syntax and will write it out for you and answer clarifying questions so you can remain in a mental state of thinking about the actual problem instead of digging through piles of junk for a bit of information.

    • CoopaLoopa@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      23
      arrow-down
      2
      ·
      edit-2
      1 year ago

      Somehow you hit an unpopular opinion landmine with the greybeard devs.

      For the greybeard devs: Try asking ChatGPT to write you some Arduino code to do a specific task. Even if you don’t know how to write code for an Arduino, ChatGPT will get you 95% of the way there with the proper libraries and syntax.

      No way in hell I’m digging through forums and code repos for hours to blink an led and send out a notification through a web hook when a sensor gets triggered if AI can do it for me in 30 seconds. AI obviously can’t do everything for you if you’ve never coded anything before, but it can do a damn good job of translating your knowledge of one programming language into every other programming language available.

      • Kogasa@programming.dev
        link
        fedilink
        arrow-up
        26
        ·
        1 year ago

        It’s great for jumping into something you’re very unfamiliar with. Unfortunately, if you often find yourself very unfamiliar with day to day tasks, you’re probably incompetent. (Or maybe a butterfly who gets paid to learn new things every day.)

    • el_bhm@lemm.ee
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      Just a few days ago I read an article on the newest features of Kotlin 1.9. Zero of it was true.

      Internet is littered with stuff like this.

      If model is correct, you are correct. If model is not correct, you are working on false assumptions.

      • chicken@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        8
        arrow-down
        2
        ·
        1 year ago

        No difference there, either way your information may be wrong or misleading. Running code and seeing what it does is the solution.

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      21
      arrow-down
      7
      ·
      edit-2
      1 year ago

      The more you grow in experience the more you’re going to realize that syntax and organization is the majority of programming work.

      When you first start out, it feels like the hardest part is figuring out how to get from a to b on a conceptual level. Eventually that will become far easier.

      You break the big problem down into discrete steps, then figure out the besy way to do each step. It takes little skill to say “the computer just needs to do this”. The trick is knowing how to speak to the computer in a way that can make sense to the computer, to you, and to the others who will eventually have to work with your code.

      You’re doing the equivalent of a painter saying “I’ve done the hard part of envisioning it in my head! I’m just going to pay some guy on fiver to move the brush for me”


      This is difficult to put into words, as it’s also not about memorization of every language specific syntax pattern. But there’s a difference between looking up documentation or at previous code for syntax, and trying to have chatGPT turn your psuedocode notes into working code.

      • emptiestplace
        link
        fedilink
        arrow-up
        19
        ·
        1 year ago

        The more you grow in experience the more you’re going to realize that syntax and organization is the majority of programming work.

        organization, absolutely - but syntax? c’mon…

      • Stumblinbear@pawb.social
        link
        fedilink
        arrow-up
        12
        ·
        edit-2
        1 year ago

        I’m a pretty senior dev and have chat gpt open for quick searches. It’s great for helping me figure out what to Google in the cases where I can’t think of the name of a pattern or type I’m looking for. It also helps quite a bit with learning about obscure functions and keywords in SQL that I can do more research on

        Hell, I use Copilot daily. Its auto complete is top-tier

        • anti-idpol action@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Copilot is good for tedious stuff like writing enums. But otherwise I more often than not need to only accept tne suggested line or particular words, since in multiline snippets it can do stupid things, like exiting outside of main() or skipping error checks.

      • chicken@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        9
        ·
        1 year ago

        I’ve been programming for decades, I’m not actually a beginner. A mistake I made early on was thinking that everything I learn will be worth the time to learn it, and will always increase my overall skill level. But (particularly as relates to syntax) it’s not and it doesn’t; something I only use once or rarely, something that isn’t closely connected with the rest of what I often do, I’ll just forget it after a while. I greatly prefer being broadly capable of making things happen to having a finely honed specialization, so I run into that sort of thing a lot, there is an ocean of information out there and many very different things a programmer can be doing.

        I think it is an important and valuable lesson to know when to get over yourself and take shortcuts. There are situations where you absolutely should never do that, but they are rare. There are many situations where not taking shortcuts is a huge mistake and will result in piles of abandoned code and not finishing what you set out to do. AI is an incredibly powerful source of shortcuts.

        You’re doing the equivalent of a painter saying “I’ve done the hard part of envisioning it in my head! I’m just going to pay some guy on fiver to move the brush for me”

        More like you’ve coded the functionality for a webapp, have a visual mockup, and pay some guy on fiver to write the CSS for you, because doing it yourself is an inefficient use of your time and you don’t specialize in CSS.

        As for the issue of a new programmer ending up with problems because they rely too much on AI and somehow fail to learn how to model the structure of programs in their head, that’s probably real, but I can’t imagine how that will go because all I had to go on when I was learning was google and IRC and it’s totally different. Hope it works out for them.

      • eclectic_electron@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        1 year ago

        TBF that’s how many master artists worked in the past. The big art producers had one master painter guiding a bunch of apprentices who did the actual legwork.

        • Rodeo@lemmy.ca
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          And senior devs guide junior devs in the same way. The point is the masters already did their time in the trenches. That how they became masters.

      • 257m@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        That the exact opposite problem for most people though. Syntax is hard at first because you are unfamiliar and gets more natural to you overtime. Algorithms are easier to think about conceptually as a person with no programming experience as they are not programming specific. If you are an experienced developer struggling over syntax yet breezing through difficult data structure and algorithm problems (Eg. Thinking about the most efficient way to upload constantly updating vertex data to the gpu) you are definitely the anomaly.

    • blackbirdbiryani@lemmy.world
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      1 year ago

      I write a lot of bash and I still have to check syntax every day, but the answer to that is not chatGPT but a proper linter like shell check that you can trust because it’s based on a rigid set of rules, not the black box of a LLM.

      I can understand the syntax justification for obscure languages that don’t have a well written linter, but if anything that gives me less confidence about CHATGPT because it’s training material for an obscure language is likely smaller.

      • ByGourou@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        Less checking syntax and more like “what was this function name again ?”
        “Which library has that ?”
        “Do I need to instance this or is it static ?”
        All of theses can be answered by documentation, but who want to read the docs when you can ask chatgpt. (Copilot is better in my experience btw)

    • Solar Bear@slrpnk.net
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      5
      ·
      edit-2
      1 year ago

      Never ask ChatGPT to write code that you plan to actually use, and never take it as a source of truth. I use it to put me on a possible right path when I’m totally lost and lack the vocabulary to accurately describe what I need. Sometimes I’ll ask it for an example of how sometimes works so that I can learn it myself. It’s an incredibly useful tool, but you’re out of your damn mind if you’re just regularly copying code it spits out. You need to error check everything it does, and if you don’t know the syntax well enough to write it yourself, how the hell do you plan to reliably error check it?

      • _danny@lemmy.world
        link
        fedilink
        arrow-up
        10
        ·
        1 year ago

        You absolutely can ask it for code you plan to use as long as you treat chatgpt like a beginner dev. Give it a small, very simple, self contained task and test it thoroughly.

        Also, you can write unit tests while being quite unfamiliar with the syntax. For example, you could write a unit test for a function which utilizes a switch statement, without using a switch statement to test it. There’s a whole sect of “test driven development” where this kind of development would probably work pretty well.

        I’ll agree that if you can’t test a piece of code, you have no business writing in the language in a professional capacity.

    • state_electrician@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      ChatGPT cannot explain, because it doesn’t understand. It will simply string together a likely sequence of characters. I’ve tried to use it multiple times for programming tasks and found each time that it doesn’t save much time, compared to an IDE. ChatGPT regularly makes up methods or entire libraries. I do like it for creating longer texts that I then manually polish, but any LLM is awful for factual information.

      • chicken@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        1 year ago

        ChatGPT regularly makes up methods or entire libraries

        I think that when it is doing that, it is normally a sign that what you are asking for does not exist and you are on the wrong track.

        ChatGPT cannot explain, because it doesn’t understand

        I often get good explanations that seem to reflect understanding, which often would be difficult to look up otherwise. For example when I asked about the code generated, {myVariable} , and how it could be a valid function parameter in javascript, it responded that it is the equivalent of {"myVariable":myVariable}, and “When using object literal property value shorthand, if you’re setting a property value to a variable of the same name, you can simply use the variable name.”

    • anti-idpol action@programming.dev
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      you can remain in a mental state of thinking about the actual problem

      more like you’ll end up wasting a significant amount of time debugging not only the problem, but also chatGPT, trying to correct the bullshit it spews out, often ignoring parts of your prompt

        • anti-idpol action@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          It might be wrong even if you provide extensive context to make it more accurate in it’s heuristics. And providing extensive context is pretty time consuming at times.

        • anti-idpol action@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I mean it might be good at helping you when you’re stuck, but sometimes it misses simple issues such as typos and for one issue resolved, it might introduce another if you’re not careful.