I have been reading a lot that 90% of their code is AI generated, companies are pushing developers to use AI as it makes them fast. But I am a little cautious of believing them. Is it true? Also sorry I didn’t find a css career subreddit so I am asking here.

  • idunnololz@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    17 hours ago

    I’m still writing 90% of my code by hand at work. I think if you have total or close to total mastery in your domain, you should probably work faster than AI.

    It takes a while for AI to generate code (Opus is pretty slow) and then you have to go review it and do rounds and rounds of fixes. It might be faster to use AI if there were unknowns or if you werent quite sure how to write the code. Otherwise I just find it faster to write it myself.

    That being said I do use AI under some soecific circumstances:

    1. im working in a code base or area of code im unfamiliar with
    2. Im working in a language in unfamiliar with
    3. prototyping ideas
    4. generating boilerplate heavy code

    For 1. And 2. I dont usually have ai write code for me. I would just ask it questions like “how do I write X in an idiomatic way in language Y”.

    For 3, I have it generate code that I then toss and rewrite if the prototype works.

    For 4, this is rare in a good code base. Most of the boiler plate heavy code at work is in unit tests.

    • funtimeposting2@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      I’ve been wary of all those use cases. If I’m unfamiliar with the code base, the language, or have a vague plan then I focus on getting understanding first; AI gives false confidence and I can’t check it’s work if I don’t understand what I’m doing. I’ve never written much boilerplate code as I use templates, written by humans, when starting a new project. The idea of starting from a slop codebase isn’t appealing as you need a good foundation.

      • idunnololz@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        50 minutes ago

        The problem I find is it can take a year or longer before you learn what is idiomatic and what isn’t and it’s not always obvious. You can ask colleges of course but it can slow down development drastically if you need to ask often. Most times, you don’t have the luxury of practicing the language for a year before you ship code so you can use AI to get a general sense of what is best practice in that language. Worst case if AI gets it wrong, it will get caught in review.

        As for understanding code bases, I’m working in code bases with millions of lines of code. Before AI I would usually ask someone to point me in the general vicinity or spend 30 minutes trying to find the right ballpark to look at for a particular thing. With AI, it can usually find it in 5 minutes or less. I still learn where the code lives if I need to reference it again in the future so I don’t really see much of a downside here other than that I get to save a chunk of time from having to pore through hundreds of source files.