Tragically, of course, if you're a fifty year old geek, coding is as close as you're getting to sex for the rest of your life....
Whenever someone utters something like this I feel the need to point out that Linus Torvalds (42) is married, and have three children (and his wife is a real life ninja, six time finnish national karate champion). When you get past 20 you will see that the smart guys actully are quite attractive to women wanting a family.
And smart guys are especially quite attractive when they are 42 years old and have a net worth of $150 million (as Linus Torvald has; I googled his net worth).
If I have not seen so far it is because I stood in giant's footsteps.