Sample
Dorn/python/22
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.741 | 0–1; higher is more readable | 84.7Δ 13.9 |
| Dorn | 0.862 | 0–1; higher is more readable | 89.1Δ 9.5 |
| Mi | 0.662 | 0–1; higher is more readable | 75.2Δ 23.4 |
| LLOC | 16 | Logical lines; fewer is more readable | 43.7Δ 54.9 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 95.5Δ 3.1 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 88.9Δ 9.7 |
| BTTF | 0.651 | 0–1; higher is more readable | 86.1Δ 12.5 |
| Human | 4.2 | 1–5; original rating | 98.6 |
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. | 410.343 | −13.541 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.186 | −6.28 |
Intercept 8.87 + feature contributions = 1.049 (log-odds).
Score = sigmoid(1.049) = 0.741.
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. | 71 | +0.658 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.031 | +0.645 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 61.903 | +0.194 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 19 | −0.08 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.75 | +0.006 |
Intercept 0.07 + feature contributions = 1.831 (log-odds).
Score = sigmoid(1.831) = 0.862.
| Score | 0.662 |
|---|
| Score | 16 |
|---|
Run 1
The code is generally readable and well-structured. It has a clear purpose, documented in a helpful docstring, and follows a logical flow. The single function is concise, with minimal nesting (one loop and one conditional branch), which supports readability. Action granularity is appropriate: most lines perform one operation, and variable names like `names`, `use_commas`, and `glue` are clear. The conditional logic, while not deeply nested, requires close reading to track state changes (`use_commas`) and quoting behavior. The `elif` with a nested `if` adds slight complexity. The code is reasonably flat and follows a natural reading order—iterating tags, deciding formatting, and joining at the end. Overall, it is straightforward but could be improved with explicit handling of whitespace-only names or clearer separation of quoting vs delimiter logic.
Run 2
The code is highly readable. It has a clear, logical structure with a single loop separating name processing from formatting. Nesting is shallow, with only a single conditional chain inside the loop. Intent is unambiguous, reinforced by a thorough docstring explaining behavior and edge cases. The function is concise without sacrificing clarity. Each action within the loop occupies its own line, and the final join step is separated cleanly. Reading flow is natural: initialize state, iterate, process names, determine delimiter, return result. The only minor drawback is the slightly awkward conditional setting of `use_commas`, but it remains easy to follow.
Run 3
The code is highly readable. It has a clear, linear structure with a single function and a helpful docstring explaining behavior. Nesting is minimal, with only one loop and one conditional branch. Intent is straightforward: build a list of tag names with special handling for commas and spaces, then join them. Code length is concise and proportional to the task. Each line performs a single logical action, and reading flow is natural from input to output. Minor deductions could be made because the logic for setting use_commas is slightly implicit (it relies on side effects in a loop), but overall the function is easy to understand and maintain.
Run 1
Code Structure: Logically organized into collecting names, selecting a delimiter, and joining the result. Nesting: Mostly shallow, though the nested check before setting use_commas is unnecessary. Clarity of intent: The descriptive function name, variable names, and detailed docstring explain the purpose well; however, the docstring says whitespace while the code checks only literal spaces. Code length: Concise overall, with minor redundancy in the flag update and delimiter selection. Action granularity: Each line generally performs one clear action. Reading flow: Natural top-to-bottom progression, although continue followed by elif adds slight control-flow friction. Overall, readable and straightforward with small opportunities for simplification.
Run 2
Code Structure: Logically organized into collecting names, choosing a delimiter, and joining the result. Nesting: Generally shallow, although the nested check before setting use_commas is unnecessary. Clarity of intent: Descriptive names and a detailed docstring explain the purpose well; however, the docstring mentions whitespace while the code checks only literal spaces. Code length: Compact overall, with minor opportunities to simplify the flag assignment and delimiter selection. Action granularity: Each line performs a single clear action. Reading flow: Natural and easy to follow, though the elif after continue introduces slight redundancy.
Run 3
Code Structure: Logically organized into collecting names, choosing a delimiter, and joining the result. Nesting: Mostly shallow, though the nested check before setting use_commas is unnecessary. Clarity of intent: Descriptive names and a detailed docstring explain the purpose well; however, the docstring mentions whitespace while the code checks only literal spaces. Code length: Concise overall, with minor opportunities to simplify the flag assignment and delimiter selection. Action granularity: Each line performs a single clear action. Reading flow: Natural and easy to follow, although elif after continue adds slight redundancy. Legacy Unicode prefixes and percent formatting modestly reduce modern readability.