Parties are also great. My current relationship was the result of going to a School of Public Health crêpe party.
Everyone who starts learning the Waltz or ChaCha (or Swing, or Tango) is appalling at it. And it's pretty liberating to be in a group of people all of whom are happy klutzes.
At my (pretty tech-centric) university, the dance club had over 2000 members : the key selling point for the guys being 'girls like to dance'. And learning steps together has a logic component (so it's satisfying to see yourself getting better), but also a huge WTF component - which takes everyone out of their comfort zone in a good way.
Don't worry about the excellent dancers showing off : they'll be taking other classes.
However, the basic initial win for the OP is to get out of the house, and have a blast learning something with a bunch of other people. The aim doesn't have to be to get good - it's a major step just to turn up. I was just trying to suggest that every beginner will be in much the same boat. IMHO, learning to dance is a much easier social activity than 'going to parties', for instance.
BTW, you might find going straight from coding all day to dance class an interesting experience mentally. :P
Carry that with you.
If you have interests, find groups that have the prevailing interest (this also goes for what type of partner you are looking for (male / female) in dating).
I love the above comment in encouraging those to bring their other friends. You will find interesting, dynamic people, as well as those you do not wish to associate with.
It is important to be honest with yourself on Whom you would actually wish to build a relationship (friend or sexual).
I assume that you start from 0 friends (I did, since I moved to another country some months ago). Start knowing someone close and easy: classmates, colleagues, occasional acquaintances, but beware not to be stuck with someone as lonely as you. Your objective is to expand from there. You can also go to special events or meetups made for people who want to know other people. Or go to some course for something you like (I dance Tango, for example). Once you know someone, try to go out with these people as much as you can: they will have other friends you can be introduced to.
Parties are a good way of doing this. Me and my friends occasionally host dinners or small parties in our houses. People are encouraged to bring new friends, which allows you to know more people. If nobody of your friends organizes some party, start the trend. If you have 3 friends and they bring a new one each, you will be already a group of 7, which is enough for a dinner/small party. Organizing one is really easy, you just need a living room, some snacks/food, some drinks.
This will almost solve your loneliness problems from a friends point of view. Members of the other sex specifically are a little more complicated. But if you do as I described above you will definitely be able to know some. After a while you can start going out alone with them. For example, I am dating some girls I met at the tango course and at some party. I know couples who formed this way.