mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 22:07:03 +01:00
Ranks the codecrafters build-your-own-x projects by difficulty and emits two offline, self-contained HTML pages: a per-guide ladder (~360 tutorials) and a per-category ladder (30 categories), grouped into Beginner/Intermediate/Advanced/ Expert tiers plus an Unsorted bucket. A guide inherits its category's tier; language only nudges order within a tier. Includes a Makefile pipeline (fetch -> parse -> build) and 100%-branch-covered tests. Excludes the generated guide page from codespell since it inlines upstream titles verbatim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNRTPNYvoBTQoTEWkYtCJD |
||
|---|---|---|
| .. | ||
| templates | ||
| tests | ||
| __init__.py | ||
| .gitignore | ||
| build_pages.py | ||
| category-ladder.html | ||
| guide-ladder.html | ||
| Makefile | ||
| parse_guides.py | ||
| README.md | ||
Build-Your-Own-X Difficulty Ladder
Two self-contained, offline HTML pages that rank the projects from codecrafters-io/build-your-own-x from easiest to hardest:
guide-ladder.html— every individual tutorial (~360 guides), grouped into difficulty tiers and filterable by tier, language, and category.category-ladder.html— the 30 top-level categories, grouped into Beginner / Intermediate / Advanced / Expert tiers.
Both are single files with all CSS, JS, and data inlined — no server, fonts, or
network needed. Open either directly in a browser (file://) and it works
offline, in your OS light/dark theme.
Difficulty model
Difficulty is a judgment call, scored on three axes: prerequisite domain knowledge, minimal-version scope, and how much step-by-step guidance exists.
- A guide inherits its category's tier — the dominant signal. A Regex-Engine guide is easier than an Operating-System guide whatever the language.
- Language only nudges the order within a tier: lower-level languages (C, Rust, Assembly) sort a little harder than Python or JavaScript. It never moves a guide across a tier boundary.
- The Unsorted group is the repo's own "Uncategorized" bucket. Its guides span every level, so they are deliberately left un-ranked rather than forced into a tier.
The exact head-to-head order inside a tier is therefore approximate by design; the tier boundaries are the trustworthy part.
Regenerating
make build # curl the README -> parse_guides.py -> build_pages.py
make clean # remove the fetched README copy and guides.json
The pipeline:
parse_guides.py— parses a local copy of the upstream README (byox-readme.md) intoguides.json, applying the difficulty model above.build_pages.py— injectsguides.jsonintotemplates/guide.template.htmland wrapstemplates/category.html, writing the two standalone pages.
byox-readme.md and guides.json are derived artifacts and are gitignored; the
built *-ladder.html pages are committed as the runnable output.