(Disclaimer: my background is in materials physics, and it may be different in other fields. But I doubt it.) Unfortunately there is very little direct incentive for research scientists to write or publish clean, readable code: - There are no direct rewards, in the tenure process or otherwise, for publishing code and having it used by other scientists. Occasionally code which is widely used will add a little to the p…
Might be worth thinking about why there are incentives there and not elsewhere.