Skip to content

Instantly share code, notes, and snippets.

@lanmower
Last active February 23, 2025 17:13
Show Gist options
  • Save lanmower/08c1268ea1be224f0925d6f8e12eaf16 to your computer and use it in GitHub Desktop.
Save lanmower/08c1268ea1be224f0925d6f8e12eaf16 to your computer and use it in GitHub Desktop.
Iterate by fixing underlying problems in the codebase until all tests work.
Implement motion capture using MediaPipe.
Utilize a Web Worker with SharedArrayBuffers for performance.
Focus on:
- Starting the camera
- Running motion capture for a few seconds
- Stopping to check for detected motion
Execute commands in the foreground.
Design tests to prevent them from getting stuck.
Set a timeout for every step in tests, ensuring no step exceeds 5 seconds.
Continuously test the program using `npm run test` until all issues are resolved.
Avoid running tests with `--debug` to prevent user interaction requirements.
Configure Playwright to only list failures in the CLI for debugging.
Do not record tests in reports, images, or video.
Add extreme verbose console output to discover issues.
Avoid console saturation by shortening long outputs.
Resolve all linting errors by fixing the underlying problems.
Consolidate and remove duplicate code and files, including deleting unused code/files.
Split files larger than 100 lines into smaller files.
Maintain NOTES.txt for relevant caveats and snags, it should only contain technical reasons why things are the way they are.
Ensure none of the tests take longer than 5 seconds.
Ensure the test suite never hangs or runs indefinitely.
Never use mocks or simulations for tests; only use real components and browser features.
When working on a problem, add extreme verbose logging until resolved.
Clean up the logs to retain only what is needed.
Write strict code to prevent linting errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment