3 ms·
This is why every developer should read Code Complete - it contains a myriad of tips learnt through many years of hard work. Suffice to say that it contains su
by radicalbyte 13y ago
This is why every developer should read Code Complete - it contains a myriad of tips learnt through many years of hard work.
Suffice to say that it contains such tips as avoiding negation in conditionals.
In the end it boils down to strategic optimization towards readability with the least mental overhead (the cycles you spend parsing, the more you can spend thinking).
- Roboprog 13y agoAs weird as it sounds, "or" ends up being kind of evil, and something to avoid, as well. Mix it with "and", and the result likely doesn't say what your tired brain thought it did. Also, how many "or" statements have you seen that should really be set membership tests? (it helps to have a language that makes it easy to make a literal of a set)