3 ms·
Please note that what is hard to read is not the same for everyone. Some people find it easier to read complex expressions (with nested && and ||), while others
by fjfaase 6y ago
Please note that what is hard to read is not the same for everyone. Some people find it easier to read complex expressions (with nested && and ||), while others find it easier to read when temporary variables/functions are used with explicative names. Having to look up a function/property with a simple expression is also breaking the flow of reading code. If there were simple rules to what makes code easy to read, than we would have a lot of better looking code. Especially, if you are working in a team, you have to adapt to some common ground, even if that is not what you prefer yourself. I also think that this is what defines a good software engineer: not someone who writes smart code, but someone who writes code that is readable to most people in the team.