phetsims / mean-share-and-balance

"Mean: Share and Balance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 1 forks source link

Code Review #270

Closed marlitas closed 3 months ago

marlitas commented 3 months ago

PhET Code-Review Checklist (a.k.a "CRC")

Table of Contents

Specific Instructions

Provide specific instructions here. For example: known problems that will fail CRC items, files that can be skipped, code that is not completed, shared or common code that also needs to be reviewed,... If there are no specific instructions, then delete this section.

GitHub Issues

The following standard GitHub issues should exist. If these issues are missing, or have not been completed, pause code review until the issues have been created and addressed by the responsible dev.

Build and Run Checks

If any of these items fail, pause code review.

Memory Leaks

Performance

Usability

Internationalization

Repository Structure

Coding Conventions

TypeScript Conventions

Math Libraries

IE11

Organization, Readability, and Maintainability

class MyClass {
  public constructor( tickMarksVisibleProperty: Property<boolean>,
                      model: Pick<IntroModel, 'changeWaterLevel'>, // <-- Note the call site can pass the whole model, but we declare we will only use this part of it
                      waterCup: WaterCup, modelViewTransform: ModelViewTransform2,
                      providedOptions?: WaterCup3DNodeOptions ) {}
}
cd {{repo}}/js ; wc -l `find . -name "*.ts" -print` | sort

Accessibility

This section may be omitted if the sim has not been instrumented with accessibility features. Accessibility includes various features, not all are always include. Ignore sections that do not apply.

General

Alternative Input

PhET-iO

This section may be omitted if the sim has not been instrumented for PhET-iO, but is likely good to glance at no matter.

jessegreenberg commented 3 months ago

Results from PhET brand memory testing. non-built with ?fuzz, snapshot every minute, garbage collection forced between 11 and 12.

image

jessegreenberg commented 3 months ago

Build directory is 73.4 MB. That is similar to a recent build of greenhouse-effect (73.7 MB). This includes phet and phet-io.

The _all_phet_debug file is 30.9 MB, compared to the one in greenhouse-effect which is 30.4 MB.

I think this is reasonable, but noted that an _all sim from ~10 years ago was <1 MB.

jessegreenberg commented 3 months ago

Code review is complete. The sim is in great shape, nice work @marlitas! It was easy to review because things were easy to read and understand and PhET patterns were followed. Issues are mostly stylistic things or documentation recommendations.

A couple of additional notes:

I did not review this part. I am not familiar with this guide and it is quite long. I can read it as part of ramping up my own experience with PhET-iO but that seems out of scope without a discussion. Let me know if I should do that or if you would like another developer to review this part. I did go through other PhET-iO checklist items in the CRC. Code related to PhET-iO was clear.

Assigning back to @marlitas.

marlitas commented 3 months ago

Thank you so much for the incredible code review @jessegreenberg! This was incredibly helpful. I think the phet-io instrumentation has been reviewed by various developers at this point and I feel relatively confident that conventions were followed. That has also gotten cleaned up with designer input as well.

I believe this issue can now be closed!