Not all under-performers need to be reprimanded or let go. Sometimes the real problem isn’t the person or the skills; it’s the fit.
Finding the right fit is more than just finding the right type of work. Finding a good fit means also finding the right type of environment, and finding the right people.
Some people work better as individual contributors in a more independent environment. Other people love working in the context of a team, and they thrive on interpersonal relationships. Trying to force either type of person into the opposite environment will have consequences.
Before giving up on yourself or others, ask the question: Could this issue be solved instead by a tweak to the working environment? How about pairing with a different team, or relocating to a different type of project?
You can’t fix attitude. You can’t coach someone who won’t allow themselves to be teachable. But we can often be too quick to label someone as a lost cause because of poor performance in a single scenario.