@glyph I like point 2.
> Second — and this is actually its more important purpose — code review is a tool for acculturation.
And your points about automatic checks being the primary filters on code properties are well taken and worth repeating.
Code review is a social process, and you should treat it as such.
This is why we also like to include a "distant voice" in code review, someone within the big org who is less intimately familiar with the code/code base, just to notice things the local folk have perhaps become blind to, and to socialize more broadly coding practices and organizational affordances. (Also catches integration bugs and interface confusion early, which is a plus.)
@glyph To check the "I use AI" box at work, I've started using Copilot to "review" the code.
I kick it off at the very end: either before approving the PR when I'm a reviewer, or before requesting a review for a peer.
The goal is to keep my reviewing skills sharp by making sure that I find all the issues and the Copilot run is clean.
Is it useful? I'm not sure. I definitely think AI reviews don't worth burning the planet.
Copilot is very good at correcting natural English. This is neat, but should be easily caught by human.
Copilot might be a mix of static code analysis tools mixed together with LLMs (is it what agents are basically are), because it found some inconsistencies.
I would rather configure dedicated tools to do this and use them as I'm writing the code.
@pervognsen
Why not both?
Deterministic for the single variable testing, e.g. make sure specific code paths are executed and covered.
Then you can use fuzzing as a type of pair wise testing, that is, making sure to cover combinations of paths that might not be expected through normal deterministic testing.
@glyph The second half is exactly why I dismiss any library where author claims tests to be written by an LLM.
That’s not what tests are for. No, you cannot version prompts and expect not even the same but equivalent output all the time.
@glyph
but also, I think you're missing one or two more purposes of code review (or you've implicitly folded it into the other three):
1. Ensuring the code is readable.
Source code is a way to communicate with other humans. So it's important that people other than the author understand it. If the code is too complex, difficult to follow, or relies on assumptions that are not commonly known, code review will catch that.
2. Making others aware of the changes.
I think it's hard for people in commercial software to experience what it's like to actually solve a problem rather than to plug a gap.
It takes far longer up front but then you get to close that problem and hardly EVER think about it again.
Identifying useful things that can be done correctly and being able to get it done in a large collaborative environment only comes with experience. Chatbots aren't gonna do that.
I think de googling/de MSFTing in the next year or so makes sense just if you want to have functioning software, the guys running these shops no longer have any idea how fucking hard and contingent it is to run something like Google.
Skilled people need to come up with ingenious shit on a daily basis to keep big services like that running and legal.
One of these days a major Google service is gonna break and they're not gonna know how to bring it up.
@matt @glyph
Mostly, the human attention span means that features do need to be split up into <400-line pieces; that's one of the key skills in software engineering
Reviewing in multiple sessions with breaks doesn't help - if the review can be split up into pieces, then so can the implementation; if it's legitimately one piece that can't be split up, then the review can't be split up either
I don't know if there are features that can't be split up into smaller pieces; if there are, we can't engineer them
Computers and computer systems are build up from deterministic, comprehensible, building blocks. Their operations and behaviors can be understood and reasoned about. I relate my personal beliefs and mindset on this point, and explore some manifestations and ramifications of this philosophy.
@glyph That piece is an epistemological argument in the same way that yours is, which I feel would not be compelling to people who haven't developed priors that justify a want of understanding. Indeed, that piece acnkowledges that and implies (and almost explicitly says) that understanding as the end goal is counterproductive.
Which is not to say that the joy of understanding isn't a valid one (I care about it a lot), it's just that if that doesn't motivate people, I don't think your point holds up.
"Everything is interesting if you go into it deeply enough."
I try to imagine that computing is to many folks as taxes and regulation are to me. But then I realize that I think that these topics are interesting, if approached in the right context, and I've lost my ability to empathize again...
@sirosen
There is, at least, a reasonably immediate and consequential impact to ignoring legal obligations. The long-term impact of not understanding a computing technology sufficiently is… rarely concretely explained, and the accountability aspect is rarely directly felt by the people who err.
And there's those that are happy to ride the lightning, because there's no stopping it. Might as well be on the capitalizing team.
@glyph @benjamineskola Part snark, part honest question:
Does it really matter what the code looks like or how it’s organized when machines are the ones reading and writing the code?
@ramsey @glyph @benjamineskola
if we had AGI it wouldn't matter, but we don't, and LLMs are a dead end towards that goal.
A lot of pro-LLM arguments hinge on what I tend to call "weaponized science fiction", a dangerous trap to fall into.
@glyph under appreciated empirical review of code review on software quality: https://rebels.cs.uwaterloo.ca/papers/emse2016_mcintosh.pdf
i don't think this often gets talked about in systems that use Gen AI! Humans are pretty ineffectual at preventing errors through code review. What effect exists seems to disappear, as you point out, after reading so much code in a short time frame.
We're _accountable_ for the output of these systems! Code change is expensive because we're supposed to be protecting the liability of the company from shipping code changes that harm businesses, lose money, etc.
Code review, I agree, is a social process. If you like Peter Naur's theory building stuff... it's a great way to build collective understanding of the theories.
Thanks for sharing!