Inspiration
An incorrect final number tells a beginner that something went wrong, but rarely shows where their mental model diverged from execution. LoopLens makes a small loop visible one iteration at a time and compares two explanations using concrete values.
What it does
Users choose a boundary, direction, or step-size challenge, or configure their own integer loop. They predict a total, reveal the trace, inspect accumulator changes, and compare an alternative. A downloadable Markdown receipt contains the exact configurations, prediction, first differing row, and both trace previews. Browser-local persistence keeps custom experiments without an account.
How we built it
React manages the interaction while a pure TypeScript simulator produces immutable rows. A separate comparison function detects changed values or one version stopping earlier. Validation rejects unsupported values. A fixed 200-iteration bound prevents a wrong-direction or zero-step loop from hanging the page. Incomplete output is labelled partial, and matching partial prefixes never establish full equivalence.
Challenges
The most important technical problem was staying honest about incomplete evidence. LoopLens never reports a partial total as final, and it does not claim matching bounded prefixes prove equivalence.
Accomplishments
The complete predict → step → compare → export workflow turns a debugging result into an inspectable explanation. Every visible control was verified on desktop and mobile, including downloads, persistence, invalid inputs, and zero-iteration loops.
What's next
Additional loop shapes and teacher-authored challenge packs could expand the practice library without changing the deterministic, local-first model.
AI assistance
OpenAI Codex assisted ideation, interface design, implementation, tests, documentation, and demo preparation. LoopLens does not use AI at runtime.
Team, timing, and access
Rushil Agrawal — solo entrant. LoopLens was originally built for Next Byte Hacks: V4, with development beginning September 13, 2026. This is the same disclosed project entered in additional events, not a claim of a separate new build for each event.
Target users are beginner programmers practicing loop boundaries, direction, and accumulation, and teachers demonstrating these concepts. No measured learning improvement or classroom adoption is claimed.
Live app: https://rushtanu14.github.io/looplens/ Public source and setup instructions: https://github.com/rushtanu14/looplens Demo: https://youtu.be/P0cr0Nc_UkM
Built With
- css
- openai-codex
- playwright
- react
- svg
- typescript
- vite
- vitest
Log in or sign up for Devpost to join the conversation.