Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Should Undergraduates Be Taught Fortran? 794

Mike Croucher writes "Despite the fact that it is over 40 years old, Fortran is still taught at many Universities to students of Physics, Chemistry, Engineering and more as their first ever formal introduction to programming. According to this article that shouldn't be happening anymore, since there are much better alternatives, such as Python, that would serve a physical science undergraduate much better. There may come a time in some researchers' lives where they need Fortran, but this time isn't in 'programming for chemists 101.' What do people in the Slashdot community think?"
This discussion has been archived. No new comments can be posted.

Should Undergraduates Be Taught Fortran?

Comments Filter:
  • by wireloose ( 759042 ) on Thursday June 11, 2009 @08:51AM (#28291859)
    Fortran is still one of the best, fastest, most optimized tools for number crunching. It's also very easy to write simple programs in it. No way I'd use Python for serious large data set numerical calculations.
  • by Anonymous Coward on Thursday June 11, 2009 @08:52AM (#28291873)

    Unlike Pascal, Prolog, Smalltalk and the rest of the fad languages, Fortran is still here, and it will still be here when Python is long-forgotten.

    I would suggest teaching them C, but it may be too complex for a first language.

  • So what? (Score:4, Insightful)

    by bsDaemon ( 87307 ) on Thursday June 11, 2009 @08:53AM (#28291897)

    Does it really matter what language they're taught in? They should be learning the concepts of programming, not just a language. However, FORTRAN has the benefit of already having a large existing code base and deployment in the field in which students in those particular disciplines are studying. There's no reason for them NOT to learn it, and if they feel like learning Python later, then then may. Python isn't the solution for every god damned thing in the world, even if it can do it.

  • Disclaimer: I went to the University of Minnesota for my BS and George Mason University for my MS both in Computer Science and I didn't learn one single thing about Fortran other then that it existed. People in other disciplines around me (ME, EE, etc) seemed to bitch about 77 versus 44 or whatever--I was too busy studying to care.

    What do people in the Slashdot community think?

    The easy route is just to let them teach what they want to. Professors will talk and push whatever they feel is valuable and they sure the hell aren't going to listen to a Slashdot user half their age that will get on his knees and write Java for an extra buck. If you get a whack job professor teaching only archaic languages, the University will probably hear complaints from alums about getting into the job market and wishing they had learned R instead of Fortran. I don't know about the other engineering programs but I'd sure rather be a master with R than Fortran. Is Fortran more efficient? Depends on if you're talking about cycles or amount of time it takes to write a quadratic sieve for prime numbers.

    I had to learn C and I actually like plain jane C in all its simplicity. I think colleges should stick to a low level language for numerical computation courses (in my case C but I believe Fortran would function fine), an intro course to an interpreted language like lisp scheme perl whatever and should of course offer full courses in whatever is the latest craze for usable languages like C++, Java ... maybe even Ruby?

    I wager this will be a hot debate and I think it's fine if people want to teach Fortran, I learned scheme and I've never used it in my professional work! Just so long as when they enter the job market, they're prepared.

  • by rotor ( 82928 ) on Thursday June 11, 2009 @09:00AM (#28291993) Homepage

    There's no problem for teaching Fortran if it's the right tool for the job. It was 13 years ago that I took Fortran in College. It went great with physics and modeling courses. These days I write web-based database apps in Java/Perl/whatever language-du-jour is required of me, but I wouldn't want to use many of these languages for scientific purposes. I'll leave that to Fortran and C.

  • Re:Oh come on. (Score:5, Insightful)

    by Opportunist ( 166417 ) on Thursday June 11, 2009 @09:00AM (#28292009)

    Right. Teach COBOL instead!

    Job security well into the next millenium!

  • Yes (Score:5, Insightful)

    by tygerstripes ( 832644 ) on Thursday June 11, 2009 @09:04AM (#28292059)
    It's called Scheme.
  • by Remus Shepherd ( 32833 ) <remus@panix.com> on Thursday June 11, 2009 @09:06AM (#28292075) Homepage

    When I was an undergrad, the CS requirement forced all students to take classes in Pascal.

    I think the reasoning was that a student should learn a language with extreme, formal structure, and then later they can learn ones that aren't quite as strict. Maybe that the same reasoning behind teaching students Fortran? At least it's a little more useful than Pascal.

  • by k2enemy ( 555744 ) on Thursday June 11, 2009 @09:07AM (#28292115)

    Citation needed.

    Even if not phython, what does Fortran have over modern compiled languages, for example?

    Lots of libraries for numerical work. Fortunately many of them are being ported to Python modules so you can get the speed/convenience advantage and work in a modern language at the same time.

  • by Anonymous Coward on Thursday June 11, 2009 @09:08AM (#28292117)

    > It's also very easy to write simple programs in it.

    99% of programs are not simple any more...

    > No way I'd use Python for serious large data set numerical calculations.

    No way I'd us Fortran for serious large data set numerical calculations...

    First I use Python - it is fastest to write and debug and has advanced data structures that simplify algorithms...
    What good is that my program run one day shorter if it took me 2 weeks more to write and debug...

    If I need to optimize - I am moving the internal part to C - it optimizes almost as well as Fortran...

    There is Also NumPy ...

    The key thing is that it is algorithms what are more important - and these are easier to write/learn
    in Python - so it students should learn Python first and only some need to learn fortran..

  • PYTHON???? (Score:5, Insightful)

    by Fantom42 ( 174630 ) on Thursday June 11, 2009 @09:08AM (#28292127)

    Are you serious? Python?

    I am somewhat a Python fan boy. I love it. Its freaking wonderful for prototyping and really has a great, natural flow that reminds me a lot of pseudocode I might just invent on a napkin. Great language. But its also a factor of 30 times slower than a compiled language like C.

    (http://www.osnews.com/story/5602/Nine_Language_Performance_Round-up_Benchmarking_Math_File_I_O/page3/)*

    And Fortran is able to do optimizations (due to differences in the language for evaluation of expressions) that C is unable to do. This has to do with guarantees of ordering that Fortran does not give that C does. My point is that Fortran is even faster than C. Why do you think its still around?

    The physical sciences aren't using a fast language because they are bored, or obsessed with speed for the hell of it. They use them because the problems they solve are typically deep into polynomial space, like O(n^3) or O(n^4). Having something 30 times faster means they can run 30 simulations instead of just 1. It makes a big difference to them.

    I think the author of this article has lost some of this perspective.

    That said, what this article should have tackled is, what do we want to teach engineering students about computer science? Right now, they take a class that teaches them C++, Java, Python, or whatever. They get some procedural programming skills with maybe a little tiny bit of object-oriented stuff (without really covering OO fundamentals IMHO, which are a more advanced topic) and they are thrown into a world where they are writing code in C for embedded controllers or Fortran for computational codes. As a result, there is a huge body of code out there written by people who know how to get the job done, but don't exactly write code that is very maintainable. They relearn the lessons of CS he hard way over 10-20-30-40(?) years of experience. Are we really giving these young students (who are not CS majors) what they need? What kind of curriculum would be ideal for someone who is going to end up writing code for something like a robot control system in C?

    * I didn't really look too closely at this particular source, but I've seen numerous benchmarks all saying the same thing. If you want a surprise, go look at how LISP stacks up compared to C. It is better than you think.

  • by MathFox ( 686808 ) on Thursday June 11, 2009 @09:10AM (#28292147)
    First I wonder which Fortran you refer to; Fortran 66 is quite a different language from Fortran 95. I agree that all Fortran variants are pretty good languages for number crunching, but Fortran 77 and older lacked support for data structures, making it hard to teach students about them and advanced algorithms in general. (Yes, I've tried.) Fortran 90 and 95 are much better in those respects. On the other hand: C and C++ are not so far behind in speed to rule them out.

    It is my opinion that learning two fundamentally different languages makes someone a better programmer. I see value in teaching both Fortran and (for example) Python, using Fortran for number crunching and Python for smarter algorithms.

  • by SpinyNorman ( 33776 ) on Thursday June 11, 2009 @09:10AM (#28292153)

    IMO universities should be teaching core principles and methods, not attempting to impart up-to-date job skills.

    If you are going to teach FORTRAN because it's of use in the real world, then why stop there? Why not also (god forbid) teach .NET. JavaScript, C#, etc. May as well teach them Excel macros and how to interact with Microsoft Clippy while you're at it.

    No!

    Teaching programming should be done in a langauge that imparts the principles easily and teaches good habits. You could do a lot worse than Pascal which was often used in this role, or maybe today just C++. I'd argue against Java and scripting languages as the core language since they are too high level to learn all the basics. You could throw in Perl, Python or any modern scripting langauge as a secondary, and for a Computer Science (vs. Physics, Engineering, etc) it's appropriate to teach a couple of other styles of programming - e.g. assembler, and functional programming.

  • Short answer, no. (Score:2, Insightful)

    by sizzzzlerz ( 714878 ) on Thursday June 11, 2009 @09:13AM (#28292185)

    While used extensively in a number of scientific research programs, it isn't used commercially in any great amount, if at all. Unless the student is planning to work in an area where the language is used, there aren't any great benefits to knowing it. College should be more about leaning the discipline of software engineering, not learning a multitude of programming languages. C or Java serve that purpose perfectly well and have extensive use in the non-academic world. It it is needed at some point, learning it won't be terribly difficult if one is already conversant with other languages.

    I used fortran 30 years ago, stopped using 25 years ago, and, outside of a few PhDs who use it where I work, nobody uses it for anything.

  • by Churla ( 936633 ) on Thursday June 11, 2009 @09:19AM (#28292293)

    Nail guns have been around for a while, but a lot of houses still get built with hammers.

    If a simple tool does a job efficiently and effectively then why "change for the sake of change"?

  • Re:Oh come on. (Score:5, Insightful)

    by joss ( 1346 ) on Thursday June 11, 2009 @09:19AM (#28292299) Homepage

    God forbid, don't teach em python first. Learn assembly, c++, ML, fortran even fucking visual basic. You can't learn python first, it's like eating the pudding before the salad. Python is the *last* language you should learn.

    Yes, I'm serious.

  • Re:Not so easy (Score:5, Insightful)

    by teg ( 97890 ) on Thursday June 11, 2009 @09:21AM (#28292331)

    Fortran hasn't had those limitations for decades - Fortran 90 and later are ideal languages for expressing mathematical algorithms and crunching numbers

    Fortran hasn't had those limitations for decades - Fortran 90 and later are ideal languages for expressing mathematical algorithms and crunching numbers. The handling of arrays, matrices are just what they should be.

    I wouldn't use Fortran as a general purpose language - having used Python for more 10 years I shudder at using Fortran for string handling, databases, user interfaces and more - but as a tool for expressing math it's the best, and also the most widely used. The alternative would be matlab (much of the syntax isn't that different).

  • by aaaaaaargh! ( 1150173 ) on Thursday June 11, 2009 @09:23AM (#28292357)
    Mod parent up. Students should learn to choose the right tool for the right purpose and not be drawn into stupid "my language is best" discussions. Python is too slow for serious number crunching and Fortran is widely in use for exactly this purpose. Python is suitable for many other tasks, though. To give another example, if somebody studies astronomy and will have to work with old legacy Forth code, he should better be taught to program in Forth at university. And somebody who needs to quench maximum speed out of hardware or wants to implement compilers should better learn assembler. I've studied linguistics and learned to program in Prolog and Common Lisp at University, now what's wrong with that? Both are still widely in use in NLP and you need to no the basics of them when you're working in that domain even if you don't use them.

    In my experience the majority of people that think that advertise one programming language above all others tend to have no clue about programming languages in general and what other languages exist apart from mainstream languages like C/C++ or Ruby, and I'm afraid this holds particularly for Python and Java enthusiasts---both of which are relatively mediocre and outdated languages in terms of their general features and usefulness, although they can of course be the right choice for many tasks.
  • by Bill Barth ( 49178 ) <bbarthNO@SPAMgmail.com> on Thursday June 11, 2009 @09:26AM (#28292413)
    End users rarely pay for supercomputer time. Very rarely. There's an application process and peer review in most cases, but the time is, in the end, free.
  • by wireloose ( 759042 ) on Thursday June 11, 2009 @09:27AM (#28292435)
    Granted. But it's still easier to write simple, basic Fortran code to solve a quick engineering problem and to use/incorporate some of the nice math libraries. If you're really good, you can wrap it all in C and includes to bring in Fortran libs, but why bother for an undergrad's first course? The student only has 16 weeks to learn the basics, while taking other classes. There is always opportunity for more advanced coursework. Plus, Fortran is readily available on lots of systems, new and old. Even C isn't available on every system in every organization where a new engineer could be employed. So start with the basics, and then advance.
  • by Jawn98685 ( 687784 ) on Thursday June 11, 2009 @09:27AM (#28292437)
    Errrmmm..., you haven't built many houses, have you? If you had, you'd know that nail guns are far more efficient for most fastening tasks. Even the fastest old-school framer or roofer with a hammer can't come close to keeping up with a worker armed with a nailer. Yes, there are tasks where the nailer won't do the job; because it's to big to fit into the work area, or because the work demands a level of precision that the nailer can't provide. Both cases represent a tiny fraction of the set. So to, I guess, is the case for data processing tools.
  • by Rhys ( 96510 ) on Thursday June 11, 2009 @09:30AM (#28292483)

    We're not talking CS here, we're talking Engineering. Teaching them a specific language used in their field /is/ teaching them core principles and methods. Think of it like a basic diffeq class, giving them the tools to be able to learn their field, as opposed to more advanced math classes that underly diffeq.

  • Sillyness (Score:5, Insightful)

    by T.E.D. ( 34228 ) on Thursday June 11, 2009 @09:35AM (#28292565)

    This was clearly written by someone who doesn't actually do any scientific computing.

    As hard as it may be for some CS-types (myself included) to believe, Fortran is still the language for scientific computing. I've worked at flight simulation companies for two different companies (and 5 different groups) for the last 15 years. The math required to simulate a flying aircraft in realtime is ungodly hairy. It also has to get done fast. We typically have 50 or so different simulation models (plus all the I/O) that have to run to completion 60 times a second. That's about 17ms, or 8ms if we want %50 spare. In addition, for a realtime app like a simulatior it needs to take the same time to execute every time (no runtime dynamic allocations, GC, etc.) or things "jitter".

    Everywhere I've worked, with the exception of Ada mandated jobs, had this code done in Fortran. Yes that includes today. We are today writing new Fortran, and we are not alone. When we request models from the aircract manufacturers, they come in Fortran (or occasionally Ada). Fortran is still, and quite possibly always will be, the language for Scientific Computing.

    Suggesting non-CS math and science students learn some other programming language instead is just wrong. Further suggesting that it should be the author's favorite hip new interpreted languge is just laughable.

  • by SuperKendall ( 25149 ) on Thursday June 11, 2009 @09:45AM (#28292777)

    IMO universities should be teaching core principles and methods, not attempting to impart up-to-date job skills.

    IMIO, Fortran is not about "imparting up to the date job skills" as much as showing students a powerful tool to accomplish a high-level task that they'd otherwise have to learn more programming to do - and that takes from time spent with the science they are trying to learn.

    Just because something is real does not make it a "trade skill" with al of the scorn you heaped upon it bountifully.

  • by infamous_blah ( 1224522 ) on Thursday June 11, 2009 @09:47AM (#28292791)

    Unlike Pascal, Prolog, Smalltalk and the rest of the fad languages, Fortran is still here, and it will still be here when Python is long-forgotten.

    I would suggest teaching them C, but it may be too complex for a first language.

    Python will be 20 years old soon and is used in many, many contexts. Whatever your opinion of FORTRAN or Python's applicability for engineering students in particular, calling Python a fad is disingenuous.

  • by SatanicPuppy ( 611928 ) * <Satanicpuppy.gmail@com> on Thursday June 11, 2009 @09:49AM (#28292849) Journal

    ...if somebody studies astronomy and will have to work with old legacy Forth code, he should better be taught to program in Forth at university...

    This is exactly the wrong reason to teach any programming language. You teach a language to teach programming concepts and methodologies, and so you use languages that emphasize the concepts you want to teach.

    You don't teach a language so someone will know it later. That makes no sense at all.

    The plus of teaching Python is that it's a badass OOP language with clean and simple syntax. It's an excellent language for conveying object oriented methodologies.

    You learned Lisp and Prolog? I learned Scheme and Prolog. Wasn't because anyone thought I'd ever actually professionally program in those langauges, it's because they represent different paradigms, and, as a student, I learned something from seeing the different types of programming languages.

    After you've mastered the basics, you go out in the world, and use the right tool for the job. For all that you argue against fanboyisms, you commit a few of them yourself. Keep an open mind.

  • Re:PYTHON???? (Score:3, Insightful)

    by slim ( 1652 ) <john@hartnupBLUE.net minus berry> on Thursday June 11, 2009 @10:01AM (#28293041) Homepage

    You're advocating premature optimisation.

    Now, I'm speaking from a position of ignorance about Fortran - but I'm guessing if it were as expressive as a modern scripting language (Python, Ruby, Groovy etc.) then it would be more generally popular.

    The new scripting languages are *so* condusive to exploratory programming, it seems to me a no-brainer that undergrads would benefit from learning one. When speed becomes an issue, optimise whichever 1% of the routines are taking up the time.

  • Python? (Score:1, Insightful)

    by Anonymous Coward on Thursday June 11, 2009 @10:10AM (#28293213)

    OK, OK.

    Fortran is old.

    But Python? Are you serious?

    pffht.

  • by UID30 ( 176734 ) on Thursday June 11, 2009 @10:13AM (#28293277)
    Awwww c'mon. This is just plain silly. Since the late 80s, "Fortran" on most major computing platforms has been nothing more than front end language parser for a multi-pass compiler system ... just like "C" and "Pascal". Whatever language you choose, they all pass their assembly output to the same back-end assembler, and binary machine code generated is pretty generic.

    Back when I was in college, I maintained a Fortran77 program that was a custom built TCP/IP client-server system. But wait! F77 didn't know what a socket was! right. The network code was written in C and compiled into object code which was directly linked into the F77 project.

    Great. So there are these massive libraries written in Fortran to do wonderful things. Best case scenario is you can link them directly into your language of choice. Worst case, call them from the scripted language of your choice with a wrapper ... Swig [swig.org] anyone?

    Bottom line? Program in what you are comfortable with. Would your peers would frown on your efforts if you learned anything but ALGOL? Fine. Use ALGOL. There are valuable lessons to be learned in any language. Strong vs weak typed, functional vs object oriented, structure, best practices ... hell, how to write "fast" code. I've been a programmer for near 20 years and I'm still learning that lesson on a daily basis.

    The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently. - Nietzsche

  • Re:Oh come on. (Score:5, Insightful)

    by Joce640k ( 829181 ) on Thursday June 11, 2009 @10:15AM (#28293317) Homepage

    The idea of programming as a semiskilled task, practiced by people with a few months' training, is dangerous. We wouldn't tolerate plumbers or accountants that poorly educated. We don't have as an aim that architecture (of buildings) and engineering (of bridges and trains) should become more accessible to people with progressively less training. Indeed, one serious problem is that currently, too many software developers are undereducated and undertrained.

    Obviously, we don't want our tools--including our programming languages--to be more complex than necessary. But one aim should be to make tools that will serve skilled professionals--not to lower the level of expressiveness to serve people who can hardly understand the problems, let alone express solutions. We can and do build tools that make simple tasks simple for more people, but let's not let most people loose on the infrastructure of our technical civilization or force the professionals to use only tools designed for amateurs.

    - Bjarne S.

  • by golodh ( 893453 ) on Thursday June 11, 2009 @10:16AM (#28293339)
    Lets face it: Fortran (even Fortran-90) might not be fashionable, but it's a lot simpler (and therefore quicker and easier to learn) than C++, much faster than Python, and it lends itself well to the implementation of massive calculations.

    It's definitely not a language for amateurs in the sense of people who like to fiddle with the system, are interested in how the compiler works, or who just want to make gee-whizz web mashups. It's a language for people who don't care a rat's *ss about computers or programming, but who need to get their calculations done without wasting time on fiddling with pointers and who need reliable answers without being bitten by silent array-boundary overflows to boot. So Slashdot might not be the best place to ask for an opinion.

    Besides, most of today's numerical libraries (BLAS, LAPACK, ATLAS, EISPACK, FFT) are written in Fortran. If you want to use them, you could do worse than learn Fortran.

    True, it's not a language you'd want to do sophisticated datastructures in, or tree-searches or text-processing or payroll accounting or database manipulation. But especially chemists (and to a lesser extent physicists) have more call for numerical software than they have for non-numerical software.

    So no. It's not at all ridiculous to teach Fortran as a first programming language to non-computer-science students. Alongside Matlab (or Octave or Scilab) it will do fine for chemists.

  • by Jawn98685 ( 687784 ) on Thursday June 11, 2009 @10:17AM (#28293363)

    But the original point of the article is about teaching people who are mathematicians (not programmers) FORTRAN or a newer language such as Python. These aren't people who, most probably, won't be coding for a living. Although knowing how a code a little will come in handy. To that extent it's more like the fact that most homeowner own a hammer and know how to use it, but don't have a need to buy a nail gun and learn how to use that. (admittedly buying a nail gun for a homeowner is really about how much FUN it is to have a nail gun handy all the time!)

    On a side note : How many of those roofers and framers learned to use a nail gun before a hammer?

    Most roofers and framers learned to use a nail gun first, and many, if not most, will never learn to use a hammer at any level that could be called proficient in the real-world "production" environment of housebuilding. Remember, we're talking mastery of the tools at a level that allows "efficiency". That's a plateau that is far lower for the nail gun.

    Same goes for programming skills. Python, for example, is far easier to master at that level (efficient production) than FORTRAN, for most tasks. Yes, there are those tasks for which FORTRAN is the right tool for the job (number crunching), but such a case is a very rare exception. So if "knowing how to code a little" is a good thing, spending x hours of the undergraduate's time teaching him a more utilitarian tool is the better expenditure of time, is it not? And BTW, let's dispense with the "but it doesn't teach good programming practice". We're not talking about BASIC here. There are a number of candidates that would fit the bill. Hell, I'd suggest that PERL is a far better choice than FORTRAN.

  • by gwait ( 179005 ) on Thursday June 11, 2009 @10:25AM (#28293475)

    Quad precision floating point.

    Doesn't look (after a short google session) that python has this. It's used in nuclear physics still for this reason.

  • Re:Oh come on. (Score:2, Insightful)

    by jason.sweet ( 1272826 ) on Thursday June 11, 2009 @10:26AM (#28293489)
    I believe that it is the architecture that COBOL usually runs on that is what makes it so conducive to "manipulating and moving massive amounts of data". As far as maintainability is concerned, COBOL makes good software engineering a hard and frustrating task. That being said, I am always amused at attempts to marginalize COBOL. I am quite certain that in the 2 1/2 hours that I have been awake this morning, at least two of my actions have been processed by COBOL code. I don't buy that "nothing beats COBOL," but I am convinced that COBOL does make the world go 'round.
  • Re:Oh come on. (Score:5, Insightful)

    by Culture20 ( 968837 ) on Thursday June 11, 2009 @10:33AM (#28293589)

    God forbid, don't teach em python first. Learn assembly, c++, ML, fortran

    This seems to me like saying you should learn to drive an F1 car, or a Model T, before being allowed anything with an automatic gearbox.

    I would say driving a car is like running a program. Designing or repairing a car is a much better analogy. And in that case, learning the old designs, and the physics they used is much better than "run this diagnostic tool; replace factory-made black-box widget". Learning assembly or C forces a person to recognize the limits of the machine (and thus the limits of interpreted languages).

  • Re:Oh come on. (Score:5, Insightful)

    by Z00L00K ( 682162 ) on Thursday June 11, 2009 @10:42AM (#28293725) Homepage Journal

    Fortran has it's place, even though it's a bit of a fringe language today.

    It has evolved since Fortran 77, and is better. It's also one of the languages where it doesn't require the programmer to have a detailed knowledge about how to parallelize a problem since later versions has those features built in. The programmer just have to be aware that it can be parallelized, but not waste time on the details about how to do it. Unfortunately GNU Fortran doesn't support this yet (unless it has been enabled lately).

    Python is certainly not an alternative - unless you want to have a replacement for Basic.

    Education shall primarily be done in type-safe languages that forces the developers to learn the importance of type safety. Way too many bugs have been created through history that are related to operations that aren't type-safe. Ada is one language that is really strict. Java is acceptable. C# is not acceptable since it has some unsafe parts when it comes to data typing.

    And Visual Basic should be taken out, shot, drowned, burnt and sterilized for all it's abilities to make things unsafe and bug-ridden.

  • Re:Oh come on. (Score:3, Insightful)

    by sycodon ( 149926 ) on Thursday June 11, 2009 @10:47AM (#28293807)

    I believe that what gives COBOL the edge when it comes to working with large amounts of data (in addition to the fact that it runs on mainframes built for throughput) is that...

    1. The data record can be/is defined clearly in the application (it's required).

    2. The data record can be redefined many many times, allowing you to subdivide the data many ways, naming each individual part, retyping it, etc. If done with just a little bit of common sense, it makes the code fairly clear about what's going on.

    3. What some would see as a weakness is actually a strength when used in the normal COBOL processing environment. That is that you really can't get too fancy in the code without it becoming unreadable and unmaintainable.

    So you are forced to break up your processing into steps, which are managed by some kind of process management system. OK, JCL in 99% of the cases.

    While seemingly clunky, it provides a great amount of resilience because you are able to restart jobs after failures from just before the failure, not from the beginning.

    Bottom line, is that COBOL and the surrounding technologies and procedures are designed to get the job done, every day, 365 days a year.

    It's not as pretty as the O'Rielly Animal House series of languages (perl, python, rattler, donkey, whatever) but it's rock solid and unstoppable when done with even just a bit of care.

    Contrast this with the ASP.net web app development I'm doing now. Talk about finicky, temperamental code. Speaking of which...need to deal with the Object not set to an Instance of an Object.

  • Re:Python? (Score:5, Insightful)

    by motek ( 179836 ) on Thursday June 11, 2009 @10:53AM (#28293883) Homepage

    Evidently, you don't go out that much. People use interpreted languages in science all the time. At least I do. Where I sit, there is quite a bit of spare capacity waiting. When I try to figure something out it is way more reasonable to write a program in three-four hours and have it run overnight than to write it in two days and have it run in (say) thirty minutes.

  • Re:Oh come on. (Score:3, Insightful)

    by DrgnDancer ( 137700 ) on Thursday June 11, 2009 @11:18AM (#28294289) Homepage

    The problem with scripting languages is that they hide the architectural details of the system they are running on. They abstract everything to the point where programming becomes simply algorithm design implemented in a language so simple that it could have been pseudo-code 20 years ago. This is fine under two circumstances:

    1) You are only interested in training "programmers", not computer scientists or computer engineers. In the case of this article, you could have a valid argument, since these are not computer science students. They're scientists in other disciplines who's primary goal is to write programs to figure out problems in their own fields of study. It is clearly not acceptable for computer science students who, in theory at least, need to understand the fundamental concepts of how computers work. Much of that understanding comes from learning "close to the metal" languages that are harder to learn, but remove abstraction and aid low level understanding.

    2) You don't expect to need the power present in "close to the metal" programming languages. Because they are less abstracted (and because they are compiled), languages like C, C++, and Fortran tend to run much more efficiently than abstracted (and usually interrupted) languages like Python and Perl. This is where the argument from the article breaks down IMO. I've never seen Python used in scientific research, except in control scripts or GUI front ends. I'm not myself a scientific researcher, but I've spent a good chunk of my career doing admin work for various kinds of academics, so I have some idea what I'm talking about. When you've just spent 10 gajillion dollars on a 7000 CPU cluster (or even $300,000 on a 200 CPU cluster), you're not going to waste computational CPU cycles on less efficient language. There's not WRONG with python, don't misunderstand me. It has many valid uses, i just don't see it as a scientific research language.

  • Re:Oh come on. (Score:5, Insightful)

    by avilliers ( 1158273 ) on Thursday June 11, 2009 @11:20AM (#28294329)

    The idea of programming as a semiskilled task, practiced by people with a few months' training, is dangerous. We wouldn't tolerate plumbers or accountants that poorly educated.

    Not at all. Most homeowners do a lot more around the house with a lot less training, whether opening up the garbage disposal or trying to manage their retirement accoutns. The goal of these classes--especially for scientists--is the equivalent: Not to get people ready for programming a bug-free third party app; it's so they don't have to sit on their hands waiting for someone else to "build tools" to solve a perfectly manageable, one-off program that will let them move their research forward.

    There may be things where there's a nice pre-built commercial or open source app; there will also be problems where there's a need for paid consultants. But there's a lot of ground in the middle, especially in specialized fields.

  • Re:Oh come on. (Score:3, Insightful)

    by TopherC ( 412335 ) on Thursday June 11, 2009 @11:21AM (#28294331)

    While I basically agree with you, in that programming is a task best done well or not at all, it's a common mistake to think that everyone who programs should be a career programmer. It must be possible to teach the necessary programming skills (and they are necessary) to college students in engineering, science, and a few other fields. It's a little bit like mathematics except that many students don't start learning it early enough. If one doesn't start learning programming before college, then it's possibly too late to really learn enough in college. I think these days really successful students primarily learn it outside of formal classes.

    My take on the topic of Fortran is that it is not important to learn in school. I've written a lot of Fortran, but with a strong background in C it was not hard to learn when it was necessary for me to. Even in experimental physics, Fortran is used increasingly rarely so most students would not have a need to use it.

    I think that learning one programming language in school is not nearly enough. Students should learn basic procedural programming concepts, something about data structures, object oriented design, and good practices in some scripting language to get comfortable with hashes and regular expressions. Python is great for a lot of this, but it's probably better to establish more low-level concepts first, including pointers. Maybe learning C and then Python could be a reasonable, minimalistic approach? C++ could actually be avoided since the syntax and rules are so complex. (I'm not talking about comp-sci majors who should certainly learn C++.) Perl is awesome of course, but again the syntax is complex and in the context of a college course that just takes time away from learning the essential concepts. Java is possible but doesn't really get either low-level or high-level enough for my tastes.

    Whatever a student learns, they should have enough breadth, conceptual knowledge, and practice so that whatever language is required for a given project would not be too hard to learn on the job.

  • Re:Oh come on. (Score:2, Insightful)

    by Sudheer_BV ( 1049540 ) <sudheer@zzz.sudheer@net> on Thursday June 11, 2009 @11:24AM (#28294379) Homepage
    Many of the subjects you mention are directly related to writing applications like code coverage testing approaches, SDLC, documentation of code, etc. I agree there are two aspects involved here - learning to program and learning a particular programming language. It doesn't mean you can't learn software engineering if you narrow down the academic focus to current programming languages. Studying arcane programming languages like COBOL doesn't prepare you well to write a business application.
  • by klchoward ( 1574685 ) on Thursday June 11, 2009 @11:40AM (#28294671)
    A resounding YES to undergrads being taught FORTRAN. I am a graduate student in Meteorology and FORTRAN is alive and kicking in the meteorological community. It is a vital part of many of our programs and models. Perl and Cshell are also very important but I wouldn't be able to do major parts of my thesis without the aid of FORTRAN. The undergrads at my graduate school are required to take FORTRAN (especially if they are in the met program) and they use it in their upper-level core classes. I wish I'd taken the FORTRAN class at my undergrad so I wouldn't have had to catch up during my thesis. Knowing FORTRAN definitely helped me grasp other languages faster.
  • Re:Oh come on. (Score:3, Insightful)

    by tthomas48 ( 180798 ) on Thursday June 11, 2009 @11:45AM (#28294733)

    Seriously? Most scientists just need to do either:

    1) Lots of math that would be tedious to do manually.
    2) Lots of pattern matching in large data files.

    Both of these things can be accomplished with small scripts by semi-skilled programmers. This isn't application programming. It's on par with macros.

  • by maj_id10t ( 725114 ) on Thursday June 11, 2009 @11:52AM (#28294857)
    I too had to learn FORTRAN (it was v77 then) as part of my undergraduate degree as did my now wife. We were both studying Environmental Engineering. There are many US Federal government agencies (e.g. EPA) who have mathematical models that are programmed in FORTRAN as per the federal regulations mandate. For those students who will be studying to work in this field it makes perfect sense for them to study FORTRAN. There are no plans I am aware of to update these environmental modeling programs from FORTRAN to a 'better' language. For the non-computer science students / environmental engineers it is a good place to start with computer programming and will add to their skills required for the work place. If they have the desire to enhance their computer programming skills they should be encouraged to minor in CS etc. For anyone else, dear God NO! Do not subject them to this language. My $0.02.
  • MOD Parent up (Score:3, Insightful)

    by DeadDecoy ( 877617 ) on Thursday June 11, 2009 @12:08PM (#28295133)
    A program language should be taught on the basis that it teaches the student programming and not that it jigsaws them into the world of business. I student that can transcend languages is likely to be a better programmer anyways, as they'll have more tools and models with which to get a task done. Note that some languages are more suitable than others. For example, Python is useful in the academic setting, where a quick turnaround is important for meeting deadlines and finding solutions. In the business world, languages like C/C++/Cobol/Java might be more suitable for performance or legacy code. That being said, any student interested in programming should be taught languages that are based on different paradigms like structural, functional, object oriented, or shits-n-giggles code (intercal, befunge), that will ultimately enable the student to learn other languages which were not taught, more easily.

    My favorite class with respect to this was assembly. It was fairly easy to pick up and taught you how the computer interpreted commands at a relatively low level.
  • Re:MOD Parent up (Score:5, Insightful)

    by anotherdjohnson ( 1239132 ) on Thursday June 11, 2009 @01:00PM (#28296039)

    A program language should be taught on the basis that it teaches the student programming and not that it jigsaws them into the world of business. I student that can transcend languages is likely to be a better programmer anyways, as they'll have more tools and models with which to get a task done.

    I would agree with this in theory, however in practice it doesn't create a programmer who can transcend languages. In fact, they generally become very tied to specific language paradigms or capabilities. For instance, most universities seem to have selected Java as the language for CS. The problem here is that when they get into the "real world" they can't find a job doing anything but java. Why? Because they have no clue what a pointer is or how to use it. Most CS and related programs are hurting our students simply because the instructors don't want to teach about certain things, or because they or the students think it's just too hard. Most people I work with don't really understand how programming really works. I once had a co-worker who had been programming for 20 years, but had no idea that the CPU had registers, what they were for, or how they would be used. That's just sad.

    My favorite class with respect to this was assembly. It was fairly easy to pick up and taught you how the computer interpreted commands at a relatively low level.

    You (and I) are becoming something of a rarity now days, most people I work with know absolutely nothing about assembly. :-(

  • Re:Oh come on. (Score:3, Insightful)

    by iluvcapra ( 782887 ) on Thursday June 11, 2009 @01:12PM (#28296237)

    TAIL-CALL RECURSIVE PROGRAMMING is probably the number one thing that sets real programmers apart from the wanna-be's.

    There, fixed it for you...

  • by Cor-cor ( 1330671 ) on Thursday June 11, 2009 @01:23PM (#28296441)

    I realize you're probably joking, but our intro class actually teaches VBA, and even though it's a general overview for engineers of all shapes and sizes, they really do a poor job of teaching the fundamentals of programming, choosing instead to focus mainly on the syntax and the language itself. As far as I know, no subsequent class ever uses VBA, so we struggle with any future programming almost as much as we would have without an intro class. They may be looking to fix that, but for now it functions primarily as a weedout class and nothing else.

    I didn't go into computer/software engineering, but I did TA the intro class for a semester and have worked with its graduates (my engineering peers) on group projects and the like. In my opinion, they really ought to teach the logic of programming (flowcharts and the like) much more heavily than focusing on any one language. That way, you don't have people sitting and memorizing the way a certain program is written but lacking the common sense to so much as use a loop rather than writing the same calculation over and over again.

    So teach FORTRAN, teach VB6, teach them LOLCODE or whatever the hell you want but please make sure you're teaching them why the code is written the way it is and that computers don't necessarily think the way you do.

  • by dodobh ( 65811 ) on Thursday June 11, 2009 @01:57PM (#28297009) Homepage

    Until you realise that Fortran has well tested and proven libraries which you would need to mostly reimplement in Python. See this comment [slashdot.org] for example.

  • by iron-kurton ( 891451 ) on Thursday June 11, 2009 @02:00PM (#28297079)

    It's a language for people ... who need to get their calculations done without wasting time on fiddling with pointers and who need reliable answers without being bitten by silent array-boundary overflows to boot.

    There are tons of mathematical packages like Matlab, Octave and Mathematica if you just want to get your calculations done. So what's the advantage of Fortran?

  • Re:Python? (Score:5, Insightful)

    by Darinbob ( 1142669 ) on Thursday June 11, 2009 @02:06PM (#28297165)
    Python? As an intro language? And I thought people were misguided teaching Java as the first (and often only) language.

    Second, while some of these scientific programs can run overnight, a lot of them will take a day or more to run, even when compiled and on a super or parallel computer. I don't know of any highly optimized Python compilers for big metal. Fortran is still the number one language for performance computing.

    Third, there seriously needs to be major scientific libraries pre-existing for the language to be useful. An added benefit is being able to support more than one floating point number format.

    Finally, the number one most important reason that Fortran is used in the sciences, is because everyone else uses it in the field. Seriously, what good is Python if all your prof's and advisor's and boss's programs that you need to maintain are in Fortran 66? It's faster to learn Fortran than to port it all. This is part of the "dusty deck" problem, where decades old libraries still have to be used and supported. This applies to many languages - many languages are popular precisely because they are popular, not because of inherent elegance or suitability.

    In the sciences, the students are not being taught programming for the sake of programming, and they're not even being taught to write good programs necessarily. They're being taught to program as a mere tool for the important stuff being taught. Some classes may not even care what language you use, as long as you can read and understand the sample programs and the math library is correct.

    Being in the sciences and not knowing Fortran will be a drawback. In some areas it may not be as big a drawback, but it will be there. This is like trying to do embedded systems without knowing C.
  • Re:Oh come on. (Score:1, Insightful)

    by Anonymous Coward on Thursday June 11, 2009 @02:07PM (#28297197)

    Clearly whoever was teaching python to the people you were watching made a pig's ear out of it.

    I teach python to our beginning programmers and they find learning other languages *easier* than they did before python.

    You just have to teach the principles properly and use python as runnable pseudocode.

  • Re:Oh come on. (Score:1, Insightful)

    by Anonymous Coward on Thursday June 11, 2009 @02:22PM (#28297497)

    Can you imagine trying to teach a new programmer how to troubleshoot Haskell?!

  • by GPS Pilot ( 3683 ) on Thursday June 11, 2009 @02:25PM (#28297531)

    one aim should be to make tools that will serve skilled professionals--not to lower the level of expressiveness to serve people who can hardly understand the problems, let alone express solutions.

    But shouldn't we keep an eye toward eventually moving into a Star Trek-like future, where anyone can ask things like, "Computer: is there a compound that is superconducting at 50 deg C? If so, what is the formula?" And the 48-core, terahertz processor cranks through sophisticated molecular models to find the answer.

  • by v1 ( 525388 ) on Thursday June 11, 2009 @02:26PM (#28297557) Homepage Journal

    I specialized in programming languages in general in school. I'm one of those people that can honestly say he has forgotten more languages than most people will ever learn. While fortran isn't a language I ever intend to use, having learned it was a useful experience. Other odd languages like lisp, algol, assy, sequence/state, etc, also provide you with unique insight into how to do things. I occasionally run into problems today where I think "that would be SO much easier to do in (name a language)", and that gets me to thinking of how to modify the simple solution in the other language to the language I'm currently working with. It's a bit like the towers of hanoi problem, it seems dreadfully complicated until you realize that done correctly the solution is very simple, and you just need to change your point of view.

    This also makes you extremely flexible. I have absolute confidence that I can sit down at any new job using any language I've never so much as heard of before, and be able to read and understand the existing code immediately, write useful code that same day, and be highly proficient with it in under a week. The only reason I can do this is I've "seen it all" for the most part and so I've already beaten the basic obstacles like "object oriented", "pointers", "procedural based" etc that a new language might throw at me and would at least temporarily derail/disorient another newbie.

  • Re:PYTHON???? (Score:3, Insightful)

    by dodobh ( 65811 ) on Thursday June 11, 2009 @02:29PM (#28297603) Homepage

    Think of Fortran as a specialist little language/DSL. Most people don't learn many DSLs in university (except UML and SQL).

    Fortran is a DSL for number crunching and matrix algebra.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...