- #1
mritunjay
- 18
- 0
For physics purposes, is it necessary to learn fortron or C++ if one knows mathematica well enough?
fleem said:"For physics purposes" I'm not sure you even need anything other than mathematica (matlab, scilab, etc.). But if you are intent on learning another language, make it C/C++, Java, or C# (in that order of recommendation). those are just way better languages and are used much more often than is Fortran, even in science. C# is a good language but I'm mad at Microsoft for repeatedly redefining the wheel for the sole purpose of locking in customers to Microsoft-only systems (although C# and mono (.NET on Linux) sure gave Microsoft the double-whammy).
fleem said:"For physics purposes" I'm not sure you even need anything other than mathematica (matlab, scilab, etc.). But if you are intent on learning another language, make it C/C++, Java, or C# (in that order of recommendation). those are just way better languages and are used much more often than is Fortran, even in science. C# is a good language but I'm mad at Microsoft for repeatedly redefining the wheel for the sole purpose of locking in customers to Microsoft-only systems (although C# and mono (.NET on Linux) sure gave Microsoft the double-whammy).
ice109 said:patently false. almost everything is still in fortran.
don't make that an or and exclusive or. learn fortran, c++, and mathematica
fleem said:A search of a reputable job site (indeed.com) for the terms "C++" and "PhD" return 21 times as many hits as a search for the terms "fortran" and "PhD". Likewise a search for "java" and "PhD" even returns ten times as many. I searched several other sites in the same way, including science-only job sites, and got the same results. If it were only a few times more, one might argue that there was some skewing of the search counts because of how science jobs are typically advertised. But a 21-fold difference makes the statement "almost everything is still in fortran" less feasible.
Why is advice in this forum always backwards. Fortran is still present but is in the process of being phased out at least in particle physics - Geant4 is C++, Pythia is going C++(With the release of PYTHIA 8.100, this new C++ version series takes over from the older Fortran 77-based PYTHIA 6.4). Fortran would have been an excellent idea 10 years ago.ice109 said:patently false. almost everything is still in fortran.
don't make that an or and exclusive or. learn fortran, c++, and mathematica
That's been my impression too, that Fortran is still pretty common due to a lot of stuff having been written in it 10/20/30 years ago, but recently more and more new programs are written in more modern languages like C++. Maybe it depends somewhat on which branch of physics you're working in.j93 said:Why is advice in this forum always backwards. Fortran is still present but is in the process of being phased out at least in particle physics - Geant4 is C++, Pythia is going C++(With the release of PYTHIA 8.100, this new C++ version series takes over from the older Fortran 77-based PYTHIA 6.4). Fortran would have been an excellent idea 10 years ago.
Landau said:At the risk of going off topic, I am a third year student physics and mathematics, and all I ever used is Mathematica. I would like to learn the basics of C++. Could anyone tell me a good book/set of lecture notes/website?
fleem said:As per my prev post i strongly recommend Java over C++. But if C++ it is, then I strongly recommend learning C before C++. There was a C compiler put out decades ago called "Power C" which came with a thick white paperback book. That book still blows away everything else I've read. If you can find one on ebay that would be cool. If not, C is a very simple language and can be learned in a short time with internet tutorials. Then only after you are comfortable with C should you tackle C++.
fleem said:A search of a reputable job site (indeed.com) for the terms "C++" and "PhD" return 21 times as many hits as a search for the terms "fortran" and "PhD". Likewise a search for "java" and "PhD" even returns ten times as many. I searched several other sites in the same way, including science-only job sites, and got the same results. If it were only a few times more, one might argue that there was some skewing of the search counts because of how science jobs are typically advertised. But a 21-fold difference makes the statement "almost everything is still in fortran" less feasible.
Mathematica is a symbolic computing software while Fortran is a programming language. This means that Mathematica is designed for mathematical and scientific computations, while Fortran is designed for writing code to solve mathematical and scientific problems.
Both Mathematica and Fortran have their strengths and weaknesses when it comes to physics. Mathematica is more user-friendly and has a larger built-in library for physics, making it a better choice for quick calculations and data visualization. Fortran, on the other hand, is more efficient for handling large amounts of data and performing complex simulations.
No, knowledge of C++ is not necessary to use either Mathematica or Fortran for physics. However, having some knowledge of programming can be helpful in optimizing your code and utilizing advanced features in these softwares.
Yes, it is possible to use both Mathematica and Fortran together for physics. They can be integrated through various methods such as calling Fortran code from Mathematica or using Fortran libraries within Mathematica. This allows for a more comprehensive approach to solving complex physics problems.
Both Mathematica and Fortran are widely used in the field of physics. Mathematica is more commonly used for quick calculations and data visualization, while Fortran is used for more complex simulations and numerical analysis. It ultimately depends on the specific needs of the researcher or scientist.