TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What’s the biggest difference between professional coding and academia?

67 pointsby acalderaroalmost 8 years ago

28 comments

yakultalmost 8 years ago
Academic code typically just has to work once or a handful of times, for a small number of highly expert users, frequently just for the author. Ease of update is of the essence - you&#x27;ll rewrite most of it many times, as your understanding the problem change. You can use all sorts of ugly hacks so long as you get what you&#x27;re after.<p>If any of it ever becomes commercially released or whatever, there&#x27;ll need to be a complete rewrite that makes it usable and maintainable by people other than yourself. But most of the code will never get to that point because most of what you&#x27;ve done up until about a week ago is wrong and worthless, and the current, correct-until-next-week iteration is stuck together with duct tape.<p>Speed only matters on the infrequent hot paths, which is why Python is popular. The rule of thumb is nobody cares about speed &#x2F; resource consumption until it needs to run on a cluster, but then you care a lot because cluster time is metered and simulations can get huge. Fortran is still fairly popular because many math libraries are on it and porting would require huge effort from a very small group of very busy people.<p>Most of the coders are not software engineers and don&#x27;t know &#x2F; don&#x27;t follow best practices; on the other hand the popular best practices are not designed for their use-case and frequently don&#x27;t fit. Versioning (of the I-don&#x27;t-know-which-of-the-fifty-copies-on-my-laptop-is-the-right-one type) is a big issue. Data loss happens. Git&#x2F;Github&#x2F;etc has steep learning curve, but so does all the various workflow systems designed for research use.
评论 #14723645 未加载
评论 #14724426 未加载
scott_salmost 8 years ago
In academic systems papers, every performance claim needs to be backed up by an experiment. But you can get credit for features even if you argue that it is <i>possible</i> to implement that feature with your design, even if you didn&#x27;t actually do it.<p>In production software, this is flipped. Every feature claim needs to have an associated test, as it&#x27;s a contract with your user. But when it comes to performance, everyone just waves their hands.<p>I&#x27;m being a little glib. But production software has to <i>work</i>. You&#x27;ll spend far more time dealing with all of the &quot;less interesting&quot; details and edge cases than with research software. As ams6110 points out, this means more focus on testing, maintenance and good design. But I do want to emphasize testing - sometimes you&#x27;ll spend more time testing something than actually implementing it. There&#x27;s also often many more residual effects from dependencies elsewhere in the ecosystem you&#x27;re working in. That&#x27;s not typical in academic software.
评论 #14724333 未加载
评论 #14724017 未加载
notacowardalmost 8 years ago
Maintainability. A lot of academic code only has to last long enough for one project or thesis, and the only maintainer will be the original author. Real-world code will last longer[1], and be worked on by more people, including people of lesser skill without the original author around to guide them. Often, that code also has to run in more environments. This difference is reflected not only in the code itself, but even more importantly in the infrastructure around it - source control, tests, documentation, bug trackers, etc.<p>Ironically, an academic might get to spend a <i>higher</i> percentage of their time on pure coding than a professional coder does. They have other concerns. Maintainable code is not part of the desired outcome. It&#x27;s consumable and expendable, not durable, so any time spent making it any better than &quot;just barely good enough&quot; is wasted. Why build a tank when all you need is a bicycle?<p>[1] At least the expectation. Some academic code lives on far longer than its authors intended, and some non-academic code vanishes pretty darn quickly. But in general, both the intent and the expectation is that non-academic code will live longer.
评论 #14724663 未加载
评论 #14724545 未加载
throwaway-emc2almost 8 years ago
&quot;Beware of bugs in the above code; I have only proved it correct, not tried it.&quot; -- Donald Knuth.<p>This is the biggest difference between academic and professional programming in a single pithy statement, from a paper that Knuth wrote.
ams6110almost 8 years ago
Academia only worries about getting results for publishing. Testability, maintainability, clean design, all take a back seat because once the paper is done the author will likely never touch the code again.
评论 #14723473 未加载
tytsoalmost 8 years ago
A number of Linux kernel developers have been working with a subset of the Usenix FAST (File systems and Storage Technologies) community. We hold a Linux FAST workshop after the FAST conference for the past few years.<p>A few years back, some of the researchers (professors and graduate students) claimed they were interested in more testing and possibly taking some of their work (Betrfs[1], specifically), and productionalizing it. In response, I spent a lot of time with kvm-xfstests[2] and gce-xfstests[3][4] testing infrastructure, cleaning them, making them work in a turn-key fashion, and providing lots of documentation.<p>[1] <a href="http:&#x2F;&#x2F;betrfs.org" rel="nofollow">http:&#x2F;&#x2F;betrfs.org</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;tytso&#x2F;xfstests-bld&#x2F;blob&#x2F;master&#x2F;Documentation&#x2F;kvm-quickstart.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tytso&#x2F;xfstests-bld&#x2F;blob&#x2F;master&#x2F;Documentat...</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;tytso&#x2F;xfstests-bld&#x2F;blob&#x2F;master&#x2F;Documentation&#x2F;gce-xfstests.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tytso&#x2F;xfstests-bld&#x2F;blob&#x2F;master&#x2F;Documentat...</a><p>[4] <a href="https:&#x2F;&#x2F;thunk.org&#x2F;gce-xfstests" rel="nofollow">https:&#x2F;&#x2F;thunk.org&#x2F;gce-xfstests</a><p>Not a single researcher has used this code, despite the fact that I made it so easy that even a professor could use it. :-)<p>The problem is that trying to test and productionalize research code takes time away from the primary output of Academia, which is (a) graduating Ph.D. students, and (b) writing more papers, lest the professors perish. (Especially for those professors who have not yet received tenure.) So while academics might claim that they are interested in testing and trying to get their fruits of the research into production code, the reality is that the Darwinian nature of life in academia very much militates against this aspiration becoming a reality.<p>It turns out that writing a new file system really isn&#x27;t that hard. It&#x27;s taking the file system, testing it, finding all of the edge cases, optimizing it, making it scale to 32+ CPU&#x27;s, and other such tasks to turn it into a production-ready system which takes a long time. If you take a look at how long it&#x27;s taken for btrfs to become stable it&#x27;s a good example of that fact. Sun worked on ZFS for seven years before they started talking about it externally, and then it was probably another 3 years before system administrators started trusting it with their production systems.
coherentponyalmost 8 years ago
Academics aren&#x27;t paid to code. Academics are paid to do research.<p>Professional coders are paid to code.
评论 #14724843 未加载
austincheneyalmost 8 years ago
JavaScript and the web generally are a really big deal. Unless you are working close to the metal at some point you are probably going to have to write code that somehow works in a browser. The problem with this is that it doesn&#x27;t resemble C++ or Java and very few people figure out how these technologies actually work.<p>Academia isn&#x27;t preparing developers for this reality. Many will try to fake it or hide under imposter syndrome, which is fine if everybody in the company is an imposter, otherwise it is plainly obvious you are incompetent.
joeclark77almost 8 years ago
I suppose it depends on <i>why</i> the academic is writing code. I&#x27;ve written simulations for social science research -- basically to extrapolate the results of certain decision making strategies by an idealized decision maker in a toy problem. The theory is the subject, not the code. Many people who read my paper will not be programmers able to critique the code, and few will care whether it follows best practices. I&#x27;ve made it open source (<a href="https:&#x2F;&#x2F;github.com&#x2F;joeclark-phd&#x2F;bandito" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;joeclark-phd&#x2F;bandito</a>) because I think it&#x27;s a good practice to promote, but I&#x27;m kind of an oddball. When I was studying other well-known simulation papers, I found their models were incompletely described and I had to contact the original authors to get implementation details in order to replicate them. This is a lot like the problem of data sharing -- all academics should be willing to share their data in order to prove that their results are as reported, but it&#x27;s not an easily enforceable principle.<p>If you are talking about <i>computer science</i> academics, of course, that&#x27;s a horse of a different color. In that case, the code is the topic, so I would guess that they&#x27;re providing it! On the other hand, the majority of such research is probably solving niche problems and special cases, so it may not be very usable in your professional coding.
snovv_crashalmost 8 years ago
In academia you get to choose your problem. This means that if something isn&#x27;t working you can restrict the inputs or only operate on some subspace of the problem.<p>In contrast, industry doesn&#x27;t let you choose the problem: you need to solve whatever the problem is that the client has. This means generalising a lot further and having a less optimal solution that is more robust to input error or poorly calibrated measurements. Even if it does fail you should be able to identify why and explain to the user what they did wrong.<p>In academia this feedback process is generally to the person who wrote the software, so a cryptic error message including some algorithmic details might be sufficient to debug the inputs sufficiently.
rglullisalmost 8 years ago
In one sentence: <i>Scientists build so they can study. Engineers study so they can build.</i>
评论 #14724786 未加载
评论 #14724787 未加载
hprotagonistalmost 8 years ago
My primary observation so far has been that academics are going to want to reach into the guts of my data analysis pipeline at every single step and inspect what&#x27;s going on.<p>This informs my design choices quite a bit.
bastijnalmost 8 years ago
In academia you don&#x27;t care about the quality of your code, in professional you do care but don&#x27;t get the time to fix it ;).<p>On a more serious note. In addition to what is already mentioned by others on quality, performance and so on I&#x27;d like to add that in professional career you most likely work with a (larger) team. Which means you will run into code conflicts where code is reused for different purposes and you cannot simply change it. In addition you have to think about readability and documentation as your colleagues have to be able to understand the code without losing too much time or needing you.<p>You will also always have to work with legacy code. Most likely code you want to change but can&#x27;t considering the timelines.<p>You will have to sync your design with many others. You might have to convince them or discuss issues with conflicting requirements or deadlines. There will be times you can&#x27;t finish your entire design and have to think of a staged introduction or even harder, change it so it can work with only 50% of the design.<p>Also, your code has to run for many years. You can&#x27;t simply take an expirimental third party package maintained by a single person. Too risky. You have to think about hardware expiring or no longer being supported (especially with gpus).<p>You gave to think about licenses. Academia is usually free. With professional you have to take a close look.
cbanekalmost 8 years ago
Operations. Forward and backward compatibility concerns. In professional coding, good enough beats cute implementations that no one will see.
评论 #14724020 未加载
dasmothalmost 8 years ago
The consensus here is that &quot;professional&quot; code is more maintainable than &quot;academic&quot;. That&#x27;s probably the ideal, but not entirely sure it holds up in practice. In particular, approaches which put a lot of emphasis on clarity and &quot;testability&quot; of individual functions&#x2F;&quot;units&quot;&#x2F;whatever can make it harder to understand and reason about what the program as a whole is doing.<p>Also, the focus on building software in teams seems to lead to architectures that <i>need</i> teams (vs. suites of manageable-size, &quot;do one thing well&quot; tools).<p>Slightly different take on this: <a href="http:&#x2F;&#x2F;yosefk.com&#x2F;blog&#x2F;why-bad-scientific-code-beats-code-following-best-practices.html" rel="nofollow">http:&#x2F;&#x2F;yosefk.com&#x2F;blog&#x2F;why-bad-scientific-code-beats-code-fo...</a>
pgbovinealmost 8 years ago
What does &quot;academia&quot; mean to you? Are you an undergraduate student, a grad student, a postdoc, a research scientist, a professor (and if so, which level)? Relationships to software creation differ at each level.
staredalmost 8 years ago
See: Why do many talented scientists write horrible software? - Academia Stack Exchange <a href="https:&#x2F;&#x2F;academia.stackexchange.com&#x2F;questions&#x2F;17781&#x2F;why-do-many-talented-scientists-write-horrible-software" rel="nofollow">https:&#x2F;&#x2F;academia.stackexchange.com&#x2F;questions&#x2F;17781&#x2F;why-do-ma...</a>
guscostalmost 8 years ago
Wrote this recently, kind of an answer to this question (if you don&#x27;t mind another disgruntled JavaScript rant): <a href="https:&#x2F;&#x2F;guscost.com&#x2F;2017&#x2F;06&#x2F;19&#x2F;future-driven-development&#x2F;" rel="nofollow">https:&#x2F;&#x2F;guscost.com&#x2F;2017&#x2F;06&#x2F;19&#x2F;future-driven-development&#x2F;</a>
notadocalmost 8 years ago
Academic is often theory<p>Professional is often whatever works<p>This is fairly common with many academic vs professional differences, btw
sonabinualmost 8 years ago
In most cases, not enough testing
santaclausalmost 8 years ago
For what it is worth, LLVM was birthed in academia.
评论 #14723974 未加载
ramgoruralmost 8 years ago
the biggest difference, in academia you code on sunday night and actually, a very small number of people read your code. But in industry, you write a code and then it goes through a pipeline of multiple reviews, so you end up spending most of your time addressing all those comments, and also you do the same for the codes written by other people.
booleandilemmaalmost 8 years ago
Obligatory xkcd: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;664&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;664&#x2F;</a>
kleer001almost 8 years ago
The super structure of a Software project, size and density of crew.
lapinrigoloalmost 8 years ago
The number of &#x2F;&#x2F; @TODO&#x27;s in the code.
kobeyaalmost 8 years ago
Testing and review.
tudorwalmost 8 years ago
shipping
Radimalmost 8 years ago
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.
评论 #14724149 未加载