What is the role of mathematics in programming?
You don't need any math to write a Hello World or a very simple website.

You will need to know some discrete mathematics and algorithm analysis to write a program that finds a route between two cities.

You will need to know matrix transformations and quaternions to write a game engine.

You will need to know a lot about all kinds of mathematical fields to write the next Wolfram Mathematica.

What I'm trying to say, what fields of mathematics you will need to know and to what degree will depend a lot on what kind of programs do you want to write. But the ones that tend to be most widely useful are data structures, algorithms and their analysis.