Sample

Dorn/python/111

Human rating uses the original dataset scale.

DatasetDorn
Human2.88
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
0.0Δ 24.5
Scalabrino0.0020–1; higher is more readable
0.8Δ 23.7
Dorn0.2840–1; higher is more readable
22.0Δ 2.5
Mi0.030–1; higher is more readable
4.7Δ 19.8
LLOC26Logical lines; fewer is more readable
18.8Δ 5.7
DeepSeek V4 Pro60–20; mean of three runs
15.3Δ 9.2
GPT-6.1 Sol130–20; mean of three runs
30.6Δ 6.1
BTTF0.2860–1; higher is more readable
14.2Δ 10.3
Human2.881–5; original rating
24.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)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.4493.368−148.281
Source linesThe number of non-empty source lines.50+20
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.214−6.321

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

Score0.002

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.128.98−1.798
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.129+1.277
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.49−0.699
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.823+0.287
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.30−0.268
Indentation frequencyHow rapidly indentation changes from line to line.26+0.162
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.092+0.044

Intercept 0.07 + feature contributions = -0.924 (log-odds).
Score = sigmoid(-0.924) = 0.284.

Score0.03
Score26
Run 1

The code is difficult to read due to inconsistent indentation, excessive inline comments, and dense multi-line function calls that obscure the logic. Structure is somewhat organized by feature (circles, radial lines, labels), but the logic is tangled and hard to follow. Nesting is moderate, but deep inside loops for subdivs. Clarity of intent is undermined by comments that repeat code rather than explain why—e.g., '#lines that go from there to the edge'. Code length is verbose, with many long, hard-to-read calls like draw_SVG_line containing multiple mathematical expressions per line. Action granularity is poor: several operations (calculations, function arguments) are packed onto single lines. Reading flow is disorganized; the first loop appears without a preceding context block, and indentation is off. The use of 'pi/2.0' repeatedly and the 'a_subdivs_cent' logic without explanation add confusion. Overall, the code would require significant effort to maintain or modify safely.

Run 2

The code is difficult to read due to several factors. The structure is tangled with deeply nested loops and conditional statements that lack clear organization or separation of concerns. Nesting levels reach three or four deep, making the flow hard to follow. Intent is often unclear due to cryptic variable names like 'dr', 'dtheta', 'rmax', and 'a_subdivs_cent', without comments explaining their purpose. The code is unnecessarily long with repetitive patterns that could be refactored into helper functions. Multiple actions are packed into single lines, such as the draw_SVG_line calls with many parameters. The reading flow is disorganized, with abrupt conditional switches and inline comments that don't sufficiently clarify the logic. The Python 2 inequality operator '<>' also adds to the confusion. Overall, this code would benefit from better naming, function extraction, and clearer structure.

Run 3

The code has moderate structure with clear sections for different grid elements, but suffers from several readability issues. The nesting depth is reasonable (max 2-3 levels), but there are multiple actions per line and inconsistent indentation throughout. Variable names like 'dr', 'dtheta', 'r_subdivs' and 'a_divs_cent' are cryptic without context. Comments exist but are inconsistent - some explain intent while others just describe what code does. The math expressions in function calls are complex with inline calculations like 'i*dtheta-j*dtheta/self.options.a_subdivs+pi/2.0' that make parameters hard to read. Long lines exceed typical readability limits, and spacing is inconsistent (extra spaces around arguments, varying indentation). The first loop appears incomplete or misplaced. The use of '<>' for inequality is non-standard Python 3. The code works but requires significant effort to understand the polar coordinate math and option dependencies.

Run 1

Code Structure: Drawing operations are logically grouped into circles, radial lines, subdivisions, and labels, though the excerpt starts mid-block and repeats coordinate calculations. Nesting: Mostly manageable, but angular subdivisions use three levels of control flow. Clarity of intent: Descriptive drawing functions and comments explain the purpose; abbreviated variables, positional arguments, and magic constants make details harder to understand. Code length: Reasonably compact, although repeated option access and trigonometric expressions could be simplified with named intermediates. Action granularity: Generally one assignment or drawing operation per statement, with multiline calls aiding readability. Reading flow: Follows a natural drawing sequence, but inconsistent spacing, crowded inline comments, a redundant commented fragment, and legacy '<>' syntax interrupt scanning.

Run 2

Code Structure: Drawing is logically grouped into circles, radial lines, subdivisions, a centre dot, and labels, but repeated calculations and drawing calls could be extracted into helpers. Nesting: Mostly moderate, with a three-level conditional/loop block for angular subdivisions. Clarity of intent: Drawing function names and comments explain the purpose, while abbreviated variables and option names require interpretation. Code length: Reasonably compact, though repeated trigonometric expressions and long argument lists add clutter. Action granularity: Generally one assignment or drawing operation per statement; multiline calls remain single coherent actions. Reading flow: Sections follow a natural rendering sequence, but inconsistent spacing, crowded inline comments, a redundant commented fragment, and the abrupt opening indentation interrupt reading. The legacy '<>' operator also makes the code less familiar to modern Python readers.

Run 3

Code Structure: Drawing operations are logically grouped into circles, radial lines, subdivisions, centre dot, and labels, but repeated geometry and drawing calls could be factored into helpers. Nesting: Mostly moderate, with the angular subdivision section reaching three levels. Clarity of intent: Comments and drawing-function names explain the purpose, while abbreviated variables and option names, dense arithmetic, and a magic constant obscure details. Code length: Reasonably compact, though repeated expressions and long argument lists add unnecessary bulk. Action granularity: Generally one assignment or drawing operation per statement; multiline calls preserve this well. Reading flow: The progression from grid elements to labels is natural, but inconsistent spacing, crowded inline comments, a stale comment, and the abruptly indented opening fragment interrupt readability. The legacy '<>' operator also makes the code less familiar to modern Python readers.