This is very tricky to explain because simple does not mean the same thing to everyone.
Example. Some devs think that
?: is simple but others think an
if statement is better. When its down to this level, you cannot please everyone.
In general, simple means without complexity. In order to understand simplicity, we need to understand complexity.
There are two types of complexity:
Essential complexity refers to a situation where all reasonable
solutions to a problem must be complicated (and possibly confusing)
because the "simple" solutions would not adequately solve the problem.
Accidental complexity is complexity that arises in computer programs
or their development process (computer programming) which is
non-essential to the problem to be solved.
You can check essential complexity with the following questions:
Is this solution simple? Can I explain it to my peer in a span of a couple of minutes and they get it? Is there a simpler solution to the problem? If yes, are there any trade-offs between the complicated solution versus the simple one? Can we live with those trade-offs? For example, many programmers make a mistake of micro optimizing everything and their solution (and the code as well) becomes overly complicated.
Checking your accidental complexity:
Is the code simple? If I come back to it in three months, how long will it take for me to build the context in my brain so I can make the change I need to make? Is everything in my source code has a clear purpose and it conveys that purpose effectively to me and other developers? How hard is it to test my code? Usually the more complicated your code is, the harder it is to unit test, so I usually use this as a measure of complexity. You usually want small, well named and focused classes and methods. Design patterns usually help you achieve these as well.
If you find yourself wanting to use a design pattern just because you just read about it, it is probably going to introduce accidental complexity. If you find yourself wanting to put something in because you think 'its smart' it will probably introduce accidental complexity.
I hope this helps and do not forget: Simple does not mean EASY.