3 ms·
This seems like a fluff piece because: 1) Prototype code scientists write tends to be written at a high level, so barring imported libraries not up and disappe
by proverbialbunny 6y ago
This seems like a fluff piece because:
1) Prototype code scientists write tends to be written at a high level, so barring imported libraries not up and disappearing, there is a high chance that code written by scientists will run 10 years later. There is a higher chance it will run than production code written at a lower level.
2) The article dives into documentation but scientists code in the Literate Programming Paradigm[0] where the idea is you're writing a book and the code is used as examples to support what you're presenting. Of course scientists write documentation. Presenting findings is a primary goal.
3) Comments here have mentioned unit testing. Some of you may scoff at this but when prototyping, every time you run your code, the output from it teaches you something, and that turns into an iterative feedback loop, so every time you learn something you want to change the code. Unit tests are not super helpful when you're changing what the code should be doing every time you run it. Unit tests are better once the model has been solidified and is being productionized. Having a lack of unit testing does not make 10 year old prototype code harder to run.
[0] https://en.wikipedia.org/wiki/Literate_programming https://en.wikipedia.org/wiki/Literate_programming
- comicjk 6y ago> scientists code in the Literate Programming Paradigm I wish. In my career as a computational scientist I have never seen this in practice, either in academia or industry. On unit testing, I half agree. Most unit tests get quickly thrown out as the code changes, so it's a depressing way to write research code. But tests absolutely help someone trying to run old code - they show what parts still work and how to use them.
- proverbialbunny 6y agoIt's even more common today. eg, Jupyter Lab or Jupyter Notebooks.
- konjin 6y agoNotebooks are to Literate Programming what Word is to TeX.