Sample
Dorn/python/29
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 27.2Δ 1.8 |
| Scalabrino | 0.434 | 0–1; higher is more readable | 34.3Δ 5.3 |
| Dorn | 0.707 | 0–1; higher is more readable | 66.7Δ 37.7 |
| Mi | 0.397 | 0–1; higher is more readable | 38.3Δ 9.3 |
| LLOC | 21 | Logical lines; fewer is more readable | 29.7Δ 0.7 |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs | 46.4Δ 17.4 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 37.0 |
| BTTF | 0.549 | 0–1; higher is more readable | 59.2Δ 30.2 |
| Human | 3 | 1–5; original rating | 29.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. | 1119.389 | −36.94 |
| Source linesThe number of non-empty source lines. | 29 | +11.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.426 | −8.139 |
Intercept 8.87 + feature contributions = -24.609 (log-odds).
Score = sigmoid(-24.609) = 0.
| Score | 0.434 |
|---|
Feature contributions
| Feature | Value | Contribution (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. | 73.967 | +0.532 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 73.967 | +0.389 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 26 | −0.176 |
| 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.104 | −0.066 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.867 | −0.006 |
Intercept 0.07 + feature contributions = 0.88 (log-odds).
Score = sigmoid(0.88) = 0.707.
| Score | 0.397 |
|---|
| Score | 21 |
|---|
Run 1
The code defines constants and helper functions for a scheduler, which is logically organized and easy to follow. However, readability is reduced by inconsistent indentation (mix of tabs/spaces), misleading function naming that uses uppercase (suggesting constants), and a comment that acknowledges a 'Not actually a constant' issue. Nesting is minimal, intent is mostly clear, and lines are concise, but the styling inconsistencies and naming conventions disrupt natural reading flow. Action granularity is fine, but the overall structure could be improved with a class or clearer separation of constants and functions.
Run 2
The code is relatively flat and easy to scan, with constants logically grouped together. However, several issues hurt readability. The comment '# Not actually a constant :)' followed by two functions named in ALL_CAPS violates naming conventions and misleads the reader about their nature. The functions themselves are nearly identical, duplicating logic that could be consolidated. The use of tabs and unusual alignment (e.g., in constant definitions) makes the formatting inconsistent and harder to parse. Additionally, the purposes of constants like wxSCHEDULER_TODAY vs wxSCHEDULER_TO_DAY are ambiguous without context. Action granularity is acceptable—one action per line—but the overall structure is somewhat disorganized due to the constant/function mixing and redundant code. Reading flow is disrupted by the misleading ALL_CAPS function names and formatting irregularities.
Run 3
The code is somewhat readable but has significant issues. The module-level constants are logically grouped and clearly named, which helps structure. However, the use of tabs for alignment is visually inconsistent. The functions SCHEDULER_BACKGROUND_BRUSH and DAY_BACKGROUND_BRUSH are poorly named: they are functions but use constant-style uppercase naming, and the comment 'Not actually a constant' indicates a deliberate but confusing design choice. Both functions duplicate logic (getting system colour and extracting RGB), violating DRY. The nested max() calls and multi-step operations within single return statements reduce clarity of intent and action granularity. Reading flow is interrupted by the misleading naming convention and the unnecessary duplication between the two brush functions. Overall, the code is understandable but could be much clearer with better naming, extraction of shared logic, and consistent formatting.
Run 1
Code Structure: Constants are logically grouped, followed by two small color helpers, but the final pen constant interrupts that organization. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: Descriptive constant names and straightforward color calculations convey purpose, though BRUSH functions return colors and constant-style function names are misleading. Code length: The snippet is concise, with minor duplication in retrieving and extracting the background color. Action granularity: Most lines perform one action; RGB tuple assignments combine closely related operations without significantly reducing clarity. Reading flow: The sequence is generally natural, but inconsistent spacing, tab alignment, and missing blank lines between functions and constants weaken visual separation.
Run 2
Code Structure: Constants and color helpers are logically grouped, but missing blank lines between functions and the final constant weaken separation. Nesting: Flat code with no nested control flow is easy to follow. Clarity of intent: Scheduler constants are descriptive, and color calculations are straightforward, though BRUSH names suggest brushes while functions return colors; abbreviated variables and the vague comment also reduce clarity. Code length: Short overall, with minor duplication in retrieving system colors. Action granularity: Mostly one assignment or return per line, although RGB extraction combines three method calls in one statement. Reading flow: The progression from imports to constants to helpers is natural, but inconsistent spacing, tab alignment, and uppercase function names interrupt readability.
Run 3
Code Structure: Constants and color helpers are logically grouped, but missing blank lines between functions and the final constant weaken separation. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: Scheduler constants have descriptive names, but the helpers return colors despite being named BRUSH, and the purpose of subtracting 15 is unexplained. Code length: The snippet is concise, although DAY_BACKGROUND_BRUSH unnecessarily extracts and reconstructs the existing color. Action granularity: Most lines perform one action; RGB tuple assignments group closely related operations without much complexity. Reading flow: The order is generally natural, but inconsistent spacing, tab alignment, abbreviated variable names, and function names resembling constants slightly disrupt readability.