Equations

Friday 25 December 2009

Programming... good old days!

Recently I went back to the good old FORTRAN. It's changed. And it's changed for the better. The old fixed form that we used at school, the famous ftn77, is changed to a free form mode since f90. I tried using f95 in a few of my programming endeavours last week. And the compiler doesn't throw as many errors at me as it used to in school... most of which had something to do with the fixed form.


When I was at the University in the mid-90s, computational courses had this strange aura around them and usually the lecturers were wierd as well. They seemed to be in possession of some kind of a magic spell that made them all the more spooky! I can't help remembering a couple at my engineering school. But more about them, perhaps later.

I must say that while I was looking at f95 and refreshing myself of the syntax, I was missing a textbook that was probably written by V. Rajaraman. How could anyone in India learn FORTRAN programming without reading his book? I wonder. But I had to do with some tutorials available on the web... mostly by some professor somewhere.

What I found interesting was FORTRAN's simplicity and how easily it renders itself to the engineering computation needs... Dynamic memory allocation is easily done and you do not need to bother about the pointers and classes. The malloc was always a source of trouble for me in C. It became easier in C++ but I always had this feeling of guilt of not using C++ in an object oriented sense.

All these languages are capable of handling anything that any computational engineering task demands but some features of one language make the task a lot easier than the other. But for casual programmers it is the urge to spend more time on problem formulation rather than the programming aspects. Last week I did a some finite difference and finite volume coding using FORTRAN. It was fun.

After being with C/C++ for a while, ending statements without a semi-colon felt a bit wierd though.

1 comment:

  1. Interesting :-) Perhaps I get so fedup of programming at work that the last thing I want to do at home is program for fun :S Its sad but I hope it changes soon.

    ReplyDelete