If you are interested in the ins and outs of new algorithms, or even inventing them yourself, then writing code is the way to go for tweaking the inner wheels or implementing new tools.