phetsims / projectile-data-lab

"Projectile Data Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

Avoid non-standard abbreviations #220

Closed pixelzoom closed 5 months ago

pixelzoom commented 5 months ago

For code review #32 ...

From the PhET coding conventions:

  • [ ] Names (types, variables, properties, Properties, functions,...) should be sufficiently descriptive and specific, and should avoid non-standard abbreviations. For example: ...

There are dozens of occurrences of the t abbreviation, like:

      derive: t => t.launcherProperty,

Sometimes t is a launcher, sometimes t is a field. All of these occur in the context of a relatively unusual use of DynamicProperty, and t doesn't make understanding that any easier.

pixelzoom commented 5 months ago

In https://github.com/phetsims/projectile-data-lab/commit/f269a55ec25131b4c17760a63c054b5720980104, I replaced t with field or launcher, as appropriate.

I searched for 'const ', 'let ', and ' => ', and skimmed the results. I don't see any other abbreviations.

Over to @samreid or @matthew-blackman to review, close if OK.

samreid commented 5 months ago

Excellent, thanks for correcting this. Closing.