Sample

Dorn/python/69

Human rating uses the original dataset scale.

DatasetDorn
Human3.89
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
22.6Δ 64.6
Dorn0.5860–1; higher is more readable
51.3Δ 35.9
Mi0.6610–1; higher is more readable
74.9Δ 12.3
LLOC31Logical lines; fewer is more readable
9.6Δ 77.6
DeepSeek V4 Pro11.330–20; mean of three runs
49.3Δ 37.9
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 6.8
BTTF0.6250–1; higher is more readable
79.9Δ 7.2
Human3.891–5; original rating
87.2

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.1522.384−50.239
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.4.64−6.96

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

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.48+0.923
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.66.922+0.831
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
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.31.843−0.291
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.926+0.288
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.107−0.094

Intercept 0.07 + feature contributions = 0.348 (log-odds).
Score = sigmoid(0.348) = 0.586.

Score0.661
Score31
Run 1

The code is relatively simple but has readability issues. The color assignment block is reasonably structured and easy to scan. However, three main problems stand out. First, there is no definition of the 'codes' dictionary, so its initial state is unknown; this makes lines like 'codes["white"] = codes["bold"]' confusing. Second, the aliasing section at the bottom uses two misspelled keys ('darkteal', 'fuscia') that are later referenced in 'functions_colors', and the 'red' key is never defined, creating ambiguity. Third, the 'nocolor' function modifies the global dictionary destructively, which is surprising behavior not reflected in its name. The code is generally flat and concise, with one action per line, and helper functions are clear. The reading flow is natural, but the missing dictionary declaration and key inconsistencies make the intent less clear. Overall, it is understandable but requires careful attention to avoid introducing bugs.

Run 2

The code is moderately readable. It uses clear, simple assignments for color codes and has straightforward functions. However, several issues reduce clarity: the repeated assignment pattern for colors is verbose and could be a dictionary literal; some assignments reference undefined keys or aliases (e.g., '0xAA0000' as a key, 'bold', 'reset') without prior definition in the snippet; there are duplicate assignments like codes['white'] and a typo 'fuscia' instead of 'fuchsia'. The functions nocolor(), reset_color(), and colorize() are clear, but create_color_func() is never used and adds dead code. The functions_colors list is long and partially redundant with earlier assignments. Structure is flat but repetitive, and intent is somewhat ambiguous due to missing context for special codes. Overall, the code is understandable but could be more concise and explicit.

Run 3

The code is fairly linear but lacks logical organization and clarity. The color mappings are scattered, with duplicates, aliases, and inconsistencies (e.g., 'fuscia' vs 'fuchsia', 'white' assigned twice, 'darkyellow' aliasing 'brown'). The intent behind these mappings and the overall structure is unclear. Nesting is minimal, which is good, but the flat list of assignments is hard to scan for relationships. Action granularity is mostly one assignment per line, which helps readability, but the monotony isn't offset by grouping or comments. The functions at the bottom are simple and readable, but their relationship to the color definitions is not explained. 'codes' is referenced but never defined, so the code lacks context. The reading flow is interrupted by duplicate and seemingly arbitrary assignments, making the code harder to understand than it should be.

Run 1

Code Structure: Color mappings, formatting helpers, and the function factory are logically grouped, though aliases could be separated more explicitly. Nesting: Minimal; the loop and nested factory function are straightforward. Clarity of intent: Most names and the factory docstring communicate purpose well, but overwriting 'white' with 'bold' and mapping 'darkteal' to 'turquoise' are surprising. The 'fuscia' alias is unexplained. Code length: Concise overall, with repetitive mappings that remain easy to scan. Action granularity: Each statement performs one clear action. Reading flow: Aligned assignments, blank lines, and short functions provide a natural flow, although inconsistent spacing and the intervening color-name list slightly weaken cohesion.

Run 2

Code Structure: Color aliases, formatting helpers, and the function factory form logical sections, though the placement of functions_colors interrupts the helper flow. Nesting: Minimal; only a simple loop and a clearly scoped inner function. Clarity of intent: Descriptive function names and a factory docstring explain the purpose, but overwriting white with bold, mapping darkteal to turquoise, and retaining both fuscia and fuchsia introduce ambiguity. Code length: Concise overall, although alias assignments are repetitive. Action granularity: Each line performs one straightforward assignment or operation. Reading flow: Aligned assignments, whitespace, and color-pair grouping make scanning easy; inconsistent spacing and unexplained aliases slightly reduce readability.

Run 3

Code Structure: Color mappings, formatting helpers, and the function factory are logically grouped, though aliases could be separated more explicitly. Nesting: Minimal; the loop and nested factory function are straightforward. Clarity of intent: Descriptive function names and simple assignments communicate purpose, but overwriting 'white' with 'bold', mapping 'darkteal' to 'turquoise', and including 'fuscia' obscure whether these are intentional compatibility aliases. Code length: Concise overall, although repeated mapping assignments could be represented more compactly as data. Action granularity: Each line generally performs one clear action. Reading flow: Alignment and blank lines make the mappings easy to scan, and helpers follow naturally. More consistent spacing between top-level functions and a brief explanation of unusual aliases would improve readability.