Most of the time I use Python. Python is a nice language – very easy to use. The only downside is it produces quite slow code – much faster than a human can work, but slower than peak performance from a computer.
So for stuff that needs to be fast, I write using C++. This is a much faster language but much harder to use – it expects you to know what you’re doing, and crashes in mysterious ways if things go wrong.
Usually most of the time is spent writing the code, so you don’t care about a few fractions of a second – that’s why I use Python most of the time.
I also write a few short programs using the command line in Linux – this is called “scripting”. These will just run a few more complicated programs in sequence. The language I use for that is Bash.
My work these days is mostly in either R or Matlab. Programmers are very protective of their favourite language and discussions about the best choice can get quite heated 🙂 but most realise that this is just a bit of fun.
Here is a list, in chronological order, of all the languages I can remember having used for projects or taught over the years:
Basic, Fortran, 6502 Assembler, Forth, Occam (on paper only), Z80 Assembler, PL1, Pascal, Logo, C, Delphi (a variant of Pascal), Visual Basic, Haskell, Lisp, Java, Matlab, R, Scratch.
The important thing to remember is that although there are *very* good reasons for prefering one language to another for any given task (like Stewart swapping from Python to C++ when things have to run fast, I do the same switching from Matlab to C++) in fact they are all equivalent to one another, at least in theory.
Comments
Martin commented on :
My work these days is mostly in either R or Matlab. Programmers are very protective of their favourite language and discussions about the best choice can get quite heated 🙂 but most realise that this is just a bit of fun.
Here is a list, in chronological order, of all the languages I can remember having used for projects or taught over the years:
Basic, Fortran, 6502 Assembler, Forth, Occam (on paper only), Z80 Assembler, PL1, Pascal, Logo, C, Delphi (a variant of Pascal), Visual Basic, Haskell, Lisp, Java, Matlab, R, Scratch.
The important thing to remember is that although there are *very* good reasons for prefering one language to another for any given task (like Stewart swapping from Python to C++ when things have to run fast, I do the same switching from Matlab to C++) in fact they are all equivalent to one another, at least in theory.