Patterns in variable names can make code easier to read
Felienne Hermans talks in this video about linguistic code smells. They can occur in method or variable names. There are 2 types:
- Content code smells - With content code smells, the meaning of the method can be misinterpreted.
- Shape code smells - With shape code smells, the order of the name parts are everytime different and therefore, less understandable.
She suggests to agree with molds. So, for example quantifiers first, if a method name start with 'is' it should return a boolean (true/false). It increases the probability that 2 programmers select the same variable name.
Just take a look. Short video with nice information.
Felienne Hermans is an Associate Professor at Leiden University