Lack of Explanatory Variables

Long or complicated calculations/equations should be broken down into smaller steps using explanatory variables.

if(headerPattern.matcher(line).find())
...

vs

Matcher match = headerPattern.matcher(line);
if(match.find())
...

the latter is more legible than the former.



bj 2019-09-22