I'm with you halfway.

First, my misgivings. Confidence takes you far with people because they assume you aren't a sociopath. They assume you're confident of earning their esteem because you enjoy the esteem of others. That's how your mind naturally works if you aren't a sociopath. It's no coincidence that the typical "get chicks by being confident" material on the web comes with a "for best results, be an asshole" slant. It's a sociopath fantasy, and most people simply aren't capable of being sociopaths.

That said, I agree with you that confidence is a huge problem for geeks. They underestimate themselves because they gauge their social and sexual worth in hypermasculine, competitive, heirarchical terms. Evolutionary psychology feeds their paranoia. (Even worse, clever people intentionally use evolutionary psychology to exploit men's paranoia, and geeks are perfect targets: smart, insecure, and prone to logical, discrete thinking.)

Geeks also tend to be averse to uncertainy and highly averse to making mistakes in their own favor, so they systematically underestimate themselves and assign high confidence to their estimates.

So, well-founded confidence is the only kind of confidence geeks can have, and geeks generally need to boost their social confidence. The question has already been asked: "How?" As you said, the answer is to develop it. Practice it. Pay attention. See what you're worth to people. See why you're worthwhile to people. Examine your assumptions: are your virtues void because somebody else is bigger, stronger, better hung? Your instincts and your own point of view cry "yes," but be skeptical about that answer. Examine it. Think about it from other people's points of view. That alone should boost a geek's confidence.

Many geeks have high confidence in everything except casual social encounters. Those geeks should first notice and then cultivate the ways they charm people. Take another look at that sentence. Charm means please, delight, or fascinate. You can charm someone by being attractive or smooth, but you can also charm them by entertaining them with a story or joke or by engaging them in a pleasant conversation. All you have to do is give them some kind of pleasure. The first step is to notice the way you charm people. Maybe you don't do it as often as you like, but every time you do give someone pleasure in conversation, analyze the situation afterwards. Give yourself credit. Then cultivate your skill. Prepare yourself to reproduce the situation. Did you tell a joke? Great, you're good at telling jokes. Next time you hear a good one, make a note of it. Everyone loves a good joke, but not everyone is good at telling them, and few people go to the trouble of remembering more than one or two. If you can tell one good joke a week in mixed company, people will remember you for it. Did you get a person to open up and tell you a story? Great, that's something you're good at -- not everyone is. Develop your skill and look for more opportunities. Whatever your value to other people is -- good looks, sexy body, elegance, musical talent, scintillating conversation, wit, compassion -- develop it. Learn to charm a wider range of people. For fun, you can even branch out to other ways of being charming.

Then, voila, you're confident. You will feel confident because you will have confidence that your presence in someone's life, however brief or lasting, will be valued. You will feel that your virtues are developed and unique, therefore not entirely interchangeable or trumpable by other people's virtues. You can even sensibly believe that some people will be particularly drawn to your virtues as you have developed them.