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

Click For Summary

Discussion Overview

The discussion revolves around the choice between enrolling in a Python-based or Java-based introductory programming course, particularly in the context of studying physics. Participants explore the implications of each language for programming skills development and future applications in scientific research.

Discussion Character

  • Debate/contested
  • Exploratory
  • Technical explanation

Main Points Raised

  • Some participants suggest that Java provides a stronger programming background due to its in-depth curriculum, while others argue that Python is easier to learn and more widely used in physics.
  • A physics professor recommended focusing on programming skills rather than the specific language, suggesting that skills are transferable across languages.
  • One participant emphasizes that learning programming in any language is beneficial, as future research may require knowledge of multiple languages, including C, C++, or Fortran.
  • Another participant notes that while Python is prevalent in the scientific community, Java is significant in the corporate world, leading to differing opinions on which language to prioritize.
  • Concerns were raised about the learning curve associated with each language, with some participants highlighting that Java's structure may be easier for beginners compared to Python's indentation issues.
  • Some participants express skepticism about the necessity of Java, arguing that Python is more relevant for physics applications and easier to use.

Areas of Agreement / Disagreement

Participants do not reach a consensus on which programming language is superior for beginners. There are multiple competing views regarding the advantages of Python versus Java, and the discussion remains unresolved.

Contextual Notes

Participants express varying assumptions about the relevance of each programming language to future work in physics and the learning experience of beginners. There are also differing opinions on the importance of learning programming skills versus the specific language chosen.

Who May Find This Useful

Students studying physics or related fields who are considering introductory programming courses and seeking perspectives on the choice of programming languages.

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   Reactions: 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   Reactions: 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   Reactions: 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
16
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K