From Matt Gentzkower and Jesse Shapiro (pdf), addressed to their RAs:
Every step of every research project we do is written in code, from raw data to final paper. Doing research is therefore writing software.
Over time, people who write software for a living have learned a lot about how to write it well. We follow their lead. We aim to write code that would pass muster if we worked at Google or Microsoft.
For the pointer I thank Bo Cowgill.