News for hackers. Stuff that matters.
Re:Ask HN: Does "trust" eliminate the need for code reviews? by WirelessGigabit on Monday November 13, 2023 @09:46AM (#38250677)
Oof. Difficult one. I've dealt with multiple people and there are some I would blindly trust because I know they would do the right thing.

On the other hand I've worked with people who need more reminders (eventually we had to discontinue our relationship) to do the right thing:

Does the PR make sense?

Did you format the code?

Did the tests pass?

Did you fix the tests? Or did you just comment them out?

And for the people I trust, it's because they insanely high quality of code, consistently. And even for them, while I DO trust them, I prefer PRs.

4 eyes see more, and we have different mindsets.

Re:Ask HN: Does "trust" eliminate the need for code reviews? by dvfjsdhgfv on Monday November 13, 2023 @10:52AM (#38251568)
Well, at least these three:

> Did you format the code?

> Did the tests pass?

> Did you fix the tests? Or did you just comment them out?

should be obvious from the MR/PR page

Re:Ask HN: Does "trust" eliminate the need for code reviews? by WirelessGigabit on Monday November 13, 2023 @11:41AM (#38252150)
Absolutely. But we've had developers who, even with extensive coaching, eventually ended up proposing PRs with the issues above.

Equally, we had reviewers, who, with extensive coaching, (and I see this a lot with contractor teams), allow PRs like this.

I work at a company where I have to speak up. It is ingrained in the way we work.

However, with contractor teams that way of working does not always translate well. They don't necessarily 'dare' to speak up on PRs of their own colleagues.

It's a weird dynamic.

Re:Ask HN: Does "trust" eliminate the need for code reviews? by pailhead on Sunday November 19, 2023 @07:55PM (#38340656)
Did you format the code? Is this really a thing in 2023?
Re:Ask HN: Does "trust" eliminate the need for code reviews? by WirelessGigabit on Monday November 20, 2023 @09:33PM (#38358242)
In the case you're serious: yes, we've had issues with developers changing code inside of GitHub and then committing, which obviously increases nose in future diffs that are done with a formatter installed. We fixed this by enforcing a formatter at the CI level.

In the case you're wondering if formatting code is important: it's a hill I'm willing to die on. It costs nothing but it removes an insane amount of discussion and noise when doing reviews.