Skip to content

Commit 52f108a

Browse files
committed
Chart new versus existing example quality
1 parent 6429e23 commit 52f108a

3 files changed

Lines changed: 193 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
cohort,slug,score
2+
Existing examples,hello-world,9.12
3+
Existing examples,values,9.44
4+
Existing examples,numbers,9.42
5+
Existing examples,booleans,9.32
6+
New syntax/graph examples,operators-and-literals,9.44
7+
Existing examples,none,9.70
8+
Existing examples,variables,9.44
9+
Existing examples,constants,9.32
10+
Existing examples,truthiness,9.70
11+
Existing examples,equality-and-identity,9.56
12+
Existing examples,mutability,9.44
13+
Existing examples,strings,9.68
14+
Existing examples,string-formatting,9.44
15+
Existing examples,conditionals,9.54
16+
New syntax/graph examples,assignment-expressions,9.34
17+
Existing examples,for-loops,9.46
18+
New syntax/graph examples,break-and-continue,9.24
19+
New syntax/graph examples,loop-else,9.34
20+
Existing examples,iterating-over-iterables,9.70
21+
Existing examples,iterators,9.56
22+
Existing examples,match-statements,8.84
23+
New syntax/graph examples,advanced-match-patterns,9.44
24+
Existing examples,while-loops,9.46
25+
Existing examples,lists,9.56
26+
Existing examples,tuples,9.56
27+
Existing examples,unpacking,9.66
28+
Existing examples,dicts,9.56
29+
Existing examples,sets,9.68
30+
Existing examples,slices,9.46
31+
Existing examples,comprehensions,9.68
32+
New syntax/graph examples,comprehension-patterns,9.46
33+
Existing examples,sorting,9.68
34+
Existing examples,functions,9.44
35+
Existing examples,keyword-only-arguments,9.32
36+
New syntax/graph examples,positional-only-parameters,9.34
37+
Existing examples,args-and-kwargs,9.56
38+
Existing examples,multiple-return-values,9.46
39+
Existing examples,closures,9.22
40+
New syntax/graph examples,scope-global-nonlocal,9.46
41+
Existing examples,recursion,8.65
42+
Existing examples,lambdas,9.56
43+
Existing examples,generators,9.46
44+
New syntax/graph examples,yield-from,9.46
45+
Existing examples,generator-expressions,9.44
46+
Existing examples,itertools,9.68
47+
Existing examples,decorators,9.34
48+
Existing examples,classes,8.44
49+
New syntax/graph examples,inheritance-and-super,9.34
50+
Existing examples,dataclasses,9.44
51+
Existing examples,properties,9.56
52+
Existing examples,special-methods,8.52
53+
New syntax/graph examples,metaclasses,8.89
54+
Existing examples,context-managers,9.58
55+
New syntax/graph examples,delete-statements,9.68
56+
Existing examples,exceptions,8.56
57+
New syntax/graph examples,assertions,9.46
58+
New syntax/graph examples,exception-chaining,9.34
59+
New syntax/graph examples,exception-groups,9.24
60+
Existing examples,modules,8.84
61+
New syntax/graph examples,import-aliases,8.56
62+
Existing examples,type-hints,8.77
63+
Existing examples,enums,9.46
64+
Existing examples,regular-expressions,9.66
65+
Existing examples,number-parsing,9.22
66+
Existing examples,custom-exceptions,9.32
67+
Existing examples,json,9.34
68+
Existing examples,datetime,9.54
69+
Existing examples,async-await,8.42
70+
New syntax/graph examples,async-iteration-and-context,8.84

docs/example-quality-new-vs-old.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Example quality: new vs existing examples
2+
3+
![Dot plot comparing quality scores for existing and newly added examples](example-quality-new-vs-old.svg)
4+
5+
Scores come from `scripts/score_examples.py`, so this is a heuristic audit rather than a human rubric review. The “new” cohort is the syntax-surface/graph expansion added after commit `f6019d5`.
6+
7+
| Cohort | Count | Average | Median | Min | Max |
8+
|---|---:|---:|---:|---:|---:|
9+
| Existing examples | 52 | 9.36 | 9.46 | 8.42 | 9.70 |
10+
| New syntax/graph examples | 17 | 9.29 | 9.34 | 8.56 | 9.68 |
11+
12+
Lowest-scoring new examples under the heuristic:
13+
14+
- `import-aliases` — 8.56
15+
- `async-iteration-and-context` — 8.84
16+
- `metaclasses` — 8.89
17+
- `break-and-continue` — 9.24
18+
- `exception-groups` — 9.24
19+
- `assignment-expressions` — 9.34
20+
- `loop-else` — 9.34
21+
- `positional-only-parameters` — 9.34
22+
23+
The new examples are slightly lower on average because they cover compact, advanced, or edge-case syntax. That suggests the next editorial pass should deepen the lowest-scoring new pages with stronger problem framing and contrast, not remove them.
Lines changed: 100 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)