Skip to content

Add a daily question, a learning passport, and a confounding lab - #61

Merged
jsshin2022 merged 6 commits into
mainfrom
hub-fun-sprint1
Oct 24, 2026
Merged

jsshin2022 merged 6 commits into
mainfrom
hub-fun-sprint1

Conversation

@jsshin2022

@jsshin2022 jsshin2022 commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

First sprint of the fun track in the PM roadmap: give people a small win in 30 seconds, something to collect, and a reason to come back, with every piece leading to a web book chapter or repo.

Includes the #60 commits until #60 is merged; after that only the last commit remains in the diff.

What changes

오늘의 한 문제 (hub, under the hero)

  • One question a day from data/daily.json (17 items, 7 causal): the situation, the claim to judge, two answers, then the reason, the chapter, and links to the game and the lab.
  • The streak and best streak are kept in localStorage; answering twice on the same day does nothing.

학습 여권 (assets/js/passport.js, on hub, game, lab, Builder pages)

  • Nine stamps: 첫 걸음, 길잡이, 오늘의 한 문제, 사흘 연속, 몸풀기 완주, 인과 감별사, 실험가, 한 단계 완주, Builder 탐방.
  • A toast when one is earned, a header button with the count, and a dialog listing how to earn the rest with links.

교란 실험실 (lab.html, assets/js/lab.js)

  • 800 simulated users. Loyalty raises both the chance of turning notifications on and retention; Y = 50 + 6z + effect·T + noise.
  • Sliders for confounding strength and the true effect, a randomize switch, a reseed button.
  • Bars for the true effect, the naive difference in means, and an OLS estimate adjusted for loyalty; a scatter with both group means.
  • Challenge: keep confounding at 5 or more and get the naive bias under 1. Randomizing solves it, which the text then explains.

Events: daily_answer, stamp_earned, passport_open, lab_start, lab_randomize, lab_challenge_complete, read_chapter.

Checked

  • 1440px and 390px: no overflow, no console errors on hub and lab.
  • Daily answer moves a 2-day streak to 3 and awards two stamps; the answered state survives a reload.
  • First repo opened awards 첫 걸음; the passport lists the earned stamps.
  • Lab: naive is inflated at confounding 7; randomizing solves the challenge and awards 실험가; events reach the data layer.

Generated by Claude Code

Review fixes (second commit, fresh-eyes review incl. statistics)

  • Daily pool reordered (no day-by-day alternation) and three traps added where a design word appears but the answer is correlational; four explanations corrected. 17 items, 7 causal.
  • Stamps: no 첫 걸음 from deep links; Builder 탐방 needs 3 distinct Builders.
  • Toast: shorter, wider, at the top on phones, pauses on hover/focus.
  • Lab: confounding slope 0.12 (slider meaningful across range), representative seed, challenge only via randomization with near-miss guidance and a hint, dimmed slider while randomized, distinct bar colours, fitted lines with the adjusted gap, chart first on phones.
  • Events: read_chapter {source, chapter} on daily/game/lab links; passport_open.source; randomize fires before challenge complete.

Generated by Claude Code

…game

- assets/js/track.js: hubTrack() sends events to GA4 when it is
  installed and does nothing otherwise; shared copy and share-url
  helpers. Hub clicks are tagged with the names in the event list.
- Start quiz: three questions pick one of the existing routes and its
  first repo; reachable from the goal row, #start, or ?quiz=1.
- Finish card: when every item in a level is marked done, the hub
  offers a 1200x630 card to save, drawn on a canvas.
- Builder pages: scripts/build_builders.py writes builders/<slug>.html,
  an index, and an SVG badge per Builder; the deploy workflow runs it.
  Share images come from scripts/builder_cards.py. The Builder dialog
  links to the page and shows a project retro when one is filled in.
- game.html: ten situations to sort into correlation or causation,
  each answer linking to a web book chapter.
- Quiz: the optional first stop no longer hides behind the skip-link
  class; the result says why the route was picked, and "이 순서로 보기"
  scrolls to the shelf, opens at the suggested card, and the route note
  starts there. Marketing work with hands-on experience goes to the
  experiment route; "used it at work" plus "code" starts at L2.
- Events: analytics attribute renamed to data-event so map lines stop
  sending their track id; re-rendering after "학습 완료" no longer sends
  open_repo; open_repo sources split (continue, spotlight, fresh,
  map_list, builder_dialog); click_join carries source; quiz_start and
  game_start carry retry; quiz key exp renamed to experience.
- Game: each situation states the claim being judged; five causal and
  five correlational items; wording states the assumptions; the result
  splits the score by kind so answering "상관" every time does not pass;
  sharing includes the score and uses the share sheet when available.
- Finish card: optional name, wording for a single item, next level
  button, share sheet on phones with download as fallback.
- Builder pages: badge reads "N기부터 · M개 기수"; a self-edit link
  when the intro or photo is missing; badge code wraps on phones.
- /#contrib scrolls to the section; privacy copy matches what is sent.
- assets/js/ga.js configures the hub property G-C5V0X2SGD3 and keeps
  the tag already on main (G-BEBVKYH8HL), and skips local previews.
- index, article, 404, game and the generated Builder pages include it;
  the inline snippets are removed.
- Deep links (#station=) report open_repo with source "deeplink".
- Footer says visits are counted anonymously with Google Analytics.
- Today's question: a band under the hero shows one question a day from
  data/daily.json (14, half causal), with the claim to judge, the
  answer, the reason and a web book chapter. The streak is kept in this
  browser.
- Learning passport (assets/js/passport.js): nine stamps for small
  actions on the hub, the game, the lab and Builder pages, a toast when
  one is earned, and a passport dialog with how to get the rest. A
  header button shows the count on every page.
- Confounding lab (lab.html): 800 simulated users; sliders for how much
  loyalty drives notifications and for the true effect, a randomize
  switch, and bars for the true effect, the naive difference and the
  loyalty-adjusted estimate. A challenge asks to get the naive bias
  under 1 while confounding stays at 5 or more.
- New events: daily_answer, stamp_earned, passport_open, lab_start,
  lab_randomize, lab_challenge_complete, lab_read.
Daily question
- Reorder the pool so answers no longer alternate day by day, and add
  three trap items that use design words but are correlational
  (attendance after a lottery, diverging pre-trends, manipulable
  cutoff). 17 items, 7 causal.
- Fix the training, premium and loan explanations; state precision and
  units in the causal items.
- The answered card keeps the claim and shows the visitor's own pick;
  the streak chip says how many days remain for the stamp.

Passport
- 첫 걸음 is not granted by a #station= deep link.
- Builder 탐방 counts distinct Builders, not page reloads.
- Shorter toast, wider on phones and shown at the top there, paused on
  hover or focus. Passport button on article and 404 pages too.
- passport_open carries its source.

Lab
- Confounding slope 0.4 -> 0.12 so the slider stays meaningful across
  its range; seed 9 gives representative defaults.
- Only randomizing completes the challenge; a near miss with
  randomization on points to resampling, and a hint appears after
  repeated slider moves.
- While randomized the confounding slider is dimmed and the result line
  calls the gap sampling error.
- Bar colours no longer reuse the group colours; the chart draws the
  two fitted lines and labels the adjusted gap. Chart first on phones.
- read_chapter {source, chapter} on daily, game and lab chapter links;
  lab_randomize fires before lab_challenge_complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant