News for hackers. Stuff that matters.
Re:The Code Review Pyramid by convolvatron on Tuesday March 22, 2022 @11:43AM (#30767463)
unfortunately, 'readability' is fairly subjective. I was part of a group recently that spent a good couple hours every week arguing whether 'ctxt' or 'context' was more readable.

when confronted, they explained to me as one would a child, that they cared deeply about code quality

Re:The Code Review Pyramid by _nhynes on Tuesday March 22, 2022 @11:52AM (#30767580)
That's ridiculous.

Obviously `ctx` is the most readable.

Re:The Code Review Pyramid by maze-le on Tuesday March 22, 2022 @12:05PM (#30767775)
Its obvious from the context that "c" is the only variable name that should represent a context.
Re:The Code Review Pyramid by mpalczewski on Tuesday March 22, 2022 @06:44PM (#30772578)
> when confronted, they explained to me as one would a child, that they cared deeply about code quality

these people sound useless.

Readability as it applies to code is how easy it is to read the code and understand it in relation to how complicated the problem domain is.

Re:The Code Review Pyramid by Bjartr on Tuesday March 22, 2022 @10:25PM (#30774145)
The best choice is whichever is more consistent with the surrounding codebase. For an outsider to the codebase, you could argue for 'context' being better, But to someone familiar to the codebase, if contexts are always in a variable 'ctxt', then 'ctxt' will instantly parse correctly without a hitch since it'll be interpreted as a single symbol.
Re:The Code Review Pyramid by TheCoelacanth on Wednesday March 23, 2022 @12:06AM (#30774822)
There's a simple test for readability. Someone familiar with the codebase reads the code and tries to understand what it does (a.k.a. a code review).

If it takes a low effort, then it's high readability. If it takes a high effort, then it's low readability.