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
-43
u/Agilitis May 12 '23
I was proving the point that more code equals more ways to break something. If it is unnecessarily complex, you have more ways to break a simple code. If there is only one line of code, you only need to take care of that piece of code.
Also, I've seen many occasions where exactly this was the base for the errors that happened. Too bloated code, and someone changes parts of it.