All snippets in “General”
These are a collection of tips and tricks you can use to improve the performance and readability of your code.
Redundant comparisons to true or false
If an expression returns a Boolean value, we don’t also need to compare that result to true or false.Read full article
Extracting complex logic to named functions
Putting complex logic into a function increases code readability. By giving that function a descriptive name, it can explain what is happening in it.Read full article
Descriptive variables instead of complex conditions
When chaining conditions together, putting them into named variables makes code more readable.Read full article