Seol mar théacs é seo: Binary population synthesis: Theory and applications