What Coding Language Should I learn?

In summary, the conversation discusses the benefits of learning how to code for a physicist and the different coding languages that can be useful. It is mentioned that knowing how to program can help with numerical techniques and data analysis, and that it is a necessary skill in modern physics. It is also suggested that the choice of coding language should depend on personal preference and access.
  • #1
Jow
69
0
Unlike some of my friends my knowledge of computing is very limited. I want to become a physicist, but I think it would be beneficial for me to learn how to code. However, after some research I am not sure what coding language to learn. What is the most useful / practical code that physicists use?

(I don't know if this will make a difference in what type of code I should learn but the computer I use is a mac.)
 
Physics news on Phys.org
  • #2
  • #3
thank you
 
  • #4
C#, FORTRAN, Python, C++, Matlab, Java seem like good choices
 
  • #5
Whatever you have easy access to... whatever seems like most fun... if your college is running a Java course, do that. If your favourite prof wants you to hack away at his Basic code, learn that...
 
  • #6
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?
 
  • #7
Gytax said:
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?

There are a lot of problems that require numerical techniques to solve. Programming such problems can give insights to how the system behaves; "how does the result change if I change this variable?" You probably won't be able to find code that helps you with a current one, so you may need to make your own. Also, you may need to modify existing code.
 
  • #8
Gytax said:
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?

Anybody who has data from any experiment, ever, has to write a data analysis pipeline to turn that raw data into "scientific results"

EDIT: And most theorists who do simulations write their own simulation code to model the physical system of interest to them. They don't just use other people's code. Or if they do (because it is a generic code for radiative transfer or fluid dynamics or something), they have to modify it to suit their specific application.

I don't know what to do with your question, because almost everyone in the physical sciences needs to be competent at programming for the core aspects of their work.
 
  • #9
just get a physics leaning computer simulation book and work out the examples.
This one has a bunch of problems and examples.

An Introduction to Computer Simulation Methods: Applications to Physical Systems
 
  • #10
Gytax said:
I don't mean to hijack this thread but I am wondering how does knowing how to program help you in physics apart from knowing how to use pre-made simulation programs? What can I do with my C++ CodeBlocks in physics?

Simulation programs may not simulate every situation, and if they do they might be too slow. I think the OP should let his particular physics environment drive his career. It maybe he can do experimental physics or theory that doesn't need any programming at all. If you do research under a professor who doesn't require any coding, then you don't need to do any coding (hey tautologies can be useful!) If the research post you get actually appears to need some coding then you can learn on the job.

Then again if you fancy doing some coding, why not... but only if you fancy it... it might be more relaxing to do modern dance between physics classes...
 
  • #11
These days its hard to do anything in physics without doing some programming/scripting. Many programs that take or analyze data have some programming/scripting component.
 
  • #12
Mmm_Pasta said:
There are a lot of problems that require numerical techniques to solve. Programming such problems can give insights to how the system behaves; "how does the result change if I change this variable?" You probably won't be able to find code that helps you with a current one, so you may need to make your own. Also, you may need to modify existing code.

That's just sensitivity analysis. That's not specific to programming.
 

Question 1: What is coding language?

Coding language is a set of instructions and rules used to create computer programs, websites, and applications. It allows us to communicate with computers and tell them what to do.

Question 2: How do I choose which coding language to learn?

The coding language you should learn depends on your goals and what you want to achieve. Some popular languages include Python, Java, HTML/CSS, and JavaScript. Consider what you want to create and research which language is most commonly used for that purpose.

Question 3: Can I learn multiple coding languages?

Yes, you can learn multiple coding languages. Many people learn more than one language to expand their skills and knowledge. However, it's best to focus on one language at a time and become proficient in it before moving on to another.

Question 4: Is it better to learn a high-level or low-level coding language?

It depends on your goals and what you want to create. High-level languages are easier to learn and use, while low-level languages offer more control and efficiency. If you are just starting, a high-level language may be a better choice. If you want to work on complex systems or hardware, a low-level language may be more suitable.

Question 5: How long does it take to learn a coding language?

The time it takes to learn a coding language varies depending on the language and your learning pace. Some languages may take a few weeks to grasp the basics, while others may take months or even years to master. It's important to be patient and practice consistently to improve your skills.

Similar threads

  • STEM Academic Advising
Replies
10
Views
1K
  • STEM Academic Advising
Replies
11
Views
1K
  • STEM Academic Advising
Replies
4
Views
1K
  • STEM Academic Advising
Replies
12
Views
1K
  • STEM Academic Advising
Replies
14
Views
1K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • STEM Academic Advising
Replies
5
Views
854
  • STEM Academic Advising
Replies
3
Views
917
  • STEM Academic Advising
Replies
2
Views
615
  • STEM Academic Advising
Replies
3
Views
755
Back
Top