An often reasonable way to ensure that you can mechanically apply a problem solving technique (which is related to, but absolutely not the same thing as understanding the maths) is to make a program that does it. Trying to learn maths by programming it is a terrible idea.
Just this morning I've been looking at Riemann's geometry; learning that through the medium of writing a program to "do it" would be painful. I don't even know what it would mean to write a program that "does" Riemann's geometry. I suppose I could write a program to apply some equations, but that's not learning the maths at all. That's automating some equation solving and it teaches me nothing about the maths.