Sample
Dorn/python/71
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 15.9Δ 10.3 |
| Scalabrino | 0.147 | 0–1; higher is more readable | 8.5Δ 17.7 |
| Dorn | 0.512 | 0–1; higher is more readable | 44.0Δ 17.8 |
| Mi | 0.51 | 0–1; higher is more readable | 52.9Δ 26.7 |
| LLOC | 40 | Logical lines; fewer is more readable | 1.4Δ 24.8 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 18.1Δ 8.1 |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs | 27.3Δ 1.1 |
| BTTF | 0.482 | 0–1; higher is more readable | 39.8Δ 13.6 |
| Human | 2.94 | 1–5; original rating | 26.2 |
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. | 1854.721 | −61.206 |
| 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. | 5.076 | −7.613 |
Intercept 8.87 + feature contributions = -39.949 (log-odds).
Score = sigmoid(-39.949) = 0.
| Score | 0.147 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 48 | +0.923 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 102 | +0.841 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 49 | −0.699 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 48 | −0.681 |
| 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. | 101.98 | −0.654 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.777 | +0.286 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.101 | −0.04 |
Intercept 0.07 + feature contributions = 0.047 (log-odds).
Score = sigmoid(0.047) = 0.512.
| Score | 0.51 |
|---|
| Score | 40 |
|---|
Run 1
The code lacks overall structure and coherent organization. The first function appears disconnected from the rest, and there is no clear separation between functions, global variables, and the main execution block. The code starts mid-function without a definition, which hurts clarity. Nesting is moderate but the flow is interrupted with inline prints and file operations. Intent is partially clear but ambiguous due to missing context, globals, and side effects inside functions. The code is unnecessarily long in places and does multiple actions per line (e.g., conditionals with print and continue). Action granularity is inconsistent, mixing file I/O, subprocess calls, and formatting. Reading flow is disjointed—jumping from function to module-level code without clear boundaries. Overall, the code is functional but poorly structured for readability.
Run 2
The code has very poor readability. The first function is missing its definition line, uses global variables, and has unclear naming. The main loop mixes I/O, string processing, subprocess calls, and error handling with no separation of concerns. There is deep nesting due to multiple if/else and continue statements. Intent is obscured by magic strings, temporary files, and scattered print statements. Multiple actions are packed into single lines (e.g., opening files, writing, closing, running commands). The reading flow is disorganized, jumping between file operations, command execution, and output formatting. Lack of functions, comments, or meaningful variable names further degrades clarity. While the code is compact, it is not concise in a readable sense—it crams too many responsibilities together. Overall, it requires significant effort to understand purpose and logic.
Run 3
The code has some clear intent in individual functions but overall structure is disorganized and hard to follow. The first function uses a global name variable without passing it as parameter, which is confusing. Action granularity is mixed: some lines do multiple things (e.g., opening file, writing, closing all in quick succession) while others are single actions. Nesting is shallow, which is good, but the reading flow is interrupted by scattered logic such as editing and clean-up sections without clear separation. Magic numbers and hard-coded strings (e.g., 'tmp', 'xmlsample') reduce clarity. The code is concise but at the cost of expressiveness. Error handling and variable naming are inconsistent, making the code feel risky to modify. Overall, it works but lacks the readability that helps maintain long-term.
Run 1
Code Structure: The helper and main processing loop provide logical organization, but top-level execution, global command state, and an incomplete opening function reduce clarity. Nesting: Mostly shallow, with continue statements keeping error paths simple; else blocks after continue are unnecessary. Clarity of intent: The symbol-to-image workflow is understandable, but terse names, unexplained temporary files, and a docstring that omits underscore insertion obscure details. Code length: Reasonably concise, though repeated command-error handling and manual file operations add verbosity. Action granularity: Most lines perform one action, but subprocess construction and XML formatting combine several operations. Reading flow: Processing proceeds naturally from input loading to rendering and output, although inconsistent spacing, commented-out debugging, and legacy print syntax interrupt the flow.
Run 2
Code Structure: Helper logic and a main processing loop provide basic organization, but the missing opening function definition, global command state, and top-level file handling weaken structure. Nesting: Mostly shallow, with early continues keeping error paths manageable; else blocks after continues are unnecessary. Clarity of intent: The LaTeX-to-PNG workflow is understandable, but terse names, fixed temporary filenames, and a docstring that omits underscore insertion obscure details. Code length: Fairly concise, though repeated command-error handling and manual counter updates add avoidable repetition. Action granularity: Most lines perform one action, but subprocess setup and XML formatting pack several operations together. Reading flow: Processing proceeds naturally from input to rendering to XML output, although commented-out debugging, inconsistent spacing, and implicit global dependencies interrupt readability.
Run 3
Code Structure: The script follows a logical input-to-rendering-to-output sequence, but mixes file handling, command execution, progress reporting, and XML generation in one loop; global command state weakens organization. Nesting: Mostly shallow, with early continues keeping control flow manageable, although else blocks after continue are unnecessary. Clarity of intent: Rendering symbols into PNGs is reasonably clear, but the opening function header is missing, names such as f and i are vague, and the lowercase-conversion docstring omits underscore insertion. Code length: Fairly concise, though repeated subprocess error handling and character replacement loops add verbosity. Action granularity: Most lines perform one action, but some combine formatting, calculations, and output. Reading flow: The processing order is natural, but inconsistent spacing, a commented-out debug line, implicit dependencies, and global variables interrupt readability.