Sample

Dorn/python/1

Human rating uses the original dataset scale.

DatasetDorn
Human3.51
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.4940–1; higher is more readable
81.9Δ 17.5
Scalabrino0.7690–1; higher is more readable
84.9Δ 20.5
Dorn0.5980–1; higher is more readable
52.1Δ 12.3
Mi0.7050–1; higher is more readable
85.2Δ 20.9
LLOC7Logical lines; fewer is more readable
67.7Δ 3.3
DeepSeek V4 Pro11.670–20; mean of three runs
51.4Δ 13.0
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 16.0
BTTF0.6220–1; higher is more readable
78.8Δ 14.5
Human3.511–5; original rating
64.3

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.218.512−7.211
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.3.788−5.681
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -0.022 (log-odds).
Score = sigmoid(-0.022) = 0.494.

Score0.769

Feature contributions

FeatureValueContribution
(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.65.818+0.877
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
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.9.836−0.272
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.078+0.186

Intercept 0.07 + feature contributions = 0.399 (log-odds).
Score = sigmoid(0.399) = 0.598.

Score0.705
Score7
Run 1

The code is fairly readable: it uses clear variable names ('weekday', 'n', 'other'), minimal nesting, and one primary action per line. The structure is logical, with a try/except guarding attribute access in __eq__. However, the snippet lacks surrounding context, especially the method signature and class definition, which slightly obscures full intent. The try block contains a slightly dense conditional; extracting the comparison into a helper or using getattr with defaults could improve clarity. Overall, it's concise and straightforward but not exemplary.

Run 2

The code is generally clear and concise, with a flat structure and one action per line where appropriate. The `__eq__` method uses a try/except to handle comparison with objects lacking `weekday` or `n` attributes, which is pragmatic but slightly unconventional; it could be seen as ambiguous intent. The `return False` inside the `if` and the final `return True` are straightforward. The main weakness is the lack of context: the snippet begins mid-method, making the overall logical structure unclear. Still, within the given fragment, nesting is minimal, and the reading flow is natural.

Run 3

The code is a short fragment but lacks clarity. It shows a deep nesting issue with a try-except wrapped around a conditional return, affecting both structure and readability. While it is concise, the intent is ambiguous without context: it relies on implicit Exception handling for type checking, which obscures the purpose. The action granularity is reasonable, but the reading flow is disrupted by non-standard comparison logic. The lack of surrounding class definition leaves the return of a new instance unclear. Overall, it is functional but hard to follow and not readable.

Run 1

Code Structure: Equality logic is logically organized, but the leading else block lacks context. Nesting: The try/if structure is shallow and easy to follow. Clarity of intent: __eq__ clearly compares weekday and n, with AttributeError handling for incompatible objects; n is somewhat opaque. Code length: Concise, with no unnecessary repetition. Action granularity: Each line performs one clear action; the combined condition expresses a single comparison decision. Reading flow: Early returns make the equality method natural to read, although the disconnected opening fragment interrupts the overall flow.

Run 2

Code Structure: The equality method is logically organized, though the opening else block lacks context. Nesting: The try/if structure is shallow and easy to follow. Clarity of intent: Comparing weekday and n clearly establishes equality, and AttributeError handling addresses incompatible objects; the preceding constructor return is less clear in isolation. Code length: Concise, with little unnecessary code, although the equality check could be expressed more directly. Action granularity: Each line performs one clear action; combining two comparisons is appropriate. Reading flow: Early returns make the method straightforward to read, but the incomplete opening fragment slightly interrupts the flow.

Run 3

Code Structure: The equality method is logically organized, though the opening else branch lacks surrounding context. Nesting: Shallow nesting keeps the comparison and exception handling easy to follow. Clarity of intent: __eq__ clearly compares weekday and n, returning False when attributes are missing; the preceding constructor return is less clear in isolation. Code length: Compact, with little unnecessary code, although equality could be expressed more directly. Action granularity: Each line performs a single clear action, and combining related comparisons is reasonable. Reading flow: The equality method flows naturally from comparison to exception handling to success, but the incomplete opening branch slightly disrupts readability.