Fortran tutorial for someone with no prior programming experience?

In summary: I will start with Fortran and then move on to Python. Thank you for the input!In summary, the conversation suggests that the person is a mature student looking to learn their first programming language for physics. They have received suggestions to learn Fortran and Python and are looking for online tutorials. The conversation also mentions the benefits of learning Fortran and Python for physics-related programming and the possibility of using both languages together. The person also receives recommendations for tutorials and expresses their intention to learn both languages.
  • #1
Light Bearer
23
0
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!
 
Technology news on Phys.org
  • #2
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...
 
  • #3
Last edited:
  • #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
 
  • #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!

rcgldr said:
A somewhat current primer for Fortran:

fprimer.pdf
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:
  • #7
gsal said:
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
Good advice!
 
  • #8
I may as well just learn them both.
 

1. What is Fortran?

Fortran is a high-level programming language commonly used in scientific and engineering applications. It stands for "Formula Translation" and was developed in the 1950s for numerical calculations.

2. Do I need any prior programming experience to learn Fortran?

No, you do not need any prior programming experience to learn Fortran. However, having a basic understanding of programming concepts and principles can be helpful.

3. Is Fortran still relevant in today's programming world?

Yes, Fortran is still widely used in scientific and engineering fields due to its efficiency in handling mathematical and scientific computations.

4. What are some resources for learning Fortran?

There are many online tutorials, books, and courses available for learning Fortran. Some popular resources include the official Fortran website, online programming communities, and textbooks such as "Fortran for Scientists and Engineers" by Stephen Chapman.

5. Can I use Fortran for other types of programming, such as web development?

While Fortran is primarily used for scientific and engineering applications, it can also be used for other purposes. However, it may not be the most suitable language for web development, as it lacks some features commonly used in web development such as string manipulation and user interface design.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
8
Views
832
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
Replies
14
Views
4K
  • Programming and Computer Science
Replies
8
Views
971
  • Programming and Computer Science
Replies
7
Views
1K
  • Programming and Computer Science
Replies
15
Views
1K
Back
Top