Sample

Dorn/python/58

Human rating uses the original dataset scale.

DatasetDorn
Human3.62
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.4710–1; higher is more readable
81.3Δ 9.2
Dorn0.6390–1; higher is more readable
55.4Δ 16.7
Mi0.5140–1; higher is more readable
54.3Δ 17.8
LLOC5Logical lines; fewer is more readable
78.0Δ 5.8
DeepSeek V4 Pro13.670–20; mean of three runs
62.8Δ 9.3
GPT-6.1 Sol140–20; mean of three runs
41.4Δ 30.8
BTTF0.6020–1; higher is more readable
74.1Δ 1.9
Human3.621–5; original rating
72.1

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
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.623−6.935
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.183.317−6.049
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -0.115 (log-odds).
Score = sigmoid(-0.115) = 0.471.

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.9+0.718
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.046+0.493
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.10−0.391
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.78+0.361
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.873−0.272

Intercept 0.07 + feature contributions = 0.573 (log-odds).
Score = sigmoid(0.573) = 0.639.

Score0.514
Score5
Run 1

The code is concise and each line has a clear, single purpose, which helps readability. However, it starts with a broad `except: pass` that suppresses all exceptions without explanation, obscuring intent and potentially hiding errors. The import and description sections are well-structured, but the lonely try/except block at the top feels disconnected from the rest, suggesting missing context or incomplete code. The string concatenation for `description` is clean but the overall flow is slightly disjointed because of the orphaned exception handler. Nesting is flat and actions are granular, scoring well on structure and clarity, but the ambiguous exception handling and lack of contextual framing prevent a higher score.

Run 2

The code is largely readable due to its brevity and clear intent. The import statements are straightforward, and the description string is well-formatted and logically concatenated. However, the initial try/except block is problematic: it begins mid-code (no preceding context), uses a bare 'except: pass' which suppresses all exceptions, and its purpose is ambiguous. This disrupts reading flow and clarity. The code is flat and concise, but the incomplete structure and overly broad exception handling reduce its overall readability.

Run 3

The code is short and mostly clear, but it has structural issues. The bare try/except with a locale setup operation is ambiguous — it suppresses all exceptions without explanation, making intent unclear. The import block is flat and readable, but placing the try/except before imports disrupts natural reading flow. The description construction is straightforward, with one logical action per line and acceptable line continuation. The code’s main weaknesses are the unexplained error suppression and lack of context for why locale setup is necessary or why failure is acceptable. Overall, it’s readable but could be clearer with a comment or specific exception handling.

Run 1

Code Structure: Imports and the description assignment are organized, but the fragment begins with an indented statement and an except block without a visible try, making its structure incomplete. Nesting: Minimal nesting keeps the snippet easy to scan. Clarity of intent: The description clearly states the document-generation purpose, while the locale setup and bare except with pass obscure error-handling intent. Code length: Concise, with no obvious unnecessary code. Action granularity: Each statement performs one action, and the multiline string remains a single clear assignment. Reading flow: Blank lines separate sections naturally, but the incomplete opening and imports appearing after executable code interrupt the flow.

Run 2

Code Structure: Imports and the description assignment are logically grouped, but the leading indentation and missing try statement make the excerpt structurally incomplete. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: The imports and description clearly indicate document generation, while the bare except silently suppresses errors and obscures failure handling. Code length: Concise, with no obvious unnecessary code. Action granularity: Each statement performs a single action; the multiline string is formatted cleanly. Reading flow: Whitespace and string continuation support natural reading, but starting mid-block and placing imports after locale handling interrupt the flow.

Run 3

Code Structure: Imports and the description assignment are logically grouped, but the opening indented statement and except lack a visible try block, making the snippet structurally incomplete. Nesting: Minimal nesting keeps it easy to scan. Clarity of intent: The description clearly states the document-generation purpose, while the bare except silently suppresses all errors and obscures failure handling. Code length: Concise, with no unnecessary repetition. Action granularity: Each statement performs one clear action; the wrapped description remains a single coherent assignment. Reading flow: The imports and description read naturally, but beginning mid-block interrupts understanding.