Michael Barany's avatar image.

My name is Michael Barany, Software Engineer

Anonymous profile image
  • Is it fair for my tech lead to not review my code unless I have unit tests?

    I_hate_writing_unit_tests. I didn't have to do them for my previous internship and it's just time consuming to do. My tech lead told our team that he will not do any code reviews from now on if our work doesn't have unit tests with them. Our whole team (of all ages) dread it and I'm wondering if this is really fair for him to have us dedicate time to doing this.

    Michael Barany's avatar image.

    I'm not a fan of companies that enforce strict TDD or "100% code coverage". That usually means they have tests for getters and setters as well...and what's the point of that? It sounds like there are no two ways about it at your company. Consider questioning your tech lead on the value of unit tests and ask if they are truly valuable for every line of code you write. When I am reviewing someone's code and theres changes to business logic or even a somewhat complicated method I will ask for tests to cover that. Unit tests are one of things that helps you before you ship out any bad code and while they may be annoying they will save you from making careless mistakes.