Sample
Dorn/python/79
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 20.6Δ 13.4 |
| Scalabrino | 0.517 | 0–1; higher is more readable | 45.0Δ 11.0 |
| Dorn | 0.438 | 0–1; higher is more readable | 36.5Δ 2.5 |
| Mi | 0.301 | 0–1; higher is more readable | 29.2Δ 4.7 |
| LLOC | 22 | Logical lines; fewer is more readable | 26.7Δ 7.2 |
| DeepSeek V4 Pro | 5.33 | 0–20; mean of three runs | 12.8Δ 21.2 |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs | 30.6Δ 3.3 |
| BTTF | 0.474 | 0–1; higher is more readable | 38.4Δ 4.5 |
| Human | 3.07 | 1–5; original rating | 34.0 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 1429.482 | −47.173 |
| 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.335 | −6.502 |
Intercept 8.87 + feature contributions = -32.805 (log-odds).
Score = sigmoid(-32.805) = 0.
| Score | 0.517 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 76 | +0.446 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76 | +0.422 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.116 | −0.188 |
| 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.844 | +0.007 |
Intercept 0.07 + feature contributions = -0.251 (log-odds).
Score = sigmoid(-0.251) = 0.438.
| Score | 0.301 |
|---|
| Score | 22 |
|---|
Run 1
The code lacks clear structure and logical organization. The first two lines appear disconnected from the function that follows, possibly leftover or misplaced code, creating confusion. Nesting is moderate but not egregious; however, the if-elif chain for copymode is repetitive and could be simplified with a mapping or dictionary. Clarity of intent is low—variable names like 'v', 'dx', and 'vy' are cryptic without context. The code length is acceptable but not concise due to repeated assignments. Action granularity is mostly one action per line, which is good, but inconsistent formatting (e.g., missing spaces around '=') hurts readability. Reading flow is disrupted by the unexplained initial lines and ambiguous comments like '#flipxy(bbox)...'. Overall, the code is hard to follow without external context or surrounding code.
Run 2
The code suffers from multiple readability issues. The initial two lines appear to be floating variable assignments without context, likely part of a loop or separate function, creating confusion. The 'effect' method has a logical flow but is burdened by repetitive conditional blocks that could be simplified into a mapping structure. Nesting is moderate, with one if-elif chain, but the conditional assignments are verbose. Naming is inconsistent - some variables use underscores (bbox) while others are camelCase-like. Magic numbers in the bbox flipping operation lack explanation. Spacing is inconsistent, with no spaces around some operators (=, +) but proper indentation in the function. The reading flow is disrupted by the floating code at the top and the abrupt ending mid-computation. While individual operations are relatively clear, the overall structure lacks cohesion and explanatory comments for non-obvious transformations like the coordinate flip.
Run 3
The code has significant readability issues. The first two lines appear completely disconnected from any function context, suggesting poor structure. The effect() method is overly long and mixes validation, option processing, geometry calculations, and variable assignments without clear separation. Deeply nested conditionals in the copymode handling could be simplified with a dictionary lookup. Inconsistent spacing around operators (e.g., 'repeat =False', 'stretch=True' vs 'stretch=True') and lack of blank lines between logical blocks hurt readability. Variable names like 'v', 'dx', 'dy' are cryptic. The commented-out bbox flip and disorganized flow make intent unclear. Some positives: the error message is clear, and indentation is consistent within the method. However, the overall structure feels like a rough draft with multiple actions crammed together and magic numbers in the bbox manipulation.
Run 1
Code Structure: The effect method follows a logical sequence of validation, selection preparation, option configuration, and geometry calculation, but the opening assignments lack context. Nesting: Shallow conditionals and an early return keep nesting manageable. Clarity of intent: Descriptive option names and the error message help, while abbreviated variables, unexplained bounding-box transformations, and a cryptic comment obscure geometry operations. Code length: Generally concise, though the repeated mode branches duplicate assignments. Action granularity: Each line performs one main action, making individual operations easy to follow. Reading flow: Execution proceeds naturally, but inconsistent spacing, excessive indentation in the opening fragment, and uneven blank lines reduce visual consistency.
Run 2
Code Structure: The effect method follows a logical sequence of validation, selection preparation, mode configuration, and bounding-box calculations, but the opening statements lack context. Nesting: Shallow conditionals and an early return keep complexity low. Clarity of intent: Descriptive option names and the error message help, while abbreviated variables, numeric bounding-box indices, and an unclear comment obscure geometric operations. Code length: Reasonably concise, although repeated mode branches add avoidable duplication. Action granularity: Each statement generally performs one action per line. Reading flow: Execution progresses naturally, but inconsistent spacing, excess whitespace, and the disconnected opening fragment interrupt readability.
Run 3
Code Structure: The effect method follows a logical sequence of validation, selection preparation, option configuration, and geometry calculation, but the initial detached assignments lack context. Nesting: Mostly flat, with a straightforward conditional chain and an early return. Clarity of intent: Descriptive option names and the error message help, but abbreviated geometry variables, unexplained coordinate transformations, and a vague commented-out operation obscure details. Code length: Reasonably concise, though repetitive mode branches could be simplified. Action granularity: Each line generally performs one assignment or call, making individual steps easy to follow. Reading flow: Execution order is natural within the method, but inconsistent spacing, uneven blank lines, and the abrupt opening reduce readability.