Re:`three = 1` in the Linux sourcecode (2014)
by klyrs on Tuesday March 09, 2021 @01:21PM
(#26401769)
The reasonable conclusion is that you should read the surrounding context and try to understand what these variables are used for. The purpose of code review is to understand the code enough that you can spot real bugs; I try to avoid flagging surface-level stuff unless it's really important. IMO, this is a borderline case due to the very clear comment (which is a bit too far away).
[ Parent
| on HN ]
Re:`three = 1` in the Linux sourcecode (2014)
by jfengel on Tuesday March 09, 2021 @01:51PM
(#26402239)
And then, having located that comment, try to rename the variable to something more meaningful. Even gap1, gap2, and gap3 would be more informative.
Re:`three = 1` in the Linux sourcecode (2014)
by klyrs on Tuesday March 09, 2021 @01:58PM
(#26402355)
We have a difference of opinion here. I lean away from bikeshedding in favor of finding more substantive issues. I'm also an old-timer and I'd call this a 3, on a scale from 1 (easily readable code) to 10 (a suitable IOCCC entry)
Re:`three = 1` in the Linux sourcecode (2014)
by jfengel on Tuesday March 09, 2021 @02:06PM
(#26402490)
It's also true that unless I had a specific mandate to touch that code, I wouldn't. If nothing else it confuses the commit history, obscuring what I was actually in there to do.
But if it were my job to touch these lines of code, I would want to leave them better than I found them.