Live data from Hacker News

Why scientific programming does not compute

nature.com

41–50 of 170 posts

Re: Why scientific programming does not compute

#41
Rather than building these data analysis/visualization programs from scratch each time, my thought is that scientists should instead be writing them as modules for a data workflow application like RapidMiner.

If you haven't heard of RapidMiner, you basically edit a flowchart where each step takes inputs and outputs, eg take some data and make a histogram, or perform a clustering analysis.

Video of someone demoing it: http://www.youtube.com/watch?v=TNESlvXp47E

This way, the scientists can focus on the algorithms and not have to worry about all the other details of creating useable, maintainable software.

Re: Why scientific programming does not compute

#42
there's not nearly enough open source academic projects, nor is there any sort of pervasive culture that encourages one.. besides the litany of examples that could be put together to show that open source + academia does exist and does work, I've read way too many computational physics or computational chemistry or computational anything academic papers that simply do not publish source code, and imo there's no good excuse for it, other than the usual, funding, or copyright / university IP

Re: Why scientific programming does not compute

#43

Earlier quoted context omitted.

Similarly, from Zed Shaw ( http://learnpythonthehardway.org/book/advice.html ) : "People who can code in the world of technology companies are a dime a dozen and get no respect. People who can code in biology, medicine, government, sociology, physics, history, and mathematics are respected and can do amazing things to advance those disciplines."

This seems at odds with the statement from the article "There needs to be a real shift in mindset away from worrying about how to get published in Nature and towards thinking about how to reward work that will be useful to the wider community." EDIT: What the heck is wrong with this? We have two opinions on the perceived value of programmers in scientific enterprises, one from someone who works in the field (David Ga…

This sentence strikes me as astonishingly hypocritical. Nature can immediately do 2 things to make the science they publish vastly more useful to the wider community:

1) Remove the paywall

2) Require publishing the code for computational papers (and the data for experimental papers)

Nature Group only cares about maintaining its status as a high impact factor journal, and scientists sheepishly submit to them. They actually love it that scientists worry about getting published in Nature.

Re: Why scientific programming does not compute

#44
I'm a PhD student in Electrical Engineering. I'm currently working on a Monte Carlo-type simulation for looking at the underwater light field for underwater optical communication (no sharks!). I'm doing the development in MATLAB and I recently put all my code up on Github (https://github.com/gallamine/Photonator) to help avoid some of these problems (lack of transparency). Even if nobody ever looks/uses the code, I know every time I do a commit there's a change someone MIGHT and I think it helps me write better code.

The problem with doing science via models/simulation is that there just isn't a good way of knowing when it's "right" (well, at least in a lot of cases), so testing and verification are imperative. I can't tell you how many times I've laid awake at night wondering if my code has a bug in it that I can't find and will taint my research results.

I suspect another big problem is that one student writes the code, graduates, then leaves it to future students, or worse, their professor, to figure out what they wrote. Passing on the knowledge takes a heck of a lot of time, especially when you're pressed to graduate and get a paycheck).

There's got to be a market in this somewhere. Even if it was just a volunteer service of "real" programmers who would help scientists out. I spent weeks trying to get my code running on AWS, which probably would have taken a few hours from someone who knew what they were doing. I also suspect that someone with practice could make my simulations run at twice the speed, which really adds up when you're doing hundreds of them and they take hours each.

Re: Why scientific programming does not compute

#46
post #6

I want to write a "software style guide" for journalists and their editors. Software and Code are both mass nouns in technical language. "Code" can be in programs (aka, things that run), libraries (things that other programmers can use to make programs), or in samples to show people how to do things in their programs or libraries. Some people call short programs scripts. When you feel you should pluralize "software",…

I believe "code" meaning "program" is a relic of early military software development, and as such is probably older than your terminology.

Re: Why scientific programming does not compute

#47
post #42

there's not nearly enough open source academic projects, nor is there any sort of pervasive culture that encourages one.. besides the litany of examples that could be put together to show that open source + academia does exist and does work, I've read way too many computational physics or computational chemistry or computational anything academic papers that simply do not publish source code, and imo there's no good…

There is an important factor discouraging publishing source code - fear that there indeed are bugs and they will be exposed. This is blatantly "security through obscurity", but I fear it's a common attitude. If there are bugs and code is secret, even if someone else later points out that the results contradict their own findings, it's (presumably) not difficult to sweep the thing under the rug and cool it down. On the other hand, if the paper is published, code is public and someone spot serious bugs, it's instantly a big shame... (code review as a part of peer review would help, but it's very unrealistic - already, reviewing is very time consuming).

In addition, there are really no structural/institutional incentives to produce and share good quality scientific code. Maintaining good code costs much effort and, currently, gives few short-term benefits. It's often easier to produce crappy code, get the results, publish and move ahead.

Re: Why scientific programming does not compute

#48

Why not just hire comp scientists or programmers permanently? Adjust the company model, permanently segregate the work?

I did some work on data visualization for the astrophysics department when I was in college. I started to work with the simulation code, but found that the math was sprinkled everywhere, which made it really difficult for me to make structural changes without risking the integrity of the program. One of the most elusive skills for self-taught programmers is how to structure code properly. A good architecture would al…

I'm a programmer who is studying physics in college, and a couple years back I had a similar experience with simulation code as you did. I didn't have any issues with the math—the program I was working on didn't have anything more conceptually advanced than multivariable calculus—but I did struggle significantly to understand the physics behind the simulation.

It didn't help that most programs use, for example, the variable 'rho' for density instead of just writing out 'density'.

On the other hand, reading game physics libraries (written by programmers, not physicists) can be just as bad. There are physics hacks all over ("it's not stable, so let's throw in an arbitrary constant") and there's code repetition where the programmer doesn't understand that two concepts are closely related.

Re: Why scientific programming does not compute

#49
post #17
post #7

Earlier quoted context omitted.

Actually it's a science thing. In a scientific context "code" is understood to mean "program". For example: http://scholar.google.com/scholar?q=%22population+synthesis+... I'm not sure why this is though.

What an excellent idea: Generate new jargon that's incompatible with the jargon used from the field you suck at. Perhaps concerned scientists and editors should reject the bifurcation here and take on the lingo of the field that creates the tool they have to use and need to learn better as a first step in learning to program in a more responsible manner?

That attitude seems a bit provincial: the usage may be uncommon in industry software development, but it's not rare in some areas of computer science. For example,

http://scholar.google.com/scholar?hl=en&q=%22linear+alge...

"Code" also has connotations (self-contained, numerical, etc.) that make it distinct from "program" or even "library". A routine in ATLAS is a code, but Microsoft Word is not.

Re: Why scientific programming does not compute

#50
post #11
post #5

As a general rule, researchers do not test or document their programs rigorously, and they rarely release their codes, making it almost impossible to reproduce and verify published results generated by scientific software, say computer scientists. Just stop doing that! Seriously, testing is not wasted effort and for any project that's large enough it's not slowing you down. For a very small and simple project testing…

You won't see any clean code written by scientists until (major) journals make it mandatory to submit code for peer review and publication. When it happens, I hope that they'll manage to agree on a sensible license (even though I won't set my hopes too high).

I have all of my code on github under a CRAPL license [1]. It assumes a certain amount of good-faith from others, but I feel that if you're worrying about getting scooped, your problem isn't ambitious enough. Luckily, my adviser agrees, and is very in favor of open releases of data [2].

[1]http://matt.might.net/articles/crapl/ [2]http://www.michaeleisen.org/blog/?p=440

Post reply on HN