Search Unity

best ai code review tool for unity

Discussion in 'General Discussion' started by realyungyung, Jan 25, 2024.

  1. realyungyung

    realyungyung

    Joined:
    Oct 5, 2023
    Posts:
    2
    can anyone recommend an ai driven code review tool with github integration ? thank you :)
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Coding AI tools are not to do review, but to assist with writing code.
    Human still need to do final code review, to make sure, it is functional, not buggy, clean and readable.
     
    CodeRonnie and PanthenEye like this.
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,824
    Yeah, and also to make sure it's not non-sense that doesn't work in the first place.

    Specifically generic AI like ChatGPT is happily providing you with code that just doesn't work to begin with. Calling methods that simply do not exist, mixing languages, or insisting that this will work at runtime even though it's clearly editor-only code.

    AI is great for creativity and inspiration though! :)

     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,562
    I think LLMs are actually more suitable for reviewing than for generating. Both code and text. And are not that good for creativity.
     
    Lurking-Ninja likes this.
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    How generative tool will understand, what my code suppose to look like and how it suppose to work?
    Maybe it can format code. But I can do that using IDE. So what is special here?

    If I dump 100 lines of code to chatGPT, how I should use it to review thing?
    - Spell check?
    - Camel / capital cases?
    - Performance?
    - Naming conventions?
    - Functionality?

    I tried as of an interest, and it outputs total rubbish. More confusing than helpful.
    On 10 points, I may have 3 valid one.

    I can not imagine using it for longer scripts.

    I am open to hear about good example of generative code review tools and approaches, which doesn't require senior expertise.
     
  6. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,562
    LLM "understand" context. For example, chatgpt at some point could recognize that a regexp is trying to match HH:mm format and suggest advanced syntax. Likewise a LLM can typically explain "what does this code do" followed by a code dump.

    However, LLM have no creativity. They produce most statistically plausible response, and that makes it an incarnation of mediocrity. It is not creative and is not fit for creative tasks. Humans do those better.

    I've used models to review human texts, it produces decent results. Trying to use it as a co-writer though is a waste of time. It works as an assistant or talking encyclopedia.

    "Please review the code fragment below and list the issues you notice. Act as a code reviewer"

    If it goes bonkers, you can simply reroll the response.

    You need a bigger with larger context, and preferably fine-tuned for programming. Code is token hungry. See reddit for suggestions for code LLMs that can work locally. I think GPT 4 was 32k tokens. There's Claude2 which is 200k, but its owner is in the process of making it useless by neutering any useful functionality it still has.
     
    DragonCoder likes this.
  7. realyungyung

    realyungyung

    Joined:
    Oct 5, 2023
    Posts:
    2
    thanks everyone for your replies. just for clarification. it´s not for code generation and also not to eradicate human code review. i looked into tools like code rabbit that offer pull request reviews and i wanted to ask if anyone has some experience or could recommend a tool :)
     
  8. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 5, 2024
    Posts:
    462
    Albeit I agree with the statement itself, it's worth to mention the problem with sharing code with cloud processes. It's fine as long as you only share your own code, but it's minimum questionable when you're uploading other people's code under not entirely open license. and outright banned by the EULA of the Asset Store (sharing assets with third-parties).
    And you absolutely should think twice if you're working with projects under NDA. Always ask if it's allowed and which ones, etc.

    Also they aren't the same. Jetsbrain's AI swears that they aren't training their AIs on your code (and they will allow local-instances for enterprise customers) meanwhile using CoPilot you don't have a choice, if you're on personal license.
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,562
    Local models exist.

    People are experimenting with quantizations, some of those models can be run on CPU.

    Obviously if you're dealing with cloud solutions, assume that the other party will copy your code even if it says that's not the case.
     
  10. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,062