https://www.sandimetz.com/99bottles/ is all about that. It starts with a few different ways to solve the same problem and then goes into comparing them using chosen criteria.
And then it goes on to implement the solution using TDD. Very underappreciated book, imho.
There are often times when I could make the code simpler but it would be longer and vice versa and my decision about which one to pick is purely personal.