C And Fortran Programming Language
8
5
Entering edit mode
12.8 years ago
Ana ▴ 50

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!

Ana

programming • 7.2k views
ADD COMMENT
6
Entering edit mode

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 REPLY
5
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
15
Entering edit mode
12.8 years ago

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:

http://www.cprogramming.com/langs.html

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

ADD COMMENT
1
Entering edit mode

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 REPLY
6
Entering edit mode
12.8 years ago
Chris ★ 1.6k

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 COMMENT
2
Entering edit mode

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 REPLY
5
Entering edit mode
12.8 years ago
ff.cc.cc ★ 1.3k

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 COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
5
Entering edit mode
12.8 years ago
João Rodrigues ★ 2.5k

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 COMMENT
3
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
3
Entering edit mode
12.8 years ago
Ahdf-Lell-Kocks ★ 1.6k

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 COMMENT
2
Entering edit mode
12.8 years ago
Alos ▴ 20

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: http://www.oreillyschool.com/certificates/perl-programming.php

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

Also the book "Beginning Perl Bioinformatics" http://www.amazon.com/Beginning-Perl-Bioinformatics-James-Tisdall/dp/0596000804

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

ADD COMMENT
2
Entering edit mode
12.8 years ago
Pascal ★ 1.5k

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 COMMENT
1
Entering edit mode
5.4 years ago
A.King ▴ 140

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 COMMENT

Login before adding your answer.

Traffic: 2312 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6