Ask HN: What’s the biggest difference between professional coding and academia?
Previous HN discussion: &quot;Why can&#x27;t you guys comment your fucking code&quot;<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14692691" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14692691</a><p>Copy&amp;pasting my response there:<p>---<p>Why is code coming out of research labs&#x2F;universities so bad?<p>1. DON&#x27;T SEE WHY CLEAR CODE MATTERS<p>Academic projects are typically one-offs, not grounded in a wider context or value chain. Even if the researcher would <i>like</i> to build something long-term useful and robust, they don&#x27;t have the <i>requisite domain knowledge</i> to go that deep. The problems are more isolated, there&#x27;s <i>little feedback from other people</i> using your output.<p>2. DON&#x27;T WANT TO WRITE CLEAR CODE<p>Different incentives between academic research (publications count, citation count...) and industry (code maintainability, modularity, robustness, handling corner cases, performance...). Sometimes direct opposites (fear of being scooped if research too clear and accessible).<p>3. DON&#x27;T KNOW HOW TO WRITE CLEAR CODE<p>Lack of programming experience. Choosing the right abstraction boundaries and <i>expressing them clearly and succinctly in code</i> is HARD. Code invariants, dependencies, comments, naming things properly...<p>But it&#x27;s a skill like any other. Many professional researchers never participated in an industrial project, so they don&#x27;t know the tools, how to share or collaborate (git, SSH, code dissemination...), so they haven&#x27;t built that muscle.<p>The GOOD NEWS is, contrary to popular opinion, it doesn&#x27;t cost any more time to write good code than bad code (even for a one-off code base). It&#x27;s just a matter of discipline and experience, and choosing your battles.