Sample
Dorn/cuda/100
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 5.6Δ 29.0 |
| Scalabrino | 0.549 | 0–1; higher is more readable | 50.8Δ 16.2 |
| Dorn | 0.177 | 0–1; higher is more readable | 14.2Δ 20.3 |
| Mi | 0.121 | 0–1; higher is more readable | 12.4Δ 22.1 |
| LLOC | 28 | Logical lines; fewer is more readable | 15.2Δ 19.4 |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs | 46.4Δ 11.8 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 41.4Δ 6.8 |
| BTTF | 0.283 | 0–1; higher is more readable | 13.6Δ 20.9 |
| Human | 3.08 | 1–5; original rating | 34.5 |
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. | 2682.484 | −88.522 |
| 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.18 | −7.771 |
Intercept 8.87 + feature contributions = -67.423 (log-odds).
Score = sigmoid(-67.423) = 0.
| Score | 0.549 |
|---|
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. | 114.922 | −1.202 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.213 | −1.132 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114.961 | +1.05 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 41 | +0.681 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 41 | −0.52 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.922 | +0.288 |
Intercept 0.07 + feature contributions = -1.534 (log-odds).
Score = sigmoid(-1.534) = 0.177.
| Score | 0.121 |
|---|
| Score | 28 |
|---|
Run 1
The code has several readability issues. There are multiple commented-out includes and preprocessor directives that add noise. The function 'set_inViewMatrix' performs multiple operations (memory allocation, matrix manipulation, cleanup) without modularity, making it longer than necessary. Matrix operations are cryptic: invViewMatrix elements are assigned in an unclear, seemingly arbitrary order with inline comments that do not explain the math. The mixed use of raw arrays and custom mat_44 structs creates confusion, and the allocation/free pattern is error-prone. Variable names are mostly clear, but the logic is not straightforward. Nesting is low, which is good, and actions are mostly one per line, but reading flow is disrupted by scattered matrix indices and lack of a clear algorithm overview. The macro MAX is unused and adds unnecessary clutter.
Run 2
The code is mostly readable but has some inconsistencies. Structure is logical with clear sections for includes, macros, and functions. Nesting is minimal, which is good, but the set_inViewMatrix function has multiple operations per line (e.g., matrix element assignments on one line), reducing action granularity. Intent is generally clear—building an inverse view matrix—but the mixing of CUDA includes with standard C utilities and commented-out includes creates ambiguity about dependencies. Code length is reasonable, though the macro MAX and iDivUp could be replaced with standard library equivalents. Reading flow is natural, but the inconsistent spacing (e.g., `#define MAX(a,b)` vs `#define THRESHOLD 0.30f`) and lack of error handling for memory allocation slightly hurt clarity. The function comments are helpful but could be more descriptive.
Run 3
The code is moderately readable but has several issues. It includes commented-out headers and a custom MAX macro that lacks parentheses around parameters, which is unsafe. The set_inViewMatrix function has clear intent but suffers from multiple actions per line, inconsistent spacing, and memory allocation without NULL checks. The function is relatively flat but mixes matrix operations, assignment, and cleanup in a way that obscures the flow. Variable names are mostly descriptive, but the use of magic numbers (e.g., 12, indices) and repetition lowers clarity. The overall structure is logical but would benefit from better formatting, single-action lines, and safer memory handling. Comments help somewhat, but the code feels terse and could be more self-documenting.
Run 1
Code Structure: Utilities and matrix setup are logically separated, with comments marking rotation, scaling, translation, and cleanup. Nesting: Almost entirely flat, making control flow easy to follow. Clarity of intent: The transformation sequence is understandable, but abbreviated names such as m, inconsistent naming, and unexplained matrix indices reduce clarity. Code length: Short overall, though heap allocation and manual element copying add boilerplate. Action granularity: Several matrix assignments share a line, making individual operations harder to scan. Reading flow: Operations follow a natural sequence, but inconsistent spacing, commented-out includes, and dense assignment lines interrupt readability.
Run 2
Code Structure: Utilities and matrix construction are logically separated, and comments identify rotation, scaling, translation, and cleanup phases. Nesting: Both functions are flat and easy to follow. Clarity of intent: The matrix-building purpose is reasonably clear, but abbreviated names such as m and detector_transl, the ambiguous set_inViewMatrix name, and unexplained matrix indices reduce clarity. Code length: The code is relatively concise, though commented-out includes, unused macros, and heap allocation boilerplate add clutter. Action granularity: Most lines perform one action, but three lines each contain multiple matrix assignments, making them harder to scan. Reading flow: Operations follow a natural sequence through initialization, transformation, translation, and cleanup; inconsistent spacing, dense function calls, and compressed assignments interrupt that flow.
Run 3
Code Structure: Utilities and matrix construction are logically separated, and comments identify rotation, scaling, transformation, translation, and cleanup stages. Nesting: The code is flat, with no nested control flow, making it easy to follow. Clarity of intent: Operation comments and detector parameter names communicate the purpose, but abbreviated variables, inconsistent naming, and unexplained matrix indexing obscure details. Code length: Reasonably short, though commented-out includes, unused macros, and temporary heap allocations add clutter. Action granularity: Most lines perform one action, but matrix-copy lines combine three assignments, reducing scanability. Reading flow: The sequence from initialization through transformation to cleanup is natural; inconsistent spacing, dense function calls, and uneven formatting interrupt that flow.