You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One major contributor of code smell (in my opinion) is code that superfluously includes the type of the thing in its name. (e.g. List itemList, or CREATE TABLE itemTable instead of just items). This goes hand-in-hand with the "avoid context-duplication" rule too.
One edge-case to consider is date type variables- whereby you may have item.dateAdded, and simply removing the type from the name leaves you with item.added, which is very unclear (sounds more like a boolean flag set if the item has been added). My personal preference is to follow the form of At. So, dateAdded would be addedAt. This defies the A/HC/LC pattern somewhat however, so take it as you will.
The text was updated successfully, but these errors were encountered:
One major contributor of code smell (in my opinion) is code that superfluously includes the type of the thing in its name. (e.g.
List itemList
, orCREATE TABLE itemTable
instead of justitems
). This goes hand-in-hand with the "avoid context-duplication" rule too.One edge-case to consider is date type variables- whereby you may have
item.dateAdded
, and simply removing the type from the name leaves you withitem.added
, which is very unclear (sounds more like a boolean flag set if the item has been added). My personal preference is to follow the form of At. So,dateAdded
would beaddedAt
. This defies the A/HC/LC pattern somewhat however, so take it as you will.The text was updated successfully, but these errors were encountered: