No, thanks. Having as much sex, as I want and going through the series of relationships didn't prevent me from graduating from the university and working at a couple of decent beneficial works. If I would forbid it to myself, it would made me just even more unhappy. Moreover... did you try to concentrate on serious research or programming, when all your thoughts are about f*ck? A hint: if your libido is very high at the moment, it's close to impossible. Thus, for me, the best way to avoid it is just to have enough sex, so I would calm down and don't be distracted, when I should concentrate on serious things.
So, please, don't generalise your experience for all people. What is good for one person, isn't necessarily good for another one.
And also... sorry, but I don't see any reason to be proud of not-having sex or/and relationships. As well as no reason to be proud of having it, of course.
Having relationships doesn't mean to be pining after a love interest. You can have them, and still be productive. It depends.
For some people it's impossible.