• Gxost@lemmy.world
    link
    fedilink
    arrow-up
    16
    arrow-down
    3
    ·
    21 days ago

    GitHub Copilot became my daily helper at work. While I’m not 100% satisfied with its code quality, I must admit it’s very handy at writing boilerplate code. A few days ago, I had to write code without having internet access, and it was so disappointing to write boilerplate code by hand. It’s an easy task, but it’s time-consuming and unpleasant.

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      10
      ·
      21 days ago

      I will forever continue to suggest that as a developer, you learn your IDE of choice’s features for templates/code snippets, or make yourself a “templates” file to copy and paste from.

      Far more control, far less opportunity to miss something small and mess up, cheaper, less resource use, and faster.

      Using VsCode/VsCodium’s snippets feature has been a serious game changer for me when it comes to boilerplate.

      • Gxost@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        21 days ago

        Copilot shines where snippets/templates don’t work or make no sense. It can write constructors, simple methods, and even simple classes if something similar is found in the solution.

    • ripcord@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      21 days ago

      I’m very curious what these development workflows are where writing “boilerplate” code is so common, especially that AI-generated is good enough. It’s very rare for me to need this, and Ileven then I generally have spent more time cleaning up wjatbit built than the time it saved me.

      • MintyAnt@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        20 days ago

        It could be level. Less experienced engineers find the boilerplate spit out by copilot extremely useful, more experienced find it more in the way.

        Is some of this just caused by more experienced folks being less inclined to learn AI tools? Maybe. I think experience writing code is the bigger factor though.

        I’m trying real hard to find it useful. I can see it eventually being more useful, but it’s just not worth the cost.

        • ripcord@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          19 days ago

          Maybe, it’s just really rare for me to be looking at a "blank page’. 95% is an incremental improvement on top of something existing. So “boilerplate” would come into my workflow pretty rarely.

          Maybe some frequently-changing data science or data mining tasks?

      • Gxost@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        18 days ago

        By saying “boilerplate”, I mean constructors, simple methods and even small classes that have some “standard” implementation. Copilot easily writes simple constructors, class initialization and destruction. It can suggest small method implementation, right after I added its declaration to related interface. Anything, that can be done almost without thinking of how to do it because there are standard practices, is handled by Copilot. It’s not perfect, it can write a whole method at a time, or only line by line, or refuse to suggest any code. But it often writes valid code.