Writing a computer program which embodies a mathematical
concept is teaching the most retarded entity that is
capable of more than just arithmetic.
I have to agree with this. Solving a problem - this isn't even limited to just math - with a computer program often means to generalize it. Generalization requires understanding. Thus, if you manage to generalize something, you have understood it.