no use of assert
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- documentation, testing
Research direction
Start by reading the related code-review issue #2 and the assertions-enabled failure in issue #23. Review the PhET Development Overview for existing assertion guidance, then identify where this simulation lacks appropriate assertions and document or address the agreed scope; done should include consistent assertion usage or a clear documentation update.
Written by the indexing model from the issue text.
Description
Related to #2 (code review):
- Assertions should be used appropriately and consistently. Type checking should not just be done in code comments. Use Array.isArray to type check an array.
This sim has zero uses of assert. Combined with #23 (sim fails with assertions enabled), I'm guessing there is lack of understanding about when and how to use assertions.
Assertions are an important tool that needs to be in every good programmer's toolbox. "Appropriately" generally mean to verify entry/exit conditions for methods, and verify programming assumptions and logic. It might be worth elaborating on this in PhET documentation, e.g. the PhET Development Overview.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phetsims/normal-modes
-
dev:typescript priority:5-deferred
Difficulty 5/5 Over a week Newbie friendliness 15/100
phetsims/normal-modes#92 ·
-
status:blocks-sim-publication
Difficulty 1/5 Under an hour Newbie friendliness 55/100
phetsims/normal-modes#90 ·
-
dev:code-review
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
phetsims/normal-modes#89 ·
-
priority:5-deferred type:bug type:multitouch
Difficulty 3/5 1-2 days Newbie friendliness 42/100
phetsims/normal-modes#87 · 1 comment ·
-
priority:5-deferred type:performance
Difficulty 3/5 1-2 days Newbie friendliness 42/100
phetsims/normal-modes#84 · 1 comment ·
All issues in phetsims/normal-modes
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Design only Leadership Survey SLFS
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bcgov/digital-journeys#2293 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tursodatabase/turso#9405 ·
Maintainers usually reply within 1 day
-
Toolkit
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
API Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
Maintainers usually reply within 1 day