Question: C And Fortran Programming Language
gravatar for Ana
8.5 years ago by
Ana50 wrote:

Hello everyone!

I'm undergraduate student in biology and i want to deal with bioinformatics and especially systems biology, in the future.

I'm thinking of taking programming lessons this semester. What i want is just an introduction to programming. I want to understand the basics and maybe in the future learn more difficult stuff. But for the moment i want just the basics. I won't use it anywhere now.

The thing is that i have only 2 options in my school: C and Fortran 95. Which of these languages is better for me? Which of them will be more useful in my future career? Any opinions will be very usefull.

Thanks in advance!


programming • 4.4k views
ADD COMMENTlink modified 13 months ago by A.King120 • written 8.5 years ago by Ana50

Fortran is dead, so the question as it stands is a no-brainer. However, you might also consider picking up a perl/python book (Example: "Perl for biologists") and start yourself off with that, as there are good odds the C class offered by your university is meant for students of the computer science program, and that it might be a little rough/unappealing for someone with your background.

ADD REPLYlink written 8.5 years ago by Eric Fournier1.4k

I agree with everyone else here that C is the way to go (and with the commenter above about what C courses are likely to be like at your school), but disagree with FORTRAN being dead. It is still very much used by engineers.

ADD REPLYlink written 8.5 years ago by Scott Cain750

Thank you! I think I'm going to give it a try by myself because- as you mentioned- the C class is offered by the engineering department and I'm afraid I can't follow the level of the class.

ADD REPLYlink written 8.5 years ago by Ana50
gravatar for Sean Davis
8.5 years ago by
Sean Davis26k
National Institutes of Health, Bethesda, MD
Sean Davis26k wrote:

Simple question, simple answer. C is the better of the two given its popularity in biology and open source code. A comparison of languages is available here:

As an aside, if you are thinking about bioinformatics and systems biology, do not forget that mathematics and statistics training.

ADD COMMENTlink written 8.5 years ago by Sean Davis26k

The key factor in learning a programming language is NOT its paradigm, libraries or communities (it could be a million of libraries or programmers and you still have to learn the complexities of an invented language). If arguing for a point based on popularity rather than merit of course then C would win always because is the choosen programming language for operating system libraries and oldest general purpose programming language. The comparison article you pointed is extremely biased because ignores the most important thing: the human

ADD REPLYlink written 8.5 years ago by michaelfaraday30
gravatar for Chris
8.5 years ago by
Chris1.6k wrote:

I definitely would choose C. Knowing C, I guess it's easier to migrate to other (industry-relevant) languages (such as e.g. Java, C++) due to their similarity in syntax.

ADD COMMENTlink written 8.5 years ago by Chris1.6k

In my experience, Chris is absolutely right about similarity. I started in bioinformatics with C++ and Perl, and learning languages like bash, R, and python was very easy. I can't speak for all computer programming languages, but at least between those 5 (Perl, C++, Python, R, bash), once you know one, picking up the rest is straightforward!

ADD REPLYlink written 8.5 years ago by Mitch Bekritsky1.2k
gravatar for
8.5 years ago by
European Union wrote:

C without any doubt.

Just a few reasons in favor of C VS fortran:

  • It's widely adopted & supported (a lot of libraries available for every need)

  • It shares the same structured/imperative approach to programming as fortran, but the transition to object oriented approach (C++) is much more intuitive

  • It's quite easy to interface C with other environment (e.g. R & bioconductor)

  • Many high quality (free) tools to work with your code available (Eclipse, Visual C, gcc, mingw32/64, performance analizers, debuggers...)

  • Eventually you could call fortran routine from your C code

ADD COMMENTlink written 8.5 years ago by

1) It WAS widely adopted, now it's very hard to find reasons justifying C over other programming languages. 2) C++ is possibly the worst language to learn OOP (check out the Alan Kay comments about C++), 3) It EXTREMELY difficult to interface C libraries, you MUST learn structure types like unions and pointers to functions, argument passing modes, memory management, etc. 4) Eclipse is everything but high quality (check the loading time for a basic code browser), the compilers and debuggers are so many because its difficulty, not because there are so simple that you don't need them

ADD REPLYlink written 8.5 years ago by michaelfaraday30

1) It still is widely adopted and supported. Remember that Ana has to choose between only 2 options, she is not looking the human side of programming 2)Do you suggest her to study fortran and then Java or Smalltalk to learn OOP ? 3)Pointers are explained in almost every programming course and this is probably the best way to have a good idea of the issues related with memory management. Unions are inessential to start working with C. 4)Try to buy licences for a fortran production environment ! ...and maybe open another thread to criticize Eclipse

ADD REPLYlink written 8.5 years ago by
gravatar for João Rodrigues
8.5 years ago by
João Rodrigues2.5k
Stanford University, U
João Rodrigues2.5k wrote:

Just a word of advice: for structural biology, FORTRAN is far from dead. Very very far. AMBER, CNS, XPLOR, even some bits of GROMACS are written in FORTRAN.

I'd go with C because you'll learn fundaments of programming, which are nevertheless important whichever the language you eventually settle on.

ADD COMMENTlink written 8.5 years ago by João Rodrigues2.5k

I wish I could +2 for two points: a) Fortran is very far from dead. It has some technical advances even C cannot compete with. b) All that is important is the principle of programming instead of superfluous aspects such as procedural vs OOP or something alike.

ADD REPLYlink written 8.5 years ago by lh332k

I also heard a story one year ago about some hard core Fortran programmer speeding up parts of iPlant Collaborative.

ADD REPLYlink written 8.5 years ago by Darked894.2k
gravatar for Ahdf-Lell-Kocks
8.5 years ago by
Ahdf-Lell-Kocks1.6k wrote:

There is a lot of C code in bioinformatics out there, I can only remember a couple of projects that use FORTRAN, so I would definitely go for C. If you are a complete starter in programming, I would give a language like python a go for a couple of weeks, then some of the concepts you'll learn will make the transition to C smoother. People do go straight to C sometimes, so no worries if you also want to do that, but don't despair in the process if it all sounds crazy.

ADD COMMENTlink written 8.5 years ago by Ahdf-Lell-Kocks1.6k
gravatar for Alos
8.5 years ago by
Alos20 wrote:

I would choose C as well, however as others have said it might benefit you to learn perl. I work in Systems Biology and use perl all the time as well as R. If you would like something a little more formal then learning completely on your own you might want to look into O'Reilly's certificate program for perl:

It is online and you can take classes at your own pace.

Also the book "Beginning Perl Bioinformatics"

C is a great language but for breaking into bioinformatics perl would help a lot. I hope that helps

ADD COMMENTlink modified 10 months ago by RamRS28k • written 8.5 years ago by Alos20
gravatar for Pascal
8.5 years ago by
Pascal1.5k wrote:

The "least worst" choice is C.

But, please do you a favor and learn as soon as possible an Object Oriented language right after C. C++ is the natural continuation but you will find Java easier. You have also Python, etc. Perl has some OO features but this is a bit dirty for having programmed OO with Perl during several months myself.

I don't advocate for any language in particular, just saying that IMHO this is good to know and have experience with the Object Oriented paradigm.

ADD COMMENTlink written 8.5 years ago by Pascal1.5k
gravatar for A.King
13 months ago by
A.King120 wrote:

First of all, all those whose comments mention FORTRAN, obviously have no knowledge of modern Fortran. It's been more than 3 decades that FORTRAN has become Fortran. I'd stay away from the advice of such people. FORTRAN is history. But Fortran (2003/2008/2018) is alive and popular. Modern Fortran is far more expressive and far easier to learn than C/C++ for scientific computing. It has a learning curve comparable to Python and MATLAB. Whoever who claims otherwise is obviously biased and does not know modern Fortran (2003/2008/2018). Pick up the book "Modern Fortran Explained" by Metcalf et al (2018) to learn more about the new Fortran standards (including object-oriented programming and Coarray parallel programming).

ADD COMMENTlink modified 13 months ago • written 13 months ago by A.King120
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 691 users visited in the last hour