Skip to content

Commit ec24632

Browse files
committed
Record the website elevation strategy
Capture where the project stands after rubric saturation and the discoverability round, define the success scorecard, and lay out four thrusts (close the demand loop, cover searched-for topics, deepen the on-page loop, earn distribution) with essence guardrails and sequencing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJDjKbt3EyWPEThak9WQXp
1 parent b61edf1 commit ec24632

1 file changed

Lines changed: 244 additions & 0 deletions

File tree

docs/elevation-strategy.md

Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
# Website elevation strategy
2+
3+
Drafted 2026-07-10. Status: proposal.
4+
5+
This document answers one question: how do we make Python By Example
6+
more successful without disrupting its essence? It builds on
7+
`docs/rubric-saturation.md` (internal quality has plateaued at a high
8+
level), `docs/learner-analytics.md` (the external signal we can already
9+
measure), and `docs/research-similar-sites.md` (the competitive
10+
landscape).
11+
12+
## The essence (what must not change)
13+
14+
Everything below is the product. Elevation work that erodes any of it
15+
is a regression, whatever it does for traffic.
16+
17+
- **One concept per page.** Compact literate walkthroughs: prose beside
18+
the source it explains, output evidence beside the source that
19+
produced it.
20+
- **Everything runs.** The complete program is editable and executes in
21+
an isolated Dynamic Worker. Expected output is verified, not claimed.
22+
- **Anchored to authority.** Every page links the official Python docs
23+
for the current Cloudflare-supported Python version.
24+
- **Low chrome, article-like.** Not a notebook, not a course, not a
25+
reference dump. Reading order and quiet layout are features.
26+
- **Curated craft.** The locked figure grammar, quality rubrics,
27+
registries, and contract tests are the moat. Nothing ships below the
28+
gates.
29+
- **Respectful by default.** No accounts, no ads, privacy-safe wide
30+
events only.
31+
32+
## Where the project stands
33+
34+
The last two improvement rounds made the inside excellent: 109
35+
examples all above the quality gate, 100% figure coverage with a mean
36+
rubric score ≈ 8.7 and nothing below 8.0, journeys with outcome
37+
contracts, zero orphaned examples, and a green steady state that
38+
`docs/lessons-learned.md` explicitly warns against inflating further.
39+
SEO metadata, structured data, sitemap, social cards, dark mode, search,
40+
and learner analytics all landed in the previous elevation pass.
41+
42+
The constraint has therefore moved. Page quality is no longer what
43+
limits success; **reach, engagement depth, and coverage of what
44+
learners actually look for** are. `docs/lessons-learned.md` already
45+
points the way: steer content work by external signal rather than
46+
internal quality scores.
47+
48+
## What "more successful" means
49+
50+
A shared scorecard, so "success" is not vibes. Everything below is
51+
measurable with the existing wide events plus `scripts/learner_report.py`
52+
and a search-console account.
53+
54+
1. **Reach** — unique learners per week on example pages; search
55+
impressions and clicks.
56+
2. **Engagement** — POST runs per week; edited-run share (the ideal
57+
documented in `docs/learner-analytics.md`: high edited share, low
58+
error share); journey traffic.
59+
3. **Return** — repeat visits per week (approximate is fine; no
60+
accounts).
61+
4. **Authority** — inbound links, listings in "learn Python"
62+
collections, and citations by AI assistants.
63+
5. **Demand conversion** — recurring `/examples/` 404s turned into
64+
shipped pages.
65+
66+
## Thrust 1 — Close the demand loop
67+
68+
The instrumentation exists; the ritual does not. The wide events
69+
already record which pages are read, which examples are run and
70+
edited, where edited code errors, and which nonexistent example URLs
71+
are requested. Make consuming that signal a habit:
72+
73+
- Schedule a Workers Logs export (Logpush or a periodic dashboard
74+
export) and run `scripts/learner_report.py` on a weekly cadence.
75+
- Treat recurring missing-example 404s as the top of the content
76+
backlog — the docs already call this "the strongest possible signal
77+
for what to write next."
78+
- Treat high error-share pages as walkthrough gaps: learners tried
79+
something the page did not prepare them for. Extend the cells or
80+
notes there.
81+
- Register the sitemap with Google Search Console and Bing Webmaster
82+
Tools (if not already done) and fold query/impression data into the
83+
same weekly look. Queries that show impressions without clicks are
84+
title/summary problems; queries with no impressions are coverage
85+
problems.
86+
87+
## Thrust 2 — Cover what learners actually search for, without sprawl
88+
89+
The catalog is deep on language semantics (Types 14, Data Model 12,
90+
Basics 12, Functions 11, Collections 11) and comparatively light on the
91+
task-shaped standard-library surfaces that dominate real Python search
92+
demand (Standard Library 9, Text 3, Async 2). Go By Example's
93+
most-linked pages are exactly the task-shaped ones: reading and
94+
writing files, command-line arguments, environment variables. We have
95+
no file-I/O or pathlib page today.
96+
97+
Candidate additions — each still one mechanism per page, each through
98+
the same rubric gates:
99+
100+
- **Files and paths**: reading/writing text files, `pathlib`. Pyodide's
101+
in-memory filesystem makes these genuinely runnable in the Dynamic
102+
Worker — a live advantage over static competitors.
103+
- **Process environment**: environment variables; command-line
104+
arguments (`argparse`'s smallest loop). Both fit the proven
105+
runtime-boundary framing already used by `networking` and
106+
`subprocesses`: teach normal Python first, state the sandbox
107+
constraint once.
108+
- **Everyday stdlib**: `random`, `time`/`perf_counter`, `math` and
109+
`statistics`, `hashlib`, `tempfile`, `functools` beyond
110+
`partial` (`lru_cache`, `reduce`), `textwrap`.
111+
112+
Filter and order this list by the 404 demand from Thrust 1 rather than
113+
shipping it wholesale; cap the pace at what can clear the 9.0 gate.
114+
The scope boundary should be stated once and kept: **language plus
115+
standard library**. Third-party frameworks (pandas, Django, FastAPI)
116+
are off-essence.
117+
118+
Separately, surface work we already have: the confusable-pair registry
119+
(`is` vs `==`, list vs tuple, shallow vs deep copy, `@staticmethod` vs
120+
`@classmethod`, iterator vs iterable) matches extremely high-intent
121+
searches. A small "X vs Y" contrasts index page — built from the
122+
existing registry, linking to the existing pages — makes that value
123+
visible to search engines and to learners scanning for a specific
124+
confusion.
125+
126+
## Thrust 3 — Deepen the on-page loop
127+
128+
Small affordances, all quiet enough to preserve the low-chrome feel,
129+
all aimed at the scorecard's engagement and return lines:
130+
131+
- **Share this code.** `example.html` already restores code from a
132+
`#code=` base64 fragment on load, but nothing ever writes one. Add a
133+
"copy link to this code" affordance near the runner so every
134+
experiment becomes a shareable artifact. Half the mechanism is
135+
already built; the missing half is a distribution channel.
136+
- **Copy buttons on code blocks.** Learners copy code constantly;
137+
making them select text by hand is friction with no editorial value.
138+
- **"Try it" nudges.** A one-line micro-challenge near the runner
139+
("change X to Y — predict the output before running") directly
140+
targets the edited-share-up, error-share-down ideal. Start as a
141+
notes convention or an optional block on the ten most-run pages and
142+
measure whether edited share moves.
143+
- **Example → journey orientation.** Journey pages link examples, but
144+
example pages never mention the journeys they belong to. A one-line
145+
"Part of the Iteration journey" link closes that edge of the graph
146+
and gives a learner who landed from search a curated next step
147+
beyond prev/next.
148+
- **Keyboard prev/next** (``/``) to reinforce the tour feel.
149+
- **Local progress marks.** A localStorage-only check on examples a
150+
learner has read or run, rendered as a quiet dot on home cards and
151+
journey lists. No accounts, no server state — but journeys gain a
152+
sense of completion, which is the cheapest honest return-visit
153+
mechanic available.
154+
155+
## Thrust 4 — Earn distribution
156+
157+
- **Publish the method.** An `/about` (or colophon) page telling the
158+
editorial story: literate cells with verified output, the locked
159+
figure grammar, geometry contract tests, quality gates. The `docs/`
160+
folder is already public-grade; no competitor has this story, and it
161+
is exactly the trust signal search engines and human referrers
162+
reward.
163+
- **Be citable by machines.** Publish `/llms.txt` and per-example
164+
Markdown endpoints (`/examples/<slug>.md`). The sources are already
165+
Markdown, and `docs/lessons-learned.md` already requires teaching
166+
artifacts to be clean enough to serve as public material. AI
167+
assistants are now a first-class referrer of learners; being the
168+
cleanest citable source for "Python by example" queries is cheap and
169+
fully on-essence.
170+
- **Feeds.** An Atom feed of new and substantially revised examples so
171+
newsletters and aggregators can pick up changes without watching the
172+
repo.
173+
- **Edit this page on GitHub.** A per-example source link converts
174+
readers into contributors (CONTRIBUTING and issue templates already
175+
exist) and is a further trust signal.
176+
- **Launch moments.** The site has never had one. Milestone-shaped
177+
posts — Show HN, r/Python, Python Weekly, an awesome-python listing
178+
PR — with the runnable-literate angle as the hook. Sequence these
179+
*after* the quick loop-deepening wins so spike traffic lands on the
180+
sharpest version of the page.
181+
- **Stay current as an event.** When Cloudflare's Python Workers
182+
runtime moves past 3.13, migrate fast (the tooling exists:
183+
`make verify-python-version`) and ship a small "new in this Python,
184+
by example" set. Version currency is a recurring, newsworthy proof
185+
that the site is alive — most competitor catalogs visibly rot.
186+
187+
## Guardrails — what we will not do
188+
189+
- No accounts, no ads, no comments, no gamification beyond quiet local
190+
progress marks.
191+
- No third-party framework or library tutorials; the boundary is the
192+
language and its standard library.
193+
- No course-ification; journeys remain curated arcs over the same
194+
example pages.
195+
- No content that bypasses the gates: every new page passes the same
196+
rubric, formatter, parity, and verified-output checks regardless of
197+
how fast we want to grow.
198+
- No chrome creep: share, copy, progress, and breadcrumb affordances
199+
must stay visually quiet. The reading experience is the product.
200+
201+
## Sequencing
202+
203+
**Now (days; mostly small, single-surface changes)**
204+
205+
1. Share-this-code link + copy buttons on code blocks.
206+
2. `/about` page + edit-on-GitHub links.
207+
3. `/llms.txt`, per-example Markdown endpoints, Atom feed.
208+
4. Search-console registration + the first weekly learner-report
209+
ritual.
210+
211+
**Next (weeks)**
212+
213+
5. First demand-driven stdlib tranche: files/pathlib, environment
214+
variables, command-line arguments, `random`, `time` — ordered by
215+
observed 404s, gated by the rubric.
216+
6. Example → journey breadcrumbs; keyboard prev/next.
217+
7. "X vs Y" contrasts index from the confusable-pair registry.
218+
8. "Try it" nudges on the ten most-run pages; measure edited share.
219+
9. First launch moment, once 1–3 are live.
220+
221+
**Horizon (quarter-plus)**
222+
223+
10. Local journey progress marks.
224+
11. Python version migration moment (runtime-dependent) plus a
225+
what's-new example set.
226+
12. Translations — only with a sustainable community model, never
227+
machine-dumped.
228+
13. Embeddable example widget for blogs — only if inbound demand
229+
appears.
230+
231+
## Risks
232+
233+
- **Distribution before sharpening wastes the spike.** A Show HN that
234+
lands on pages without share/copy affordances converts one visit
235+
into zero artifacts. Sequence quick wins first.
236+
- **Stdlib expansion drifts into reference sprawl.** The 404-demand
237+
filter, the one-mechanism-per-page rule, and the broad-surface-title
238+
lesson in `docs/lessons-learned.md` are the existing defenses; keep
239+
them binding.
240+
- **The analytics ritual decays.** Keep it one command and one short
241+
dated summary; if it takes an hour it will stop happening.
242+
- **Runner cost or abuse under spike traffic.** Turnstile protection
243+
and the smoke bypass already exist; watch turnstile outcomes in the
244+
weekly report during launch weeks.

0 commit comments

Comments
 (0)