Scientific software allows to transform theories and methods into numerical results and physical insight. This is especially true for the study of realistic models of materials, that heavily rely on first-principle computer simulations. This article describes the problems encountered in the development and maintenance of scientific software and examines the possible solutions. The ongoing work towards better software for present and future simulations of materials, performed with the Quantum ESPRESSO distribution in the framework of the EU-supported MaX Centre of Excellence, is introduced.