Bell's 1964 theorem has been described as "one of the profound scientific discoveries of the (20th) century". His inequality, and generalisations of it, are at the heart of quantum computation and information processing. Related inequalities have been well studied in areas such as probability theory, metric embeddings, number theory and discrete optimization. I will explain this connection, and using it describe a method of generating a large number of new, distinct, tight Bell inequalities. (Joint work with H. Imai, T. Ito and Y. Sasaki.)