Sample
Dorn/python/83
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.008 | 0–1; higher is more readable | 66.6Δ 17.5 |
| Dorn | 0.562 | 0–1; higher is more readable | 49.0Δ 35.1 |
| Mi | 0.485 | 0–1; higher is more readable | 51.0Δ 33.1 |
| LLOC | 9 | Logical lines; fewer is more readable | 61.3Δ 22.8 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 91.4Δ 7.2 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 93.5Δ 9.3 |
| BTTF | 0.547 | 0–1; higher is more readable | 58.2Δ 25.9 |
| Human | 3.82 | 1–5; original rating | 84.1 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 331.338 | −10.934 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.538 | −6.807 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -4.871 (log-odds).
Score = sigmoid(-4.871) = 0.008.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 64 | +0.954 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.308 | −0.294 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.099 | −0.021 |
Intercept 0.07 + feature contributions = 0.248 (log-odds).
Score = sigmoid(0.248) = 0.562.
| Score | 0.485 |
|---|
| Score | 9 |
|---|
Run 1
The code is highly readable. It shows a flat, logical structure with a clear, repetitive pattern of registry and directive assignments. Nesting is absent, and each line represents a single, distinct action. The intent—mapping keys to directive names and registering handlers—is obvious, especially given the self-descriptive naming. Concise and natural in flow, the code could only be slightly improved by grouping related assignments or adding a brief comment if the surrounding context is not already evident.
Run 2
The code is highly readable due to its flat structure, clear intent (registering directives), and one-action-per-line style. It groups three similar assignments for one registry, then another three for a different directive namespace, creating a logical flow. Naming is consistent and purpose is evident. However, it is somewhat repetitive, which could be condensed with a loop, slightly increasing clarity by reducing duplication.
Run 3
The code is straightforward and readable. It clearly registers directive names in two separate structures. Each line performs one logical action, and the grouping is consistent. However, there is minor duplication in the string literals, and the intent behind two registries is only partially clear without context. Overall, it is concise, flat, and easy to scan.
Run 1
Code Structure: Two clearly separated blocks logically group registry entries and directive mappings. Nesting: Entirely flat, requiring no tracking of nested control flow. Clarity of intent: Descriptive keys and handler names make the registration purpose apparent, although registry, en, and EffDirectives require external context. Code length: Short and appropriately explicit; minor repetition is reasonable for this small set of mappings. Action granularity: Each line performs exactly one assignment. Reading flow: Consistent syntax and a blank line between related groups make the code easy to scan and follow.
Run 2
Code Structure: Two logically grouped registration blocks, separated by a blank line. Nesting: Completely flat, making every assignment easy to follow. Clarity of intent: Descriptive directive names clearly indicate registration and mapping, although the roles of registry and en require external context. Code length: Short and proportionate; repeated assignments are explicit rather than unnecessarily verbose. Action granularity: Each line performs exactly one assignment. Reading flow: Consistent syntax and ordering make the code easy to scan, with the shared directives appearing in the same order across both blocks.
Run 3
Code Structure: Related assignments are logically grouped into registry entries and English directive mappings, separated by a blank line. Nesting: The code is entirely flat. Clarity of intent: Descriptive keys and handler names make the registration purpose clear, although registry, en, and EffDirectives require external context. Code length: The snippet is concise; repeated assignments are reasonable for this small set. Action granularity: Each line performs exactly one assignment. Reading flow: Consistent formatting and grouping make the code easy to scan, with matching directive names reinforcing the relationship between the groups.