| Thread Closed |
Which programming language do you use? |
Share Thread | Thread Tools |
| Sep17-08, 05:54 AM | #1 |
|
|
Which programming language do you use?
Hi All,
I am a physicist from Hungary. I was involved in quite a few programming tasks back in the university, especially in the field of Density Functional Theory, which needed complex computations. I used Fortran and later C++, for Object Oriented programming gave quite a few advantages that were useful for our purposes. I work as a software developer now, I use Java, which is - as far as I know - out of the scope of scientific computations; but who knows, for some tasks it may be the language (especially, where extreme speed is not an issue). I was just wondering if people in science, especially in physics, still use Fortran or C/C++ or some other special languages. I read some papers on this new experimental language from sun, called Fortress. Does anyone uses it yet? If anyone here is interested in this topic, please share your thoughts, I'm very much interested in these trends in scientific computation. Any answers would be appreciated. Thanks. |
| Sep17-08, 06:15 AM | #2 |
|
|
As far as I know, people prefer python for programming and for scientific computation mathematica and matlab.
Although there isn't any consensus here, you use what is best for your needs. |
| Sep17-08, 06:22 AM | #3 |
|
|
Well, as always, it depends on what suits your problem.
Fortran and C/C++ are the most popular for simulations, especially when it comes to parallel programming. Then there are mathematica, matlab and IDL, that I have mostly seen used for visualisation and for small problems. |
| Sep17-08, 06:28 AM | #4 |
|
|
Which programming language do you use? |
| Sep17-08, 06:30 AM | #5 |
|
Admin
|
In my experience quite often people use not a language that is best suited for the task, but the language that they know best. Especially when you need to do some quick and dirty tests this approach makes sense, as it is usually much faster to get the result with tools at hand than to learn new tools. For larger problems investing in a new language may be beneficial.
|
| Sep17-08, 07:09 AM | #6 |
|
Mentor
|
Good point Borek: when you only have a hammer everything looks like a nail.
I like Mathematica for figuring stuff out, and I primarily use C++ for "production level" things. But I try to keep an eye on other languages (e.g. Python, Java, C#) so that if I ever find myself in a situation where they would be particularly helpful I can use them. |
| Sep17-08, 08:07 AM | #7 |
|
|
Does anyone uses Java for serious problems?
By the way, thanks for the quick replies! |
| Sep17-08, 08:47 AM | #8 |
|
Recognitions:
|
Partly this is historical, scientists learnt Fortran, engineers learnt C and so C++ was an easy step. Early Java didn't have have separate float/double types (IIRC) and was very slow. Most scientists coming from Fortran/C thought procedurally rather than OO and it's not clear that OO is such a good mix for most scientific problems. Java doesn't (didn't?) have such good library support (NAG etc) I would say that Python has now overtaken Java as the popular dynamic scientific programming languge |
| Sep17-08, 09:16 AM | #9 |
|
|
This is true. But mainly for early Java, as you wrote. I don't think, however that mathematical libraries have been implemented in Java in great number:(
By the way, NAG (and I guess some other) libraries can be called from Java code. I don't know how efficiently, though. |
| Sep17-08, 09:18 AM | #10 |
|
|
You can take a look at calling NAG from Java through JNI here if you are interested:
http://www.nag.com/doc/TechRep/html/Tr1_04/Tr1_04.html |
| Sep17-08, 11:05 AM | #11 |
|
|
In an engineering or "industrial" setting (ie, not academia) the computer codes are often old and the investment in developing them was significant. So, we continue to use Fortran since this was in use when the codes were developed. In the nuclear power business, the codes have been extensively reviewed and tested, and some of the codes themselves have been reviewed and approved for certain uses. That makes it very unlikely that a new code will be written from scratch. I have also seen C++ used to code new graphical user interfaces, which allow the old fortran code to be run on a PC. Some people also use PERL for programs they write themselves, since it is supported on the Unix systems.
|
| Sep17-08, 02:08 PM | #12 |
|
|
Please don't leave out VBA "Visual Basic for Applications" I have written modules in Acess and Excel that will design entire heat exchangers. LOL. You use what the company has when they are too cheap to purchase to correct software.
|
| Aug6-09, 01:58 AM | #13 |
|
|
I pretty much stick to what languages that i respect the most, and what I know a 'fragment' of.... [who cares what's popular or mainstream]
Basic, PL/I, Fortran... One day, I'll add C and Mathematica to the list. I will agree with MathematicalPhysicist though: 'people prefer python for programming and for scientific computation mathematica and matlab. Although there isn't any consensus here, you use what is best for your needs.' Most people do seem to like Python and Mathematica for getting their feet wet. I still think Fortran and C are here to stay and the most useful. They were, are, and will be important for quite a while, if not near forever. I only wish that one day i could have the ability to see some small chunk of code and instantly, know what the equivalents are in Basic <-> C <-> PL/I, back and forth. then again still like flowcharting, gotos,line numbers, kitchen-sink languages that arent like Pascal, and Knuth's scary 3 books. [oh and Forman Acton's outstanding and slightly intimidating text on numeric computing] As long as you can think in a language,hope the code is readable [or well-documented] and got enough books on programming in it, that's most of the battle. About a decade ago, i read one physicist who's comments stuck with me. Fortran and C for him were the most useful ones, and one shouldnt discount the usefulness of Basic, PL/I and Assembler, since they came in handy... Not so sure his experiences would match others, but for *me* it made a lot of sense. Basic seems to be the easier of the languages for people to write in and think conceptually for many, and Fortran is just an older, fancier and slightly more difficult form. PL/I is like a deluxe super Fortran. And at the other end is Assembler, and something similar yet a lot more managable, being C. High end and low end languages in a nutshell. Honestly, i think my choices of languages were always based on how good the textbooks on the languages were, or how i liked the examples and samples of code. Where you see the examples you like and understand, i think 'chooses' our computer language. For me a ton of good examples, makes it or breaks it for me... |
| Aug6-09, 03:10 AM | #14 |
|
Recognitions:
|
Apparently in Transportation, they use java, bleh!. I know BASIC (VB), and Object Pascal (delphi) quite well!. I can survive using C/C++. However, in my research group the tools mainly used are MS Excel, ArcGIS, TransCAD, SAS, STATA, and MATLAB. Visual Basic is present in the Excel and ArcGIS enviroment, and the other have their own "language". Java is used by other members for agent based modeling in the group. So far, I've not done any agent-based modeling, but if I do I'll probably use Object Pascal or make myself finish learning C/C++. (VB applications are not as stable).
|
| Aug6-09, 04:59 AM | #15 |
|
|
I use C++ for numerical computations and simulation (I know FORTRAN but I'm more comfortable with C++). I also use C++ and MPI (and sometimes OpenMP) for parallel programming. For doing small and dirty numerical computation I'll just pop up MATLAB and for math I'll use Maple. However, something like MATLAB would be impossibly slow to do anything real with (like Monte-Carlo or Power Method type Matrix Diagonalization for large matrics)
|
| Aug6-09, 06:29 AM | #16 |
|
|
I've written simple e-mail processing programs in VBA and it's quite a neat environment, but no way would I choose it for physics simulations! I agree with the comment "Java bleh!" but even Java would be better for that kind of thing! I've written programs in all the languages mentioned so far, and several others (Objective C, Algol, Lisp, Prolog, Eiffel, Oberon, Modula...) But my favourite, by far, for quick development of physics & business simulations, is Smalltalk. And the best environment (VisualWorks) is free for non-commercial use, the second best (Squeak) is free, full stop.
|
| Aug6-09, 10:44 AM | #17 |
|
|
My professor works on HEP using data from fermilab, he uses C++
However, at first he wanted me to learn Python so he could write some of his new stuff in Python or at least translate the old stuff. So I'd put Python down as a good language to know. |
| Thread Closed |
| Thread Tools | |
Similar Threads for: Which programming language do you use?
|
||||
| Thread | Forum | Replies | ||
| Which programming language to learn??? | Computing & Technology | 18 | ||
| Programming language for engineering | General Engineering | 19 | ||
| Which programming language is the best ? | Programming & Comp Sci | 15 | ||
| c programming language | Programming & Comp Sci | 1 | ||
| programming language overview | Programming & Comp Sci | 15 | ||