Programming Advice for Physics BSc Student

  • Thread starter Thread starter DClancy
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary

Discussion Overview

The discussion centers around programming advice for a physics BSc student seeking summer research positions. Participants explore suitable programming languages, resources for self-learning, and methods for developing programming skills relevant to physics research.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests that C++ is a strong choice for scientific applications, while Java is seen as a stepping stone.
  • Another participant mentions C++ and Fortran as main programming languages, with Python and R also being used for various tasks.
  • Resources for self-learning include specific websites and downloading open-source astrophysics packages to understand their workings.
  • There is a distinction made between simply learning a programming language and truly understanding programming concepts.
  • Some participants express a preference for Python due to its simplicity and effectiveness, while others caution that it may not provide the same foundational insights as more complex languages.
  • Concerns are raised about the challenges of learning C++, with some participants acknowledging its difficulty but emphasizing its importance in industrial settings.
  • Participants highlight the value of reading and modifying existing code as a learning method, with suggestions to engage with complex libraries and APIs.
  • Project Euler is mentioned as a potential starting point for coding projects.

Areas of Agreement / Disagreement

Participants express a range of opinions on the best programming language to start with, with no consensus on a single preferred language. Some advocate for C++, while others support Python or Java as suitable introductory languages. The discussion remains unresolved regarding the best approach to learning programming.

Contextual Notes

Participants note that the choice of programming language may depend on specific research interests and applications in physics, and there are varying opinions on the effectiveness of different languages for beginners.

DClancy
Messages
12
Reaction score
0
Ok, let me introduce you to my problem. I am very interested in and am actively applying to many summer research positions but I find myself somewhat limited towards what I can apply for.

My issue is that most of the positions, if not all, want programming experience and I have only done 1 first year java programming course. So my thoughts are that if I fail to get a position for the summer, I will take summer courses AND also try to teach myself some programming skills to increase my competence in that realm and show employers that I am serious about obtaining a position in research.

The question is,
1) What would be a good language to focus on?
2) Where might I potentially find good resources for self learning
3) Do you have any recommended methods for teaching myself some programming skills.

I am just finishing my second year at the university of victoria in a physics BSc and I love what programming I have done, so anything that seems particularly relevant to physics research would likely be a good idea!

Thanks in advance for potential input.
 
Physics news on Phys.org
what kind of research do you want to be involved with?

I would suggest learning C++ if you are wanting to impress, java is more of a stepping stone in learning how to program (although java has its benefits, C++ is miles more suited to scientific applications).
 
DClancy said:
1) What would be a good language to focus on?

C++ and Fortran are the main programming languages. People also use Python and R for various things

2) Where might I potentially find good resources for self learning

I'd start with www.astro-sim.org[/url] and [PLAIN]http://www-theorie.physik.unizh.ch/astrosim/code/doku.php

3) Do you have any recommended methods for teaching myself some programming skills.

Download an open source astrophysics package and start figuring out what makes it work.
 
Last edited by a moderator:
While learning languages is always a plus, I'd suggest you might want to learn programming. There's a big difference between being able to cobble a program together and knowing how to program.
 
Would C++ be a good intro into programming for someone who doesn't have any experience or should I start with java as the OP did? Vanadium do you have any resources that teach the programming basics? Thanks in advance.

Joe
 
C++ is OK to start with. I wouldn't recommend FORTRAN; it has a reputation of being bad for everything except number crunching. Personally, I never liked Java because of its limited functionality and slowness.

As to how to start, I'd suggest finding an online tutorial and following it. Make sure to read EVERY word and do EVERY exercise. If you skip a few sentences because they seem boring, you'll forget what they said a few weeks later.
 
I started by learning java in school. It seems to be the popular choice in programming languages for schools. Recently I have begun programming in python, and it is so amazing. Python is such a great language I can hardly describe it. It makes everything so simple so that you can focus on the actual programming and not the implementation. It is also, imho, the perfect level to program on. It is high enough so you don't have to hold its hand for everything, and low enough so you can do a lot of stuff still.

So, as you can tell, I am a big fan of python. With that being said, I am not sure if I would recommend python as a first language. It makes things to simple (which is not bad at all) but as far as learning programming I think that if it were my first language then I would have missed out on some insightful things, (but I'm not sure of this).

I think java is a great beginning language because there are A LOT of tutorials and information on the web. There are so many great tutorials/documentation out there. It is also (from what I have heard) a bit more friendly than c or c++.

So personally I would recommend java or python for you first language, and python for your final language because its beautiful :).
 
Also if you want to do industrial numerical programming, you are going to have to learn some C++. Why learn C++ if it's a pain-in-the-rear-end language? It's because it's a pain-in-the-rear-end language. People figure (usually correctly) that if you can program in C++ you can deal with anything else.

The other thing is that more languages is better, so being proficient in three languages is better than just knowing one regardless of what that language is. Any industrial setting will have you program in several different languages, and there are situations in which you'll be asked to program in a language that you've never seen before in your life.
 
The other thing is that you'll learn a lot by trying to read code and by changing code. One of the things that helps me write good code is haven't dealt with trying to read bad code. Also, just trying to download code and get it running will teach you a lot of stuff.
 
  • #10
twofish-quant said:
The other thing is that you'll learn a lot by trying to read code and by changing code
On this note, work with some really complex and somewhat broken libraries and APIs. (Play with facebook's or google's if you want something sort of fun.) Get used to bad documentation and finding answers on random mailing lists. Learn to debug code. A friend's first project at a job was making a massive program using an internal API. The API was the documentation.

Any industrial setting will have you program in several different languages, and there are situations in which you'll be asked to program in a language that you've never seen before in your life.
Even better is when it's an internal company language, so the only people who can help you out are your fellow employees and the docs.

I've been doing lots of python for the past couple of years, so I vote for that as a starter language. I've gotten much better at C/C++ by messing around with python 'cause it got me programming, and that's really the most important thing for learning to code.

Another good place to start on coding projects is project euler.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
28
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K