After someone tells me her/his name, I always say: "I'm terrible with names, so I will ask about yours a couple of times, but that's the only way for me to remember," and I smile very very friendly. 90% of time people say something: "yeah, me too".

Then I really ask again, about 2-3 times, even if it's just within 30 seconds after the introduction. If there is more people around, together, then I say: "Hey, does everyone know names of each other? Let me try!" And then I try to say the names. People take it as very very friendly and fun, and by doing this I release a lot of pressure, because the less confident people also can use this opportunity to review the names.

There are often moments when I happen to be a guest at small parties/meetings. Learning all the names is my little game (the side effect of which is that girls will think you are more attractive). I sit next to the host, so that I can ask silently about the names (assuming that the host knows almost everyone), and then I just repeat them in mind again and again. Being silent in a conversation is usually a good idea anyway[1]. And then, when I leave, I stand up and say: "Thank you very much: John, Anna, Martha... etc, it was a lovely evening with you". And everyone is really impressed. The next time you meet with the same crowd, people will be extremely friendly to you :)

In business setting: that's more tricky. First of all you collect business cards and check people you are going to have a meeting with way ahead - check them up on facebook or linkedin. Even if you know only the name and function, and not the face, it will be later easier for you to associate them with the right person.

When you sit down with people who gave you their business cards, put the cards in front of you, on the table, in the same order they are sitting.

If this meeting is another meeting with the same people, take your note pad with you (you should be ready to take notes anyway) and before the meeting write the names on the margin. Then when you are with them, they will usually mention some names of the people present, or titles. Then you write on the page the names in order of sitting - person to your right - write the name on the right side of the page, etc.

Btw: it is extremely important to ALWAYS make notes from meetings. Do it right after the meeting, sit in the lobby or in your car and write down things like: who you met with, what were the issues discussed (even - or especially - when someone said something trivial or private like: my son was playing football last weekend, you will ask about football the next time you are on the lift with this important CTO), what you agreed for, what is missing, what do you have to bring to the next meeting. Collect those and always review before another meeting [thank you B. for teaching me this].

[1] - the little secret about conversations: people will think that the conversation was interesting if you let them talk. That's true when you are on a date or with your client. Ask questions, listen to what they say, reply with short replies, listen more. Show them that you are really interested in what they say, laugh at their jokes, consider what is important for them, be sad when they are sad. We often tend to think that we become interesting because we say something smart, but that's not true. -- does not apply to John Carmack and the like;)