Finally (programming.dev)
submitted 3 years ago* (last edited 3 years ago) by to c/programmer_humor@programming.dev
 

top 30 comments

sorted by: hot top controversial new old
[–] 30 points 3 years ago (13 children)

Most of the codes I copied from GPT doesn't even work Seems I spent more time fixing it compared to thinking it myself

  • source
  • hideshow 13 child comments
  • [–] 44 points 3 years ago (3 children)

    Seems I spent more time fixing it compared to thinking it myself

    AI code is just bad code written by someone else that I now have to fix, and we all know the one job every coder loves is fixing code written by someone who you cannot ask: "why did you do it this way?"

  • source
  • parent
  • hideshow 3 child comments
  • [–] 14 points 3 years ago (5 children)

    Often when I tell ChatGPT what error its code produced it will immediately figure out what the bug was and fix it.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 7 points 3 years ago (2 children)

    interacting with chatgpt is a learned skill

    i’ve used it several times and while the initial code may have some issues you can get them cleared up with a few direct follow ups

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 3 years ago* (1 child)

    I recall reading a while back of one person's strategy, whenever ChatGPT generates code for him he immediately tells ChatGPT "there's a bug in that code" (without checking or specifying). It'll often find one.

    Another approach I've heard of is to tell ChatGPT that it's supposed to roleplay two roles when generating code, a programmer and a code reviewer. The code reviewer tidies up the initial code and fixes bugs.

    Since often ChatGPT's code works fine for me I don't usually bother with these steps initially, since I'm usually just wanting a quick and dirty script for a one-off task the quality doesn't matter much in my case.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 3 years ago

    Yeah, this is the way how to interact with it. It makes sense as well, because it's only predicting the next word based on the previous words, so it had can in hindsight find a lot more stuff and in general be smarter about it.

  • source
  • parent
  • [–] 19 points 3 years ago

    I've had success with trivial things, like write a log file parser with this pattern, or give me a basic 3 part left-right-center header in html. Works ok for trivial side projects. I would never trust it in production. Its a tool, nothing more at this point. Like an electric drill, better than a hand crank, but you still need to know how to use it.

  • source
  • [–] 13 points 3 years ago

    Yea I genuinely hope we get to the point where I don't have write code. Let me describe the architecture and algorithms with my voice in English. I'd much rather spend my time solving abstract problems than typing syntax. If I have to essentially "teach" the AI what I want by dropping down the ladder of abstraction sometimes, that's OK.

  • source
  • [–] 8 points 3 years ago

    My favourite use of ChatGPT is

    Optimize below function

  • source
  • [–] 6 points 3 years ago (1 child)

    Me a CS student that bet all my future in the field: yes totally happy about this

  • source
  • hideshow 1 child comment
  • [–] 5 points 3 years ago (2 children)

    Then what will you do for money

  • source
  • hideshow 2 child comments
  • [–] 4 points 3 years ago (4 children)

    It won’t, because AI will generate based on existing content, but will not make something new

  • source
  • hideshow 4 child comments
  • [–] 4 points 3 years ago

    Both can suck you know.

  • source
  • [–] 2 points 3 years ago (1 child)

    If AI can write code based on English input then we should be able to feed it a spec and then just deploy to production the output.

  • source
  • hideshow 1 child comment
  • [–] 4 points 3 years ago

    And, as always, attempting to code to that spec will expose contradictions, inconsistencies, and frequently produce something that the customer judges as unfit for purpose.

    Coding has never been the toughest problem, except in the matter of security attacks.

  • source
  • parent
  • load more comments
    view more: next ›