|
|
|
|
|
by notacoward
3262 days 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. Ironically, an academic might get to spend a higher 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's consumable and expendable, not durable, so any time spent making it any better than "just barely good enough" is wasted. Why build a tank when all you need is a bicycle? [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. |
|
> easier to maintain code is king. Unless you are writing something extremely time critical do not try to be clever. A little slower is okay (and yes, I am in the performance consultancy business) if it significantly decreases the maintenance burden. Clever hacks belong to toy projects and blog posts. The next person who maintains it will be stupid to the code -- even if it's yourself. That clever hack is now a nightmare to untangle. In short: always code under the assumption that you will need to understand this when the emergency phone kicks you out of bed after two hours of sleep in the middle of the night. The CTO of Cloudflare was woken to the news of Cloudbleed at 1:26am.
Now I correct myself: clever hacks belong to academia, toy projects and blog posts.