Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fortran tutorial for someone with no prior programming experience?

  1. Jan 10, 2013 #1
    Hi there,

    As the title suggests, I am looking to start learning my first programming language. I am a mature student (24) who has recently returned to school to pursue physics. A friend of mine who does physics suggested that I learn Fortran (90/95) as my first language. I am looking online for tutorials but haven't had much luck. The tutorials on the Fortran site all seem to assume prior programming experience, and obviously I have none :frown: I was hoping someone could recommend a good online tutorial (preferably free, but I am willing to pay)...Any help is appreciated.

    Alternatively a good friend of mine who does CS suggested that I learn Python as my first language and provided me with a great online tutorial. Opinions on whether I should learn Fortran or Python as my first language? Or is it irrelevant? Thanks!
     
  2. jcsd
  3. Jan 10, 2013 #2

    jedishrfu

    Staff: Mentor

    I'd check out Processing.org as a first language. Its designed from visual graphic artists uses Java syntax and gives immediate feedback. Processing is based on Java so learning it isn't a loss. From there I'd get into using Java and learn how to use Netbeans or Eclipse for serious programming.

    For physics related stuff I'd checkout Open Source Physics at www.compadre.org/osp. They have a lot of physics simulations. I took a course a few years ago where we used the book Intro to Comp Physics which is based on the Open Source Physics library and can do a lot of cool simulations.

    Other opinions will follow...
     
  4. Jan 10, 2013 #3

    rcgldr

    User Avatar
    Homework Helper

    Last edited: Jan 10, 2013
  5. Jan 10, 2013 #4

    jedishrfu

    Staff: Mentor

  6. Jan 10, 2013 #5
    If your interests are in physics, then, yes, Fortran and Python are very good choices. Fortran for all the legacy libraries that by virtue of being around for decades are now bug-free. And Python for its great popularity in the engineering and scientific community as a quick dynamic language, as a replacement for matlab and mathcad in both programming ease, handling of matrices, and data visualization.

    If you have to choose, I would learn Fortran first. Up to Fortran 77, it all was very easy to learn; starting from Fortran 90, Fortran started to include more advanced stuff that makes learning Fortran a bit more of an effort.

    I can think of two reasons to learn Fortran first:
    1. Its staticly-typed nature...you will learn to declare variables correctly of a type and keep them that way.
    2. For the purposes of programming physics or other calculations/simulation, you can quickly learn most of Fortran, if not all, in a short given time frame with a tutorial or a book and be done with it.
    I can think of a reason to take on Python second:
    1. You may never finish studying Python...and all its modules; thus, you would probably never get back to Fortran

    Often, you need both. People continue to use individual Fortran functions for the main number crunching and glue them together by wrapping them with Python to ease GUI creation, data gathering and manipulation, data visualization.

    my 2 cents...more like 3
     
  7. Jan 10, 2013 #6
    Thanks for all the replies, I appreciate it. I've downloaded all the recommended tutorials and look forward to getting into them. I will learn Fortran first...thanks gsal!


    I go to SMU! I had no idea this existed. I guess I will start learning Fortran from Clarke's tutorial and see how it goes.

    Thanks again :biggrin:

    Edit: The Python tutorial my friend recommended: http://learnpythonthehardway.org/book/
     
    Last edited: Jan 10, 2013
  8. Jan 11, 2013 #7

    Mark44

    Staff: Mentor

    Good advice!
     
  9. Jan 11, 2013 #8
    I may as well just learn them both.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fortran tutorial for someone with no prior programming experience?
  1. FORTRAN Tutorial (Replies: 24)

  2. Programming in fortran (Replies: 5)

  3. Programming Tutorials (Replies: 2)

Loading...