1 · those who see mathematics as a particular subject area, body of knowledge, or set of topics, with limited applicability to programming (which, given that definition of mathematics, I think is true)
2 · those who also see mathematics as a particular subject, but with almost unlimited applicability (which I think is false, except maybe on a technicality)
3 · those who see mathematics as all-encompassing and including every kind of careful thinking or precise action (which I don't think really matches serious use of the term, nor is a useful definition)
4 · those who see mathematics as a particular set of skills which are most commonly applied to the topics that people we call "mathematicians" study but are also applicable to many other problems (this is the camp I happen to be in)
So for me, at least, mathematics is primarily a way of thinking and playing. (More specifically, a collection of methods for problem-posing and problem-solving that are rooted in formal logic and equivalences / transformations of representation.) Mathematical training and experience with proofs helped me cultivate that, but studying at university isn't the only way.
I once asked my first mathematics professor whether I could call myself a mathematician even though I was just a first-year student; they replied that anybody who does mathematics is a mathematician. That idea has really stuck with me. Although it's helpful to have jargon and wonderful to have mathematical tradition, anyone can do mathematics and be a mathematician, regardless of age and background – the capacity is the common heritage of humankind, like the capacity for art or language. And like art, it can be directed toward any goal or be an end unto itself.
[I've never agreed with the opinion that mathematics exists for the sake of physics or real-world problem solving, but enough people I respect hold that opinion that I'm wary of dismissing it.]
Now to the matter at hand – does mathematics (sense 4) help with programming? For me, absolutely and without question. It's perhaps the most important set of skills I use while programming (but not the only one).
edit: I distinguish computer science (a branch of mathematics that professional mathematicians study) from programming (designing correct programs) from coding (communicating programs to a computer so that they can be run), and I assume that programming and (to a lesser degree) coding are mostly what people are talking about here.