Sample
Dorn/cuda/48
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 34.3Δ 7.2 |
| Scalabrino | 0.504 | 0–1; higher is more readable | 42.6Δ 15.6 |
| Dorn | 0.395 | 0–1; higher is more readable | 31.8Δ 4.7 |
| Mi | 0.213 | 0–1; higher is more readable | 21.4Δ 5.6 |
| LLOC | 15 | Logical lines; fewer is more readable | 46.5Δ 19.5 |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs | 49.3Δ 22.3 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 19.9Δ 7.1 |
| BTTF | 0.248 | 0–1; higher is more readable | 9.7Δ 17.3 |
| Human | 2.95 | 1–5; original rating | 27.0 |
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. | 1029.082 | −33.96 |
| 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.993 | −7.49 |
Intercept 8.87 + feature contributions = -20.579 (log-odds).
Score = sigmoid(-20.579) = 0.
| Score | 0.504 |
|---|
Feature contributions
| Feature | Value | Contribution (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. | 113.935 | −1.161 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114 | +1.035 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.137 | −0.388 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 27 | −0.199 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 25 | +0.151 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 23 | +0.058 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.609 | +0.004 |
Intercept 0.07 + feature contributions = -0.428 (log-odds).
Score = sigmoid(-0.428) = 0.395.
| Score | 0.213 |
|---|
| Score | 15 |
|---|
Run 1
The code shows moderate readability with reasonable structure and intent, but suffers from inconsistent nesting, unclear variable names, and mixed action granularity. The synchronization call is well-placed to indicate a barrier point. However, single-letter variables (w, u, d, a, b, i, j) lack descriptive context, making the update logic harder to follow without external documentation. Nesting is generally manageable, though the conditional blocks for 'a' and 'b' updates add depth and could be flattened or extracted. Some lines combine multiple operations (e.g., arithmetic with assignment), reducing one-action-per-line clarity. The learning rate and weight update functions suggest good modularization, but the surrounding code doesn't consistently break logic into helper functions. Reading flow is acceptable for a CUDA kernel, but the scattered update blocks for weights, errors, a, and b feel disorganized. Overall, it's functional and somewhat readable, but could be improved with better naming, reduced nesting, and clearer separation of concerns.
Run 2
The code shows moderate readability. It has a clear, flat structure with minimal nesting (only one level deep in conditionals), and each line generally performs a single action. The intent is fairly clear—updating weights and biases in what appears to be a neural network training step, with synchronization and learning rate adjustments. However, readability suffers from several issues: cryptic variable names (e.g., `deltaW`, `hd`, `vr`, `lastDeltaWithoutLearningMomentumW`), magic numbers and unclear indexing logic, and an abrupt start without visible loop context. The mixing of CUDA thread logic with mathematical operations also creates some cognitive overhead. The reading flow is okay but not natural; comments help but are sparse. Code length is reasonable, but some expressions are dense. Overall, it's functional but would benefit from better naming and more contextual comments.
Run 3
The code is difficult to read due to unclear variable names, inconsistent formatting, and ambiguous logic flow. There is a mix of concerns: thread synchronization, weight updates, and bias updates are interleaved without clear separation. The nesting is moderate, but the conditions like 'if (i < I && j < J)' and 'if (i < I && threadIdx.y == 0)' create tangled control flow. Variable names such as 'vd', 'hd', 'vr', 'hr', 'deltaW', 'deltaA', 'deltaB' lack descriptive context. The code length is not excessive, but the intent is not immediately obvious. Action granularity is acceptable, with one operation per line, but the reading flow is disjointed because related updates are scattered. The use of '__syncthreads()' without surrounding context further obscures the purpose. Overall, the code requires significant mental effort to understand.
Run 1
Code Structure: Updates are separated into recognizable weight and bias sections, but the fragment starts and ends mid-block, limiting structural clarity. Nesting: Mostly shallow, with one nested conditional that remains easy to follow. Clarity of intent: UpdateLearningRate and UpdateWeight communicate their purposes, while abbreviated variables such as a, b, vd, and hr require domain context. Comments identify update sections but provide little explanation. Code length: The visible logic is reasonably concise, although long argument lists make calls harder to scan. Action granularity: Each statement performs a distinct operation, with indexing and normalization separated from update calls. Reading flow: Blank lines and sequential update stages support navigation, but inconsistent conditional spacing, terse naming, and incomplete surrounding context interrupt the flow.
Run 2
Code Structure: Updates are logically grouped into weights, a, and b, but the fragment starts and ends mid-block, limiting structural clarity. Nesting: Mostly shallow, with only one nested conditional in the visible update logic. Clarity of intent: Comments and descriptive update function names convey the broad purpose, but abbreviations such as vd, hr, u, and d obscure details. Code length: The fragment is reasonably concise, although long function calls with many arguments are harder to scan. Action granularity: Each statement generally performs one action, making individual operations easy to follow. Reading flow: Blank lines and update comments support a natural sequence, but inconsistent spacing, lengthy identifiers, and missing surrounding context interrupt readability.
Run 3
Code Structure: Updates are logically grouped into weights, errors, and biases, but the incomplete excerpt starts and ends mid-block. Nesting: Mostly shallow, with one nested condition that remains manageable. Clarity of intent: Comments and descriptive update function names help, while abbreviated variables such as vd, hr, a, b, u, and d obscure meaning. Code length: Concise overall, though long function calls are harder to scan. Action granularity: Generally one operation per line; the deltaW expression combines related arithmetic appropriately. Reading flow: Blank lines and indentation separate phases naturally, but inconsistent conditional spacing, unexplained thread-index guards, and missing surrounding context hinder comprehension.