Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

no use of assert

Open
#24 3 comments 0 reactions 0 assignees View on GitHub

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

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

dev:code-review

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phetsims/normal-modes

All issues in phetsims/normal-modes

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.