One task per routine and well-defined interfaces
Modularisation is one of the key concepts not only of (software for) reproducible research, but of software development as a whole. Without modularisation no reuse, and without reuse no chance to tackle complex tasks.
Note: This section is clearly opinionated. There are definitely other tools available. However, this is the tool the author recommends from own experience.
Probably currently the best available open-source high-level language for scientific programming
Python-based ecosystem of open-source software for mathematics, science, and engineering
NumPy, SciPy, Matplotlib, iPython, Sympy, pandas