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.
 

Similar threads

Replies
13
Views
2K
Replies
2
Views
2K
Replies
20
Views
4K
Replies
12
Views
2K
Replies
8
Views
2K
Replies
7
Views
1K
Replies
1
Views
2K
Replies
6
Views
3K
Back
Top