25 comments

[ 5.5 ms ] story [ 59.5 ms ] thread
What cars do pilots drive?

What foods do vintners eat?

These are silly questions -- in all three cases, the answer is "if they're smart, whatever is best for their circumstances". I know mathematicians who have used Fortran, Pascal, C, C++, Java, BASIC, Assembly, Lisp, Maple, Matlab, Magma, Mathmatica, and Maxima; and that's not counting the people who do deliberately weird things (like computing Mersenne primes in Postscript).

> and that's not counting the people who do deliberately weird things (like computing Mersenne primes in Postscript).

Now what's so weird about that ?

In postscript (which is actually quite a powerful language) sounds a lot less weird than doing it in brainfuck or something like that.

Your two questions seem to imply that programming isn't that closely related to mathematics. Programming may not be that important for the math learned in school, but in general math researchers do at least as much programming as computer science researchers.

It is interesting to look at what languages get used for what kinds of research, and how it is affected by the researcher's level of computer science education. For example, those doing numerical analysis kind of research tend strongly toward MATLAB, with Python getting a lot of use from those who are relatively well-educated about computer science, and the lower-level languages used by people with extreme performance needs or who haven't learned any of the newer options. On the other hand, I doubt that any of the numerical researchers I work with have even heard of Haskell, and while some may have heard of APL (though definitely not J), none could use it.

What cars do pilots drive? What foods do vintners eat?

I'd say it's more like asking "What cars do park rangers drive?" or "What foods do wrestlers eat?" because we're talking about groups of people with quite specific requirements. The question, while overly broad, isn't silly, because there's a lot of people who have no idea and have never heard of things like Maple, Magma. Heck, now I coem to think of it I've never heard of Maxima, so your answer taught me something new. And if you learn something new from the answer, it's probably not a silly question!

How interesting that you find the question silly, when a bunch of mathematicians at Math Overflow, many of them more talented than you, actually took the time to give an honest reply. I was expecting something more intellectual from you...

For example, unsurprisingly, Reid Barton (who has won the Putnam many more times than you) likes to code in Haskell. See? That's an interesting reply. Mathematicians have delicate aesthetic sensitivities, so the languages they use will most likely reflect them.

The one I know uses Mathematica.
I know a bona-fide ex-NASA rocket scientist who uses Matlab. He finds that it's much more productive than C, which he used to use heavily. His NASA job basically involved numerical methods for integration to track the trajectory of the Space Shuttle.
I like MatLab, but for me (biologist) it's a very intricate language to learn, and AFAIK not easy to use in multiple platforms where you don't have the framework installed. And "expensive" too (as Mathematica).
But as a rocket scientist, he says there is a lot of software ready-made for him to use, which even included graphics/animation, analysis of realtime data feeds, and limited finite-element analysis of the rocket's structure. Also, his boss had a good software budget at the time.
Depends on the branch. In quantitative finance: C++, R, F#, Q, OCaml, MATLAB, Python (NumPy and SciPy)
I second this. I have a quantitative finance background. I use C, C++, C#, MATLAB, and Python. MATLAB and Python are primarily for prototyping ideas. C and C++ are primarily used when I'm working with Linux. C# is exclusively used when I am working with Windows.
What kind of stuff do you use C# for? I can only imagine using it for interoperability and GUI code.
Right now, I am writing a trading system using Trading Technologies' API. In my MSFE program we use XTrader to do a lot of our simulated trading. I thought it would be interesting challenge to create a black box to bone up on my C# skills.

EDIT: As for the GUI comment, I am actually trying to stay away from a bloated GUI as speed is key in this business.

Also, when we, as a program, went to Chicago during late October, so many people said that C# was becoming an important language to know if you plan on doing quant work. Up until that point, I had been focused primarily on C and C++. I thought it would be wise to do some work with C# if people at quant shops were telling me this is something I need to know.

Not all automated trading or quantitative finance is high-frequency. A bank trading exotic derivatives OTC could use C# to generate quotes without a problem. There are at least a couple reputable prop groups I know of that use C# in real-time trading systems, but both are running more quantitative long-term strategies in options.
Statisticians commonly use SPlus or R. Applied mathematicians use some flavor of Fortran, in part because of numerical libraries available in that language. Matlab is also in heavy currency in many disciplines.

Much of the time, a scientist is driven to a language not by any particular language feature, but by what code/tools are already available in that language that they can build upon for their own research.

Many epidemiologists seem to prefer Stata. I don't know why. It's like some SQL shell out of the early 80's.

I think that languages that didn't support "conventional" operator precedence lost out because that went against the expectations of science/tech types. (Smalltalk & Lisp in particular)

Many epidemiologists seem to prefer Stata.

That seems to be a west coast thing. East coast epidemiologists that I know use some mix of S or SPSS or SAS.

I don't know of that many applied math people using Fortran these days. If you need to use a fortran library, you can either call it directly from c, or write a wrapper (in c) which you can call from python/matlab/mathematica. Or you can probably just download the c wrapper.

The only people I know who use fortran are either a) old or b) their code is very old.

Coq is the only real Mathematics language I've ever played with.

Everything else just feels like it's ultimately Arithmetic, even when doing Symbolic Algebra natively in Haskell or Lisp or Mathematica.

Quantitative analysts used to use Smalltalk quite a bit. There's still a bit of that. Ruby's taking up some of that territory now. C++ was there too, and is still going strong.
Very often Matlab. Very often badly. And for a programmer who has to watch, it is to weep.
I find it very interesting that almost every single mathoverflow user (based on this page alone) uses their full name as their username on the site.

Compare that with stackoverflow and HN in which we use nicknames, made up names, etc.

Just interesting to see how different communities choose to handle something like this.

It's a MO policy: http://mathoverflow.net/faq

"We also encourage you to use your real name as your username. In your own enlightened self-interest, realise that participating in blogs, Math Overflow, the arXiv, and mathematical publishing are all forms of advertising for your "brand", even if that’s not your principal purpose (and hopefully it’s not). Since job applications require you to write your real name, you might as well use it everywhere else, too."

The bright side is that if a Fields medalist answers your question, you know it ;-)

The practising mathematicians I know don't program. I'm not sure if there are any ways in which programming can help with things like Functional Analysis or Geometric Topology. Not even sure about low-dimensional topology.

I'll ask Tim Gowers next time I see him.

The ex-mathematicians I know who now use mathematics to do things in the real-world use a full range, including all those mentioned elsewhere.

For my PhD I used Fortran, BCPL, zed (not the one you might think - it was essentially "ed"), and Phoenix scripting.

For my day job I use Python/Sage/NumPy, C, C++, ARM assembler, bash, BASIC and OpenOffice Calc. Infrequently and irregularly I use Lua and Scheme. On the other hand, I'm not really doing math anymore. I no longer prove theorems.