4 ms·
Refactoring if statements for readability
- akoder 11y agoLets not limit it to if statements. Writing or refactoring existing code by using meaningful variable names can go a long way in increasing the readability of the code. I follow a simple rule to make my code easy to follow: 1.variable names should indicate what they will be containing 2.name the function with atleast one verb denoting what the function does. 3.file names indicate what code in it is trying to do. Small changes like this can help more than comments some times to understand and read code. Finally code is meant for humans to read. So be expressive!