Sample

Dorn/python/64

Human rating uses the original dataset scale.

DatasetDorn
Human3.38
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
28.4Δ 24.5
Scalabrino0.6290–1; higher is more readable
65.5Δ 12.6
Dorn0.4150–1; higher is more readable
33.7Δ 19.2
Mi0.1850–1; higher is more readable
18.9Δ 34.0
LLOC25Logical lines; fewer is more readable
21.4Δ 31.5
DeepSeek V4 Pro6.670–20; mean of three runs
20.9Δ 32.0
GPT-6.1 Sol120–20; mean of three runs
19.9Δ 33.0
BTTF0.4730–1; higher is more readable
37.6Δ 15.3
Human3.381–5; original rating
52.9

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.1172.977−38.708
Source linesThe number of non-empty source lines.30+12
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.239−6.359

Intercept 8.87 + feature contributions = -24.197 (log-odds).
Score = sigmoid(-24.197) = 0.

Score0.629

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.77+0.404
Indentation frequencyHow rapidly indentation changes from line to line.30+0.301
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.30−0.268
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.31−0.061
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.897+0.008
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.096+0.006

Intercept 0.07 + feature contributions = -0.344 (log-odds).
Score = sigmoid(-0.344) = 0.415.

Score0.185
Score25
Run 1

The code is somewhat readable but has several issues. The structure is partially organized, with a function call and file writing logic at the end, but the main loop body lacks separation. Nesting is moderate but the try/except block adds complexity. Intent is unclear in several places: magic numbers like 4 and 2 for frame types, vague variable names like 'd', 'T', and 'content' vs 'contents'. The code is concise but at the cost of clarity. Multiple actions are crammed onto single lines (e.g., string concatenation and append operations). The reading flow is disjointed - the page counter and string building intermix with file I/O. The exception handling uses obsolete Python 2 syntax. Missing indentation and context make the beginning of the snippet hard to follow. Overall, it reads like legacy script code that prioritizes brevity over clarity, requiring domain knowledge of Scribus internals to understand.

Run 2

The code has several readability issues. It lacks clear structure—variables are appended to 'T' without context, and 'content' is checked before being updated, which can be confusing. Nesting is shallow but the logic flow is disorganized: appending to 'T', updating 'page', and file I/O are intermingled with no helper functions or comments. Variable names like 'd', 'T', and 'item' are not descriptive. Multiple actions occur per line in some cases, and the try/except uses outdated Python syntax. The reading flow jumps from tuple indexing (item[0], item[1]) to magic numbers (4, 2) without explanation. Overall, while concise, the intent and structure are unclear, making it hard to follow without prior knowledge of the data structures.

Run 3

The code is difficult to read due to inconsistent indentation, unclear variable names (e.g., 'd', 'T', 'item'), and ambiguity about the data structures being iterated. The main loop nests logic for different item types without helper functions, making intent hard to follow. There is mixed action granularity—some lines perform multiple operations, others are fragmented. The reading flow is disjointed: the function starts abruptly with an assignment to 'strpage', and there is no docstring or comments explaining overall purpose. The try/except block uses a bare exception and prints it without context. Duplication detection logic is especially unclear. Overall structure is not obviously organized: file writing is intermixed with content gathering. While the code is relatively concise, it sacrifices clarity, and only someone familiar with the specific Scribus API and original data structures could easily understand it.

Run 1

Code Structure: Export logic and document checks are reasonably separated, but the snippet starts mid-block, obscuring its overall organization. Nesting: Moderate nesting combines iteration, type checks, and duplicate handling without becoming excessively deep. Clarity of intent: Scribus calls suggest text/image export, but names such as T and d, positional item accesses, and numeric type codes obscure meaning. Code length: Mostly concise, although manual file closing and raising an exception for cancellation add avoidable complexity. Action granularity: Each line generally performs one action, making operations easy to distinguish. Reading flow: Processing items, writing the file, and displaying completion follow a natural sequence, but inconsistent spacing, incomplete surrounding context, and legacy exception syntax interrupt readability.

Run 2

Code Structure: Text and image handling are logically grouped, followed by file output and document checks, but the excerpt starts mid-block and lacks context. Nesting: Moderate nesting within the loop and duplicate check adds some reading effort without becoming deeply tangled. Clarity of intent: Scribus calls and output messages make the export purpose apparent, but terse names such as T and d, positional item access, and numeric type codes obscure details. Code length: Reasonably concise, although manual file closing and intermediate string variables add verbosity. Action granularity: Each line generally performs one action, making operations easy to follow. Reading flow: Processing, saving, and reporting follow a natural sequence, but inconsistent spacing, unnecessary parentheses, legacy exception syntax, and broad exception handling interrupt readability.

Run 3

Code Structure: Text and image handling are logically grouped, followed by file output and a document check, but the excerpt starts mid-block, obscuring its overall organization. Nesting: Loop, conditional, and duplicate-check nesting is moderate and manageable. Clarity of intent: Scribus calls make the export purpose apparent, but names like T and d, numeric item types, and tuple indexing obscure details. Code length: Mostly concise, though manual file closing and an intermediate completion-message variable add minor verbosity. Action granularity: Generally one action per line, making operations easy to distinguish. Reading flow: Processing, saving, and notification follow a natural sequence, but inconsistent spacing, unnecessary parentheses, legacy exception syntax, and broad exception handling interrupt readability.