phetsims / energy-forms-and-changes

"Energy Forms And Changes" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
5 stars 5 forks source link

code review #247

Closed chrisklus closed 1 year ago

chrisklus commented 5 years ago

As per discussion between @ariel-phet, @jbphet, and @chrisklus on 07/29/19, the formal code review is just for EFACIntroModel.js, EFACIntroScreenView.js, SystemsModel.js, and SystemsScreenView.js. These files are all-together ~2500 LOC, which is around 1/5 of the sim. This sim is on-deck for phet-io instrumentation.

@pixelzoom, please see the few items marked with 'UPDATE' in my self review (#243) so you know which checklist items are in progress.

Please mark failed items with

Build and Run Checks

Memory Leaks

Performance

Usability

Internationalization

Repository Structure

Coding Conventions

Type Expressions

Visibility Annotations

Because JavaScript lacks visibility modifiers (public, protected, private), PhET uses JSdoc visibility annotations to document the intent of the programmer, and define the public API. Visibility annotations are required for anything that JavaScript makes public. Information about these annotations can be found here. (Note that other documentation systems like the Google Closure Compiler use slightly different syntax in some cases. Where there are differences, JSDoc is authoritative. For example, use Array.<Object> or Object[] instead of Array<Object>). PhET guidelines for visibility annotations are as follows:

Math Libraries

IE11

Organization, Readability, and Maintainability

Accessibility

N/A - no accessibility

PhET-iO

NA - no PhET-iO

pixelzoom commented 5 years ago

79 inline "//REVIEW" comments were added in the above commit.

chrisklus commented 5 years ago

79 inline "//REVIEW" comments were added in the above commit.

Sorry you had to add all those "needs annotation" comments throughout the sim... you saw that this review was supposed to be based around just four files, right? I would've addressed those in my self review otherwise.

pixelzoom commented 5 years ago

Oh no... I didn't see that this was just 4 files. I did a complete review.

pixelzoom commented 5 years ago

So why is this a "formal review" if I'm only doing 4 files? Sounds like a spot-check to me. And I was never involved in any discussion where this didn't sound like a full code review. But my bad for jumping right in without reading the top comment.

chrisklus commented 5 years ago

So why is this a "formal review" if I'm only doing 4 files? Sounds like a spot-check to me.

Only because all of this is motivated by starting phet-io instrumentation (which we were hoping to start pretty soon), and we knew a pile of work would come up if the whole sim got reviewed. Perhaps that is for the best long-term, though.

And I was never involved in any discussion where this didn't sound like a full code review. But my bad for jumping right in without reading the top comment.

My bad for not telling you separately beforehand too.

pixelzoom commented 5 years ago

Yeah, I think it's probably for the best.

I've completed the review. Summary....

Generally important:

Important for PhET-iO:

chrisklus commented 5 years ago

@pixelzoom thanks for putting in all the time and effort. And sorry that you were probably swearing at me for doing a terrible self review that whole time... I'll communicate better in the future.

chrisklus commented 1 year ago

I don't see any references to this issue in code, looks like everything is being tracked in side issues. Closing.