What Programming Languages Do Astronomers Use?

-- | March 6, 2017

Question: What code language do astronomers typically use? And do you have any advice on how good, one should be at programming? I know that astronomers often create their own software, so I was wondering if someone should aim for a minor or major in computer science?  — Autumn

Answer: Astronomers use a variety of programming languages to process the measurements that they make and to develop theoretical simulations of astrophysical phenomena.  I would say that the majority of astronomers use C, C++, and Python in their research.  You will also find some older codes written in Fortran that are still in use.  Most astronomers, though, don’t necessarily major or minor in computer science in college.  We tend to take a course or two in a programming language that we want to become proficient in, then practice those languages by using them in our research.  Many astronomers even learn a programming language by just using it.

Jeff Mangum