Sample
Dorn/python/68
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.072 | 0–1; higher is more readable | 72.7Δ 0.0 |
| Scalabrino | 0.508 | 0–1; higher is more readable | 43.4Δ 29.3 |
| Dorn | 0.755 | 0–1; higher is more readable | 71.3Δ 1.4 |
| Mi | 0.434 | 0–1; higher is more readable | 42.9Δ 29.8 |
| LLOC | 14 | Logical lines; fewer is more readable | 49.0Δ 23.7 |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs | 77.3Δ 4.6 |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs | 86.5Δ 13.8 |
| BTTF | 0.302 | 0–1; higher is more readable | 16.2Δ 56.5 |
| Human | 3.63 | 1–5; original rating | 72.7 |
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. | 515.502 | −17.012 |
| Source linesThe number of non-empty source lines. | 31 | +12.4 |
| 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.543 | −6.815 |
Intercept 8.87 + feature contributions = -2.556 (log-odds).
Score = sigmoid(-2.556) = 0.072.
| Score | 0.508 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.03 | +0.654 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 81.438 | +0.51 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 15 | −0.218 |
| 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. | 84 | +0.107 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 15 | +0.077 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.894 | +0.022 |
Intercept 0.07 + feature contributions = 1.124 (log-odds).
Score = sigmoid(1.124) = 0.755.
| Score | 0.434 |
|---|
| Score | 14 |
|---|
Run 1
The code is well-structured with a clear class-level docstring explaining the purpose and context. The __init__ method is flat, with minimal nesting and logical assignment grouping. Variable names are descriptive (topicNameTuple, parentArgsInfo, allOptional, allRequired). Each line performs a single action, maintaining clean action granularity. The flow is natural: documentation, initialization, then relationship handling. Minor readability issues include the unused topicNameTuple parameter, which is ambiguous, and the conditional assignment of parentAI could be more concise. The class constants are clear but lack enum-like grouping. Overall, the code is highly readable but has slight room for improvement in parameter clarity and avoiding unnecessary complexity.
Run 2
The code is generally readable but has some inconsistencies. The class docstring clearly explains its purpose, and methods are logically organized. However, there are several issues: the constructor mixes initialization of different attribute types without clear grouping, the parent reference handling uses a custom WeakNone class (not shown) which adds ambiguity, and the isComplete() method is trivially simple yet exists without comment explaining why. Variable naming is mostly clear but mixing naming conventions (argsDocs, argsSpecType, parentAI, allOptional) creates inconsistency. The code could benefit from grouping initialization by concern (docs, spec metadata, parent reference) and clarifying the WeakNone purpose. Nesting is appropriately flat, line length is reasonable, and each line performs one action. The reading flow is acceptable but could be improved with better section separation within the __init__ method.
Run 3
The code is generally readable with clear intent, good docstring, and logical structure. The class has a single responsibility and the methods are concise. However, there are some readability issues: the `__init__` method performs multiple actions without clear separation, constants are defined but their relationship to the logic is not obvious, and the `WeakNone` usage is confusing without additional context. The docstring is helpful but contains some historical context that may be unnecessary for understanding the current implementation. The nesting is minimal, which is positive, but the action granularity could be improved by grouping related operations or adding section comments. Overall, it is above average but not exemplary.
Run 1
Code Structure: The class is logically organized into documentation, constants, initialization, and a simple query method. Nesting: Only one shallow conditional keeps the code easy to follow. Clarity of intent: The docstring explains the class's role and fixed parameter specification, though abbreviations such as LPS and parentAI, external dependencies, and the unused topicNameTuple parameter slightly reduce clarity. Code length: The implementation is concise; the introductory documentation is somewhat lengthy relative to its simplicity. Action granularity: Each statement performs one clear action, with no compressed multi-operation lines. Reading flow: Initialization proceeds naturally from argument documentation to specification properties and the parent reference. Minor spacing inconsistencies and comments calling tuples lists slightly detract from polish.
Run 2
Code Structure: A small, logically organized class with constants, initialization, and a completeness query. Nesting: Minimal, with only one simple conditional. Clarity of intent: The docstring explains the class's role and fixed parameter specification, and inline comments clarify attributes. However, domain-specific terminology, unexplained WeakNone(), an unused topicNameTuple parameter, and an unused SPEC_MISSING constant slightly obscure intent. Code length: Implementation is concise, though the docstring is somewhat lengthy relative to the functionality. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Initialization proceeds naturally from argument documentation to specification attributes and then the parent reference. Inconsistent spacing and mixed naming conventions modestly reduce polish.
Run 3
Code Structure: The class is logically organized, with documentation, constants, initialization, and a simple query method. Nesting: Only one shallow conditional keeps complexity low. Clarity of intent: The docstring explains the class's purpose and fixed argument specification, though abbreviations such as LPS and parentAI, external dependencies, and the unused topicNameTuple parameter require additional context. Code length: The implementation is concise, but the docstring is somewhat verbose relative to its simplicity. Action granularity: Each statement performs a single clear action. Reading flow: Execution proceeds naturally from argument documentation to specification fields and parent linkage; inconsistent spacing and comments describing tuples as lists slightly detract from readability.