Call me a devil. I did something kind of mean.
Call me a devil. I did something kind of mean.
I had a code review (PR) up for review. One of the approvers wanted some additional unit testing. They were being kind and provided the solution.
Their solution used mocks--not inherently a bad thing. Without getting into too much technical details, it was not a good solution. The test didn't test anything because they mocked the function which contained the logic meant to be tested.
Here's were I became the devil. I checked it in. I wanted to see if anyone would notice.
No one noticed. The PR was approved.
Before we had automation and CI/CD delivery pipelines, I think code reviews had more value. And even then I question the cost benefit. Unless the approver, pulls the code, runs it, debugs it, does their own test.....they will not catch many mistakes. My scenario above proves that. These days, I think we are due some honest assessment of how much time is wasted on processes.
Rarely do any engineers have the time necessary to thoroughly evaluate a PR. The solution is more complex than I have room here. I think it starts with acknowledging we are wasting a lot of time through the countless re-iterations of getting a PR approved.
I'd love to hear your thoughts.
Comments
If you'd like to comment on this post, please reach out to me through the contact page .