DEV Community

Discussion on: Writing code for your future self

Collapse
 
sebas86 profile image
Sebastian Śledź

Hmm. Keep in mind that you can do more readable code without sacrificing performance. In last example you can still use functions directly in logical condition instead executing them and store result in temporary variable and code will be perfectly readable without querying DB when other checks fail. ;)

Collapse
 
sunnysingh profile image
Sunny Singh

Yep, I definitely agree in cases where the optimized version is just as readable.