Sample

Dorn/python/67

Human rating uses the original dataset scale.

DatasetDorn
Human4.17
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.9560–1; higher is more readable
91.6Δ 6.1
Dorn0.9080–1; higher is more readable
95.0Δ 2.8
Mi0.6120–1; higher is more readable
65.2Δ 32.6
LLOC6Logical lines; fewer is more readable
72.8Δ 24.9
DeepSeek V4 Pro180–20; mean of three runs
98.3Δ 0.6
GPT-6.1 Sol17.670–20; mean of three runs
88.9Δ 8.9
BTTF0.6980–1; higher is more readable
92.2Δ 5.6
Human4.171–5; original rating
97.8

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.505−6.758
Source linesThe number of non-empty source lines.10+4
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.91.738−3.027

Intercept 8.87 + feature contributions = 3.085 (log-odds).
Score = sigmoid(3.085) = 0.956.

Feature contributions

FeatureValueContribution
(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.54+1.378
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.036+0.595
Indentation frequencyHow rapidly indentation changes from line to line.10−0.391
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.945−0.271
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.10+0.191
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.54+0.067

Intercept 0.07 + feature contributions = 2.286 (log-odds).
Score = sigmoid(2.286) = 0.908.

Score0.612
Score6
Run 1

The code is highly readable: it has a clear purpose stated in a docstring, logical structure with imports and guard clause, minimal nesting, and concise length. Each action is on its own line, and the flow is natural. Minor deduction for the print statement lacking parentheses (Python 2 style) and no type hints or additional context, but overall it's clean and understandable.

Run 2

The code is clean, well-structured, and highly readable. It has a clear docstring explaining its purpose, a logical import block, and a flat structure with no nesting. The error handling is concise and communicates intent clearly. The only minor issues are the use of a wildcard import, which is slightly less explicit, and the Python 2-style print statement, but these do not significantly impact readability.

Run 3

The code is clean and well-structured: it has a clear docstring explaining purpose, a logical import guard for Scribus, and flat, minimal nesting. It is concise with one main action per line and a natural reading flow. Minor deduction because the wildcard import is broad, but given the script's context, it is acceptable. Overall, highly readable.

Run 1

Code Structure: Imports and error handling are logically organized. Nesting: A single try/except keeps nesting minimal. Clarity of intent: The Scribus dependency check is clear, but the docstring promises group resizing that the snippet does not implement; the wildcard import also obscures imported names. Code length: Very concise, with no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: The progression from description to imports to failure handling is natural. Legacy Python 2 print syntax slightly reduces accessibility for modern readers.

Run 2

Code Structure: Imports and environment-error handling are logically organized. Nesting: A single try/except keeps nesting minimal. Clarity of intent: The Scribus dependency check is clear, but the docstring promises group enlargement that the snippet does not implement; the wildcard import also obscures imported names. Code length: Very concise, with no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: Execution proceeds naturally from the description through imports to a clear failure message and exit.

Run 3

Code Structure: Imports and environment handling are logically organized. Nesting: A single try/except keeps the code shallow and easy to follow. Clarity of intent: The Scribus dependency and failure behavior are clear, but the docstring promises resizing functionality that is absent, and the wildcard import obscures imported names. Code length: The snippet is concise with no unnecessary implementation. Action granularity: Each statement performs one action. Reading flow: Execution proceeds naturally from the description to imports and graceful termination when Scribus is unavailable.