{"id":26567886,"url":"https://github.com/lixoten/js-practice-2","last_synced_at":"2026-04-29T20:10:11.968Z","repository":{"id":239857067,"uuid":"799660971","full_name":"lixoten/JS-Practice-2","owner":"lixoten","description":"A way to practice JS code problems. Enjoy, let me know what you think. STAR my repo.. If i see any interest, I will keep repo update mored often","archived":false,"fork":false,"pushed_at":"2024-05-16T01:10:09.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T19:37:12.813Z","etag":null,"topics":["code-practice","code-problem","codemirror","codemirror-editor","hyperskill","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lixoten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-12T19:43:16.000Z","updated_at":"2024-05-16T01:10:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"16c79bc3-f58f-4451-837a-77aee455a692","html_url":"https://github.com/lixoten/JS-Practice-2","commit_stats":null,"previous_names":["lixoten/js-practice-2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lixoten/JS-Practice-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixoten%2FJS-Practice-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixoten%2FJS-Practice-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixoten%2FJS-Practice-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixoten%2FJS-Practice-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lixoten","download_url":"https://codeload.github.com/lixoten/JS-Practice-2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixoten%2FJS-Practice-2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-practice","code-problem","codemirror","codemirror-editor","hyperskill","javascript"],"created_at":"2025-03-22T19:29:10.398Z","updated_at":"2026-04-29T20:10:11.912Z","avatar_url":"https://github.com/lixoten.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JS Practice Coding Challenge Platform\n\nFYI... am new to JavaScript... am new to coding period. I started learning Feb 2024. Haft the time I am lost.\nThis is a **personal project** after I completed a Frontend track(course) on Hyperskill. A way to practice.\nInspired by Hyperskill way of presenting problems for students to answer.\n\n## Overview\nThis project is a coding challenge platform designed to help users practice and improve their coding skills. It allows users to solve problems, check their solutions, and learn from hints or solutions provided.\n\n[js-practice.webm](https://github.com/lixoten/JS-Practice-2/assets/52259786/089c46e8-b717-4bff-a73c-bf0f56bf7afa)\n\n\n\n## Features\n- **Problem Set Management**: Users can load different sets of problems to solve\n  --- **\u003cspan style=\"color:red;\"\u003eAm still working on this\u003c/span\u003e**.\n- **Code Editor**: An integrated code editor using CodeMirror for writing and editing code.\n  --- **\u003cspan style=\"color:red;\"\u003eneed to upgrage to codemirror 6\u003c/span\u003e**.\n- **Solution Checking**: Users can check their solutions against expected solutions on Submit/Check.\n- **Hint System**: Provides hints to help users solve problems, on user request.\n- **Score Reward/Penalty History** Display a history of applied points, be it + points awarded or - points for penalties.\n- **Solution Display**: Shows the correct solution on user request.\n- **Scoring System**: Keeps track of the user's score based on correct and incorrect answers and penalties if solution or hints are used. Or if a problem is skipped\n- **Copy to Clipboard**: Users can copy the solution to their clipboard for easy access.\n\n### Problem Files\n- **JSON Format**: Problems are stored in JSON files, allowing for easy management and expansion of the problem set.\n- **Dynamic Loading**: The application dynamically loads problems from JSON files, providing a flexible way to introduce new problems.\n\n### User Interaction\n- **Code Editor**: A CodeMirror-based editor allows users to write and run JavaScript code to solve problem.\n- **Problem Display**: Problems are displayed with instructions and hints, guiding users through the solution process.\n- **Solution Viewing**: Users can view the correct solution on request. 10 points penalty\n- **Hint Viewing**: Users can view hints. Each hint view incurs 1 point penalty\n- **Scoring System**: A scoring system rewards correct answers and penalizes incorrect attempts or viewing solutions prematurely.\n\n### Gamification\n- **Scoring**: Users earn points for correct answers and lose points for incorrect attempts or viewing solutions.\n- **Game Stats**: for tracking how many problems have been solved, how many left to go, how many wrong and so on..\n- **Penalties**: Viewing solutions, hints incurs a penalty, Skipping problems are incur penelty. Encouraging users to solve problems independently.\n- **Progress Tracking**: The application tracks user progress, displaying scores and penalties to motivate continuous learning.\n\n### Technical Implementation\n#### Modularity and Class Usage\n- **Classes**: The application uses classes (Scoring and MessageHandler) to encapsulate functionality related to scoring and message handling, promoting modularity and reusability.\n- **Modules**: JavaScript modules (main.js, scoring.js, messageHandler.js, etc.) are used to organize code, facilitating easier maintenance and understanding.\n\n### JSON Data Handling\n- **Loading Problems**: The loadAndPresentProblems function fetches problems from JSON files, dynamically updating the UI with new problems.\n- **Problem Structure**: Each problem includes instructions, a hint, the problem statement, arguments, and the expected solution, structured in a JSON object.\n\n\n## Getting Started\n\n### Prerequisites\n- A modern web browser.\n- Basic knowledge of HTML, CSS, and JavaScript.\n\n### Installation\n\nnpm install @codemirror/lint\n\nThis project is a web-based application and does not require installation. Simply open the `index.html` file in your web browser.\n--- **\u003cspan style=\"color:red;\"\u003eNot really ready for that\u003c/span\u003e**.\n--- **\u003cspan style=\"color:red;\"\u003exxxxxxxxxxxxxx\u003c/span\u003e**.\n\n## Usage\n\n1. **Load a Problem Set**: Click the \"Change Problem Set\" button to load a new set of problems.\n2. **Solve Problems**: Use the integrated CodeMirror editor to write your solution and click the \"Run Script\" button to execute it.\n3. **Check Your Solution**: Click the \"Check\" button to compare your solution with the expected solution.\n4. **View Hints and Solutions**: If you're stuck, click the \"Show hint\" button to get a hint. If you want to see the solution, click the \"Show Solution\" button.\n\n## Contributing\n\nContributions are welcome If you find a bug or have a feature request, please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n## Contact\n\nIf you have any questions or need further assistance, please open an issue or contact the maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixoten%2Fjs-practice-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flixoten%2Fjs-practice-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixoten%2Fjs-practice-2/lists"}