you used myJewels as the count of how many jewels... that is kind of fuzzy... when 10 other programmer read other programmers' code, when they see... myJewels... is it an array? Is it a string, or it is a number. Sure, you can imply it from the context, but sometimes when the code expand from 10 lines to 20 and to 30, it becomes difficult to track down.
I'd suggest using count or countJewels to exactly denote what it means. Otherwise Peter has a myJewels and is an array, Michael has a myJewels and it is a string... count has very little chance of confusion.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
you used
myJewels
as the count of how many jewels... that is kind of fuzzy... when 10 other programmer read other programmers' code, when they see...myJewels
... is it an array? Is it a string, or it is a number. Sure, you can imply it from the context, but sometimes when the code expand from 10 lines to 20 and to 30, it becomes difficult to track down.I'd suggest using
count
orcountJewels
to exactly denote what it means. Otherwise Peter has amyJewels
and is an array, Michael has amyJewels
and it is a string...count
has very little chance of confusion.