r/badcode • u/sausage-x-donut • May 12 '23
java Code written by project lead. A comment was added by my team member that the entire method can be replaced with a single line: getErrorsList().contains(message). Project lead responded that we should focus on readability and performance and not on such code review comments.
796
Upvotes
View all comments
Show parent comment
5
u/Agilitis May 12 '23
With each response you give us you leave out important bits in our arguments to change it and because of that:
You are right. Mroe code is not inherently worse. More code when you could have done it in less lines of code WITHOUT hurting readability is bad. This argument has multiple point and all of them needs to be included in the argument to make sense.
If these are true then yes, the longer version is worse. Which is true for the example above, so this is a worse code than the shorter version.