Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm a second-semester Junior working towards a Computer Science degree with a Scientific Computing concentration and a Mathematics degree with a concentration on Applied Discrete Mathematics. So, number crunching and such rather than a bunch of regular expressions, interface design, and networking.

I've found that I'm not learning new relevant languages from my coursework and am interested in what the community would recommend me to learn. I know as far as programming methods go, I need to learn more about parallelizing programs, but if there's anything else you can recommend, I would appreciate it.

Here's a list of the languages with which I am very experienced (web technologies omitted as they barely apply here). Any recommendations for additional languages I should learn would be very much appreciated.

  • Java
  • C
  • C++
  • Fortran77/90/95
  • Haskell
  • Python
share|improve this question
If you want even more ideas, you could now ask on scicomp.stackexchange.com –  David Ketcheson Jan 22 '12 at 6:12
add comment

closed as not constructive by gnat, MichaelT, Bart van Ingen Schenau, Bill, Robert Harvey May 30 '13 at 17:57

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

7 Answers

up vote 14 down vote accepted

I think you are covered as far as languages are concerned. In fact, let me offer you a warning: if I'm interviewing you, and you claim to be "very experienced" in all those languages in your junior year, I'm going to be very skeptical, and I'm going to do my best to put you on the spot. A list that long means that you are either an exceptional talent or you are padding your resume. Having completed a couple of homework problems using a language is a nice start, but it doesn't mean that you know the language in any realistic sense. You shouldn't list a language on your CV unless you are prepared to answer technical questions on that language in your interview.

That said, there is more to scientific computing then knowing a bunch of languages. Here is my list of topics that you should know:

  • Details of floating-point arithmetic
  • Algorithms and data structures
  • Linear algebra
  • Geometry
  • Calculus
  • Statistics
  • Optimization theory
  • Parallelization/High performance computing

In terms of technologies, you should learn your way around version control, profilers, and debuggers, (just like any other programmer). You may also want to pick up a plotting package, some form of cluster management software (e.g. Oracle Grid Engine), and some parallelization API (e.g. MPI, CUDA, or OpenCL).

That's probably way more stuff than you can actually pick up in four years. Which topics you focus on depends on what kind of scientific programming you want to do. Physics generally means differential equations and bioinformatics means statistics. Almost every scientific programmer will need to know algorithms, linear algebra, and the details of floating point arithmetic.

share|improve this answer
Let me fair and let me be brief: I've been doing research for the past five years and have used all of these technologies extensively. You may want to start to realize that this soon-to-graduate generation has been using computer technology all of its life and so many individuals of said group will be far more advanced than you may expect. Treat them as such. –  Zéychin Sep 26 '11 at 15:04
@Zéychin - There have always been rare people with abilities beyond their years, but using & programming in a commercial environment are two very different things - & that comes from someone who took his first programming consultancy job before he became a teenager! Even so, almost 30 years on, my pre-university experience only warrants a line or two on my CV. If you want to be respected, you have to prove it. As Charles said if you say you are "Very Experienced" expect to be put on the spot. If you answer well, you will gain respect, if not you will receive the scorn you deserve. *8') –  Mark Booth Sep 26 '11 at 16:28
@Zeychin, as I said, you may be an exceptional talent. My experience interviewing recent graduates is that they have unrealistically low thresholds for what constitutes "very experienced". I've been in software development for 30 years, and while I've worked with all the technologies you listed (substituting LISP for Haskell), I'd only describe myself as very experienced in C and Python. More typical of what I've encountered was the new hire who described himself as very experienced in C, but who couldn't print out a column of right-adjusted numbers, and even claimed it wasn't possible. –  Charles E. Grant Sep 26 '11 at 16:30
add comment

Mathematica and Maple would be a couple of other languages I'd add that may be worth knowing.

R (programming language) may also be useful if you want something more suited towards statistics.

share|improve this answer
Great! I will look into these. Thanks. –  Zéychin Sep 10 '11 at 21:01
add comment

It looks like you've got a pretty good spread of languages there. Diamond Light Source, the UK national synchrotron facility, routinely uses all but one of the languages you mention.

Java and Python (also Jython) are used for data acquisition & analysis systems; C and C++ are used for control, instrumentation and diagnostic systems; while Fortran and MATLAB are often used by scientists and beamline support staff for their own specialist data analysis.

As Charles suggested however, languages are not the only thing to look at. Diamond is making ever greater use of Nvidia Tesla based HPC compute clusters, so CUDA skills are gaining in importance.

Also, if you don't have a copy of Numerical Recipes then go out and buy a copy immediately. I found it invaluable in industry, let alone in the scientific sector.

share|improve this answer
That book looks invaluable! Thank you! –  Zéychin Sep 26 '11 at 14:58
add comment

Clojure is an very interesting and relevant language for you to consider as an extension to your list. Reasons:

  • It's a Lisp. Every truly serious hacker should learn Lisp - see beating the averages. Most important for scientific computing, Lisps are fantastic for extending the language / craeting DSLs for specific problem domains due to the fact they are homoiconic and support very powerful macro-based metaprogramming.
  • There is an R-like scientic computing / visualisation library called Incanter which has an active community and seems ideal for many of these kind of problems. The github pages also has some neat code samples.
  • It's a JVM language - the big advantage here is that you get access to all of the huge range of scientific computing libraries in the Java ecosystem e.g. Weka. In addition, you get all the usual advantages of being on the JVM (cross platform bytecode, fantastic JIT compiler, garbage collection etc.)
  • Clojure is a functional langauge. If you know Haskell, you'll appreciate the power this brings, and indeed Haskell is often cited as one of the biggest language inspirations for Clojure. It's a relatively pragmatic functional language however - it is impure (allows side effects), lazy (allows lazy sequences, even infinite ones) and dynamically typed.
  • Excellent support for multi-core concurrency - likely to be important if your scientific computations are numerically intensive. This excellent video gives some background on Clojure's relatively novel approach to concurrency.
  • Performance is good to excellent. Clojure is always JIT-compiled, and can fully exploit the speed of JVM's primitive types and inlined method calls etc. If dynamic typing is an issue, you can optional supply static type hints to get maximum performance. In general, I've found that optimised Clojure code will go about as fast as optimised pure Java.
  • It is designed for interactive developemnt - my usual way of working in Clojure is to fire up a REPL, load some data sets, then start interacting directly with the live programming environment to solve whatever problem I am facing. Great for scientific computing. Others have taken the idea further and applied this interactive way of working to allow live-coding of music (Overtone video).
share|improve this answer
This is a wonderfully well: thought-out, formatted, and written answer! Thank you very much. I really, really like the way Clojure looks. I would upvote you more than once if I could! –  Zéychin Nov 26 '11 at 7:28
No worries. I've really enjoyed discovering and using Clojure, just happy for other people also to benefit! –  mikera Nov 26 '11 at 8:51
add comment

Definitely C and C++. These are the power languages, although more difficult to use, nearly everyone believes use of these leads to more efficient programs. Never mind the programmer's time, unfortunately.

More and more astronomers are adopting Python for theory, planning and number crunching experimental data. Easy to learn (mostly), powerful, doesn't demand too much time on low-level details, useful powerful entities such as Dictionaries are built in rather than a clutzy library/template thing like in C++. Even though it runs on a virtual machine, like Java, it's not a performance problem since all the real action is in numpy routines, which are written in C by very smart people who understand CPU pipeline, caching as so on. Python is more or less replacing Matlab and IDL in many smaller research groups.

I'm not aware of any languages in widespread use in scientific computing not already on your list. But then, some physicists and other science researchers are more likely to experiment with new languages and less popular innovative languages, for example D, Google Go. I remember an article on Sather for some sort of physics simulation - that particular language is dead and gone. But someone somewhere in physics is trying whatever is today's innovative language, if it promises performance and powerful math capabilities.

share|improve this answer
Lionel of Intel fame recently said that their sales of Fortran package surpasses any other product in the their development line. –  Rook Sep 26 '11 at 1:07
add comment

Looking at your list, and assuming you are actually experienced in all of these, you've got a decent spread. I've found the following things to be true in my foray as a scientist working in a stats, math and simulation heavy field:

  • Java/Python: People usually seem to know one of the other, based on whatever their university decided to teach for introductory programming. My preference is for Python, and my impression is its a language that's gaining a fair amount of traction in the scientific sphere because it's fairly approachable, decently functional, and has pretty wide support.
  • C/C++: These languages make up the "underpinning" of many of the slick R and Python stuff that's going on right now, and the languages people turn to when they really truly need speed that they can't get from Python.
  • Fortran: I've never met someone who actually uses Fortran, but I'm sure some old warhorses still do.
  • MATLAB: Another "if you took an engineering class you probably learned it" language. Since I didn't, I've very little use for it, but I get code frequently from people who do use it.

The one thing missing from your list is a high-end statistics language. MATLAB can do in a pinch, but it's not as commonly going to be used if you encounter out-and-out statistics problems. I'd suggest R. It's free, its the new sexiness, and of the major statistics languages I can come up with, the one that feels the most like a "normal" programming language.

But when it comes down to it, the answer is probably going to be: Whatever your future supervisor/PI (if you go to grad school) or boss (private industry) uses. I know people who try and let their students be ultra-flexible, and it just ends up confusing everyone.

share|improve this answer
Any insight as to why the downvote, mysterious downvoter? –  Fomite Sep 25 '11 at 22:03
I upvoted this to offset the downvote and thanks for your answer. I've neglected very much to look into statistical work and realize it will be quite beneficial. Thank you. –  Zéychin Sep 26 '11 at 14:57
@Zéychin No worries. I've also noticed people moving toward R for visualization tasks, and even some numerical mathematics (solving systems of differential equations) that would be handled by more out and out programming languages. I think it's just one of those flexible things to know. –  Fomite Sep 26 '11 at 18:29
I guess the downvoter is probably a heavy Fortran user, like me. Fortran may still be the most heavily used scientific programming language, since fundamental libraries (like LAPACK) are written in it. I didn't downvote, though -- the rest of this answer is good. –  David Ketcheson Jan 22 '12 at 6:10
@DavidKetcheson Fair point. I think my issue with Fortran is I don't know anyone who programs in it. Tons of stuff is written in it, but it's all treated as mysterious and black-boxy. –  Fomite Jan 22 '12 at 7:37
show 1 more comment

One language/software package that no one has mentioned is Sage. Sage is written pretty much in Python and aims to become an open source alternative to Mathematica, Maple, and MATLAB. Sage also has the advantage of having a bunch of visualization libraries built into it as well--and the notebooks feature is pretty nice too. So for most math work, you could probably go pretty far with Python and Sage.

I do a lot of work in Statistics, so I use R quite often. R is good for a lot of things, but it is much slower than python or other languages--unless you apply some of the newer multicore or parallel processing features. The RCPP package is also really nice because it allows you to port the slower parts of your R code to C or C++. Python also has some nice stable interfaces to C++.

So as for now, I think Python, R, and C/C++ are still the best. There are some new languages coming up, like Scala, Julia, Go, and D, which may one day make big improvements on the existing technologies. There is no doubt that the pace of advance in scientific programming means that languages developed 5-10 years ago cannot keep pace with the challenges of today; however, there are no clear alternatives on the horizon IMHO.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.