Complex Condition Code Review
Complex If Condition Detected - Or Avoid negative condition [Dangarous]
- Use var to make the code more readable.
- Business codes require more readability than performance.
- Don't use negative condition.
- Rather using
IsNotBlocked
use must
IsBlocked
and then use a function where it returns
IsActive () -> !IsBlocked
- DON'T over complicate codes!
- Don't negate a negative condition
Images
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Don't negate a negative condition
Bad ❌
Good ✔✅ : Always be positive
An Example
FROM : Bad ❌
TO : Good ✔✅ - Always be positive
Refernece (Condition)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →