During college, I must admit that I would kind of space out whenever math discussion entered a CS class, and would regain my attention once the professor said "and here's how that looks in code" because I would end up thinking of the math the same way I thought of code anyways. It would be neat if you expressed some of the concepts in source code examples in some sufficiently high-level and clean-syntax language of your choosing.
I think the math/cs book by Aho and Ullman does a good job of introducing basic math concepts backed up with plenty of code and examples. Plus: it is available online for free.