[ofa-general] Re: Merging of completely unreviewed drivers
Jeff Garzik
jeff at garzik.org
Fri Feb 22 11:20:12 PST 2008
Ingo Molnar wrote:
> 2) you might know that Deja-Vu moment when you look at a new patch that
> has been submitted to lkml and you have a strange, weird "feeling"
> that there's something wrong about the patch.
>
> It's totally subconscious, and you take a closer look and a few
> seconds later you find a real bug in the code.
>
> That "feeling" i believe comes from a fundamental property of how
> human vision is connected to the human brain: pattern matching.
> Really good programmers have built a "library" of patterns of "good"
> and "bad" looking coding practices.
>
> If a patch or if a file has a clean _style_, bugs and deeper
> structural problems often stand out like a sore thumb. But if the
[...]
> The best programmers are the ones who have a good eye for details -
> and that subconsciously extends to "style details" too. I've yet to
> see a _single_ example of a good, experienced kernel programmer who
> writes code that looks absolutely careless and sloppy, but which is
> top-notch otherwise. (Newbies will make style mistakes a lot more
> often - and for them checkpatch is a nice and easy experience at
> reading other people's code and trying to learn the style of the
> kernel.)
[...]
> 4) there's a psychological effect as well: clean _looking_ code is
> more attractive to coders to improve upon. Once the code _looks_
> clean (mechanically), the people with the real structural cleanups
> are not far away either. Code that just looks nice is simply more of
> a pleasure to work with and to improve, so there's a strong
> psychological relationship between the "small, seemingly unimportant
> details" cleanups and the real, structural cleanups.
The above deserved to be quoted... just because I agree with all of it
so strongly :)
Bugs really do "hide" in ugly code, in part because my brain has been
optimized to review clean code.
Like everything else in life, one must strike a balance between picking
style nits with someone's patch, and making honest criticisms of a patch
because said patch is too "unclean" to be reviewed by anyone.
Jeff
More information about the general
mailing list