views:

1177

answers:

18

I'm a relatively young programmer and so I don't really know much about languages like Fortran or Cobol that have their origins in the beginning of modern informatics.

I'm a bit confused because it seems like there are many people out there saying that these two languages are still very alive and being used all over the world whereas others say the opposite. In addition, it seems like there are only very few questions tagged Fortran or Cobol here on stackoverflow.

  • Can someone "demystify" the situation for me? Who uses these senior languages these days and are they even used anymore?

  • Do you have any experiences with one of the languages or do you know something about their latest developments?

A: 

Keeping older programmers rich ;)

Visage
You write that as if it were abad thing !
High Performance Mark
@visage: nobody stops you if you want to learn FORTAN and/or COBOL and get rich.
kriss
@kriss: COBOL programmers are expected to be in short supply, as the older ones retire. (Or, in my case, move to other languages and never want to touch the blasted language again.)
David Thornley
A: 

Here at a large Health insurance company we have a cobol claims proccessing system that is still a critical app. It still does a few things well, but right now most of the work being done on it is just putting lipstick on a pig

Anthony
+19  A: 

Fortran is still used pretty often in scientific circles or on supercomputers for heavy numerical processing. Recently I was at the Max Planck institute for plasma physics near here and they do a pretty large part of their simulations in Fortran. Besides, the language standards themselves are still in pretty active development, the latest efforts dating back to 2003 and 2008.

Since Fortran has been in use for more than fifty years, there is a vast body of Fortran in daily use throughout the scientific and engineering communities. It is the primary language for some of the most intensive supercomputing tasks, such as weather and climate modeling, computational fluid dynamics, computational chemistry, computational economics, plant breeding and computational physics. Even today, half a century later, many of the floating-point benchmarks to gauge the performance of new computer processors are still written in Fortran (e.g., CFP2006, the floating-point component of the SPEC CPU2006 benchmarks).

Wikipedia: Fortran, Legacy

COBOL is pretty much alive in many banking and finance systems. Basically you got code there that runs for a few decades now. And there's still the golden rule: If it works, don't touch it. And no need to break it by re-writing everything (and those systems aren't exactly small and can be rewritten in a few days). The latest COBOL standard dates back to 2002 so it's not much older than the current Java version :-).

COBOL programs are in use globally in governmental and military agencies, in commercial enterprises, and on operating systems such as IBM's z/OS, Microsoft's Windows, and the POSIX families (Unix/Linux etc.). In 1997, the Gartner Group reported that 80 % of the world's business ran on COBOL with over 200 billion lines of code in existence and with an estimated 5 billion lines of new code annually.

Wikipedia: COBOL, Legacy

Though agreed, most people having to do with programming or computer science rarely come near those languages. But they live a pretty healthy life and are nowhere near dead. That fact probably still remains a decade from now, I think. But there probably aren't many new systems developed in COBOL nowadays, even though Fortran is still used actively for new development.

Joey
We (fortran programmers) should really stop making an emphasis on that paragraph regarding fortran+legacy code. To the young newbies starting those languages, it gives the feeling that the only reason why someone would learn it is to maintain that legacy. While the truth is something completely different ... there is a large number of projects today written from scratch in fortran (have no idea how things stand in cobol world) simply because it is still the best tool for the job. The problem is that there isn't that many fortran
ldigas
programmers in % to the total number of programmers, and that's why it gives the impression of a lanuage not used. If they made a poll only amongst engineers, physicists and the like, I'm pretty sure the numbers would be dramatically different. p.s. These comments need to have a larger char. limit :/
ldigas
+1  A: 

I'd guess the majority of programming in these languages are from updating / maintaining legacy programs written in these languages.

Fortran is used a lot in scientific computing due to it's numeric processing abilities and existing libraries. Back in the 90's when I was taking Computer Science, I remember that an optional Fortan class was offered for Computer Science majors - but it was also an elective for Electrical Engineering, Physics, and Astronomy majors (if I recall correctly) due to the use of Fortan in their respective fields.

COBOL was used primarily for business software - computing finance reports and that sort of thing. Also it was a popular / easy language for mainframe programming for a period (the VB of it's era ;) ), so companies that still have these mainframes may have a bit of COBOL code running on them. As the surge in COBOL programming for Y2K indicated - there are apparently a lot of these still in use.

Nate
+2  A: 

Cobol and Fortran are still alive in the same institutions that were using them 20-30 years ago, namely financial institutions, insurance and governments (but not limited to them).

They have large codebases that cannot be simply replaced - they do too many things and the attempt to replace them would cost more than the cost of maintaining them. Most of this code is mission critical, so no one wants to touch it (if it ain't broke don't fix it).

Read this article for some more views on why Cobol is still alive.

Some of the developments are in modernising these languages - I know there is a .NET port for Cobol, called NetCobol and similarly for Fortran.

Oded
+1  A: 

Applications in banking and insurance are often one-off, business specific applications, and are sometimes certified with particular authorities, which is a time-consuming and expensive process. Result is a critical application that cost a fortune. It would be a huge risk to replace it and conservative organisations like banks and insurance companies tend to have the attitude "Do it once and do it right".

Colin Pickard
+1  A: 

As J. Rössel pointed out, some numerical scientific simulations are written FORTRAN. I worked as service administrator for a company doing meteoroligical simulations. The model used was MM5, which is a purestrain FORTRAN Application.

sum1stolemyname
A: 

We still use FORTRAN for writing simulation programs in Physics. Before 77 now 95.

Ross
A: 

There are places where new ideas are always sprouting, like computer science departments and software startup companies.

There are places where old ideas are preserved and conserved, like non computer science departments and older companies.

People generally belong to one kind of organization or the other, so they have different ideas. Often the reasons they give sound rational, but the real reason is it's what they're used to. It's kinda like politics.

Mike Dunlavey
It has more to do with where IT lands on the corporate balance sheet: *Asset* => neat, new nifty stuff. *Liability* => COBOL, run-till-death
NealB
+3  A: 

As others have said, Fortran is in active use for scientific and numerical programming. One reason that language has lasted so long is that it has evolved: FORTRAN, FORTRAN II, IV, 77, Fortran 90, 95, 2003 and now 2008. Today's Fortran is is very different from FORTRAN 77 and even more so from earlier versions. Many who think the language deficient are basing their criticisms on characteristics of the earlier versions. A summary of the current language is at http://en.wikipedia.org/wiki/Fortran_language_features

M. S. B.
C++ is catching up, it's got a complex number type now! And in the next standard (in another 25years or so) it will have native multi-dimensional arrays!
Martin Beckett
Many of the High-Energy Physics codes I see are still basically written in F77, not even using all it's power. I guess the problem is that most scientists aren't really programmers, but learn by example from generations before. This leads to very long lifetimes of some peculiar, possibly bad patterns.This might also be related to the lack of *good* free resources about modern FORTRAN programming.
honk
+2  A: 

What I saw at ye olde cobol shop:

  • Cobol on mainframe used to develop web applications.
  • CICS Web services(CWS) provides the web server
  • provides services to the cobol programmer think tomcat and servlets
  • cobol transactions like java applets
  • Multiple ways to display web pages from cobol transactions
  • Screen scraper solutions for 3270 block mode screen applications
  • 3270 block mode screen applications are very similar to web 1 applications.
  • Replace screens with HTML documents populated with symbol lists
  • Business logic remains in the cobol applications.
  • Batch jobs are used for reporting and data transformation of data.
  • Works with vsam, isam files, relational databases, oracle and db2
  • Cobol programmers use CICS services to manage session state, temporary storage queues for caching data.
  • Cobol applications tend to involve high volume data entry screens with ten key data entry, so forms use javascript to allow for heads down data entry.
  • Cobol web applications tend to have the same structure as the 3270 block mode programs with a section to move data into local memory structures, to evaluate command user commands, to edit or validate data, store to database.
C1a
A: 

FORTRAN allows you to write shorter code. As an example this codes calculates the sum of the positive elements in the matrix A.

sumofpositives = sum(A, A>0.0)

If you want to do the same in c++or java then you would have to use two for loops. Scripting languages such as perl and python have simiar nice notation, but they are generally slower than fortran. Matlab and scipy are good for some purposes but not for all.

The sad truth is that FORTRAN's combination of simple matrix notation and speed is unique.

niels
+4  A: 

Fortran is still in active use every day in the scientific community. Fortran has some advantages that make it uniquely attractive:

  1. Its pretty easy to learn. Most scientists like myself don't have computer science degrees but still find themselves writing code more than anything else. The design of the language is well suited to translating engineering-type problems into code.

  2. Fortran is old, there is a huge body of code that is written in Fortran that is still in use. Fortran has also been updated to include modern features quite regularly while maintaining backwards compatibility (for the most part). Ancient codes that are in use in places such as the nuclear industry, where codes used for license certification and must be audited by the IAEA and NRC, are rock solid and reliable.

  3. Fortran targets the high end computing market with highly tuned compilers from Portland, Intel and NAG that have features for parallel computing with MPI or OpenMP (which are both very well implemented in Fortran) and are marketed towards the very high end of the market.

  4. A lot of standard libraries were written back in the day using Fortran because it was the best language available at the time. The premier linear algebra libraries, LAPACK and BLAS, were originally written in Fortran. Nowadays versions exist in other languages such as C, but the primary versions still are in Fortran and the forks into other languages like CLAPACK still require you pass Fortran-style arguments and data when you call functions since they intend to maintain cross-compatibility. Might as well write in Fortran, at that point.

In truth, however, I find myself using scripting languages such as Python more and more. Python is way better at handling tasks that are not computationally intense, such as text processing, which often forms the majority of your objective problem. Often I will write a computationally intense routine in Fortran and then use Python to pass data in and out and organize everything.

Incidentally, when I was in secondary school (for nuclear engineering) we were required to take an introductory class on Fortran. The class wasn't especially well taught but I found myself liking Fortran (it wasn't my first exposure to programming) but I couldn't foresee using the "original" programming language in the 21st century. To my great surprise, I now find myself writing tons of Fortran (I'm on SO right now distracting me from writing some now...) and really have come to appreciate it. Fortran 90 is, for the most part, a really nice language.

Jason Hite
A: 

I work for a consulting company that does quite a bit of business with local county governments, and nearly all of our clients use COBOL (or RPG) extensively in critical applications.

As has been mentioned, the biggest reason these systems still exist is the "don't fix what isn't broken" principle. Additionally, some of our bigger clients have very complex systems that would require multi-million dollar projects to replace, easily outside of their "enhancement" budget. These types of businesses won't replace their systems until it's absolutely necessary.

I'm a 23-year old Java/.Net developer, but I've also picked up COBOL to avoid bench-time when we don't have any active Java/.Net projects. The biggest challenge for me was adapting to environments where COBOL is prominent, ie, AS400s and mainframes.

Not many organizations are investing in new COBOL-based systems. However, there are still an enormous amount of these systems in place, and they still require maintenance and enhancement requests.

majorpayne27
A: 

Used for development/testing of jet engines. Application I've seen it in use for.

Gnatz
+1  A: 

Cobol is widely used in anything involving money. Pretty much every transaction you do, anywhere in the world, will go through a Cobol system.

People love to say that all the Cobol apps are 20 and 30 years old, but they are just plain wrong. Cobol is the language of the Fortune 1000, for the parts where they actually make money. They are actively developed, the compilers and language specs support all sorts of things like OOP that one would expect of a modern language.

Most of the time, when you see someone talking about Cobol, they are talking about a class they took in collect in 1972 that they didn't like. They left with some bigoted notions and they tend to compare that experience to using 2010's software.

I use a dozen or so languages routinely, and I LIKE Cobol for some things. Even in 2010.

Joe Zitzelberger
+1  A: 

One big difficulty with attempts to replace COBOL, or even, heaven help up, s390 assembler code is that often the knowledge embedded in the system has long since passed out of the institution; you wrote programs to automate processes twenty or thirty years ago, and once they were automated you sacked the people who had performed them manually.

If you wanted to replace that code, you'd either need to reverse engineer your business rules by hiring a bunch of COBOL programmers to read the code, produce specs, re-implement in your target language, and then go through the normal test/debug/why are we doing horrible things to our customers cycle; or you could rebuild your business processes from scratch while you rebuild your systems.

Both are expensive and time-consuming, and you'll probably spend a lot of money and effort to get yourself back to where you were two or three years ago (albeit in a newer and more trendy language). Why not spend the money on extending your codebase with functions your customers will pay money for?

(Also, I'll nth the commens made by others; modern COBOL is not your father's COBOL; we're in the process of Web Service enabling a bunch of our CICS/COBOL backends because the latest versions of CICS make it trivial to do so, for example.)

Rodger
A: 

If you want a compiler that does a decent job of optimising vector code then there is not a wide choice of languages available. FORTRAN has good support from third party libraries for functions like matrix operations and is actually passably well suited to the problem domains it is used in. The main alternatives to FORTRAN are MATLAB and C. Most other platforms such as NumPy just wrap libraries written in a low level language, or are significantly slower.

COBOL has a large body of legacy code, but it is still quite well suited to a variety of business applications, Particularly on platforms such as CICS that were designed for it. All other things being equal, a COBOL/CICS application will vastly outperform Java on the same hardware. For a Mainframe shop, COBOL applications will typically have significantly lower running costs than an equivalent system written in Java.

COBOL is often a good choice for headless batch operations - tuning a COBOL application to process a large volume of data quickly is often much easier than doing the same thing with stored procedures in a database system. Once I saw a posting on (IIRC) slashdot where the poster was describing a system he wrote in COBOL sometime in the 1980s. This would read and process a 35GB file of credit card refunds every hour - on a machine with roughly the CPU speed of an early 2000's mobile phone.

ConcernedOfTunbridgeWells