try implementing symbolic differentiation in a language like haskell or egison, and then again in a language like python or js, and your perspective on what is 'easy to understand and debug' is very likely to change
http://5outh.blogspot.com/2013/05/symbolic-calculus-in-haske... is more complete and also includes an explanation and a bunch of algebraic simplifications you'd usually want along with the symbolic differentiation itself