If there's one thing I like.. it's code readability, consistency and acronyms and grammar. A convention I (possibly) came up with for naming functions makes this often brain-bending task fairly painless.
V.A.N. - Verb, Adjective, Noun
Eg:
getAngryBirds()
findLostTreasure()
removeUnwantedHair()
slayEvilDragon()
playKillerSolo()
patFriendlyDog()
decryptGovernmentDatabase()
killWhiteWalker()
In cases where an adjective is not applicable.. I fall back to Verb, Noun.
Eg:
getBirds()
findTreasure()
removeHair()
slayDragon()
playSolo()
patDog()
decryptDatabase()
killWalker()
Pluralisation should also be used to appropriately reflect the entity being used.
Enjoy nameNextFunction()
Top comments (0)