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

AI Thread Summary
The discussion centers on the choice between a Python-based and a Java-based introductory programming course. Key points include the recommendation from a physics professor to prioritize gaining programming skills over the specific language learned, suggesting that foundational programming knowledge is more important than the language itself. While Python is noted for its ease of use and popularity in scientific fields, Java is recognized for its depth and structure, potentially providing a stronger programming background. Participants express that once programming fundamentals are mastered, transitioning to other languages becomes easier. Some argue that Java's complexity can be beneficial for beginners, while others advocate for Python due to its widespread application in research and industry. Ultimately, the decision hinges on the individual's future programming needs and interests, with both languages offering valuable skills.
Theonefrom1994
Messages
15
Reaction score
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
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?
 
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 .
 
Python is easier, but for the rest that professor gave good advice.
 
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.
 
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
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
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.
 
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
3K
Replies
20
Views
4K
Replies
12
Views
2K
Replies
8
Views
2K
Replies
7
Views
2K
Replies
1
Views
3K
Replies
6
Views
3K
Back
Top