<h3>Background</h3>

<p>Last year, I did an internship in a physics research group at a university. In this group, we mostly used <a href="http://en.wikipedia.org/wiki/LabVIEW" rel="noreferrer">LabVIEW</a> to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite OK, but for data analysis, it's a real pain. On top of that, everyone was mostly self-taught, so code that was written was generally quite a mess (no wonder that every PhD quickly decided to rewrite everything from scratch). Version control was unknown, and impossible to set up because of strict software and network regulations from the IT department.</p>

<p>Now, things actually worked out surprisingly OK, but how do people in the natural sciences do their software development?</p>

<h3>Questions</h3>

<p>Some concrete questions:</p>

<ul>
<li>What languages/environments have you used for developing scientific software, especially data analysis? What libraries? (for example, what do you use for plotting?)</li>
<li>Was there any training for people without any significant background in programming?</li>
<li>Did you have anything like version control, and bug tracking?</li>
<li>How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (especially physicists are stubborn people!)</li>
</ul>

<h3>Summary of answers thus far</h3>

<p>The answers (or my interpretation of them) thus far: (2008-10-11)</p>

<ul>
<li>Languages/packages that seem to be the most widely used:

<ul>
<li>LabVIEW</li>
<li><a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29" rel="noreferrer">Python</a>

<ul>
<li>with <a href="http://en.wikipedia.org/wiki/SciPy" rel="noreferrer">SciPy</a>, <a href="http://en.wikipedia.org/wiki/NumPy" rel="noreferrer">NumPy</a>, <a href="http://www.scipy.org/PyLab" rel="noreferrer">PyLab</a>, etc. (See also Brandon's reply for downloads and links)</li>
</ul></li>
<li>C/C++</li>
<li><a href="http://en.wikipedia.org/wiki/MATLAB" rel="noreferrer">MATLAB</a></li>
</ul></li>
<li>Version control is used by nearly all respondents; bug tracking and other processes are much less common.</li>
<li>The Software Carpentry course is a good way to teach programming and development techniques to scientists.</li>
<li>How to improve things?

<ul>
<li>Don't force people to follow strict protocols.</li>
<li>Set up an environment yourself, and show the benefits to others. Help them to start working with version control, bug tracking, etc. themselves.</li>
<li>Reviewing other people's code can help, but be aware that not everyone may appreciate that.</li>
</ul></li>
</ul>

[{'answer_id': 38261, 'author': 'Chris Upchurch', 'author_id': 2600, 'author_profile': 'https://Stackoverflow.com/users/2600', 'pm_score': 3, 'selected': False, 'text': "<p>I'm not exactly a 'natural' scientist (I study transportation) but am an academic who writes a lot of my own software for data analysis.  I try to write as much as I can in Python, but sometimes I'm forced to use other languages when I'm working on extending or customizing an existing software tool.  There is very little programming training in my field.  Most folks are either self-taught, or learned their programming skills from classes taken previously or outside the discipline.</p>\n\n<p>I'm a big fan of version control.  I used Vault running on my home server for all the code for my dissertation.  Right now I'm trying to get the department to set up a Subversion server, but my guess is I will be the only one who uses it, at least at first.  I've played around a bit with FogBugs, but unlike version control, I don't think that's nearly as useful for a one-man team.</p>\n\n<p>As for encouraging others to use version control and the like, that's really the problem I'm facing now.  I'm planning on forcing my grad students to use it on research projects they're doing for me, and encouraging them to use it for their own research.  If I teach a class involving programming, I'll probably force the students to use version control there too (grading them on what's in the repository).  As far as my colleagues and their grad students go, all I can really do is make a server available and rely on gentle persuasion and setting a good example.  Frankly, at this point I think it's more important to get them doing regular backups than get them on source control (some folks are carrying around the only copy of their research data on USB flash drives).</p>\n"}, {'answer_id': 38263, 'author': 'Pramod', 'author_id': 1386292, 'author_profile': 'https://Stackoverflow.com/users/1386292', 'pm_score': 4, 'selected': False, 'text': '<p>This might be slightly tangential, but hopefully relevant.</p>\n\n<p>I used to work for National Instruments, R&amp;D, where I wrote software for NI RF &amp; Communication toolkits. We used LabVIEW quite a bit, and here are the practices we followed:</p>\n\n<ol>\n<li>Source control. NI uses Perforce. We did the regular thing - dev/trunk branches, continuous integration, the works.</li>\n<li>We wrote automated test suites.</li>\n<li>We had a few people who came in with a background in signal processing and communication. We used to have regular code reviews, and best practices documents to make sure their code was up to the mark.</li>\n<li>Despite the code reviews, there were a few occasions when "software guys", like me had to rewrite some of this code for efficiency.</li>\n<li>I know exactly what you mean about stubborn people! We had folks who used to think that pointing out a potential performance improvement in their code was a direct personal insult! It goes without saying that that this calls for good management. I thought the best way to deal with these folks is to go slowly, not press to hard for changes and if necessary be prepared to do the dirty work. [Example: write a test suite for their code].</li>\n</ol>\n'}, {'answer_id': 38265, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>I\'m no expert in this area, but I\'ve always understood that this is what <a href="http://en.wikipedia.org/wiki/MATLAB" rel="nofollow noreferrer">MATLAB</a> was created for.  There is <a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11596&amp;objectType=file" rel="nofollow noreferrer">a way to integrate MATLAB with SVN for source control</a> as well.</p>\n'}, {'answer_id': 38266, 'author': 'dmckee --- ex-moderator kitten', 'author_id': 2509, 'author_profile': 'https://Stackoverflow.com/users/2509', 'pm_score': 4, 'selected': False, 'text': '<p>Nuclear/particle physics here.</p>\n\n<ul>\n<li>Major programing work used to be done mostly in <a href="http://en.wikipedia.org/wiki/Fortran" rel="noreferrer">Fortran</a> using <a href="http://en.wikipedia.org/wiki/CERN_Program_Library" rel="noreferrer">CERNLIB</a> (PAW, MINUIT, ...) and <a href="http://en.wikipedia.org/wiki/GEANT_(program)" rel="noreferrer">GEANT3</a>, recently it has mostly been done in C++ with <a href="http://en.wikipedia.org/wiki/ROOT" rel="noreferrer">ROOT</a> and <a href="http://en.wikipedia.org/wiki/Geant4" rel="noreferrer">Geant4</a>. There are a number of other libraries and tools in specialized use, and <a href="http://en.wikipedia.org/wiki/LabVIEW" rel="noreferrer">LabVIEW</a> sees some use here and there.</li>\n<li>Data acquisition in my end of this business has often meant fairly low level work. Often in C, sometimes even in assembly, but this is dying out as the hardware gets more capable. On the other hand, many of the boards are now built with <a href="http://en.wikipedia.org/wiki/Field-programmable_gate_array" rel="noreferrer">FPGA</a>s which need gate twiddling...</li>\n<li>One-offs, graphical interfaces, etc. use almost anything (<a href="http://en.wikipedia.org/wiki/Tk_(framework)" rel="noreferrer">Tcl/Tk</a> used to be big, and I\'ve been seeing more Perl/Tk and Python/Tk lately) including a number of packages that exist mostly inside the particle physics community.</li>\n<li>Many people writing code have little or no formal training, and process is transmitted very unevenly by oral tradition, but most of the software group leaders take process seriously and read as much as necessary to make up their deficiencies in this area.</li>\n<li>Version control for the main tools is ubiquitous. But many individual programmers neglect it for their smaller tasks. Formal bug tracking tools are less common, as are nightly builds, unit testing, and regression tests.</li>\n</ul>\n\n<p>To improve things:</p>\n\n<ol>\n<li>Get on the good side of the local software leaders</li>\n<li>Implement the process you want to use in your own area, and encourage those you let in to use it too.</li>\n<li>Wait. Physicists are empirical people. If it helps, they will (eventually!) notice.</li>\n</ol>\n\n<hr>\n\n<p>One more suggestion for improving things. </p>\n\n<ol start="4">\n<li>Put a little time in to helping anyone you work directly with. Review their code. Tell them about algorithmic complexity/code generation/DRY or whatever basic thing they never learned because some professor threw a Fortran book at them once and said "make it work". Indoctrinate them on process issues. They are smart people, and they will learn if you give them a chance.</li>\n</ol>\n'}, {'answer_id': 38270, 'author': 'Grey Panther', 'author_id': 1265, 'author_profile': 'https://Stackoverflow.com/users/1265', 'pm_score': 1, 'selected': False, 'text': '<p>First of all, I would definitely go with a scripting language to avoid having to explain a lot of extra things (for example manual memory management is - mostly - ok if you are writing low-level, performance sensitive stuff, but for somebody who just wants to use a computer as an upgraded scientific calculator it\'s definitely overkill). Also, look around if there is something specific for your domain (as is <a href="http://www.r-project.org/" rel="nofollow noreferrer">R</a> for statistics). This has the advantage of already working with the concepts the users are familiar with and having specialized code for specific situations (for example calculating standard deviations, applying statistical tests, etc in the case of R).</p>\n\n<p>If you wish to use a more generic scripting language, I would go with Python. Two things it has going for it are:</p>\n\n<ul>\n<li>The interactive shell where you can experiment</li>\n<li>Its clear (although sometimes lengthy) syntax</li>\n</ul>\n\n<p>As an added advantage, it has libraries for most of the things you would want to do with it.</p>\n'}, {'answer_id': 38284, 'author': 'Aaron Maenpaa', 'author_id': 2603, 'author_profile': 'https://Stackoverflow.com/users/2603', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?)</p>\n</blockquote>\n\n<p>Python, <a href="http://en.wikipedia.org/wiki/NumPy" rel="nofollow noreferrer">NumPy</a> and pylab (plotting).</p>\n\n<blockquote>\n  <p>Was there any training for people without any significant background in programming?</p>\n</blockquote>\n\n<p>No, but I was working in a multimedia research lab, so almost everybody had a computer science background.</p>\n\n<blockquote>\n  <p>Did you have anything like version control, bug tracking?</p>\n</blockquote>\n\n<p>Yes, <a href="http://en.wikipedia.org/wiki/Subversion_(software)" rel="nofollow noreferrer">Subversion</a> for version control, <a href="http://en.wikipedia.org/wiki/Trac" rel="nofollow noreferrer">Trac</a> for bug tracing and wiki. You can get free bug tracker/version control hosting from <a href="http://www.assembla.com/" rel="nofollow noreferrer">http://www.assembla.com/</a> if their <a href="http://en.wikipedia.org/wiki/Terms_of_service" rel="nofollow noreferrer">TOS</a> fits your project.</p>\n\n<blockquote>\n  <p>How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!).</p>\n</blockquote>\n\n<p>Make sure the infrastructure is set up and well maintained and try to sell the benefits of source control.</p>\n'}, {'answer_id': 38312, 'author': 'kaybenleroll', 'author_id': 277, 'author_profile': 'https://Stackoverflow.com/users/277', 'pm_score': 5, 'selected': False, 'text': '<p>The course <a href="http://www.swc.scipy.org/" rel="noreferrer">Software Carpentry</a> is aimed specifically at people doing scientific computing and aims to teach the basics and lessons of software engineering, and how best to apply them to projects.</p>\n\n<p>It covers topics like version control, debugging, testing, scripting and various other issues.</p>\n\n<p>I\'ve listened to about 8 or 9 of the lectures and think it is to be highly recommended.</p>\n\n<p><strong>Edit:</strong> The MP3s of the lectures are <a href="http://www.osl.iu.edu/~lums/swc/index.html" rel="noreferrer">available</a> as well.</p>\n'}, {'answer_id': 40760, 'author': 'Alexander L. Belikoff', 'author_id': 3514, 'author_profile': 'https://Stackoverflow.com/users/3514', 'pm_score': 3, 'selected': False, 'text': '<p>I\'d highly recommend reading <a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html" rel="nofollow noreferrer" title="What Every Computer Scientist Should Know About Floating-Point Arithmetic">"What Every Computer Scientist Should Know About Floating-Point Arithmetic"</a>. A lot of problems I encounter on a regular basis come from issues with floating point programming.</p>\n'}, {'answer_id': 69184, 'author': 'DarenW', 'author_id': 10468, 'author_profile': 'https://Stackoverflow.com/users/10468', 'pm_score': 2, 'selected': False, 'text': '<p>Definitely, use <a href="http://en.wikipedia.org/wiki/Subversion_(software)" rel="nofollow noreferrer">Subversion</a> to keep current, work-in-progress, and stable snapshot copies of source code.  This includes C++, Java etc. for homegrown software tools, and quickie scripts for one-off processing.  </p>\n\n<p>With the strong leaning in science and applied engineering toward "lone cowboy" development methodology, the usual practice of organizing the repository into trunk, tag and whatever else it was - don\'t bother!  Scientists and their lab technicians like to twirl knobs, wiggle electrodes and chase vacuum leaks.  It\'s enough of a job to get everyone to agree to, say Python/<a href="http://en.wikipedia.org/wiki/NumPy" rel="nofollow noreferrer">NumPy</a> or follow some naming convention; forget trying to make them follow arcane software developer practices and conventions.  </p>\n'}, {'answer_id': 69200, 'author': 'DarenW', 'author_id': 10468, 'author_profile': 'https://Stackoverflow.com/users/10468', 'pm_score': 2, 'selected': False, 'text': '<p>For source code management, centralized systems such as <a href="http://en.wikipedia.org/wiki/Subversion_(software)" rel="nofollow noreferrer">Subversion</a> are superior for scientific use due to the clear single point of truth (SPOT).  Logging of changes and ability to recall versions of any file, without having chase down where to find something, has huge record-keeping advantages.  Tools like <a href="http://en.wikipedia.org/wiki/Git_(software)" rel="nofollow noreferrer">Git</a> and <a href="http://en.wikipedia.org/wiki/Monotone_(software)" rel="nofollow noreferrer">Monotone</a>: oh my gosh the chaos I can imagine that would follow!   Having clear-cut records of just what version of hack-job scripts were used while toying with the new sensor when that Higgs boson went by or that supernova blew up, will lead to happiness. </p>\n'}, {'answer_id': 72252, 'author': 'Arc the daft', 'author_id': 8615, 'author_profile': 'https://Stackoverflow.com/users/8615', 'pm_score': 2, 'selected': False, 'text': '<p><em>What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?)</em></p>\n\n<p>My undergraduate physics department taught <a href="http://en.wikipedia.org/wiki/LabVIEW" rel="nofollow noreferrer">LabVIEW</a> classes  and used it extensively in its research projects.</p>\n\n<p>The other alternative is <a href="http://en.wikipedia.org/wiki/MATLAB" rel="nofollow noreferrer">MATLAB</a>, in which I have no experience.  There are camps for either product; each has its own advantages/disadvantages.  Depending on what kind of problems you need to solve, one package may be more preferable than the other.</p>\n\n<p>Regarding data analysis, you can use whatever kind of number cruncher you want.  Ideally, you can do the hard calculations in language X and format the output to plot nicely in Excel, <a href="http://en.wikipedia.org/wiki/Mathcad" rel="nofollow noreferrer">Mathcad</a>, <a href="http://en.wikipedia.org/wiki/Mathematica" rel="nofollow noreferrer">Mathematica</a>, or whatever the flavor du jour plotting system is.  Don\'t expect standardization here.</p>\n\n<p><em>Did you have anything like version control, bug tracking?</em><p>\nLooking back, we didn\'t, and it would have been easier for us all if we did.  Nothing like breaking everything and struggling for hours to fix it!</p>\n\n<p>Definitely use source control for any common code.  Encourage individuals to write their code in a manner that could be made more generic.  This is really just coding best practices.  Really, you should have them teaching (or taking) a computer science class so they can get the basics.</p>\n\n<p><em>How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!)</em></p>\n\n<p>There is a clear split between data aquisition (DAQ) and data analysis.  Meaning, it\'s possible to standardize on the DAQ and then allow the scientists to play with the data in the program of their choice.</p>\n'}, {'answer_id': 100103, 'author': 'Brandon DuRette', 'author_id': 17834, 'author_profile': 'https://Stackoverflow.com/users/17834', 'pm_score': 5, 'selected': False, 'text': '<p><em>What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?)</em></p>\n\n<p>I used to work for <a href="http://www.enthought.com" rel="noreferrer">Enthought</a>, the primary corporate sponsor of <a href="http://www.scipy.org" rel="noreferrer">SciPy</a>. We collaborated with scientists from the companies that contracted Enthought for custom software development. Python/SciPy seemed to be a comfortable environment for scientists. It\'s much less intimidating to get started with than say C++ or Java if you\'re a scientist without a software background.</p>\n\n<p>The <a href="http://www.enthought.com/products/epd.php" rel="noreferrer">Enthought Python Distribution</a> comes with all the scientific computing libraries including analysis, plotting, 3D visualation, etc.</p>\n\n<p><em>Was there any training for people without any significant background in programming?</em></p>\n\n<p>Enthought does offer <a href="http://www.enthought.com/training/" rel="noreferrer">SciPy training</a> and the SciPy community is pretty good about answering questions on the mailing lists.</p>\n\n<p><em>Did you have anything like version control, bug tracking?</em></p>\n\n<p>Yes, and yes (Subversion and Trac). Since we were working collaboratively with the scientists (and typically remotely from them), version control and bug tracking were essential. It took some coaching to get some scientists to internalize the benefits of version control.</p>\n\n<p><em>How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!)</em></p>\n\n<p>Make sure they are familiarized with the tool chain. It takes an investment up front, but it will make them feel less inclined to reject it in favor of something more familiar (Excel). When the tools fail them (and they will), make sure they have a place to go for help &mdash; mailing lists, user groups, other scientists and software developers in the organization. The more help there is to get them back to doing physics the better.</p>\n'}, {'answer_id': 104403, 'author': 'Ian Hopkinson', 'author_id': 19172, 'author_profile': 'https://Stackoverflow.com/users/19172', 'pm_score': 2, 'selected': False, 'text': '<p>Ex-academic physicist and now industrial physicist UK here:</p>\n\n<p><em>What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?)</em></p>\n\n<p>I mainly use <a href="http://www.google.com/search?client=opera&amp;rls=en&amp;q=site:en.wikipedia.org+MATLAB&amp;sourceid=opera&amp;ie=utf-8&amp;oe=utf-8" rel="nofollow noreferrer">MATLAB</a> these days (easy to access visualisation functions and maths). I used to use <a href="http://en.wikipedia.org/wiki/Fortran" rel="nofollow noreferrer">Fortran</a> a lot and <a href="http://en.wikipedia.org/wiki/IDL_(programming_language)" rel="nofollow noreferrer">IDL</a>. I have used C (but I\'m more a reader than a writer of C), Excel macros (ugly and confusing). I\'m currently needing to be able to read Java and C++ (but I can\'t really program in them) and I\'ve hacked Python as well. For my own entertainment I\'m now doing some programming in C# (mainly to get portability / low cost / pretty interfaces). I can write Fortran with pretty much any language I\'m presented with ;-)</p>\n\n<p><em>Was there any training for people without any significant background in programming?</em></p>\n\n<p>Most (all?) undergraduate physics course will have a small programming course usually on C, Fortran or MATLAB but it\'s the real basics. I\'d really like to have had some training in software engineering at some point (revision control / testing / designing medium scale systems)</p>\n\n<p><em>Did you have anything like version control, bug tracking?</em></p>\n\n<p>I started using Subversion / TortoiseSVN relatively recently. Groups I\'ve worked with in the past have used revision control. I don\'t know any academic group which uses formal bug tracking software. I still don\'t use any sort of systematic testing.</p>\n\n<p><em>How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!)</em></p>\n\n<p>I would try to introduce some software engineering ideas at undergraduate level and then reinforce them by practice at graduate level, also provide pointers to resources like the Software Carpentry course mentioned above.</p>\n\n<p>I\'d expect that a significant fraction of academic physicists will be writing software (not necessarily all though) and they are in dire need of at least an introduction to ideas in software engineering.</p>\n'}, {'answer_id': 323538, 'author': 'David Lawrence Miller', 'author_id': 4892, 'author_profile': 'https://Stackoverflow.com/users/4892', 'pm_score': 2, 'selected': False, 'text': "<p>I'm a statistician at a university in the UK. Generally people here use R for data analysis, it's fairly easy to learn if you know C/Perl. Its real power is in the way you can import and modify data interactively. It's very easy to take a number of say CSV (or Excel) files and merge them, create new columns based on others and then throw that into a GLM, GAM or some other model. Plotting is trivial too and doesn't require knowledge of a whole new language (like PGPLOT or GNUPLOT.) Of course, you also have the advantage of having a bunch of built-in features (from simple things like mean, standard deviation etc all the way to neural networks, splines and GL plotting.)</p>\n\n<p>Having said this, there are a couple of issues. With very large datasets R can become very slow (I've only really seen this with >50,000x30 datasets) and since it's interpreted you don't get the advantage of Fortran/C in this respect. But, you can (very easily) get R to call C and Fortran shared libraries (either from something like netlib or ones you've written yourself.) So, a usual workflow would be to:</p>\n\n<ul>\n<li>Work out what to do.</li>\n<li>Prototype the code in R.</li>\n<li>Run some preliminary analyses.</li>\n<li>Re-write the slow code into C or Fortran and call that from R.</li>\n</ul>\n\n<p>Which works very well for me.</p>\n\n<p>I'm one of the only people in my department (of >100 people) using version control (in my case using git with githuib.com.) This is rather worrying, but they just don't seem to be keen on trying it out and are content with passing zip files around (yuck.)</p>\n\n<p>My suggestion would be to continue using LabView for the acquisition (and perhaps trying to get your co-workers to agree on a toolset for acquisition and making is available for all)  and then move to exporting the data into a CSV (or similar) and doing the analysis in R. There's really very little point in re-inventing the wheel in this respect.</p>\n"}, {'answer_id': 597655, 'author': 'temp2290', 'author_id': 72071, 'author_profile': 'https://Stackoverflow.com/users/72071', 'pm_score': 3, 'selected': False, 'text': "<p>1.) Scripting languages are popular these days for most things due to better hardware.  Perl/Python/Lisp are prevalent for lightweight applications (automation, light computation); I see a lot of Perl at my work (computational EM) since we like Unix/Linux.  For performance stuff, C/C++/Fortran are typically used.  For parallel computing, well, we usually manually parallelize runs in EM as opposed to having a program implicitly do it (ie split up the jobs by look angle when computing radar cross sections).</p>\n\n<p>2.) We just kind of throw people into the mix here.  A lot of the code we have is very messy, but scientists are typically a scatterbrained bunch that don't mind that sort of thing.  Not ideal, but we have things to deliver and we're severely understaffed. We're slowly getting better.</p>\n\n<p>3.) We use SVN; however, we do not have bug tracking software. About as good as it gets for us is a txt file that tells you where bugs specific bugs are.</p>\n\n<p>4.) My suggestion for implementing best practices for scientists: <strong>do it slowly</strong>.  As scientists, we typically don't ship products.  <strong>No one in science makes a name for himself by having clean, maintainable code</strong>. They get recognition from the results of that code, typically.  They need to see justification for spending time on learning software practices.  Slowly introduce new concepts and try to get them to follow; they're scientists, so after their own empirical evidence confirms the usefulness of things like version control, they will begin to use it all the time! </p>\n"}, {'answer_id': 670051, 'author': 'Brendan', 'author_id': 199, 'author_profile': 'https://Stackoverflow.com/users/199', 'pm_score': 2, 'selected': False, 'text': '<p>I work as a physicist in a UK university.</p>\n\n<p>Perhaps I should emphasise that different areas of research have different emphasis on programming. Particle physicists (like dmckee) do computational modelling almost exclusively and may collaborate on large software projects, whereas people in fields like my own (condensed matter) write code relatively infrequently. I suspect most scientists fall into the latter camp. I would say coding skills are usually seen as useful in physics, but not essential, much like physics/maths skills are seen as useful for programmers but not essential. With this in mind...</p>\n\n<ul>\n<li>What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?)</li>\n</ul>\n\n<p>Commonly data analysis and plotting is done using generic data analysis packages such as <a href="http://www.wavemetrics.com/" rel="nofollow noreferrer">IGOR Pro</a>, <a href="http://www.originlab.com/" rel="nofollow noreferrer">ORIGIN</a>, <a href="http://www.synergy.com/" rel="nofollow noreferrer">Kaleidegraph</a> which can be thought of as \'Excel plus\'. These packages typically have a scripting language that can be used to automate. More specialist analysis may have a dedicated utility for the job that generally will have been written a long time ago, no-one has the source for and is pretty buggy. Some more techie types might use the languages that have been mentioned (Python, R, MatLab with Gnuplot for plotting).</p>\n\n<p>Control software is commonly done in LabVIEW, although we actually use Delphi which is somewhat unusual.</p>\n\n<ul>\n<li>Was there any training for people without any significant background in programming?</li>\n</ul>\n\n<p>I\'ve been to seminars on grid computing, 3D visualisation, learning Boost etc. given by both universities I\'ve been at. As an undergraduate we were taught VBA for Excel and MatLab but C/MatLab/LabVIEW is more common.</p>\n\n<ul>\n<li>Did you have anything like version control, bug tracking?</li>\n</ul>\n\n<p>No, although people do have personal development setups. Our code base is in a shared folder on a \'server\' which is kept current with a synching tool.</p>\n\n<ul>\n<li>How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!)</li>\n</ul>\n\n<p>One step at a time! I am trying to replace the shared folder with something a bit more solid, perhaps finding a SVN client which mimics the current synching tools behaviour would help.</p>\n\n<p>I\'d say though on the whole, for most natural science projects, time is generally better spent doing research!</p>\n'}, {'answer_id': 912952, 'author': 'David', 'author_id': 111257, 'author_profile': 'https://Stackoverflow.com/users/111257', 'pm_score': 2, 'selected': False, 'text': '<p>Another good option is <a href="http://www.scilab.org/" rel="nofollow noreferrer">Scilab</a>.  It has graphic modules à la <a href="http://en.wikipedia.org/wiki/LabVIEW" rel="nofollow noreferrer">LabVIEW</a>, it has its own programming language and you can also embed Fortran and C code, for example.  It\'s being used in public and private sectors, including big industrial companies. And it\'s free.</p>\n\n<p>About versioning, some prefer <a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow noreferrer">Mercurial</a>, as it gives more liberties managing and defining the repositories. I have no experience with it, however.</p>\n\n<p>For plotting I use <a href="http://en.wikipedia.org/wiki/Matplotlib" rel="nofollow noreferrer">Matplotlib</a>. I will soon have to make animations, and I\'ve seen good results using <em><a href="http://en.wikipedia.org/wiki/MEncoder" rel="nofollow noreferrer">MEncoder</a></em>.  Here is an <a href="http://assorted-experience.blogspot.com/2008/02/image-sequence-to-movie-mencoder.html" rel="nofollow noreferrer">example</a> including an audio track.</p>\n\n<p>Finally, I suggest going modular, this is, trying to keep main pieces of code in different files, so code revision, understanding, maintenance and improvement will be easier.  I have written, for example, a Python module for file integrity testing, another for image processing sequences, etc. </p>\n\n<p>You should also consider developing with the use a debugger that allows you to check variable contents at settable breakpoints in the code, instead using print lines.\nI have used Eclipse for Python and Fortran developing (although I got a false bug compiling a Fortran short program with it, but it may have been a bad configuration) and I\'m starting to use the <a href="http://en.wikipedia.org/wiki/Eric_Python_IDE" rel="nofollow noreferrer">Eric IDE</a> for Python.  It allows you to debug, manage versioning with <a href="http://en.wikipedia.org/wiki/Subversion_(software)" rel="nofollow noreferrer">SVN</a>, it has an embedded console, it can do refactoring with Bicycle Repair Man (it can use another one, too), you have Unittest, etc.  A lighter alternative for Python is <a href="http://en.wikipedia.org/wiki/IDLE_(Python)" rel="nofollow noreferrer">IDLE</a>, included with Python since version 2.3.</p>\n\n<p>As a few hints, I also suggest:</p>\n\n<ul>\n<li><p>Not using single-character variables. When you want to search appearances, you will get results everywhere.  Some argue that a decent IDE makes this easier, but then you will depend on having permanent access to the IDE. Even using ii, jj and kk can be enough, although this choice will depend on your language. (Double vowels would be less useful if code comments are made in Estonian, for instance).</p></li>\n<li><p>Commenting the code from the very beginning.</p></li>\n<li><p>For critical applications <em>sometimes</em> it\'s better to rely on older language/compiler versions (major releases), more stable and better debugged.\nOf course you can have more optimized code in later versions, fixed bugs, etc, but I\'m talking about using Fortran 95 instead of 2003, Python 2.5.4 instead of 3.0, or so.  (Specially when a new version breaks backwards compatibility.)  Lots of improvements usually introduce lots of bugs.  Still, this will depend on specific application cases!\nNote that this is a personal choice, many people could argue against this.</p></li>\n<li><p>Use redundant and automated backup! (With versioning control).</p></li>\n</ul>\n'}, {'answer_id': 1693017, 'author': 'Jay', 'author_id': 114979, 'author_profile': 'https://Stackoverflow.com/users/114979', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>What languages/environments have you\n  used for developing scientific\n  software, esp. data analysis? What\n  libraries? (E.g., what do you use for\n  plotting?)</p>\n</blockquote>\n\n<p>Languages I have used for numerics and sicentific-related stuff:</p>\n\n<ul>\n<li>C (slow development, too much debugging, almost impossible to write reusable code)</li>\n<li>C++ (and I learned to hate it -- development isn\'t as slow as C, but can be a pain. Templates and classes were cool initially, but after a while I realized that I was fighting them all the time and finding workarounds for language design problems</li>\n<li>Common Lisp, which was OK, but not widely used fo Sci computing. Not easy to integrate with C (if compared to other languages), but works</li>\n<li>Scheme. This one became my personal choice.</li>\n</ul>\n\n<p>My editor is Emacs, although I do use vim for quick stuff like editing configuration files.</p>\n\n<p>For plotting, I usually generate a text file and feed it into gnuplot.</p>\n\n<p>For data analysis, I usually generate a text file and use GNU R.</p>\n\n<p>I see lots of people here using FORTRAN (mostly 77, but some 90), lots of Java and some Python. I don\'t like those, so I don\'t use them. </p>\n\n<blockquote>\n  <p>Was there any training for people\n  without any significant background in\n  programming?</p>\n</blockquote>\n\n<p>I think this doesn\'t apply to me, since I graduated in CS -- but where I work there is no formal training, but people (Engineers, Physicists, Mathematicians) do help each other.</p>\n\n<blockquote>\n  <p>Did you have anything like version\n  control, bug tracking?</p>\n</blockquote>\n\n<p>Version control is absolutely important! I keep my code and data in three different machines, in two different sides of the world -- in Git repositories. I sync them all the time (so I have version control <em>and</em> backups!) I don\'t do bug control, although I may start doing that.\nBut my colleagues don\'t BTS or VCS at all.</p>\n\n<blockquote>\n  <p>How would you go about trying to\n  create a decent environment for\n  programming, without getting too much\n  in the way of the individual\n  scientists (esp. physicists are\n  stubborn people!)</p>\n</blockquote>\n\n<p>First, I\'d give them as much freedom as possible. (In the University where I work I could chooe between having someone install Ubuntu or Windows, or install my own OS -- I chose to install my own. I don\'t have support from them and I\'m responsible for anything that happens with my machins, including security issues, but I do whatever I want with the machine).</p>\n\n<p>Second, I\'d see what they are used to, and make it work (need FORTRAN? We\'ll set it up. Need C++? No problem. Mathematica? OK, we\'ll buy a license). Then see how many of them would like to learn "additional tools" to help them be more productive (don\'t say "different" tools. Say "additional", so it won\'t seem like anyone will "lose" or "let go" or whatever). Start with editors, see if there are groups who would like to use VCS to sync their work (hey, you can stay home and send your code through SVN or GIT -- wouldn\'t that be great?) and so on.\nDon\'t impose -- show examples of how cool these tools are. Make data analysis using R, and show them how easy it was. Show nice graphics, and explain how you\'ve created them (but start with simple examples, so you can <em>quickly</em> explain them).</p>\n'}, {'answer_id': 2543699, 'author': 'Norman H', 'author_id': 77329, 'author_profile': 'https://Stackoverflow.com/users/77329', 'pm_score': 2, 'selected': False, 'text': '<p>I would suggest F# as a potential candidate for performing science-related manipulations given its strong semantic ties to mathematical constructs.</p>\n\n<p>Also, its support for units-of-measure, as written about <a href="http://blogs.msdn.com/andrewkennedy/archive/2008/08/29/units-of-measure-in-f-part-one-introducing-units.aspx#" rel="nofollow noreferrer">here</a> makes a lot of sense for ensuring proper translation between mathematical model and implementation source code.</p>\n'}, {'answer_id': 3366804, 'author': 'grzkv', 'author_id': 243912, 'author_profile': 'https://Stackoverflow.com/users/243912', 'pm_score': 3, 'selected': False, 'text': '<p>I am a physicist working in the field of condensed matter physics, building classical and quantum models.</p>\n\n<p><strong>Languages:</strong></p>\n\n<ul>\n<li>C++ -- very versatile: can be used for anything, good speed, but it can be a bit inconvenient when it comes to <a href="http://en.wikipedia.org/wiki/Message_Passing_Interface" rel="nofollow noreferrer">MPI</a></li>\n<li><a href="http://en.wikipedia.org/wiki/GNU_Octave" rel="nofollow noreferrer">Octave</a> -- good for some supplementary calculations, very convenient and productive</li>\n</ul>\n\n<p><strong>Libraries:</strong></p>\n\n<ul>\n<li>Armadillo/<a href="http://en.wikipedia.org/wiki/Blitz++" rel="nofollow noreferrer">Blitz++</a> -- fast array/matrix/cube abstractions for C++</li>\n<li>Eigen/Armadillo -- linear algebra</li>\n<li>GSL -- to use with C</li>\n<li><a href="http://en.wikipedia.org/wiki/LAPACK" rel="nofollow noreferrer">LAPACK</a>/<a href="http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms" rel="nofollow noreferrer">BLAS</a>/<a href="http://en.wikipedia.org/wiki/Automatically_Tuned_Linear_Algebra_Software" rel="nofollow noreferrer">ATLAS</a> -- extremely big and fast, but less convenient (and written in FORTRAN)</li>\n</ul>\n\n<p><strong>Graphics:</strong></p>\n\n<ul>\n<li><a href="http://en.wikipedia.org/wiki/Gnuplot" rel="nofollow noreferrer">GNUPlot</a> -- it has very clean and neat output, but not that productive sometimes</li>\n<li><a href="http://en.wikipedia.org/wiki/Origin_%28software%29" rel="nofollow noreferrer">Origin</a> -- very convenient for plotting</li>\n</ul>\n\n<p><strong>Development tools:</strong></p>\n\n<ul>\n<li><a href="http://en.wikipedia.org/wiki/Vim_%28text_editor%29" rel="nofollow noreferrer">Vim</a> + plugins -- it works great for me</li>\n<li><a href="http://en.wikipedia.org/wiki/GNU_Debugger" rel="nofollow noreferrer">GDB</a> -- a great debugging tool when working with C/C++</li>\n<li><a href="http://en.wikipedia.org/wiki/Code::Blocks" rel="nofollow noreferrer">Code::Blocks</a> -- I used it for some time and found it quite comfortable, but Vim is still better in my opinion.</li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/38239', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1037/']