logoalt Hacker News

flutasyesterday at 9:51 PM2 repliesview on HN

Hmm, in every team I've been in (only 3 tbf) we almost all followed the "nit" approach for PRs.

    nit: this could be changed to XYZ
vs

    we should use XYZ here
where it was understood nits could be ignored if you didn't feel it was an urgent thing vs a preference.

Replies

zoogenyyesterday at 10:26 PM

It's worth noting that this is a kind of different "nit" than something that might be attached to a line of code. Like, someone might "nit" using a bunch of if statements where a switch statement might work, or if someone uses a `for each` where a `thing.map` would do.

What I am describing would be something higher level, more like a comment on approach, or an observation that there is some high-level redundancy or opportunity for refactor. Something like "in an ideal world we would offload some of this to an external cache server instead of an in-memory store but this is better than hitting the DB on every request".

That kind of observation may come up in top-level comment on a code review, but it might also come up in a tech review long before a line of code has been written. It is about extending that attitude to all aspects of dev.

show 1 reply
YZFtoday at 5:18 AM

But then you end up with nit inflation, people feel like they need to fix the nits, and do, and there's no meaning to nit any more. I try to just not comment unless I feel there is some learning from the nit.