Sample
Dorn/python/35
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 49.3Δ 17.8 |
| Scalabrino | 0.571 | 0–1; higher is more readable | 53.9Δ 22.4 |
| Dorn | 0.33 | 0–1; higher is more readable | 26.7Δ 4.7 |
| Mi | 0.704 | 0–1; higher is more readable | 84.7Δ 53.2 |
| LLOC | 26 | Logical lines; fewer is more readable | 18.8Δ 12.7 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 84.5Δ 53.1 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 48.9 |
| BTTF | 0.622 | 0–1; higher is more readable | 79.4Δ 47.9 |
| Human | 3.02 | 1–5; original rating | 31.5 |
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. | 998.941 | −32.965 |
| 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.405 | −6.607 |
Intercept 8.87 + feature contributions = -10.702 (log-odds).
Score = sigmoid(-10.702) = 0.
| Score | 0.571 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 50 | +0.992 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 50 | −0.727 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 48 | −0.663 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.77 | +0.286 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.115 |
| 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. | 86 | +0.023 |
Intercept 0.07 + feature contributions = -0.708 (log-odds).
Score = sigmoid(-0.708) = 0.33.
| Score | 0.704 |
|---|
| Score | 26 |
|---|
Run 1
The code is clean, well-structured, and highly readable. Each method has a single, clear responsibility, and naming conventions (Get/Set/Activate/Init) clearly communicate intent. Nesting is minimal — only one level in ActivateNext/ActivatePrevious, and the logic is flat and easy to follow. Actions are separated line by line, improving debugability and clarity. The reading flow is logical and natural, moving from getters/setters to behaviors and initialization. Length is concise with no unnecessary code or comments. Minor deductions: ActivateNext and ActivatePrevious have repetitive logic that could be extracted into a helper for DRYness, and the blank lines inside if-blocks are slightly unusual. Overall, this is exemplary procedural-style Python with excellent clarity.
Run 2
The code is generally readable with clear method names and simple, one-action-per-line logic. Structure is logical, organizing getters, setters, and actions. Nesting is minimal, with only one level in ActivateNext/ActivatePrevious. However, readability is reduced by several issues: inconsistent indentation creates visual clutter, blank lines are excessive and uneven, and the lack of docstrings or comments leaves intent partially implied. Some repeated logic (e.g., client window checks and page count retrieval) could be refactored, and method naming uses PascalCase rather than Python's snake_case convention. Overall, the code is understandable but not as polished or idiomatic as it could be.
Run 3
The code is generally readable with clear method names and logical organization. Each method performs a single, well-defined action, and the structure follows a consistent pattern. Nesting is minimal, with only one level of conditional checks in ActivateNext and ActivatePrevious. However, there are minor style inconsistencies: excessive blank lines between methods, and conditional bodies not indented as blocks in the provided formatting. The use of Hungarian notation (p prefix) is consistent but slightly dated. The conditions in ActivateNext/Previous could be broken into named variables for clarity, and the page-count check uses a magic number (0) that is understandable but implicit. Overall, the code is straightforward to follow with clear intent and concise implementation.
Run 1
Code Structure: Methods are logically separated into accessors, client creation, navigation, and initialization. Nesting: Navigation uses only two conditional levels, keeping complexity low. Clarity of intent: Method names and straightforward assignments clearly convey behavior, although pointer-style field names and framework-specific constants require some context. Code length: Methods are concise, but excessive blank lines and duplicated navigation logic add unnecessary length. Action granularity: Each statement performs one clear action. Reading flow: Execution is easy to follow, with explicit wraparound handling; placing initialization earlier and reducing whitespace would improve the overall flow.
Run 2
Code Structure: Small, focused methods logically separate accessors, client creation, navigation, and initialization. Nesting: Navigation uses only two conditional levels, keeping control flow easy to follow. Clarity of intent: Method names clearly communicate their purpose, though legacy prefixes such as _p and pChildFrame are less intuitive. Code length: Methods are concise, but excessive blank lines, repeated selection calls, and duplicated navigation logic add minor overhead. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Both navigation methods follow a natural check-calculate-wrap-select sequence; inconsistent whitespace and initialization appearing last slightly weaken the overall presentation.
Run 3
Code Structure: Small, focused methods provide logical organization, although initialization appears after the operational methods. Nesting: Navigation methods use only two conditional levels, keeping complexity low. Clarity of intent: Method names clearly describe access, initialization, and navigation; framework-specific names and pointer-style prefixes add minor cognitive overhead. Code length: Methods are concise, but excessive blank lines and duplicated navigation logic slightly reduce compactness. Action granularity: Each statement performs one action, with no crowded or compound lines. Reading flow: Navigation follows a natural check, calculate, wrap, and select sequence. Repeated GetSelection calls and inconsistent whitespace mildly interrupt an otherwise straightforward reading experience.