Sample
Dorn/python/101
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.888 | 0–1; higher is more readable | 88.3Δ 0.8 |
| Dorn | 0.653 | 0–1; higher is more readable | 59.3Δ 28.1 |
| Mi | 0.435 | 0–1; higher is more readable | 43.5Δ 44.0 |
| LLOC | 4 | Logical lines; fewer is more readable | 82.7Δ 4.7 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 87.9Δ 0.4 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 88.9Δ 1.4 |
| BTTF | 0.616 | 0–1; higher is more readable | 76.9Δ 10.6 |
| Human | 3.89 | 1–5; original rating | 87.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) |
|---|---|---|
| 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.598 | −6.896 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 106.198 | −3.505 |
Intercept 8.87 + feature contributions = 2.069 (log-odds).
Score = sigmoid(2.069) = 0.888.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 9 | +0.718 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.044 | +0.51 |
| 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. | 75 | +0.489 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.895 | −0.286 |
Intercept 0.07 + feature contributions = 0.634 (log-odds).
Score = sigmoid(0.634) = 0.653.
| Score | 0.435 |
|---|
| Score | 4 |
|---|
Run 1
The code is very concise and readable. It sets the locale, imports a function, and defines two string variables with clear names and purposes. The structure is logical: environment setup, import, then configuration variables. There's no nesting, and the intent is evident—it's a command-line tool for converting reStructuredText to LaTeX. The only minor issues are the empty string locale argument (slightly ambiguous) and a redundant blank line between the import and variable definitions, which slightly disrupts the visual grouping. Otherwise, the reading flow is natural and clear.
Run 2
The code is concise, with clear intent and a natural reading flow. It sets the locale, imports a specific function, and defines two straightforward strings for command-line usage and description. The structure is logical, the nesting is nonexistent, and action granularity is appropriate. However, the locale setting at the very top is somewhat ambiguous without context, and the import placement after the locale call deviates from PEP8 conventions, which slightly impacts clarity. Overall, it's highly readable but could benefit from a comment explaining the locale call and conventional import ordering.
Run 3
The code is highly readable. It is concise, with a clear logical structure: setting the locale, importing a function, and defining metadata for a command-line tool. Nesting is non-existent, and each action is separated clearly into logical blocks. The intent is straightforward—preparing localization, importing a publisher, and defining usage/description strings. The use of a multi-line string concatenation for 'description' maintains readability without excessive line length. Minor deductions: import ordering convention (stdlib import before locale setting) and lack of a trailing newline, but overall it is clean, unambiguous, and well-structured.
Run 1
Code Structure: Simple organization, though placing the import after the locale-setting call is unconventional. Nesting: No nesting, making the snippet easy to scan. Clarity of intent: The usage and description clearly identify a reStructuredText-to-LaTeX command-line tool; the locale setup is recognizable, though the locale import is not shown. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action; the split description string remains a single clear assignment. Reading flow: Generally natural, with whitespace separating setup and metadata, but the late import and extra trailing blank lines slightly interrupt the flow.
Run 2
Code Structure: Simple and logically grouped, though locale configuration before the import is unconventional, and the locale import is not shown. Nesting: No nesting makes the snippet easy to scan. Clarity of intent: The usage and description clearly identify a command-line tool for converting reStructuredText to LaTeX; the role of publish_cmdline is not demonstrated. Code length: Concise, with no unnecessary implementation. Action granularity: Each statement performs one action, and the split description remains a single clear assignment. Reading flow: Mostly natural, with whitespace separating setup, import, and metadata, but placing imports first would improve consistency.
Run 3
Code Structure: Simple and logically grouped, although locale configuration before the import is unconventional. Nesting: No nesting, making the code easy to scan. Clarity of intent: The usage and description clearly identify a command-line tool for generating LaTeX from reStructuredText; the locale setup is understandable, but locale is not imported in the shown snippet. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action; splitting the description across lines improves readability. Reading flow: Mostly natural, with whitespace separating setup and metadata, though placing imports first would improve flow. The unused publish_cmdline import and missing command invocation make the snippet appear incomplete.