A lot of data science and ML projects I’ve worked with are written by people who are not coders first. Their primary concern is a working model and not a maintainable software so it’s quite reasonable that the code they write is not as production-ready as what you would expect from a software developer. In this article, I’ve listed some of the most common code smells I encounter when I’m refactoring DS/ML applications. I hope that this list will be helpful for some folks in developing their “code nose”.
Code smells can serve as an indicator that there might be a problem with your code. They are not intended to be prescriptive. It should not be used as “if you see x, it’s wrong and you should do y”. As always, develop an understanding of how your code works, how it’s used, how it might evolve, and based on these factors, you can discern if you’re doing the right thing.

#programming #refactoring #best-practices #code-smells #data-science

Common Code Smells in Data Science Projects and How to Fix Them
1.60 GEEK