TL;DR how do you deal with people who deliver bad code on regular basis, ignore code style, standards (DRY, etc.) and do not improve over time?
I am an a small startup and I have been tasked with reviewing code submitted by other programmers and enforce "better" code and consistent style. Since it's not the first time I had to do this. I decided to refrain from mistakes I made in previous team I have worked in.
The previous team had around 12 people at that time and I have encountered 3 types of people there:
- people who embrace it, try to improve and help you improve the style and help others
- people who write code the way they want and then try to refactor it with their editor (this of course does not work most of the time)
- and people who just don't give a ****, ignore everything, complain and thus delay the release cycle because they just can't be bothered - their explanation is - "why do you care, it works"
Just few days ago, I had to review an important feature that was supposed to be ready for the next day during a presentation - it was supposed to be delivered 5 days prior. This was delivered from a person, that belongs to the third category.
The code delivered, was not only very far from code style, but was just blatantly bad. After a full day of dozens of PR's that werent up to par, mostly because more than half of comments were ignored - I had to, against my better judgement, after being pressured by the management merge the code to master and push it to test. The result was even worse than I anticipated and mostly did not work (I am not going to go into details), thus the presentation was canceled.
Stuff like this pisses me off to no end, most of all the blatant refusal of any kind of self improvement...
So the question is - how do you deal with people who deliver bad code on regular basis, ignore code style, standards and do not improve over time?