Yes. There's even something about the "tone" of this piece that screams "spectrum" to me.
As far as I know there's not reliable evidence that smart people have fewer friends. In fact, I would hypothesize just the opposite. This is pretty easily testable.
It sounds like he has a combination of Aspergers and depression. It's telling that he doesn't mention seeking out a mental health care provider. That sounds like the best course of action.
It's noteworthy that he was raised in a Christian household. Frankly, most religions do not do a good job of taking mental health seriously.
I sympathize with this post because I was raised as a conservative Christian and I had little to no exposure to modern mental health ideas when I was growing up.
I ended up struggling massively with depression in my twenties because of it. Finally, therapy and medication helped to change my life for the better, in a way religion* never did (and probably couldn't).
I hope this guy gets good professional help. Apparently, he's a coder so he can probably afford it. That would go a long way to solving his problems. It's also the truly "smart" thing to do.
* This is not meant to disparage religion, there are plenty of good, well-qualified Christian therapist. Whatever your belief system, a trained professional is probably your best bet.