What does clean code mean to you?
Here is another open-ended question. I like talking about this one a lot. To me, clean code is not the code that follows an architectural pattern coming from a book or article on the Internet, or any common approach people are following in general. To me, clean code is the code that aligns with the 4 elements of simple design: 1. Passes All Tests 2. Reveals Its Intention 3. Has No Behavioural Duplication 4. Has Fewer Elements 1 - The tests are the fastest way to get feedback from the system, whether it works according to the expectations or not. They would tell me exactly what's not working. So the tests play as a guarantee that the system works as intended. 2 - The code should communicate what it stands for, and what it does. Naming (although very hard) is key here. The code needs to be understandable by humans, as we are the ones writing and maintaining it. Computers don't care about readability at all. 3 - The duplication might occur in both physical and logical forms. It applies to structures or concepts related to the business. Two pieces of code may look the same but their nature is completely different, so it does not make sense to merge them. 4 - Partly related to the duplication, and mostly addresses code that is not necessary, but is added to align with another similar part of the code, or an architectural pattern. Think about the UseCase classes that have an `invoke()` function that only forwards a call. Curious about your opinions on clean code and what you consider clean code to be. Share them below