Sample

Dorn/python/32

Human rating uses the original dataset scale.

DatasetDorn
Human3.72
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
45.1Δ 32.9
Scalabrino0.6470–1; higher is more readable
68.2Δ 9.8
Dorn0.5860–1; higher is more readable
51.0Δ 27.0
Mi0.1980–1; higher is more readable
20.3Δ 57.7
LLOC18Logical lines; fewer is more readable
38.4Δ 39.6
DeepSeek V4 Pro120–20; mean of three runs
53.6Δ 24.4
GPT-6.1 Sol14.670–20; mean of three runs
47.1Δ 30.9
BTTF0.4910–1; higher is more readable
42.6Δ 35.4
Human3.721–5; original rating
78.0

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)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.794.953−26.233
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.815−7.222

Intercept 8.87 + feature contributions = -12.585 (log-odds).
Score = sigmoid(-12.585) = 0.

Score0.647

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.109+0.954
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.108.935−0.949
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.065+0.315
Indentation frequencyHow rapidly indentation changes from line to line.28+0.231
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.28−0.222
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.891+0.008

Intercept 0.07 + feature contributions = 0.347 (log-odds).
Score = sigmoid(0.347) = 0.586.

Score0.198
Score18
Run 1

The code has clear imports and a recognizable structure, but readability suffers from inconsistent indentation, mixing tabs and spaces, and terse variable names like 'im'. Some logic is ambiguous ('*' and bare booleans in fileDialog). The main function is flat, which helps flow, but comments are only historical, not explanatory. German variable names ('Breite', 'Hoehe') reduce clarity for a general audience. There is unnecessary nesting via the if/else for page orientation, and action granularity is moderate. Overall, it is understandable but not polished.

Run 2

The code has clear intent and reasonably flat structure, but suffers from several readability issues. Variable naming is mixed language (German/English) and abbreviated (Breite, Hoehe, pageX, xsize), reducing clarity. Some operations are dense, like combined image opening and size extraction. The file dialog call contains multiple positional arguments with ambiguous booleans, weakening readability. Error handling is good, as is the overall organization. Indentation and nesting are minimal, which helps reading flow. Comments only appear at the top, not throughout. The code length is concise, but action granularity sometimes combines steps. Overall, functional and simple, but would benefit from clearer naming, spacing, and more descriptive arguments.

Run 3

The code has a clear overall structure: imports, error handling, and a main function. The intent is understandable—import an image and scale it relative to page size. However, readability is hindered by mixed-language variable names (Breite, Hoehe) which obscure meaning for English readers, inconsistent spacing, and a slightly dense scaling block. Nesting is minimal, which is good, and actions are mostly one per line. The main function is concise but lacks comments explaining the 0.8 scaling factor and the page orientation logic. Error handling is straightforward. Overall, the code is functional but could be clearer with consistent naming, minor comments, and formatting improvements.

Run 1

Code Structure: Imports and dependency checks precede a focused main function, providing logical organization. Nesting: Shallow try/except blocks and a single if/else keep complexity low. Clarity of intent: Image selection and proportional sizing are understandable, but mixed German and English variable names, wildcard imports, and the unexplained 0.8 factor reduce clarity. Code length: Short and mostly concise, although the dimension-selection conditional could be simplified with min(). Action granularity: Each line performs one coherent action; tuple unpacking is appropriate. Reading flow: Execution follows a natural sequence from dependencies to page dimensions, image loading, and sizing, but inconsistent spacing and capitalization interrupt readability. The snippet ends without using the calculated dimensions or invoking main, leaving its overall purpose incomplete.

Run 2

Code Structure: Imports, dependency checks, and image-sizing logic are logically separated, though main is not invoked in the shown code. Nesting: Shallow try/except blocks and a single if/else are easy to follow. Clarity of intent: Dialog text and calculations suggest sizing an imported image to fit the page while preserving its aspect ratio, but mixed-language variable names, abbreviations, and wildcard imports reduce clarity. Code length: Short and focused, although the width-selection conditional could be simplified using min(). Action granularity: Each line generally performs one clear action; tuple unpacking is appropriate. Reading flow: Execution proceeds naturally from dependency checks to page dimensions, image selection, and size calculation, but inconsistent spacing and naming interrupt readability.

Run 3

Code Structure: Imports, dependency checks, and the main function are logically separated, though the snippet ends without completing or invoking main. Nesting: Shallow try/except blocks and a simple conditional are easy to follow. Clarity of intent: Selecting an image and calculating dimensions to fit the page is understandable, but wildcard imports, mixed-language names such as Breite and Hoehe, and abbreviated variables obscure details. Code length: Compact overall; the conditional could be expressed more directly using min(pageX, pageY). Action granularity: Each line performs one coherent operation, including natural tuple unpacking. Reading flow: Execution proceeds naturally from page dimensions to image selection and scaling, but inconsistent spacing, capitalization, and blank lines reduce polish.