Sample
Dorn/python/25
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.607 | 0–1; higher is more readable | 82.7Δ 23.7 |
| Dorn | 0.857 | 0–1; higher is more readable | 86.9Δ 27.9 |
| Mi | 0.711 | 0–1; higher is more readable | 86.6Δ 27.6 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.6Δ 29.5 |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs | 79.9Δ 20.9 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 93.5Δ 34.4 |
| BTTF | 0.466 | 0–1; higher is more readable | 36.2Δ 22.8 |
| Human | 3.45 | 1–5; original rating | 59.1 |
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) |
|---|---|---|
| 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.233 | −7.85 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 114.694 | −3.785 |
| Source linesThe number of non-empty source lines. | 8 | +3.2 |
Intercept 8.87 + feature contributions = 0.435 (log-odds).
Score = sigmoid(0.435) = 0.607.
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. | 61 | +1.082 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 3 | +0.352 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.065 | +0.313 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 7.968 | −0.298 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 48 | −0.03 |
Intercept 0.07 + feature contributions = 1.787 (log-odds).
Score = sigmoid(1.787) = 0.857.
| Score | 0.711 |
|---|
| Score | 3 |
|---|
Run 1
The code is a simple module defining constants for MySQL protocol. Structure is clear with a docstring explaining purpose, followed by exports and a revision string. Nesting is non-existent, keeping it flat. Intent is clear — this is a constants module. Length is concise, with no unnecessary code. Action granularity is appropriate, with one logical grouping per line. Reading flow is natural: docstring, exports, revision. Minor deductions: the __revision__ slicing expression is cryptic and could confuse readers unfamiliar with SVN keyword expansion, and missing spaces after commas in __all__ slightly reduce style consistency. Overall, it is highly readable for a constants definition file.
Run 2
The code is a small constants module with a clear docstring explaining its purpose. Structure is logical: docstring, public API declaration, and version parsing. Nesting is minimal (only a string slice, which is shallow). Intent is clear—defining and exporting MySQL protocol constants. Code length is concise; no unnecessary lines. Action granularity is appropriate: each statement is on its own line and performs one logical action. Reading flow is natural, from purpose to exports to version. Minor deductions: the string-slicing revision extraction is slightly cryptic without context, and the lack of spacing after commas in '__all__' slightly reduces consistency, but overall readability is very high.
Run 3
The code is a short constants module with a clear purpose, indicated by the docstring. The flat structure and one-action-per-line style contribute to readability. The module exports constants at the top and maintains a revision string. However, the naming is generic ('CR', 'ER', 'FLAG') and gives no hint of their values or domains. The revision parsing via string slicing is obscure and fragile. The module name lacks context, and there are no comments explaining individual constants. While the code is concise, the ambiguity in naming and the cryptic revision logic reduce clarity of intent and overall readability.
Run 1
Code Structure: A module docstring followed by export and revision metadata is logically organized. Nesting: No nesting makes the code easy to scan. Clarity of intent: The docstring clearly states the module’s purpose, and __all__ identifies public exports; however, the revision string slicing uses unexplained indices. Code length: Very concise, with no unnecessary code. Action granularity: Each statement performs one distinct action. Reading flow: Natural top-to-bottom flow, slightly weakened by inconsistent spacing between list elements and the opaque revision extraction.
Run 2
Code Structure: A descriptive module docstring followed by export and revision metadata is logically organized. Nesting: No nesting, making the code easy to scan. Clarity of intent: The module purpose and exported names are clear, though the revision string slicing uses unexplained numeric offsets. Code length: Concise, with no unnecessary code. Action granularity: Each assignment occupies its own line and performs a distinct task. Reading flow: Natural top-to-bottom progression; inconsistent spacing between list elements slightly reduces visual readability.
Run 3
Code Structure: A clear module docstring precedes export and revision metadata, providing logical organization. Nesting: No nesting makes the snippet easy to scan. Clarity of intent: The docstring and __all__ clearly describe the module's purpose and exports, but the numeric slicing used to extract __revision__ is less self-explanatory. Code length: Very concise, with no unnecessary implementation. Action granularity: Each assignment occupies its own line and serves a single purpose. Reading flow: Natural top-to-bottom progression, though inconsistent spacing between list items slightly reduces polish.