Which course would be most useful for a computational physicist?

In summary, the conversation involved a physics major seeking advice on which elective course to take for their senior year. The two options were an assembly language and computer organization course and an object-oriented programming course in Java. The majority opinion was that the assembly course would be more useful for a computational physicist, as it would provide a better understanding of how computers work and can aid in optimizing code for high-performance machines. Some also mentioned the importance of learning object-oriented programming, but noted that it can be easily self-taught. However, some caveats were given, such as considering future job prospects and personal interests when making the decision.
  • #1
bcbwilla
103
0
Hi all, long time reader, 2nd time poster.

The long story:
I'm a physics major in my senior year, and I've recently developed an interest in computational physics/chemistry and I'm considering pursuing it in graduate school. I became interested in computational science when I took a basic programming course, and began doing some research involving density functional theory.

I have room for one elective next semester before I graduate, so I need advice about which one to pick. I have already taken a basic course in programming (java: data types, control structures, basic OOP, etc.) and I'm taking one right now about data structures (java: abstract data types, recursion, searching, sorting, etc). I'm also currently taking a course in computational physics using Fortran.

The short story:
Which of these courses would be most useful for a computational physicist?

Course 1:
Assembly Langauge and Computer Organization

Topics in Assembly Langauge Concepts, introduction to Computer Organization, Machine Representation of Information, Models of Computer Architecture, Instruction and Addressing Fundamentals, Control Structures.

Objectives:
1. To learn elements of a Von Neumann computer and its implementations.
2. To understand integer, character, and float data presentations.
3. To understand RISC and CISC processor architecture.
4. To understand stack (in memory) and its usage in processing functions.
5. To understand concepts of linking, interrupts, and traps.
6. To have a working knowledge of C and assembly language.

or

Course 2:
Object Oriented Programming (in Java)
Introduction and analysis of the object-oriented programming paradigm and concepts. Design of classes and objects in problem solving. Use of object libraries.

Objectives:
1. Describe the differences between procedural and object-oriented programming paradigms.
2. Write small to medium size computer programs using an object-oriented approach.
3. Apply object-oriented concepts to algorithm development.
4. Create solutions using reusable software components from object libraries and application programming interface (API).
5. Develop maintainable and reusable software and analyze their characteristics.I plan on learning the contents of both courses eventually, I'm just wondering which course would be of the most immediate use.

Thanks!
 
Last edited:
Physics news on Phys.org
  • #2
Object oriented programming would be of immediate use...

The assembly course with it's hardware would be useful later when you want to take advantage of multi-core machines to their fullest.
 
  • #3
If you have already done data structures etc then any further OOP can generally be learned by picking up a book. Assembly is much harder to learn on your own and getting an understanding on how a computer actually works can help a lot when coding. I would go with the assembly course.

(spoken as a coder, not a physicist)
 
  • #4
I can't see how learning assembly and computer organization will aid you in computational physics that much. Assembly and computer organization is mostly useful if you want to go into computer engineering or anything which deals with computer hardware. For immediate use I would definitely have to say object oriented programming would be better.

However, assembly and computer organization is an interesting topic (at least I find this) and it wouldn't hurt you to know how a computer works. IMO just take whichever course seems most interesting.
 
  • #5
Course #2 doesn't say what language it uses.

If it's anouther Java course, you probably won't learn much from it, but if it uses C++ and some "real" application libraries (Windows or whatever) that will be another step foward.

I don't think course #1 is very relevant unless you want to get involved in programming embedded systems etc - which might not be everybody's idea of "computational physics", but somebody has to make the instrumentation work to do the experiments!

Course #1 appears to be teaching you what computers were like in 1970, not what they are today. You have to start the learning process somewhere, of course, but it doesn't go far enough to be much practical use getting the best performance out of modern high-performance computers (or even modern PCs) IMO. (But microcontrollers etc are still pretty muich like all computers were in the 1970s)
 
  • #6
AlephZero said:
Course #2 doesn't say what language it uses.

If it's anouther Java course...

Yeah, it's another course in Java. Sorry about that, I edited the OP to include that.


Thanks for the responses so far! I did expect them to be somewhat mixed. It is a tough choice after all, which is why I'm asking in the first place :smile:
 
  • #7
I would rather do course #1. Number two is easy enough to do on your own, and you will understand OOP easily without taking a class on it (infact, just read any OOP language's best reference books and you'll get the ideas pretty quick, for weird stuff like C++ this is a near requirement otherwise you're going to get fudged). Something more fundamental I might not take the time to learn, but could prove useful. Also, if I weren't trained in areas like that I might find it hard to work through it completely alone, and in those cases it may help to have a teacher around to explains things a little differently.

I'd definitely spring for hte first course if you're willing to also learn to be a better programmer in your free time. It just seems like a more efficient use of your time, especially since OOP is something you'll see a ton of if you work on programming regularly, so it becomes easy to pick it up based on pure repetition.
 
  • #8
Course #1 is going to be far, far, far more useful to you. You'll need to learn OOP also, but that's easier to do on your own.

If you are doing any numerical programming you are going to have to think very carefully about how the processor is running the code, and I've been in situations where I've had to look at the disassembled code to figure out the bottlenecks.

The other thing is that a good chunk of graduate research involves trying to figure out what to do with the newest hardware.
 
  • #9
I echo the majority view that course #1 is more useful, but would like to point out to caveats:

1) If you are looking to find some employment after as a programmer after your BSc. course #2 may be the better choice. Not because of what you're taught there; as already said you can learn the course contents by yourself. But because you have a formal proof of having some background in OOP.

2) It's not your question but as someone who works in the field I feel compelled to point it out anyways: If you are interested in computational physics or chemistry, then pretty much any physics, chemistry, or math course is more helpful to you than either of the two courses. We have quite a few PhD students with little background in programming in my department. But in my experience everyone's limiting factor still is the math and physics knowledge (understanding the physical relevance of the simulation, knowing what kind of experiments are being done in the field, being able to autonomously set up a proper statistical data analysis, knowing physical effects that may affect the performance of the simulation, being able to set up software tests against analytical solutions, ...), not the programming skills. Taking a computer programming course as a computational physicist is like taking a do-it-yourself course as an experimental physicist: possibly helpful, but less impact on professional work than a proper science course.
 
  • #10
Timo said:
If you are interested in computational physics or chemistry, then pretty much any physics, chemistry, or math course is more helpful to you than either of the two courses.

Interesting point, I will consider that. I'm actually taking all of the physics I can next semester (thermal and solid state), but I'll take a look at what chemistry and math courses are offered.

I'm leaning towards course #1 at the moment, due to the suggestions, but also because the programming course I'm taking now (data structures) involves much more OOP than I anticipated. We've spent a couple weeks covering the basics, and the rest of the class will be carried out using OOP.
 
  • #11
Timo said:
2) It's not your question but as someone who works in the field I feel compelled to point it out anyways: If you are interested in computational physics or chemistry, then pretty much any physics, chemistry, or math course is more helpful to you than either of the two courses.

As someone else that works in the field, I'd have to disagree with that. A lot depends on exactly the topic of your dissertation, but if you work in hard core numerical analysis then you are going to have to be an extremely sharp computer programmer.

being able to autonomously set up a proper statistical data analysis, knowing physical effects that may affect the performance of the simulation, being able to set up software tests against analytical solutions, ...), not the programming skills.

In my field it's quite different. In high performance computing, a tiny difference can make the difference between a simulation that takes two weeks to run, and one which doesn't run at all. For example, one thing that makes a big difference is the order that you write you for-loops. If you write the for-loops in the wrong way, then you fragment memory, the compiler does not used vectorized instructions, and your simulation is dead.

Also for precision work, hardware issues matter. I recently spent a week tracking down some differences that ended up having to do with different floating point representations on different operating systems.

C++ is useful because with templates, you can have the compiler take a for-loop and vectorize it, so you get OOP *and* decent performance. Using OOP is starting to be essential because you have code that typically are between 20K and 100K source lines of code.

Taking a computer programming course as a computational physicist is like taking a do-it-yourself course as an experimental physicist: possibly helpful, but less impact on professional work than a proper science course.

Depends on the field. This isn't true for my field.

The problem with computer programming courses is that most CS courses aren't geared toward high performance computing.
 
  • #12
Timo said:
course #2 may be the better choice. Not because of what you're taught there; as already said you can learn the course contents by yourself. But because you have a formal proof of having some background in OOP.

No one cares if you have formal proof of anything. In a job interview, I can tell by talking with someone for 10 minutes if they understand OOP at a basic level, and give me an hour, and I can tell if they understand it deeply.

If you understand it, I don't care where you learned it from.
 
  • #13
I recommend you learn both if you want to this kind of stuff, even if you learn one by coursework and the other in your own time.

I think twofish-quants argument is valid and if you have done some basic programming in any procedural language, the assembler course would be very good.

I don't know if you can get access to a vector machine or supercomputer, but if you can, that would provide a great environment for doing some applied computational work. These kind of machines are designed for computational stuff, and in many environments this is the kind of thing that gets used.

I remember two-fish talking about using GPU's for computation, and I'm not really surprised since they offer a lot of processing power and are pretty cheap in the overall scheme of things. For this kind of thing you might get a standardized interface like OpenGL or DirectX and write some assembler programs for the graphics card. If you are interested also, there are bit-coin mining distro's for linux that use the GPU to "mine" for bitcoins.

Once you know the constructs used in flow control, learning the object oriented way isn't really that hard. Classes are just structures pretty much for the most part and basically your function pointers in the data structures can do more advanced things with the paradigm of inheritance, but in the end it's just a data structure, and if you have programmed in C using that kind of style, then OOP is not really a tough transition.

Also one last point: it is definitely a good idea to work with platforms that use both assembler/machine code and native procedural/OOP code. If you are able to easily integrate the two, then that is good experience. You will learn all about with using linking programs, but in my opinion, it is important that you learn how to incorporate different kinds of programs/platforms into your repositories.
 
  • #14
@twofish-quant: Formal proofs are not for job interviews, they are for being invited to job interviews. Considering your comments on taking programming classes: Since those stem from your experience (that doesn't quite seem to fit with mine) you probably have a point. Perhaps it depends on whether you put the emphasis in "Computational Physics" on "computer" or on "physics". I personally consider it quite important that I am a physicist, not an engineer or a programmer.
 
Last edited:

Related to Which course would be most useful for a computational physicist?

1. What is a computational physicist?

A computational physicist is a scientist who uses computer simulations and mathematical models to study and understand various physical phenomena. This interdisciplinary field combines principles from physics, mathematics, and computer science to solve complex problems and make predictions about the behavior of physical systems.

2. What skills are necessary for a career in computational physics?

To excel as a computational physicist, one must have a strong foundation in physics, mathematics, and computer science. Proficiency in programming languages such as Python, C++, and FORTRAN is essential. A solid understanding of numerical analysis, data analysis, and statistical methods is also important. Additionally, critical thinking, problem-solving, and communication skills are crucial for success in this field.

3. Which course would be most beneficial for someone interested in pursuing a career in computational physics?

A course in computational physics would be the most useful for someone interested in this field. This course would cover topics such as numerical methods, data analysis, and simulation techniques, providing a strong foundation for a career in computational physics. Other relevant courses could include advanced courses in physics, mathematics, and computer science.

4. Are there any specific programming languages that are important for computational physicists to know?

Yes, there are several programming languages that are commonly used in computational physics, including Python, C++, and FORTRAN. Each language has its advantages and is used for different purposes, so it is beneficial to have knowledge and experience with multiple programming languages.

5. What are some potential career paths for someone with a background in computational physics?

Some potential career paths for someone with a background in computational physics include working in research and development for industries such as aerospace, energy, and healthcare. Other options include pursuing a career in academia as a professor or researcher, working for government agencies, or becoming a data scientist or analyst for a variety of companies. There are also opportunities in finance and technology for individuals with strong computational and analytical skills.

Similar threads

  • STEM Academic Advising
Replies
12
Views
1K
  • STEM Academic Advising
Replies
5
Views
867
Replies
2
Views
901
  • STEM Academic Advising
Replies
5
Views
1K
  • STEM Academic Advising
Replies
11
Views
693
  • STEM Academic Advising
Replies
1
Views
781
  • STEM Academic Advising
Replies
1
Views
980
  • STEM Academic Advising
Replies
3
Views
929
  • STEM Academic Advising
Replies
2
Views
871
  • STEM Academic Advising
Replies
4
Views
993
Back
Top