better suggestion)
> A method or field occurs in the context of a class. A variable occurs in the context of a method. Take that context for granted and don’t repeat it. forgot who wrote it, but remember this whenever your're naming things
that depends on your preference and on the guidelines of the language
For example if there's a method named items the variable inside should be named counts or count. And when you're assigning, reaching for something outside it's context ItemsCount = class.items()
And another suggestion. Remove the words that start with capital letter and see if it still means numberOfItems numberItems number ItemsCount Items
Обсуждают сегодня