logoalt Hacker News

raddan • today at 10:57 AM • 0 replies • view on HN

Whether code review is inportant or not probably depends on whether the problem someone is solving is important or not. But when it is important, I think we should be putting the onus on the person who filed the PR instead of burning our own neurons trying to understand volumes of stuff. Tell me what you asked the AI to do. Why is that a good idea? Once I hear that answer (because many junior programmer ideas don’t even get past that point), let’s look at the code together. Tell me why you think the code you submitted does what you say. Did you look at the code? Did you write tests? Did you check for test coverage? Maybe you’re a little smarter than that. Did you think through pre- and post-conditions? Corner cases? Are certain undesirable behaviors impossible? How do you enforce that? Types? State machines?

Even before slop coding good code review was hard, because verification is a hard problem. But we have many tools at our disposal to increase confidence without having to go full-on mathematical proof. Human understanding has always been the bottleneck, and as long as the thing you are doing is for humans, humans will have good reasons to want to understand it, so they will remain the bottleneck. This is ok. It’s ok for humans to be the rate-limiter. But don’t go it alone and fry your own brain.