{"id":20365644,"url":"https://github.com/hackyourfuture/debugging","last_synced_at":"2025-04-12T04:46:48.040Z","repository":{"id":74101957,"uuid":"106288439","full_name":"HackYourFuture/debugging","owner":"HackYourFuture","description":"setup repo for debugging assignments that will be added to the js repo","archived":false,"fork":false,"pushed_at":"2018-01-15T13:09:08.000Z","size":75,"stargazers_count":2,"open_issues_count":1,"forks_count":17,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-12T04:46:40.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/HackYourFuture.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":"2017-10-09T13:38:53.000Z","updated_at":"2024-08-26T11:52:01.000Z","dependencies_parsed_at":"2023-05-25T04:15:32.155Z","dependency_job_id":null,"html_url":"https://github.com/HackYourFuture/debugging","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdebugging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdebugging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdebugging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdebugging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HackYourFuture","download_url":"https://codeload.github.com/HackYourFuture/debugging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519470,"owners_count":21117757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-15T00:19:23.367Z","updated_at":"2025-04-12T04:46:48.028Z","avatar_url":"https://github.com/HackYourFuture.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Debugging\n\n*(This is still a work in progress)*\n\nDebugging is a big part of a programmer's life. Programmers inevitably produce\nbugs as a side-effect of writing code. Having a proper understanding of what a\nbug is and how to squash it is an essential skill for any developer. In this\nclass we provide the students with a vocabulary and tools for talking and\nthinking about bugs and how to get rid of them.\n\n## Theory\n\nFollowing Andreas Zeller's *Why programs fail* we start by introducing a\nvocabulary:\n\n1. a **defect** - a piece of code that can cause an infection\n2. an **infection** - a program state that is different from the programmer's intention.\n3. a **failure** - externally observable effect of faulty program behavior caused by the\ninfection.\n\n## Practice\n\nThe nature of classes in HackYourFuture is very hands-on and in that spirit we\nshould provide the students with tools and assignments. We show some tools that\ncan help track infections like `console.log`, the Chrome javascript debugger,\nassertions, and unit tests.\n\nAssignments are comprised of buggy programs, ranging from easy/hard to fix. It's\nthen up to the students to find and fix the bugs.\n\n*Of course for us as teachers it's gonna be challenging to come up with various\n buggy programs that strike the right difficulty balance.*\n\n### Ideas of buggy programs\n\nIdeas for buggy programs for students to solve:\n\n\n#### Week 1\n\n- If, if-else, else condition as three individual if statements\n- Using an uninitialized variable\n- Attempt to add two numbers together but make one of the numbers a string\n- ...\n\n*If you have more ideas for buggy programs, please submit them by creating an\nissue on Github, or adding a pull request.*\n\n## Requirements\n\n- To teach students how to systematically debug programs.\n- Integrate this material into the curriculum as much as possible.\n- Class is taught in a mandatory hangout session.\n- Do actual debugging in front of the class.\n- Work through one of the homework examples during class. Ask them if they made\n  homework, and solve it together.\n\n## Ideas\n\n- Use the MAKEME, README, REVIEW structure just like the other classes.\n- Unit tests with npm and Github giving the student/teacher feedback (George)\n- Use the default structure for assignments:\n    - For every assignment the student has to add a file.\n    - Little programs they need to fork and fix. Clone and then pull request.\n    - The student has to give a name to the file to explain what it does.\n- Give a master class to the HYF teachers and alumni.\n- Add assignments on unit testing.\n- Let them read the program line by line in class.\n- Look at the javascript 1 assignments for inspiration on writing buggy assignments.\n\n## Notes\n\n- Students use various IDEs: Brackets, Visual Studio Code, Chrome debugger.\n\n## TODO\n\n- Introduce myself (Frank) to class 12 before giving a hangouts lecture.\n- Ask the teachers to add debugging assignments.\n- What version of javascript do we use? If we use ES6, we need an ES6 compatible\ndebug environment as well. I'm not sure the Chrome debugger can help us there.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackyourfuture%2Fdebugging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackyourfuture%2Fdebugging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackyourfuture%2Fdebugging/lists"}