Is it necessary to master discrete mathematics in order to become a great programmer?
It appears that Concrete Mathematics is a highly regarded book.
>>1
Either you will learn it by doing or you will learn it before hand and apply it while you're programming.
You don't have to know it ahead of time but at the end you will at least have a good intuition for eg graphs, logic, proofs, sets etc.
Discrete Mathematics and Functional Programming by Thomas VanDrunen combines discrete mathematics and programming. It uses Standard ML for functional programming.