People
- Friendship is a two-way street. Waiting passively is not the way to go. Don't be across of rejection. Someone has to initiate the process and there's nothing wrong with the person being you. Just imagine it is equally hard for others to start taking to you.
- Acquaintance conversion can be a thing. Do you hang out at the same cafe / restaurant often? Start talking more to people there, can be either the staff or the customers. If you are afraid, try with those that you have seen for a few times and more friendly looking. You might end up with a good friend or the worst case some discount or freebie.
Hobby beyond programming
- I think it's essential to have another hobby apart from programming, which involves going outside the room and seeing people. We need to feel the society in some way after being alone for too long. In my case I really enjoyed walking, and it doesn't have to be together with others. Just walk in some densely populated areas such as malls or CBD or tourist area. You will feel more lifted when you are physically close to other people. It's also a good chance to initiate conversations.
- Finding a hobby group. Other hobby suggestions include weight lifting or photography. Try finding a local group for such activities to avoid the feeling of loneliness. Meetup.com, Facebook, Instagram are some of the avenues.
Goal
- Try to set goals for yourself if you have lost purpose in life. It can be something challenging or silly. As with programming, you can be quantitative in the goals. For example, eating healthy for a month, saving 100k in one year. Personally I set a goal of retiring at 35 and it's doing wonders to my motivation to work and expanding my income streams.
(I might add more as I recall them)