From my interactions with researchers in ML, most of them are actually pretty good programmers. There just isn&#x27;t an incentive to make your code clean:<p>1. There isn&#x27;t much correlation between quantity or even quality of papers you publish and the quality of your code. Meaning, writing cleaner code is not going to help you get that postdoc or faculty position.<p>2. Doing research is full of stops and starts and branches that fail and approaches that get thrown out. It&#x27;s a waste of time to write clean code since you know it&#x27;ll most likely be thrown out. When you do get an approach that works, you publish your paper and move on.