Basic python stuff in 1st/2nd year physics)

  • Context: Python 
  • Thread starter Thread starter theneedtoknow
  • Start date Start date
  • Tags Tags
    Physics Python Year
Click For Summary
SUMMARY

The discussion emphasizes the importance of learning programming fundamentals over specific languages for students in physics and astrophysics. C and C++ are identified as the most widely used languages in these fields, while IDL is noted for its popularity in astronomy. The conversation recommends focusing on programming techniques and practices, with resources like "Code Complete" and "The C Programming Language" (K&R) as essential reading. A free Java environment is also suggested for those interested in exploring Java programming.

PREREQUISITES
  • Basic understanding of programming concepts
  • Familiarity with physics and astrophysics principles
  • Knowledge of C and C++ syntax
  • Access to programming resources and books
NEXT STEPS
  • Study "Code Complete" for programming techniques and best practices
  • Learn C programming through "The C Programming Language" (K&R)
  • Explore IDL for astronomy-related programming tasks
  • Download and experiment with the free Java environment from Sun
USEFUL FOR

Students in physics and astrophysics, aspiring programmers, and anyone looking to enhance their programming skills for academic or career purposes.

theneedtoknow
Messages
169
Reaction score
0
I have never done any programming (except very basic python stuff in 1st/2nd year physics), and I want to learn some a bit more in depth over the summer. Can anyone recommend which programming language I should learn? What's most-widely used for physics/astrophysics?
 
Technology news on Phys.org


C or C++ are probably the most widely used, but it varies a lot by specific field. Right now IDL (a commercial programming language, so it's not free, based loosely on Fortran) is popular in astronomy and astrophysics. But the idea is to learn how to program, and then you just need to learn the syntax for a new language. So C, C++, even Perl would be fine for that, and there are a lot of good introductory books out there (and websites) to get you started.
 


I wouldn't spend much time worrying about which language to use. You need to learn how to program. What I mean by that, is you need to focus specifically on programming techniques and practices since they translate into all languages. There is a great book titled "Code Complete" that covers all sorts of things related to the art of programming while focusing on a few popular languages (C++, C#, and JAVA are the ones I can think of right now). Definitely worth picking up if your interested in programming for hobby or career.

A link to the book: https://www.amazon.com/dp/0735619670/?tag=pfamazon01-20
 
Last edited by a moderator:


Squeak: Learn Programming with Robots by Stéphane Ducasse
 


Learn C. All the other languages out there fall into a spectrum with C at one end and Lisp at the other, with most on the C side. You have the intellect to get through 2nd year physics, so work your way through K&R (https://www.amazon.com/dp/0131103628/?tag=pfamazon01-20)
 
Last edited by a moderator:

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 56 ·
2
Replies
56
Views
10K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
16
Views
3K