3

So while reviewing a pull request a see that a co-worker named a variable "em" which stands for employee manager. So I asked him to rename it from "em" to "employeeManager" but he replies - Thats how all variables referencing that class are named in the rest of the app so he is being consistent with the app. What do you think should be done? Do I approve his PR?

Comments
  • 3
    Why not tell him to change all the other variables too? It will make the overall code more readable.
  • 3
    If it's the convention elsewhere in the codebase fair enough, but that * really * shouldn't be the convention.
  • 1
    I agree with @Fiftyseven that it's a terrible convention that should be abolished, but it's not this poor guys fault that the project has that convention... However, if that's always the attitude so it will never get fixed which is why I'd create a ticket to rename all instances of it
  • 0
    What my reply to him was - If it was done in the bad way before, that doesn't mean you have to continue the bad way now. It might take sometime to refactor the full app but what I told the team was to rename the variables whenever they come across such bad variable names.
Add Comment