Live data from Hacker News

Get an AI code review in 10 seconds

oldmanrahul.com

31–40 of 69 posts

Re: Get an AI code review in 10 seconds

#31

I still dont get the idea about AI code reviews. A code review (at least in my opinion) is for your peers to check if the changes will have a positive or negative effect on the overall code + architecture. I have yet to see an LLM being good at this. Sure, they will leave comments about common made errors (your editor should already warn about this before you even commit it) etc. But to notify about this weird thing…

Sure, AI code reviews aren't a replacement for an architecture review on a larger team project.

But they're fantastic at spotting dumb mistakes or low-hanging fruit for improvements!

And having the AI spot those for you first means you don't waste your team's valuable reviewing time on the simple stuff that you could have caught early.

Re: Get an AI code review in 10 seconds

#32
post #31

I still dont get the idea about AI code reviews. A code review (at least in my opinion) is for your peers to check if the changes will have a positive or negative effect on the overall code + architecture. I have yet to see an LLM being good at this. Sure, they will leave comments about common made errors (your editor should already warn about this before you even commit it) etc. But to notify about this weird thing…

Sure, AI code reviews aren't a replacement for an architecture review on a larger team project. But they're fantastic at spotting dumb mistakes or low-hanging fruit for improvements! And having the AI spot those for you first means you don't waste your team's valuable reviewing time on the simple stuff that you could have caught early.

those AI checks, if you insist in getting them, should be part of your pre-commit, not part of your PR review flow. they are at best (if they even reach this level) as good as a local run of a linter or static type checker If you are running them as a PR check, the PR is out there. So people will spend time on that PR. no matter if you are fixing the AI comments or not. Best to fix those things BEFORE you provide your code to the team.

[edit] Added part about wasting your teams time

Re: Get an AI code review in 10 seconds

#33

I still dont get the idea about AI code reviews. A code review (at least in my opinion) is for your peers to check if the changes will have a positive or negative effect on the overall code + architecture. I have yet to see an LLM being good at this. Sure, they will leave comments about common made errors (your editor should already warn about this before you even commit it) etc. But to notify about this weird thing…

[deleted]

Re: Get an AI code review in 10 seconds

#34
post #24

Earlier quoted context omitted.

Good thing I work on an old C++ code base where it's impossible for AI to go through the millions of lines that all interact horribly in unpredictable ways.

Funny you mention that, I have very recently just came back from a one-shot prompt which fixed a rather complex template instantiation issue in a relatively big very convoluted low-level codebase (lots of asm, SPDK / userspace nvme, unholy shuffling of data between numa domains into shared l3/l2 caches). That codebase maybe isn't in millions of lines of code but definitely is complex enough to need a month of onboard…

Template instantiation is relatively simple and can be resolved immediately. Trying to figure out how 4 different libraries interact with undefined behavior to boot is not going to be easy for AI for a while.

Re: Get an AI code review in 10 seconds

#35
post #31

Earlier quoted context omitted.

Sure, AI code reviews aren't a replacement for an architecture review on a larger team project. But they're fantastic at spotting dumb mistakes or low-hanging fruit for improvements! And having the AI spot those for you first means you don't waste your team's valuable reviewing time on the simple stuff that you could have caught early.

those AI checks, if you insist in getting them, should be part of your pre-commit, not part of your PR review flow. they are at best (if they even reach this level) as good as a local run of a linter or static type checker If you are running them as a PR check, the PR is out there. So people will spend time on that PR. no matter if you are fixing the AI comments or not. Best to fix those things BEFORE you provide you…

I completely agree.

Re: Get an AI code review in 10 seconds

#36
post #25
post #2

With not much more effort you can get a much better review by additionally concatenating the touched files and sending them as context along with the diff. It was the work of about five minutes to make the scaffolding of a very basic bot that does this, and then somewhat more time iterating on the prompt. By the way, I find it's seriously worth sucking up the extra ~four minutes of delay and going up to GPT-5 high ra…

Do you do any preprocessing of diffs to replace significant whitespace with some token that is easier to spot? In my experience, some LLMs cannot tell unchanged context from the actual changes. That's especially annoying with -U99999 diffs as a shortcut to provide full file context.

I've only ever had that problem when supplying a formatted diff alone. Once I moved to "provide the diff, and then also provide the entire contents of the file after the change", I've never had the problem. (I've also only seriously used GPT-5.0 high or more powerful models for this.)

Re: Get an AI code review in 10 seconds

#38
post #31

Earlier quoted context omitted.

Sure, AI code reviews aren't a replacement for an architecture review on a larger team project. But they're fantastic at spotting dumb mistakes or low-hanging fruit for improvements! And having the AI spot those for you first means you don't waste your team's valuable reviewing time on the simple stuff that you could have caught early.

those AI checks, if you insist in getting them, should be part of your pre-commit, not part of your PR review flow. they are at best (if they even reach this level) as good as a local run of a linter or static type checker If you are running them as a PR check, the PR is out there. So people will spend time on that PR. no matter if you are fixing the AI comments or not. Best to fix those things BEFORE you provide you…

We have AI code reviews enabled for some PR reviews and we discuss them from time to time on the PR to see if it’s worth doing it.

Re: Get an AI code review in 10 seconds

#39
post #31

Earlier quoted context omitted.

Sure, AI code reviews aren't a replacement for an architecture review on a larger team project. But they're fantastic at spotting dumb mistakes or low-hanging fruit for improvements! And having the AI spot those for you first means you don't waste your team's valuable reviewing time on the simple stuff that you could have caught early.

those AI checks, if you insist in getting them, should be part of your pre-commit, not part of your PR review flow. they are at best (if they even reach this level) as good as a local run of a linter or static type checker If you are running them as a PR check, the PR is out there. So people will spend time on that PR. no matter if you are fixing the AI comments or not. Best to fix those things BEFORE you provide you…

My team uses draft PRs and goes through a process, including AI review, before removing the draft status thereby triggering any remaining human review.

A PR is also a decent UI for getting the feedback but especially so for documenting/discussing the AI review suggestions with the team, just like human review.

AI review is also not equivalent to linter and static checks. It can suggest practices appropriate for the language and appropriate for your code base. Like a lot of my AI experiences it's pretty hit or miss and it's non-deterministic but it doesn't have much cost to disregard the misses and I appreciate the hits.

Re: Get an AI code review in 10 seconds

#40
post #31

Earlier quoted context omitted.

Sure, AI code reviews aren't a replacement for an architecture review on a larger team project. But they're fantastic at spotting dumb mistakes or low-hanging fruit for improvements! And having the AI spot those for you first means you don't waste your team's valuable reviewing time on the simple stuff that you could have caught early.

those AI checks, if you insist in getting them, should be part of your pre-commit, not part of your PR review flow. they are at best (if they even reach this level) as good as a local run of a linter or static type checker If you are running them as a PR check, the PR is out there. So people will spend time on that PR. no matter if you are fixing the AI comments or not. Best to fix those things BEFORE you provide you…

This just sounds like you haven’t worked in a team environment in the last 12 months.

The ergonomics of doing this in pre-commit make no sense.

Spin up a PR in GitHub and get Cursor and/or Claude to do a code review — it’s amazing.

It’ll often spot bugs (not only obvious ones), it’ll utilise your agent.md to spot mismatched coding style, missing documentation, it’ll check sentry to see if this part of the code touches a hotspot or a LOC that’s been throwing off errors … it’s an amazing first pass.

Once all the issues are resolved you can mark the PR as ready for review and get a human to look big picture.

It’s unquestionably a huge time saver for reviewers.

And having the AI and human review take place with the same UX (comments attached to lines of code, being able to chat to the AI to explain decisions, having the AI resolve the comment when satisfied) just makes sense and is an obvious time saver for the submitter.

Post reply on HN