4 ms·
His first list really, really hand-waves the problems that style of coding can cause. Just use better tools or run valgrind? It never is that simple. One aspec
by sseagull 10y ago
His first list really, really hand-waves the problems that style of coding can cause. Just use better tools or run valgrind? It never is that simple.
One aspect of scientific coding is that it can have very long lifetimes. I sometimes work on some code > 20 years old. Technology can change a lot in that time frame. For example, using global data (common back then) can completely destroy parallel capability.
The 'old' style also makes the code sensitive to small changes in theory. Need to support a new theory that is basically the same as the old one with a few tweaks? Copy and paste, change a few things, and get working on that paper! Who cares if you just copied a whole bunch of global data - you successfully avoided the conflict by putting "2" at the end of every variable. You've got better things to do than proper coding.
Obviously, over-engineering is a problem. But science does need a bit of "engineering" to begin with.
Anecdote: A friend of mine wanted my help with parsing some outputs and replacing some text in input files. Simple stuff. He showed me what he had. It was written in fortran because that's what his advisor knew :(
Note: I'm currently part of a group trying to help with best practices in computational chemistry. We'll see how it goes, but the field seems kind of open to the idea (ie, there is starting to be funding for software maintenance, etc).
- luthaf 10y ago> there is starting to be funding for software maintenance Any reference concerning this point? I am interested!
- sseagull 10y agoHere is a starting point for one big movement in my field: https://www.nsf.gov/news/news_summ.jsp?org=NSF&cntn_id=189347&preview=false https://www.nsf.gov/news/news_summ.jsp?org=NSF&cntn_id=18934... It's not quite "maintenance", but is definitely a step away from just writing software to get an answer and then abandoning it. Also, anecdotally, a there is movement towards more open-source software. Slowly but surely, things are moving in the right direction.