imho, both go sideways. if maayo ka sa mathematics, dako chance maayo ka sa programming. if maayo ka sa programming, dako chance maayo ka sa mathematics.
and by programming i mean making your own code and not just modifying/copying code from the internet.