Should I enroll in a python course or java? (I’m studying physics)

In summary, the conversation discusses the decision between taking a Python-based or Java-based introductory computer programming course. The Java course is recommended by a physics professor because it offers a more in-depth understanding of programming. However, the individual has been exposed to Python and is considering taking that course instead. Ultimately, it is recommended to choose the course that will be most useful in the future, as learning multiple programming languages is necessary in the long run. Personal opinions vary, but it is generally agreed that learning how to program is more important than the specific language chosen.
  • #1
Theonefrom1994
15
5
Python based course or java course ?. I will be taking an introductory computer programming course . One is python based and the other is java based. The java based course has 2 semesters and goes more in depth with programming . Would it be useful to just take the java courses and get the stronger programming background , or take python course ? I have been exposed to python a little bit but I have no formal training in programming and writing code to solve .problems. A physics professor did recommend the java course and noted that it’s better to gain programming knowledge and skills and not worry much about what language to learn as those can be learned when needed if I already have programming skills .
 
Technology news on Phys.org
  • #2
Theonefrom1994 said:
A physics professor did recommend the java course and noted that it’s better to gain programming knowledge and skills and not worry much about what language to learn as those can be learned when needed if I already have programming skills .

And why do you not want to take this advice?
 
  • #3
Vanadium 50 said:
And why do you not want to take this advice?
Just like to hear other perspectives before I make decisions. I’ve been given a lot of bad advice over the years .
 
  • #4
Python is easier, but for the rest that professor gave good advice.
 
  • #5
On careful reflection, I'd say do one or the other.

It's true that once you've learned to program in one language, picking up another is fairly straightforward. In the long run, your professor's advice is good. However, all languages have their foibles and ways of working, and there's a learning curve in doing things without fighting the language.

So if you know you'll be using python in anger in the near future I'd recommend the python course. If you don't know that, I'd recommend Java. You can always download python and play around with it in your spare time.
 
  • #6
In the end, you'll need to learn several programming languages on your own.

When you join most research groups early in your career, you'll have to learn whatever language they are learning.

Often it's C, C++, or Fortran.

Your choice now is just a choice on what may be a better launch pad for what comes next.

Stop doodling and get to work.
 
  • Like
Likes Mondayman
  • #7
Theonefrom1994 said:
Python based course or java course ?. I will be taking an introductory computer programming course . One is python based and the other is java based. The java based course has 2 semesters and goes more in depth with programming . Would it be useful to just take the java courses and get the stronger programming background , or take python course ? I have been exposed to python a little bit but I have no formal training in programming and writing code to solve .problems. A physics professor did recommend the java course and noted that it’s better to gain programming knowledge and skills and not worry much about what language to learn as those can be learned when needed if I already have programming skills .

I'd go with Python, personally. You are much more likely to use it. Java is one of the most important programming languages in the corporate world but as far as I know there's hardly anyone using it in physics, while there are quite a lot of people using Python.

Other responders here have pointed out that it doesn't matter too much which programming language you learn first since you'll likely have to learn more than one in the longer term anyway. This is true. But it is also true that not all programming languages are equal and you might as well start with the one that you're likely to get the most out of. I learned some Java when I was a teenager (it was one of the first languages I learned) and, personally, I now find it very bureaucratic and inflexible compared with other languages I've learned and used since then, including Python. I can't imagine any situation where I would pick Java as the language I wanted to use, especially for anything relating to physics research.
 
  • Like
Likes Phys12
  • #8
I disagree with wle and agree with your professor. Sure, there's a lot of Python out there, and there's a lot of terrible Python out there. It is more important to learn how to program.
 
  • #9
Theonefrom1994 said:
Python based course or java course?
Definitely Java if you want to learn programming. You might have to learn Python later on by yourself if you want to stick to Science, but for a beginner, Java is the way to start. In our Python classes in college, many of my friends were completely new to programming, and they found it difficult to understand Python concepts. I felt they would have done a lot better if they started with Java first. Java will help you gain experience in programming.

In Python, the problem every student faces is indentation. Java doesn't have any such problem, so it's easier to grasp the concepts. Once you have an experience in programming, you can easily grasp any language.
Theonefrom1994 said:
A physics professor did recommend the java course and noted that it’s better to gain programming knowledge and skills and not worry much about what language to learn as those can be learned when needed if I already have programming skills.
Follow his advice.
 
  • Like
Likes Dr Transport
  • #10
As others have observed, Python is easier to get started with, but Java is more in-depth -- this article makes good arguments for preferring Java over Python as a beginning programming language, and includes this humorous image:

1590393606110.png


I suggest that you browse http://rosettacode.org and compare the Python solutions with the Java solutions.
 

1. Should I enroll in a python course or java?

This ultimately depends on your specific goals and needs. Both Python and Java are widely used programming languages and have their own unique advantages. Python is known for its simple syntax and versatility, making it a popular choice for data analysis and scientific computing. On the other hand, Java is a more powerful and complex language, commonly used in enterprise applications and Android development. Consider your intended applications and do some research on the job market for each language before making a decision.

2. How will learning python or java benefit my study of physics?

Both Python and Java can be useful for physics students, but in different ways. Python's scientific libraries and easy-to-learn syntax make it a great tool for data analysis and modeling. This can be particularly useful for physics experiments and simulations. Java, on the other hand, is better suited for creating complex programs and applications, which may be useful for advanced physics research or developing software for scientific equipment.

3. Are there any specific python or java courses geared towards physics students?

Yes, there are many courses specifically designed for physics students looking to learn Python or Java. These courses often focus on using the languages for data analysis, simulations, and other physics-related applications. You can search for these courses online or consult with your physics department for recommendations.

4. How long does it take to learn python or java?

The time it takes to learn a programming language can vary greatly depending on your background, dedication, and learning method. However, generally speaking, it may take a few months to become proficient in the basics of either Python or Java. As you continue to use the language and work on more complex projects, you will continue to improve your skills and knowledge.

5. Can I learn both python and java at the same time?

While it is possible to learn both languages simultaneously, it may not be the most efficient approach. Since Python and Java have different syntax and uses, trying to learn them both at once could lead to confusion. It may be better to focus on mastering one language first and then learn the other later on, as needed. However, if you have a strong foundation in programming and are a fast learner, you may be able to handle learning both languages at once.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
8
Views
875
  • STEM Academic Advising
Replies
12
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
13
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
20
Views
3K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
Back
Top