This course is a graduate level introduction to certain types of extremal problems in mathematics. Though the objects we study come from disparate parts of mathematics (coding theory, graph theory, curves over finite fields, algebraic number fields, lattices, ...), there is an underlying common structure to all the problems, whereby upper bounds on the 'quality' of the objects come from zeta functions, and the lower bound on existence of optimal or near-optimal objects come from group theory (or modular forms).