I've never been involved in hiring myself, but I think that this is made out to be a much more complicated process than it should be.
The sad fact of the matter is that unless you are looking for a very specific skill, interviewing is a "buyer's market". It costs less to throw out a lot of unqualified candidates and risk losing some qualified ones, than to err in the other direction and waste time on unqualified ones. There will always be other programmers.
Programmers, like most people, make estimates and rely on hunches (and some prejudices). I think that if you had a stack of a 100 resumes and 10 people on your team, and you gave each resume to two people to skim, you could easily get rid of 80% of the resumes. That is how admission commmittees for graduate schools work, for example. Usually you just know. It's true that you may miss on some brilliant candidates (e.g., someone who's great but had a crappy GPA, a foreign background, or whatever), but you save time.
Then you do interviews. There's a limit to what you can do with phone interviews, but each phone interview is another screen and a chance to filter more people. You break it down to the amount you want to fly in and spend time on.
My own view (having not done hiring) is that the role of the onsite (when remote candidates are considered) is to confirm. In other word, don't use the onsite to decide if the candidate could potentially be considered for the role. Only bring him in when you feel that you would give him an offer and weren't able to demonstrate why not based on phone interviews and remote screenings.
I am also personally not a big fan of the beauty-contest style of interviewing: When you bring 20 people in, pick a few finalists, and decide between them. I feel that while chemistry is important, technical skills are the first order of business. I believe that it is particularly difficult to separate a person's ability from the personality you grew to like or dislike immediately from the meeting. I think it's much better to bring one qualified candidate at a time, see if there's a reason not to hire them, and if there isn't, to go ahead until you filled the quota. That's how dating and marriage works, and you just live with the possibility that you might have missed someone.
A related pet peeve that I've seen in most places: Don't bring people in, and as the first order of business sit them down to do a pen-and-paper test which is then reviewed with the team. The time to do these tests is in the initial screening. If the problem is that someone can cheat, figure out ways around it (e.g., limited amount of time, do it in real time on a shared editor, etc.). An interview should be about actual face-to-face communication! Don't waste people's time bringing them in if they could fail before they uttered a single word. If you brought someone in and failed them because they didn't perform well on a written test before you interviewed them in person, you just wasted plane tickets and hotels anyway.
Finally, a few things about rejections:
First, if someone will not get hired not matter what, let them know right away, don't wait until someone accepted the position. This behavior is common in academia but I've seen it in some organizations.
Second, if somebody is a finalist but not your first choice and you are waiting on the first choice, let that person know the situation, or even state that there is a waitlist. (Ideally you'll never be in this situation by avoiding beauty-contents). If you just delay your response, you are creating problems for other organizations (since the candidate may be a first-choice somewhere else but preferring your organization) and they do the same to you. This is actually a well-recognized cause of deadlock in academic hiring. This is also fair to the candidate. I would personally prefer to work for a less-attractive organization that wanted me as their first choice than a more attractive one that only got me because the person they wanted didn't accept. Nobody (well, most people) don't want to be defaults, and I feel that it makes you start on the wrong foot.
Third, do everything to make your process fast or you will miss candidates. I know a few organizations where the whole procedure for opening up the headcount starts after a candidate has been identified. Sometimes even months and years, by which the candidate is long gone. If you know your company has a lengthy process, do everything you can to ensure that once you find the right candidate you can make an immediate offer within up to a week. Have the mandate for it!
Finally, I personally believe that the further someone got in your process, the more information they deserve about why they did not make it all the way. (And I'll skip the dating analogies this time). If someone sent a resume and are just a bad fit, have the courtesy of acknowledging in a form letter, but don't sweet-talk it. If you write that "you are a great candidate, but bla bla bla" and the person is not great, it's a joke. Just say "your background does not match our needs, period". However, if someone made it further in, such as a few phone interviews or even an onsite, try to explain why they didn't get the job. Don't open it to contention, but explain in a personal message. I'd rather know that a place felt that I was not sufficiently versed in algorithms, for example, than to get a form letter. Form letters belong to situations where there has been no mutual investment. If someone spent the time to make the trip, try to at least be informative.