Sample

Dorn/python/101

Human rating uses the original dataset scale.

DatasetDorn
Human3.89
Lines9

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.8880–1; higher is more readable
88.3Δ 0.8
Dorn0.6530–1; higher is more readable
59.3Δ 28.1
Mi0.4350–1; higher is more readable
43.5Δ 44.0
LLOC4Logical lines; fewer is more readable
82.7Δ 4.7
DeepSeek V4 Pro16.330–20; mean of three runs
87.9Δ 0.4
GPT-6.1 Sol17.670–20; mean of three runs
88.9Δ 1.4
BTTF0.6160–1; higher is more readable
76.9Δ 10.6
Human3.891–5; original rating
87.5

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.598−6.896
Source linesThe number of non-empty source lines.9+3.6
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.106.198−3.505

Intercept 8.87 + feature contributions = 2.069 (log-odds).
Score = sigmoid(2.069) = 0.888.

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.044+0.51
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.75+0.489
Indentation frequencyHow rapidly indentation changes from line to line.8−0.46
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.895−0.286

Intercept 0.07 + feature contributions = 0.634 (log-odds).
Score = sigmoid(0.634) = 0.653.

Score0.435
Score4
Run 1

The code is very concise and readable. It sets the locale, imports a function, and defines two string variables with clear names and purposes. The structure is logical: environment setup, import, then configuration variables. There's no nesting, and the intent is evident—it's a command-line tool for converting reStructuredText to LaTeX. The only minor issues are the empty string locale argument (slightly ambiguous) and a redundant blank line between the import and variable definitions, which slightly disrupts the visual grouping. Otherwise, the reading flow is natural and clear.

Run 2

The code is concise, with clear intent and a natural reading flow. It sets the locale, imports a specific function, and defines two straightforward strings for command-line usage and description. The structure is logical, the nesting is nonexistent, and action granularity is appropriate. However, the locale setting at the very top is somewhat ambiguous without context, and the import placement after the locale call deviates from PEP8 conventions, which slightly impacts clarity. Overall, it's highly readable but could benefit from a comment explaining the locale call and conventional import ordering.

Run 3

The code is highly readable. It is concise, with a clear logical structure: setting the locale, importing a function, and defining metadata for a command-line tool. Nesting is non-existent, and each action is separated clearly into logical blocks. The intent is straightforward—preparing localization, importing a publisher, and defining usage/description strings. The use of a multi-line string concatenation for 'description' maintains readability without excessive line length. Minor deductions: import ordering convention (stdlib import before locale setting) and lack of a trailing newline, but overall it is clean, unambiguous, and well-structured.

Run 1

Code Structure: Simple organization, though placing the import after the locale-setting call is unconventional. Nesting: No nesting, making the snippet easy to scan. Clarity of intent: The usage and description clearly identify a reStructuredText-to-LaTeX command-line tool; the locale setup is recognizable, though the locale import is not shown. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action; the split description string remains a single clear assignment. Reading flow: Generally natural, with whitespace separating setup and metadata, but the late import and extra trailing blank lines slightly interrupt the flow.

Run 2

Code Structure: Simple and logically grouped, though locale configuration before the import is unconventional, and the locale import is not shown. Nesting: No nesting makes the snippet easy to scan. Clarity of intent: The usage and description clearly identify a command-line tool for converting reStructuredText to LaTeX; the role of publish_cmdline is not demonstrated. Code length: Concise, with no unnecessary implementation. Action granularity: Each statement performs one action, and the split description remains a single clear assignment. Reading flow: Mostly natural, with whitespace separating setup, import, and metadata, but placing imports first would improve consistency.

Run 3

Code Structure: Simple and logically grouped, although locale configuration before the import is unconventional. Nesting: No nesting, making the code easy to scan. Clarity of intent: The usage and description clearly identify a command-line tool for generating LaTeX from reStructuredText; the locale setup is understandable, but locale is not imported in the shown snippet. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action; splitting the description across lines improves readability. Reading flow: Mostly natural, with whitespace separating setup and metadata, though placing imports first would improve flow. The unused publish_cmdline import and missing command invocation make the snippet appear incomplete.