the worst possible way to handle the interaction is admonish them for not being good enough, throw their code in the bin and then rewrite it yourself.
You should perhaps read through again, that's not what appears to have happened, or at least it's possibly an emotional retelling of one side of the story.
No, that is exactly what happened: A new kernel contributor spent 5 days investigating an issue only to have their fix slightly adjusted and committed by a tenured maintainer. See comparison: https://news.ycombinator.com/item?id=37673443
How should have this been handled? Easy: something called “code review”. The maintainer could have simply reviewed the patch and suggested what changes need to be made for it to be accepted. And if the maintainer really wants some credit for some odd reason, they can get the Reported-By tag. Win-win!
But what ended up happening is a loss of (at least) one potential long-term contributor. I for one definitely thought more highly of kernel maintainers.
No. It's not as simple as represented in the OP, though perhaps your suggestion would have been a useful approach to consider. See the details of the discussion in the email thread.
:
the worst possible way to handle the interaction is admonish them for not being good enough, throw their code in the bin and then rewrite it yourself.
You should perhaps read through again, that's not what appears to have happened, or at least it's possibly an emotional retelling of one side of the story.