It amazes me to see wizards at Java, Perl, and Unix who cower like tiny forest creatures when faced with a chance to make friends or get a date. So bring your magic wand over here and get ready to learn some new spells.
1) You're not in junior high school any more. You are in a big world with people of many ages, many interests, and many sexual orientations. Most of these people don't know that you puked on the teacher's shoes in first grade, so you get to start fresh with at least some of them. (If you are in junior high school, my list won't help you. You are in hell, my friend, so stay clear of the bullies and make friends with your computer. Life does get better.)
2) Social skills are learnable and doable. You wouldn't expect to learn Microsoft Foundation Classes without a book--would you? To become a Certified Nerd Social Success, plan for some reading, some practice--and some failures.
3) Most advice books, like most other books, are crap. The library is better than the bookstore for finding good ones. Steven Covey (7 Habits of Highly Successful People) is good. The Harvard Negotiation Project guys (Getting to Yes, Difficult Conversations) are good.
4) If you want people to be interested in you, be interested in them. If someone is talking to you, don't sit there thinking, "I hope she likes me--do my armpits stink?" Listen to people, think about why they are saying what they are saying, ask questions, and think about what you want to say yourself.
5) Common interests help get relationships started--but to make relationships grow, the main thing is time spent together. If you feel isolated, get involved in a long-term collaborative project with other people who interest you. For example, work on the website of some interesting group or help out at a local school. (This is also a good way to troll for a job.)
6) Get other people involved in interesting stuff you do by asking for their advice. Find out what they are good at and ask them to tell you more about it.
7) When someone hurts you, expect your inner troll to yell, "That hateful jerk is hurting you on purpose!" or "You hopeless creep, nobody will ever like you!" Stay calm, think of kinder possibilities, go to a cheerful movie--and try again. Relationships are like puppies. If a puppy pees on the rug, you don't shoot it and hope for a better puppy some day--at least, not if you hope to end up with a long-term, lovable dog.
8) You, as a nerd, are an interesting person with a lot of abilities and a lot of cool stories to tell. You are exactly the friend or lover some people are looking for, so throw back your shoulders, take a deep breath, and get ready to help them find you.
9) While you've got your shoulders thrown back and your chest full of air, take a look in the mirror. Tell yourself, because it's true, that the zit on your nose or the 50 pounds you've been meaning to lose will not make a bit of difference to the right person. But in finding that person, you want to look clean and confident. Wearing a crumpled shirt from the laundry bag tells people, "I'm not worth much to myself." You are worth a lot, so look as if you thought so.
10) Go get 'em, wizard!
Any of you other nerds want to join me in giving advice to our younger brethren?