Post AxhzPR7tfXTSvfmvRY by wolf480pl@mstdn.io
 (DIR) More posts by wolf480pl@mstdn.io
 (DIR) Post #AxZp0O39Puv9LFJ0Mq by mjd@mathstodon.xyz
       2025-08-26T19:29:37Z
       
       3 likes, 4 repeats
       
       I think many people misunderstand the purpose of code review.  The purpose of code review is not for the reviewer to find bugs, and certainly not for them to ensure that the code is bug-free.  Anyone who depends on code review to find bugs is living in a fool's paradise.  As everyone should know by now, it is not in general possible to find bugs by examining the code.  The primary purpose of code review is to find code that will be _hard to maintain_.  The reviewer looks at the code and tries to understand what it is doing and how. If they can't, that means it will be hard to maintain in the future, and should be fixed now, while the original author is still familiar with it.
       
 (DIR) Post #AxbCGqqmb5sVOzIgDo by janisf@mstdn.social
       2025-08-27T01:31:53Z
       
       0 likes, 0 repeats
       
       @mjd There needs to be a better way to document code.  Half of the effort spent maintaining could be saved, not just with docs you can drill down on, but by getting coders focused on the human environment in which their code is supposed to work.  It's this that a reviewer is for--to gatekeep the sloppy crap, that just happens to work, out.
       
 (DIR) Post #AxbCGrzKMoJ6vmJ1BA by wolf480pl@mstdn.io
       2025-08-27T15:18:29Z
       
       0 likes, 0 repeats
       
       @janisf @mjd what do you mean by documenting code?Source code is humanity's best attempt at finding a language to express algorithms in an unambiguous and human-readable way.Of course higher-level architecture overview documents are useful and often needed, but that won't make reading code unnecessary.
       
 (DIR) Post #Axhyy21msQ4TGirYXY by dj3ei@mastodon.radio
       2025-08-30T21:52:17Z
       
       0 likes, 0 repeats
       
       As a developer, most of my time is spent reading code and only a fairly small amount goes into writing code.To sonewhat rephrase this 🧵's original toot:One major purpose of code review is to enforce that future developers need to read as little of the code as possible to get done whatever it is they need to do.Messy code forces you to always consider the entire codebase to get any little something accomplished. @wolf480pl @janisf @mjd
       
 (DIR) Post #AxhzPR7tfXTSvfmvRY by wolf480pl@mstdn.io
       2025-08-30T21:57:24Z
       
       0 likes, 0 repeats
       
       @dj3ei @mjd Right, so we try to structure programs in such  a way that to see that a piece of code is correct you only need to consider code surrounding it.And we enforce that by having the reviewer read that code.So I don't get @janisf 's suggestion that there has to be a better way - better than what? Than readable code and readability-focused reviews?
       
 (DIR) Post #Axk9KMZgYKZ3DovQm0 by janisf@mstdn.social
       2025-08-31T22:57:53Z
       
       0 likes, 0 repeats
       
       @wolf480pl @dj3ei @mjd I've had to go back and document some really old code.  it isn't that easily human-readable, otherwise I wouldn't have been hired to put in the double-slashes the coder didn't bother to do.I'm not making any suggestions.  I know things are getting better.  it just doesn't seem as though there's a consistent standard from where I sit... as a now non-active coder.