Sample

Dorn/python/99

Human rating uses the original dataset scale.

DatasetDorn
Human2.98
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
20.1Δ 8.4
Scalabrino0.0820–1; higher is more readable
5.0Δ 23.4
Dorn0.2470–1; higher is more readable
20.1Δ 8.4
Mi0.6320–1; higher is more readable
68.5Δ 40.1
LLOC27Logical lines; fewer is more readable
16.9Δ 11.6
DeepSeek V4 Pro13.330–20; mean of three runs
61.0Δ 32.6
GPT-6.1 Sol130–20; mean of three runs
30.6Δ 2.2
BTTF0.3860–1; higher is more readable
22.0Δ 6.4
Human2.981–5; original rating
28.4

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.1419.452−46.842
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.628−6.943

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

Score0.082

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 (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.172−0.725
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.30−0.268
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.091−0.003

Intercept 0.07 + feature contributions = -1.115 (log-odds).
Score = sigmoid(-1.115) = 0.247.

Score0.632
Score27
Run 1

The code has a clear, linear structure that is easy to follow, with one main action per line and no deep nesting. Variables like `t1` through `t7` are sequentially assigned, and the repeated create/set pattern is consistent. However, readability suffers from several issues: single-letter variable names (`x`, `y`, `l`, `h`) are ambiguous without context, and the magic numbers (-2, -7, 0.1) lack explanation. The repeated block pattern could be simplified with a helper function to reduce redundancy. There is also a minor bug: `t7` is assigned twice, overwriting the first reference. The import fallback handles the Scribus dependency well, but the overall code would benefit from more descriptive naming and abstraction.

Run 2

The code is structurally simple and flat, with a clear linear sequence of operations, making it easy to follow. However, it suffers from repetitive variable names and magic numbers that obscure intent: coordinates like y-2 or x+7+h lack semantic meaning. Multiple actions are combined per line (e.g., creating a line and setting its width), which violates the one-action-per-line principle but keeps the script concise. The reading flow is natural—each pair of lines adds one visual tick mark—but the purpose of those marks is not explained. Error handling is minimal, and there is no documentation or comments to clarify the overall goal. Overall, readability is moderate: the structure is approachable for a small script, but clarity of intent and granularity could be improved with named constants or helper functions.

Run 3

The code is logically structured into a single main() function with clear, sequential steps. Nesting is minimal, and intent is mostly clear—it creates crop marks around a selected object in Scribus. However, readability suffers due to repetition: eight nearly identical line-creation and line-width statements could be condensed into a loop or helper function. Variable names like t1–t7 are generic and don't convey purpose. Action granularity is mostly one action per line, which is good. The reading flow is natural, but the repeated 't7' assignment appears to be a copy-paste error, and magic numbers (2, 7, 0.1) lack explanation. The unit handling is reasonable but unexplained. Overall, the script is easy to follow but verbose and slightly error-prone.

Run 1

Code Structure: A separate main function and import-error handling provide basic organization, but repeated line creation lacks grouping or abstraction. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Scribus API calls suggest drawing marks around an object, but terse variables, unexplained numeric offsets, and a wildcard import obscure details. Reusing t7 for two lines is confusing. Code length: Short overall, though eight nearly identical creation-and-width pairs introduce avoidable repetition. Action granularity: Each statement performs one clear operation. Reading flow: Position and size retrieval, drawing, deselection, and unit restoration follow a natural sequence, but missing comments, inconsistent spacing, and no visual grouping make the coordinate calculations harder to follow.

Run 2

Code Structure: Import handling and a single main function provide logical organization, but repetitive line creation lacks abstraction or grouping. Nesting: The code is flat and easy to follow. Clarity of intent: Scribus API names suggest drawing marks around an object's bounds, but terse variables, wildcard imports, unexplained numeric constants, and the reused t7 name obscure details. Code length: Short overall, though eight nearly identical creation-and-width pairs could be simplified with a helper or coordinate list. Action granularity: Each statement performs one clear operation. Reading flow: Saving units, obtaining geometry, drawing lines, and restoring units forms a natural sequence, but inconsistent spacing and absent comments or descriptive names make the geometric calculations harder to scan.

Run 3

Code Structure: Import handling and a single main function provide clear organization, but repeated line creation lacks abstraction. Nesting: The code is flat and easy to follow. Clarity of intent: API calls suggest drawing marks around an object, but wildcard imports, terse names such as l, h, and t1–t7, unexplained numeric constants, and no comments obscure the exact purpose. Code length: Short overall, though eight nearly identical createLine/setLineWidth pairs add avoidable repetition. Action granularity: Each statement generally performs one action, making individual operations easy to inspect. Reading flow: Saving units, obtaining geometry, drawing lines, and restoring units form a natural sequence, but tightly packed arithmetic and reusing t7 for the final line reduce clarity.