They’ll come out at the wrong time and appear to the wrong people.
Tag Archives: clean code
Method names should resemble the domain.
It’s always best to use business words to describe what a method is doing.
Methods shouldn’t depend on prior method calls.
You want your code to be more loosely coupled, so it doesn’t break later.
Name booleans carefully.
Give them names that suggest a binary outcome.
Variable names should describe what, not how.
Leave the how to the implementation.
A variable should have one purpose.
Don’t overload variables into multiple meanings.
Don’t modify input parameters.
It will lead to unexpected results later.
Write shorter routines.
Studies have shown that longer and more complex routines are subject to error and more expensive to maintain.
A variable’s name should correlate to the size of its scope.
The larger the scope, the harder it is to fully understand.