DEV Community

Discussion on: Worst thing I ever named anything

Collapse
 
pierreturnbull profile image
Pierre Turnbull • Edited

I like using a parent-child naming, especially in SASS. However when lots of elements are nested it can give some names that are actually not understandable at all at first glance, such as getGameDetailsRankingRowFieldNumberClasses.
It means : "A function that returns the classes of the div corresponding to the field 'number' in a 'row' of a list called 'ranking', which is located in the page 'gameDetails'."
Hence I try renaming things with short, easy names when possible. It's a little sacrifice but, when done properly, it is much useful!