News for hackers. Stuff that matters.
Re:What's the point of writing good scientific software? by Xcelerate on Friday February 08, 2013 @01:49PM (#5189436)
I've been debating about whether I want to open-source the scientific code I've been writing. A lot of it could be useful to other people in the molecular dynamics field.

I recently introduced my advisor to Github, and he thought it was a good idea; however, there were a few hesitations. The first, most importantly, is the likeliness of a bug. If you put your code on a very public website like Github, there is a chance it's going to be scrutinized by everyone in your field.

Now, unless you are one of the best programmers who has ever lived, there are bound to be bugs in your software, and when someone discovers them, it could have a deleterious effect on any journal articles you've written that used that code. The issue is that even though most bugs do not lead to significant changes in results, you would still need to redo all of your data to make sure that is the case. The software industry has long recognized buggy software as a reality, but I don't think the scientific community is as tolerant of it (hence the reason a lot of people hide their code).

For my MD simulations, I use the well-known LAMMPS package. Bugs in it are discovered all the time! (http://lammps.sandia.gov/bug.html). So I think there needs to be a collective realization among the scientific community that these are bound to occur and authors of journal articles can't be persecuted all the time for it. A lot of computational work is the art of approximation so I would just lump "human incompetency" under one of those approximation factors.

Despite this risk, I think I'm still going to release my code at some point as I would personally welcome critique and improvement suggestions. I'd like to think I'm a better coder than most scientists since I've been coding since I was twelve in multiple language paradigms and have won a major hackathon, but eh, who knows. I'm quite sure my environment isn't up to industry standards because I've always coded solo rather than in a team.

Re:What's the point of writing good scientific software? by plg on Friday February 08, 2013 @02:01PM (#5189510)
holy moly. It sounds like you don't want to release your code because someone else might find a bug that you missed (and that might have a "deleterious" effect on your journal articles).

You would rather leave potentially incorrect work standing than have a bug corrected?

What the f*ck has happened to science.

Re:What's the point of writing good scientific software? by nagrom on Friday February 08, 2013 @02:40PM (#5189695)
What the fuck has happened to science.

This is fairly standard in the science industry (I use the term deliberately). I get rated (in nuclear and particle physics) on how many papers I've published, what indictions of recognition I get from my peers and at which conferences I've been invited to speak. Short of something like a Millennium Prize or a Nobel (one-in-a-million, and both still very political), there are almost no direct rewards to accuracy or importance.

Academics tend not to be the people with the most understanding or the best direct insight - they're the people with the most friends on committees and who do the most fashionable things (usually badly). And so they appoint new academics who are a little bit worse than them (no point in opening yourself to competition - instead bring in people who are going to be grateful to you!) and the cycle continues.

Re:What's the point of writing good scientific software? by michaelbarton on Friday February 08, 2013 @03:13PM (#5189846)
I strongly agree with your statement. I am the author of the original post. I removed a sentence stating that job search committees care about the number of publications and citations more than they do about if your software is well documented and has a good command line interface. I feel as a post doc I am in a vulnerable career position and I always have to think about how 'will this lead to a publication' before anything else.
Re:What's the point of writing good scientific software? by plg on Friday February 08, 2013 @04:11PM (#5190171)
I can identify with that... for better or for worse, the currency of academic (at least research-based academia in north america) today is publications in high impact peer-reviewed journals. Period. If there are exceptions they are exceedingly rare.

The most sickening part of it all is that who are the ones who perpetuate this system? It is us (other academics).

Re:What's the point of writing good scientific software? by michaelbarton on Friday February 08, 2013 @05:02PM (#5190387)
Exactly. There are more and more scientists entering the job market every year making funding more and more competitive. I feel like it's not enough to be good anymore you have to be really good to get funding.

What can we do to change it? I love research. Having almost 10 years of experience but still earning less than if I had gone straight into industry after a masters degree wears you down though.

I think ultimately it is because scientists add little of value to society in the short term. An MD who has a comparable number of years of education can expect to earn 10X that of an equivalent scientist because they value immediately.

Re:What's the point of writing good scientific software? by mgillett on Friday February 08, 2013 @08:39PM (#5191145)
This is what turns me off so much from academia. Is this really that typical at most universities? I know that there's always been a large emphasis placed on publishing in high-impact journals (and often), but isn't the open publishing movement beginning to have an effect, albiet rather small?
Re:What's the point of writing good scientific software? by nagrom on Sunday February 10, 2013 @06:58AM (#5196174)
Not that I have seen. In fact, in my experience, even publications are not all that important! In the UK and Germany both it seems to be 30% of what you know, 60% of who you know and 10% luck.
Re:What's the point of writing good scientific software? by dantheman on Friday February 08, 2013 @02:34PM (#5189670)
Yeah, this is what make me fed up with academia -- it's no longer really about the work.

I like Feynman's quote "It's a kind of scientific integrity, a principle of scientific thought that corresponds to a kind of utter honesty--a kind of leaning over backwards. For example, if you're doing an experiment, you should report everything that you think might make it invalid--not only what you think is right about it: other causes that could possibly explain your results; and things you thought of that you've eliminated by some other experiment, and how they worked--to make sure the other fellow can tell they have been eliminated." [1]

[1] http://neurotheory.columbia.edu/~ken/cargo_cult.html

Re:What's the point of writing good scientific software? by Xcelerate on Friday February 08, 2013 @03:34PM (#5189961)
Whoa, hold on there! No need to swear.

> It sounds like you don't want to release your code because someone else might find a bug that you missed

I already said at the end of my post that I decided to release my code. Everyone will be able to see it.

> You would rather leave potentially incorrect work standing than have a bug corrected?

Of course not. You missed the whole point of my post. My point was "Here's a situation in science that needs fixing". "People are hesitant to fix it because...". "I'm going to personally work towards a solution."

Let me ask: what incentive does any scientist have at all to publish their code? You're not going to make money off of it. It's in an obscure niche so you're not going to be world-famous with it. You may get citations to your work, but you're just making yourself vulnerable to having your reputation destroyed because of a bug that nullified all of your articles' results. This is why nobody wants to do it. I'm not saying it's right; I'm saying that it's the status quo.

Most big scientific packages are funded by the DOE, NSF, and others. That's likely the only reason they are even out there.

Re:What's the point of writing good scientific software? by plg on Friday February 08, 2013 @03:56PM (#5190091)
"What incentive does any scientist have at all to publish their code?"

holy moly x 2

How about that it represents a fuller account of what you did and how you did it? (bugs or no bugs). Isn't scientific publishing supposed to be about reporting what you did as accurately as possible so that others can (1) understand and (2) replicate?

BTW the * in my f*ck from above stands for "ra", what did you think it stood for?

Re:What's the point of writing good scientific software? by Xcelerate on Friday February 08, 2013 @04:00PM (#5190117)
Alright, I'm going to play devil's advocate since you're obviously not getting the point.

> How about that it represents a fuller account of what you did and how you did it?

So what? Journals never require your code to be submitted. It's not going to increase your article's chance of acceptance. And nobody asks for your code anyway. Why should I publish it if it's not going to bring me any benefits?

> Isn't scientific publishing supposed to be about reporting what you did as accurately as possible so that others can (1) understand and (2) replicate?

In an idealized world, yes. But nobody else does it so why should I?

Re:What's the point of writing good scientific software? by gknoy on Friday February 08, 2013 @04:19PM (#5190212)
From a game theory perspective, where you are seeking tangible rewards for your work, I totally see your point of the disadvantages of publishing your code: it's purely a short-term weakness.

From the perspective of what "science" is claimed to mean, namely the advancement of human knowledge in a way which is repeatable and verifiable, it seems axiomatic that sharing your algorithms, code, and data are necessary and beneficial to the scientific community.

As a researcher, you don't gain a lot from publishing YOUR code ... but you sure might gain a lot from being able to re-use someone else's code in your domain, or more easily replicate someone else's experiment.

In short: You should share your code because it's the Right Thing to Do if you want to grow human knowledge.

Re:What's the point of writing good scientific software? by saraid216 on Friday February 08, 2013 @05:05PM (#5190398)
> it seems axiomatic that sharing your algorithms, code, and data are necessary and beneficial to the scientific community.

It seems that way, but it isn't. If a cultural foolishness causes you to lose significant credibility undeservedly, it's actually more beneficial to withhold things that could damage it so that you can continue your essentially still-very-useful work.

You could spearhead the fight against said cultural foolishness, but that's time and energy spent doing something other than the work you want to do and are best at.

Someone has to, but why you? This is the Bystander Effect.

Re:What's the point of writing good scientific software? by hermannj314 on Friday February 08, 2013 @06:03PM (#5190662)
My lawyer friend always said 'the probative value must outweigh the prejudicial value' for evidence to be accepted. So just because something is true and relevant, is not sufficient to make it admissible as evidence.

So, I guess I can see that argument here. Just because the software has a "bug" isn't sufficient to conclude the results are not accurate. The prejudicial value outweighs the probative value.

Re:What's the point of writing good scientific software? by plg on Friday February 08, 2013 @04:52PM (#5190339)
"Why should I publish it if it's not going to bring me any benefits?"

wow. has it come to this? really? maybe you should reconsider your career choice

Re:What's the point of writing good scientific software? by michaelbarton on Friday February 08, 2013 @05:10PM (#5190422)
I think it's a fair point. The time spent documenting and releasing code could be spent on producing and finishing another manuscript to add to your CV. If you're not behaving like this, them probably some one else is maybe? Job search and tenure committees demand more and more publications the higher the institution.

Science shouldn't be like this but I think it's zero sum.

Re:What's the point of writing good scientific software? by Xcelerate on Friday February 08, 2013 @09:56PM (#5191398)
I don't think you know what "devil's advocate" means...
Re:What's the point of writing good scientific software? by pjscott on Friday February 08, 2013 @03:32PM (#5189945)
Suppose that your code does become widely visible. How is that a bad thing for you? Your reputation will be enhanced, you will have contributed something that other people find useful, and if there are serious bugs affecting your results, it'll be nice to find those.

You might want to automate the process of re-running your analysis, though. It's a good idea in general, and especially if you anticipate needing to make minor tweaks to the software involved.

Re:What's the point of writing good scientific software? by michaelbarton on Friday February 08, 2013 @03:44PM (#5190015)
I think that is a big 'if.' If I create one of the pieces of bioinformatics software that becomes widely used then this is great for my career. However I believe a large majority of research software goes unused and therefore uncited. The extra effort I made to create a website and documentation is therefore time I could have spent more usefully on creating another publishable unit.
Re:What's the point of writing good scientific software? by michaelbarton on Friday February 08, 2013 @03:07PM (#5189823)
I have a feeling that there is great deal of buggy software in biology. Taking non-scientific software for example such as Rails, if there is a bug this becomes obvious a page is loaded incorrectly or a model is pulled incorrectly from the database.

In contrast imagine an academic scenario where I'm testing a hypothesis using someone else's software. How do I notice a bug? I'll notice the bugs where the output is in the wrong format for example. More subtle bugs I won't notice because I don't have any expectation on the results. This will affect the conclusion I draw though.