-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code review #201
Comments
Warnings during build:
|
Skipping this since already published. |
These files are missing:
|
I noticed there are many new files and types related to accessibility. This means it may not be an exemplar for starting with a simple simulation for instrumentation with @jbphet. On the other hand, it would be nice to understand how accessibility and phet-io can coexist. |
On hold while discussing #204 (comment) |
@jessegreenberg said he'll spend a bit more time tidying things up. When it's ready, he'll assign this to me for review. |
These issues were addressed in other issues in this repo. |
@samreid I believe this issue can be closed. balloons-and-static-electricity was instrumented for PhET-iO, went through QA, and was published since this issue was opened. Before an accessible version of BASE is published, it would be great to review the new features and investigate how they integrate with phet-io, but there is still work to be done then and I feel that a new review would be necessary at that time. Closing issue, but if you disagree, please feel free to reopen and assign back to me! |
Sounds good, thanks! |
@jbphet and I will likely start instrumenting this simulation on Tuesday. One of the preparatory steps is to perform a code review and bring it up to standards.
NOTE! Prior to doing a code review, copy this checklist to a GitHub issue for the repository being reviewed.
PhET code-review checklist
Build and Run Checks
Internationalization
generally match the values, such as
{binaryProbability: "Binary Probability"}
. Screen names should usescreen.screenName
instead ofcamelcase. Message patterns and long paragraphs will also use a different pattern.
Repository structure
Are all required files and directories present?
For a common-code repository, the structure is similar, but some of the files and directories may not be present if the repo doesn’t have audio, images, strings, or a demo application.
Is the js/ directory properly structured?
1:1 correspondence between asset and resource files; for example, several images may be in the same .ai file.
grunt published-README
orgrunt unpublished-README
?Coding conventions
Documentation
Common Errors
Math.round
used wheredot.Util.roundSymmetric
should be used? Math.round does not treat positive and negative numbers symmetrically, see fix nearest-neighbor rounding in Util.toFixed dot#35 (comment)toFixed
used wheredot.Util.toFixed
ordot.Util.toFixedNumber
should be used? JavaScript'stoFixed
is notoriously buggy, behavior differs depending on browser, because the spec doesn't specify whether to round or floor.phet.joist.random
, and all doing so after modules are declared (non-statically)? Forinstance, the following methods (and perhaps others) should not be used:
Math.random
_.shuffle
_.sample
_.random
new Random()
Organization, Readability, Maintainability
Does changing the values of these constants break the sim? For example, see allow minimum rows to go to "1" and address dependency on current minimum of "5" plinko-probability#84.
Performance, Usability
dt
capped appropriately? Try switching applications or browser tabs, then switch back. Did the model take one big/long/awkward step forward? If so,dt
may need to be capped. Example fromfaradays-law.FaradaysLawModel
:Memory Leaks
Property.link
is accompanied byProperty.unlink
.PropertySet.link
is accompanied byPropertySet.unlink
.DerivedProperty
is accompanied bydispose
.Multilink
is accompanied bydispose
.Events.on
is accompanied byEvents.off
.Emitter.addListener
is accompanied byEmitter.removeListener
.Node.on
is accompanied byNode.off
tandem.addInstance
is accompanied bytandem.removeInstance
.dispose
function have one? This should expose a publicdispose
function that callsthis.disposeMyType()
, wheredisposeMyType
is a private function declared in the constructor.MyType
should exactlymatch the filename.
PhET-iO
(https://github.com/phetsims/phet-io/blob/master/doc/how-to-instrument-a-phet-simulation-for-phet-io.md)
for the PhET-iO development process.
The text was updated successfully, but these errors were encountered: