tech: What programming language is best suited for science?
In college I want to go into computer programming. For a minor though I’m going into a science most likely physics, genetics, or chemistry. Whats the best programming language to write programs for these subjects?
Answers and Views:
Answer by meshelman4
C++ is very flexible.
Fortan was invented way back when to be used for math and sciences. but i imagine that lots of the languages now can do a better job.Answer by Daniel R
Python – a great language in itself – has an add-on library called SciPy, which is apparently very good for this sort of thing.Answer by spopt36
C++ or C# would be most flexible if you’re doing programs that may get very complicated. C# is really easy to learn and use IMHO.
You may want to look into MatLab, which uses C and is good for calculating matrices of data, but can be difficult to debug (error messages in MatLab tend not to be very descriptive).
Haven’t used FORTRAN, but FORTRAN was made for scientific calculations. the only problem is almost noone uses it anymore.
Answer by BeachBumGo with C and C++…but “going into computer programming” was a good career move back in 1963, when I was in high school. Now, it seems every 13 year old can whip out code. I’d suggest majoring in something like you mention, physics chem, whatever, but be aware that writing code is expected, not optional. It’s like saying “I’m going to college, and maybe I’ll learn to read too.” You need to show up on the doorstep already competent in reading, writing, ‘rithmetic, and coding.Answer by Harry M
It’s more likely you are going to need a number of languages during your studies. I studied computer science and have a phd in network engineering which has a heavy mathematical background.
You definately need a language like C++ or C# which are quite similar in their syntax style (wouldn’t recommend Visual Basic even if it’s practically the same code as C#). However, you are going to reach a point where you’d need to develop a complex mathematical function to keep developing in those languages, as they do not have everything by default.
You might be able to purchase mathematical libraries for C#/C++ however you would need to be certain that they are suitable for your needs and efficiently implemented.
Matlab is a great piece of software to cover your mathematical needs. Its latest version allows you to create C# wrappers for your .M scripts so you can continue using C# code while at the same time leveraging Matlab’s mathematical potential.
Lastly, if you are going towards something that requires intence computational needs then there is something else you might need to consider. Development on one of the new NVidia Graphics cards that support CUDA. CUDA is basically a language that allows you to use the Graphics Card’s processing power to do the calculations on it instead of the CPU. CUDA is similar to C, and you can create a library to invoke *again* by your C# code. (This is basically the reason I don’t suggest VB, because this way your coding style will remain consistent). CUDA transforms your pc into a mini super computer (provided you program it correctly).
I write a lot of simulations and I am using a combination of the above mentioned technologies. The time spent learning them, is definately worth the time spent running simulations and developing.
Good luck mate.
Leave a Reply