3 ms·
We run an Incubator for university students, helping them bridge the gap between "academic" and "useable" code, so I have to deal with this topic all the time.
by Radim 9y ago
We run an Incubator for university students, helping them bridge the gap between "academic" and "useable" code, so I have to deal with this topic all the time.
Why is code coming out of research labs/universities so bad?
1. DON'T WANT TO WRITE CLEAR CODE
Different incentives between academic research (publications count, citation count, fear of being scooped if research too clear...) and industry (code maintainability, clarity, robustness, handling corner cases, performance...).
2. DON'T SEE WHY CLEAR CODE MATTERS
Academic projects are one-offs, not grounded in a wider context. Even if the researcher would like to build something long-term useful and robust, they don't have the requisite domain knowledge to go that deep. This external knowledge, the subject matter expertise, is hard to come by.
In lieu of that, researchers start solving artificial problems on artificial datasets. The proper project cycle is broken, there's no feedback from other people using the fruits of your labour.
3. DON'T KNOW HOW TO WRITE CLEAR CODE
Lack of programming experience. Choosing the right abstraction boundaries and expressing them clearly and succinctly in code is HARD. Naming things is hard, structuring things is hard -- clarity in your head first, the code follows naturally.
But it's a skill like any other. When we put students to work on real ML projects, they are shocked. Many have never seen a properly designed piece of code in their life, don't know any tools, how to share or collaborate (git, SSH...). It's not like they'd sprinkle some extra comments here and there and be done -- the whole code structure and how they attain clarity of thought is different.
The GOOD NEWS is, it doesn't cost any more time to write good code than bad code.
So once they learn, everyone wins. That's the main purpose of our Incubator programme. It's not like researchers write crap code on purpose, no need to assume bad faith. Seeing the fruits of your labour useful and used by others is immensely rewarding!