Slashdot Mirror


Should Undergraduates Be Taught Fortran?

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?"

794 comments

  1. It's okay to teach them FORTRAN by sharkette66 · · Score: 5, Funny

    But only if they have to do it on punch cards, like I did. Give each student a can of WD40 to keep the machines working smoothly, too.

    1. Re:It's okay to teach them FORTRAN by Anonymous Coward · · Score: 0

      Dozens? Oh, the horror!

    2. Re:It's okay to teach them FORTRAN by hairyfeet · · Score: 4, Funny

      Nah, make them learn VB6, if for no other reason for enjoying the screams of horror from 'real" programmers when they come across some VB6 app. Take that, real programmers! For extra evil teach them GOTO. I've found watching the facial ticks and foam build up around the mouth from real programmers when they encounter a GOTO to be quite entertaining!

      --
      ACs don't waste your time replying, your posts are never seen by me.
    3. Re:It's okay to teach them FORTRAN by maj_id10t · · Score: 3, Insightful

      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.

    4. Re:It's okay to teach them FORTRAN by Anonymous Coward · · Score: 0

      Y'know I still don't understand the common loathing of goto statements. I mean yeah there's plenty of ways you can use them that will seriously mess up your debugging/program, but if you have a good understanding of when and where it can be used, and what initialization it will ignore/break, there are times where it's not really any worse than whatever your alternative is (Mind you I don't have an example onhand, but I did have a program at some point where it was a good alternative to what I did do.

      Mind you after seeing code that some wannabe/scriptkiddie wrote in c++ with goto statements in it to make it go FASTERRR, you wish that goto required a -ffucking-idiot flag to enable :D

    5. Re:It's okay to teach them FORTRAN by Tablizer · · Score: 1

      But only if they have to do it on punch cards, like I did. Give each student a can of WD40 to keep the machines working smoothly, too.

      Oh man, punched cards. I came in on the tail end of cards for some intern work and don't miss them one bit. The card-punch machine I was using once punched the holes about 2 millimeters off the "proper" position. It was at the threshold for the reader and thus the reader refused to read some of the cards in the deck. I would re-punch (copy) those identified as bad cards and try again.

      But the next time through a *different* set of cards were rejected. After about the 4th cycle of this a "seasoned" mainframer came to help because the deadline was looming and there was no time to find the tapes to create a fresh set of cards. He pulled out what looked like a jewelry eye-scope, aligned it against a template card he had, and held it up to the light. After examining it for about a 2 minutes, he explained the problem and told our group to find a different punch machine to make a new batch of cards using either the bad deck or ideally the original tape(s), if found.

      Those seasoned people had all kinds of tools in their bag. They'd sometimes poured iron powder on reel-to-reel tape to study wear patterns and alignment of the magnetic data patterns. The pattern looked like tire treads. It seems sometimes the tapes had a similar problem.

      Now adays we just make a fresh copy and toss the bad tape/disk/media-thing. But back then tapes were expensive and card copies were not always easy to make, especially if they came from multiple different sources. Plus, the data patterns imprinted on the medium are too small for the human eye now.
             

    6. Re:It's okay to teach them FORTRAN by Cor-cor · · Score: 2, Insightful

      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.

    7. Re:It's okay to teach them FORTRAN by hb253 · · Score: 1

      WD40 is a drying agent, not a lubricant.

      Common misconception.

      --
      Self awareness - try it!
    8. Re:It's okay to teach them FORTRAN by ksheff · · Score: 1

      Or have them do it on an old CDC Cyber green screen. It's a character building exercise.

      --
      the good ground has been paved over by suicidal maniacs
    9. Re:It's okay to teach them FORTRAN by Jake+Griffin · · Score: 1

      Haha... I thought the same thing. I'm pretty sure I've taken over a dozen classes in which I wrote dozens of programs in each. So I've written grosses. And now that I'm graduated, I'm still writing more. And I'll probably go back for a master's and perhaps a phd and write even more. I'm quickly approaching the...kiloprogram.

      --
      SIG FAULT: Post index out of bounds.
    10. Re:It's okay to teach them FORTRAN by psmears · · Score: 2, Informative

      WD40 is a drying agent, not a lubricant.

      Uh... isn't it both? The manufacturers of WD40 certainly seem to think so:

      WD-40 protects metal from rust and corrosion, penetrates stuck parts, displaces moisture, and lubricates just about anything

    11. Re:It's okay to teach them FORTRAN by SuperTechnoNerd · · Score: 1

      Learning Fortran and Basic I believe makes it harder to learn object oriented languages like C++ and Java. I also have seen first hand what a 'real' programmer does when he sees GOTO's in code.. Remember the Excorsist? Head twisting, pea soup, the works... :) However what is more intresting, I greped through linux kernel sources, wow- just count the GOTO'S..

    12. Re:It's okay to teach them FORTRAN by Jake+Griffin · · Score: 1

      "[WD-40] was originally designed to repel water and prevent corrosion...The long term active ingredient is a non-volatile, viscous oil which remains on the surface, providing lubrication and protection from moisture....These properties make the product useful in both home and commercial fields; lubricating and loosening joints and hinges, removing dirt and residue, extricating stuck screws and bolts, and preventing rust are common usages. The product may also be useful in removing moisture, particularly in electrical components." [Emphasis mine]

      (Source)

      --
      SIG FAULT: Post index out of bounds.
    13. Re:It's okay to teach them FORTRAN by v1 · · Score: 3, Insightful

      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.

      --
      I work for the Department of Redundancy Department.
    14. Re:It's okay to teach them FORTRAN by hairyfeet · · Score: 5, Interesting

      Well, I'll tell you like my former VB teacher told me, funnily enough after some kid tried to steal my code and pass it off as his own. After Mike(my teacher) got done laughing his ass off he told the kid "BTW you are getting an F for stealing from Kevin". "How do you know that he didn't steal it from me?" Again after Mike got done laughing his ass off he projected the code onto the board and said to the class "Do you notice anything a little odd about this code?" And one said "It has numbers in front of all the lines...and what is a GOTO?"

      And Mike said "How old are you Shawn?" and after the kid said 19 he said "And THAT class is why I know Shawn stole this code from Kevin. He turned to me and said "You're what? 35?" and when I confirmed he said "You see class, in the days before PCs became standard with pretty desktops like you have now, all the machines ran BASIC. The numbering and the use of GOTO to call a sub is a classic tell that the person who wrote this cut his teeth on one of the old BASIC computers." He tilted his head and said "Commodore or Atari?" and I sat there with my mouth gaping and said "Commodore VIC20. How did you know that?" he said "Because your code is classic Commodore and Atari style. Very efficient but as subtle as a chainsaw."

      After some of the kids started coping pieces of my code and trying to use GOTO and crashing all over the place Mike explained it to me like this-"To an old greybeard like you or me, that actually understands what the code is doing a GOTO can be a quick and efficient way to get something done quick. Subtle as a chainsaw, but it gets the job done. But you give it to these kids, that don't really understand what they are trying to accomplish or understand how the codes works in the machine? It is like handing a monkey a sledgehammer and letting him loose in a room full of bombs. He is gonna blow something up, the only question is when."

      So if you want to know why teachers like Mike would cringe when they saw a GOTO, it is because it works fine IF you know what you are doing and how the code will be processed. But with so many learning code the VS way, with everything drag and drop, for many of those GOTO will simply blow up in their faces. Better just to not let them know it exists in the first place.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    15. Re:It's okay to teach them FORTRAN by herdingcats · · Score: 1

      oh...my...god...i'm not the only one surviving, then.

      and look at us now, out here on the interweb tubes with all these young yahoos (no pun intended).

    16. Re:It's okay to teach them FORTRAN by St.Creed · · Score: 1

      I'm sorry to enlighten you but a goto is never needed, violates ALL the tenets of good programming and frankly, when my boss or myself see a colleague or hired help put in a goto somewhere, they will get a solid thrashing. Self-modifying code and other Weapons of Mass Code Destruction are in the same category. And while SOME arguments can be made for selfmodifying code in very limited circumstances (embedded code might be one), there is never an argument for using goto's unless the language doesn't give you subroutines. Oh, and in my education: anyone using a GOTO got a 1 (that's an F- ) for his or her assignment anyway. Automatically.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    17. Re:It's okay to teach them FORTRAN by hb253 · · Score: 1

      I would never depend on WD40 as a long term lubricant. They may claim it works, but my personal, anecdotal experience is that it lasts about a day or two.

      --
      Self awareness - try it!
    18. Re:It's okay to teach them FORTRAN by billius · · Score: 1
      For the record, I'm 22 and my first programming experience was using MBASIC on a Kaypro II and when I got to high school the introductory programming class was still being taught in QBasic (granted we were the last class ever to use it, after that they ditched it in favor of PLT Scheme via the DrScheme environment). Therefore statements like GOTO and GOSUB came up quite a bit in my early programming days and judging from a discussion in one of my earlier college CS classes (about this famous letter), I'm not alone in having this experience.

      So if you want to know why teachers like Mike would cringe when they saw a GOTO, it is because it works fine IF you know what you are doing and how the code will be processed. But with so many learning code the VS way, with everything drag and drop, for many of those GOTO will simply blow up in their faces. Better just to not let them know it exists in the first place.

      See, this argument gets applied to all kinds of bad language features. Really, I think that sentence should read "it works fine IF the code is being maintained by one programmer who never has to deal with anyone else, doesn't mind working for at the same place until he dies and will pass the family trade on to his kids so someone will know what the hell is going on after he's dead." I did an internship a few years ago at a company where the billing software was still essentially all written in QBasic. They were paying two contractors $70/hr each for about 2 full months of work to make minor changes to the software because it was so difficult to maintain. GOTO had its day on the sun, but it's over for a good reason.

    19. Re:It's okay to teach them FORTRAN by tyrione · · Score: 1

      Seriously? I'm 40 and you're 35. I cut my teeth on Fortran with GOTO and line numbers, not BASIC. Then again, I graduated in Mechanical Engineering and when I graduated the dipsh*ts interviewing me wished up one side and down the other that I had C Programming. Well back to degree two, Computer Science, and then they discussed, ``If only you had Java programming''--this was 1996. Luckily, NeXT wasn't big on Java and were smart enough to hire by one's extensive background and ability to engage in person.

      The absolute most useless and strange question I got [from an ex-Microsoft guy starting his own company] was, ``Given an infinite amount of rope while standing at the Equator you have a 20 foot hole with a 20 foot span to cross and you are required to get across to the Northern Hemisphere. How would you solve this problem.?

      The CTO asked me to review my answers and asked, ``How come you didn't think of climbing down the channel/canal and just walk around the Equator until it was filled up like a Yo-Yo?

      My response, ``I figured, as a trained M.E. that K.I.S.S. applies here and just taking this infinite amount of rope and filling in a gap of rope 20 feet deep and 20ft across takes far less time to get to the other side, don't you?''

      His response, ``You're the first person to ever answer the question that way.''

      My response, ``Who thought of the Yo-Yo answer as a reasonable or expected answer?''

      His response, ``I did.''

      Uncomfortable moment with me breaking it to the notion that different minds will solve the same problem in different ways.

      Needless to say, he was embarrassed in never thinking of the simple solution and I didn't get the job.

      All I thought of after walking out, ``What a freakin' moron. Walk around the globe. Yeah, that's practical.''

      Then I thought it must be a Microsoft thing which then spawned a comparison between colleagues of the dumbest questions ever asked in an interview.

      My next favorite was the douche bag at Real Networks who thought he'd ask me a Kinematics question and seeing as he didn't have a Mechanical Engineering degree didn't understand my answer for it didn't coincide with the one he saw in a book.

      I'm glad I didn't get that job, though I did end up interviewing for two weeks for an SQA job that ended with the CTO asking me all about QuickTime and Apple Engineering--none of which I cared to share with him.

      I'm glad doing my own consulting and phasing more into Mechanical Engineering projects is coming full circle. There are too many business nobs with no Science running Software Companies.

    20. Re:It's okay to teach them FORTRAN by andreyvul · · Score: 1

      I too am addicted to gotos. Even Java's psuedo-gotos e.g. ...
      foo : while(false); ...

      then use break foo; insstead of goto foo;

      Yes, labelled break/continue is a goto in disguise.
      You can do the same in C/C++, just add a nop before the closing brace like so:

      while (...) { ...
      continue_foo:
      asm("nop");
      }
      break_foo: ...

      Gotos/labelled break/continues are very useful when creating a tokenizing parser where token classes have enough overlap ... e.g. command-line calculator. But only the teacher/ASM/C/C++-fluent programmer will understand it.

      --
      proud caffeine whore
    21. Re:It's okay to teach them FORTRAN by hairyfeet · · Score: 1

      For you and the "I'd fire your ass" guy, chill, have a Pepsi. We are talking about BASIC, and in particular VB6. I have always been a firm believer in "the right tool for the job" and only a nut or a glutton for punishment would design some giant web monstrosity of an app in VB6.

      Let's be honest here: what is VB6 used for? pretty much its only function is making a GUI for a database. Sure you can do other stuff with it, but what is 90%+ of the VB6 out there doing? Running a GUI on a database, usually a little one off app like the one I cooked up a couple of years back for a salvage yard so they could keep up where on their three lots a particular car was.

      In the cases it was designed for, making little frontends to databases in little mom & pop shops, seriously, who gives a flying fart if you use a GOTO or not? It isn't like Joe's Cars is gonna roll the thing out nationally over the web here. For simple jobs like the above posters 'GOTO Done' or mine where I had a simple GOTO sub that did basic checks on the data, honestly who cares? You know why VB6 got a bad name? Because too many hacks tried to fit a square peg in a round hole and use VB6 where it didn't belong. Building some complex Intranet app or project with web access? Use Java or AJAX or any language OTHER than VB6. Need to build a quick frontend for a database for Mary's hair salon? VB6 is your pal, just as is GOTO. The key with both VB6 and GOTO IMHO is knowing when either is appropriate and when it is not. And if you know what you are doing, you'll know when that is.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    22. Re:It's okay to teach them FORTRAN by Anonymous Coward · · Score: 0

      In any event, you should be pointing to here or (better yet!) here if you want people to actually get to see good ol' EWD's (in)famous letter.

      But you should probably be looking at this instead.

    23. Re:It's okay to teach them FORTRAN by Anonymous Coward · · Score: 0

      Pttthhh! Real programmers toggle it in!

      Bloody young whipper snapper hippy punch card Holerith machine lovers!!!!

    24. Re:It's okay to teach them FORTRAN by Anonymous Coward · · Score: 0

      cant the same effect of a goto be obtained by calling another function within another, ie:
      def foo(a,b) ...
      end def

      def bar(a,b) ...
      foo(a,b) ...
      end def

      or am i being a bad programmer here?

    25. Re:It's okay to teach them FORTRAN by Krakhan · · Score: 1

      So how am I supposed to do error handling in a low level language that doesn't have any explicit exception handling mechanisms, like C? Also, how do I accomplish the same code using only while loops and flag variables without involving code duplication and a whole bunch of flag variables that I have to set, check, and reset, and also doesn't have a big performance cost and make it an unreadable mess. An example of such a use would be in a deeply nested loop 3+ levels deep that I'd want to break out to the outer most loop. On that note, do you have issues with people who use break, continue statements, or any other forms of flow control in the program, and follow goofy rules like the one entry, one exit philosophy? This is the impression I'm getting from you.

      Any tool within the language can be abused. As long as the intent is clear and justified and there's no other better choice, I see no issues with using a goto or any of its variants in other languages (call/cc comes to mind) in when needed. That being said of course, there are richer flow control constructs in higher level languages that don't necessitate the need for goto as much anymore, possibly not at except in extreme circumstances.

      Also, this is a great read from Knuth himself who shows ways you can use goto to improve code readability and make it easier to express ideas and correctness without unnecessarily tying your hands behind your back: Structured Programming with Goto statements. Food for thought.

    26. Re:It's okay to teach them FORTRAN by Anonymous Coward · · Score: 0

      REAL programmers use GOTOs freely, because /they/ like it when "real" programmers rant about the evils of GOTO, just to give them a Hannibal Lecture of the benefits afterwards.

    27. Re:It's okay to teach them FORTRAN by twoHats · · Score: 1

      goto works fine if you know what you are doing? ... and you never ever want to maintain your code. ... and you don't want others to be able to read your code. ... froth - drool - argghhh As a 66 yo programmer who actually had to write and maintain what were considered large programs with gotos in FORTRAN using punch cards and untouchable main frames, or as we used to call them, computers, I would question the sanity of someone who thought this was a good way to write code by anyone.

      I have taken the time to learn C, Pascal, C++, and Java at a professional level, to get as far as possible from those crappy languages of the past. Who the hell would teach FORTRAN now?? Why not COBOL for all of the business majors too?

    28. Re:It's okay to teach them FORTRAN by jeff4747 · · Score: 1

      So how am I supposed to do error handling in a low level language that doesn't have any explicit exception handling mechanisms, like C? Also, how do I accomplish the same code using only while loops and flag variables without involving code duplication and a whole bunch of flag variables that I have to set, check, and reset, and also doesn't have a big performance cost and make it an unreadable mess.

      There's these things called "functions". Your program is allowed to have more than one.

      And if you're concerned about a performance hit (lol) then there's this "inline" keyword you can look up.

    29. Re:It's okay to teach them FORTRAN by nobodie · · Score: 1

      wrong direction. bring back some of those old ENIACs from Princeton where I learned machine code. That way they learn real programming/algorhythm basic and none of this prissy drag and drop text programming. 1s and 0s will hone thier little minds and give them the real foundation for a bright future. Think about the 40th anniversary of UNICS, the OS, a text editor and whatever the hell else he did in that month. that is what a machine code foundation can do for you. I mean, how long would it take to write UNICS in python?

      --
      Subversion of spatial scale luxury decoration ideas.
    30. Re:It's okay to teach them FORTRAN by Krakhan · · Score: 1

      Congratulations, you've replaced one circumlocution for another. In addition, that doesn't solve the general case for exception handling except in the most trivial cases, and you've also made the code more unreadable by putting related blocks of code in separate functions, which defeats the whole point of using them in the first!

      Also, C does not have an inline keyword, and whether a C++ (It is not the same as C) compiler will not just inline a function just because you tell it too. That's dependent on the complexity of the code present, and also the compiler specific optimizer.

      But I guess it's pointless to care about performance if you don't care about parsers & code generation, operating systems, signal processing (audio, image, video), and various stuff in scientific computing that many others in this discussion have mentioned.

  2. Oh come on. by geminidomino · · Score: 5, Funny

    --No one-- should be taught FORTRAN. Ever...

    *sobs in fetal position*

    1. Re:Oh come on. by Opportunist · · Score: 4, Insightful

      Right. Teach COBOL instead!

      Job security well into the next millenium!

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    2. Re:Oh come on. by Warlord88 · · Score: 1

      I agree. There are so many better first languages. I was fortunate to learn C++. Python seems to be growing in popularity as first language that can be learned. OK. TFA mentions that.

    3. Re:Oh come on. by scubamage · · Score: 5, Funny
      Yep, real men use ADA.

      ...And drink very heavily.

    4. Re:Oh come on. by mabhatter654 · · Score: 4, Interesting

      but for math geeks FORTRAN is probably the easiest language to get from pencil-n-paper to computer. Math functions in FORTRAN translate nicely from their paper counter parts. If you can do math and "show your work", or punch numbers in a calculator, you're 2/3 of the way to a FORTRAN command line program.

      I don't think it's a useful first language anymore. Something like Python would be more useful "out of college". FORTRAN is really easy to pick up later anyway as it's "old fashioned" and line numbered based. I'd think the biggest problem teaching the class now would be getting students to take it seriously because it's a much older way of thinking about programs from our modern OOP languages.

    5. Re:Oh come on. by joss · · Score: 5, Insightful

      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.

      --
      http://rareformnewmedia.com/
    6. Re:Oh come on. by sycodon · · Score: 1, Interesting

      Mock if you will, but when it comes to manipulating and moving massive amounts of data and maintaining the application, nothing beats COBOL.

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    7. Re:Oh come on. by beelsebob · · Score: 4, Interesting

      Indeed, even the creator of Fortran said "actually, that was a shit idea, we should all ignore it and use functional programming instead" in this paper.

    8. Re:Oh come on. by beelsebob · · Score: 3, Interesting

      but for math geeks FORTRAN is probably the easiest language to get from pencil-n-paper to computer. Math functions in FORTRAN translate nicely from their paper counter parts. If you can do math and "show your work", or punch numbers in a calculator, you're 2/3 of the way to a FORTRAN command line program.

      Yes, but with a good functional language like Haskell, you're 9/10 of the way there, not 2/3.

    9. Re:Oh come on. by Anonymous Coward · · Score: 0

      The difference being that with Fortran they will have skills that are actually usable and useful in the real world, whereas with Haskell you've taught them a toy language beloved on academics.

    10. Re:Oh come on. by dkh2 · · Score: 1

      And now that we've put the Y2K scare behind us we won't need new COBOL developers until the Unix clock rolls over on 19-Jan-2038.

      --
      My office has been taken over by iPod people.
    11. Re:Oh come on. by Plumber,+Programmer, · · Score: 1, Troll

      Python is the *last* language you should learn.

      And only if you absolutely must use it.
      I wouldn't describe it as "pudding" though. That's too tasty.

    12. Re:Oh come on. by Anonymous Coward · · Score: 0

      Python is the *last* language you should learn.

      I have to respectfully disagree. I have seen it used in introductory programming courses with moderate to good success.

    13. Re:Oh come on. by boneglorious · · Score: 5, Interesting

      I absolutely agree. With a background in c++, learning python (my new department's introductory language) was cake, but I'm watching the people who learned python first struggle to go beyond it. They're even more hindered by the fact that they keep thinking, "But python was so easy..."

      --
      Can I mod something +1 Scary if it's true but I wish it weren't?
    14. Re:Oh come on. by ruhri · · Score: 1

      but for math geeks FORTRAN is probably the easiest language to get from pencil-n-paper to computer. Math functions in FORTRAN translate nicely from their paper counter parts.

      Nope, the easiest one for that purpose would actually be MATLAB (or octave, for that matter). If you want decent O-O with that, you can also use PyLab. Anyone who needs FORTRAN for whatever reason down the road can easily pick it up having been exposed to any of the above, but it should not be taught as a first programming language.

    15. Re:Oh come on. by gestalt_n_pepper · · Score: 3, Interesting

      A more interesting questions is "Why are other programming languages so hard? And is the difficulty justified by the additional power?" Bonus question: Is it *necessary* that a language (cough, cough, C++) be an ergonomic disaster to be powerful?

      --
      Please do not read this sig. Thank you.
    16. Re:Oh come on. by anotheregomaniac · · Score: 1

      Gawd, I hated Fortran. It was all they taught in the early seventies to lowly scum sucking undergrad Engineering students at the Univ of Mich. Fortran was the single biggest thing that turned me away from computers (until I saw a MITS Alair. It was love at first sight). I can't believe anyone would still think Fortran's the right first language. It's like forcing someone to learn to hand crank a car engine, in the age of plug-in hybrids.

    17. Re:Oh come on. by Kotoku · · Score: 2, Funny

      You can't have any pudding if you don't eat your meat!

    18. Re:Oh come on. by gfxguy · · Score: 1

      When I was taking numerical analysis, I wrote my code in C++. Everyone else used Fortran.

      I remember handing in what the teacher considered a difficult assignment on one printed page (it was to solve one specific type of problem). The Fortran versions were all at least three or more pages.... why? Because they had to simulate a stack to do recursion. I know modern versions of Fortran can do this for you, but that's not what they had on the university computers at the time.

      So the next class, the teacher hands back all the assignments except mine. After class, I asked if there was a problem... he pulls out the one page and looks at it, and says "it can't work." Now, if he had told us to use Fortran, I would have used Fortran, but he explicitly said we could use any language we want. I had to sit down with him at a terminal to prove it worked. From then on, I used Fortran, despite his "promise" we could use any language we wanted.

      --
      Stupid sexy Flanders.
    19. Re:Oh come on. by quakehead3 · · Score: 2, Funny

      "Yes, but with a good functional language like Haskell, you're 9/10 of the way there, not 2/3."
      But then students would be too lazy to do their homework.

    20. Re:Oh come on. by slim · · Score: 1

      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.

      even fucking visual basic.

      I don't see where that gets anyone.

      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.

      I don't see what's wrong with Python as a first language. It gets stuff done. You might never need to make the jump to anything lower level.

    21. Re:Oh come on. by Joce640k · · Score: 5, Insightful

      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.

      --
      No sig today...
    22. Re:Oh come on. by Sudheer_BV · · Score: 1

      When I was doing computer science graduate course about eight years ago, they taught us Pascal and then COBOL followed by FORTRAN. Lastly they taught us C. But all of them were mere introduction to these programming languages. The most a student could learn from these courses is to know how to use loops and functions in programs. Nobody ever told us what are the differences among these programming languages and why they existed. What to say of teaching students how to write applications? I wish they had taught us C, C++ and python for the undergraduate course.

      --
      Sudheer Satyanarayana
      www.techchorus.net
    23. Re:Oh come on. by JorgeFierro · · Score: 0

      For what it's worth, Could you tell us what was the college/university?

    24. Re:Oh come on. by Anonymous Coward · · Score: 2, Informative

      Real men know that the name of the programming language 'Ada' is not an acronym.

    25. Re:Oh come on. by Anonymous Coward · · Score: 0

      OK, for the last time: the language is called "Ada." It is NOT an acronym.

    26. Re:Oh come on. by SolitaryMan · · Score: 1

      Yep, real men use ADA

      I totally agree. However, since we are geeks here, I'd say that almost any other woman will do.

      --
      May Peace Prevail On Earth
    27. Re:Oh come on. by JoelisHere · · Score: 1

      Mock if you will, but when it comes to manipulating and moving massive amounts of data and maintaining the application, nothing beats COBOL.

      Except nearly every programming language since. (You did say, "Mock if you will," and I will :-) Seriously though, most of my distaste for COBOL is due to the Luddites that taught it in school. I suppose I could have felt the same way about Scheme had those profs been as bad as my COBOL instructors.

    28. Re:Oh come on. by jason.sweet · · Score: 2, Insightful

      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.

    29. Re:Oh come on. by quanticle · · Score: 2, Informative

      Why are other programming languages so hard? And is the difficulty justified by the additional power?

      Well, that all depends on what you mean by "power". In one sense, all Turing-complete languages are equally powerful, since the set of solvable problems for all is the same.

      In the sense of being "easy to use" or "easy to learn", however, I would say that it is necessary for some languages to be "hard", in the sense of having fewer layers of abstraction between the programmer and the hardware-level instruction set. These languages allow those that need finer grained control to have it. In more concrete terms, I'm glad Assembler exists (for the sake of those making device drivers), even if I'll never personally use it.

      Is it *necessary* that a language (cough, cough, C++) be an ergonomic disaster to be powerful?

      Again, it all depends on how you define "ergonomic disaster". There are those who feel that C++ is a useful addition to C that makes object orientation easier while still not obscuring the central structure of C. C++ is no more powerful (in absolute terms) than any other Turing complete language - it just makes some problems easy while making others hard.

      Trying to say that one programming language is more "powerful" than another is like trying to say that a hammer is "more powerful" than a screwdriver.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    30. Re:Oh come on. by Culture20 · · Score: 5, Insightful

      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).

    31. Re:Oh come on. by hAckz0r · · Score: 1

      Yep, real men use ADA.

      Real Geeks use IDA Pro, male or female. Dissembling the ADA code and patching it is much more fun.

      btw - Drinking is strictly optional; It tends to cloud the mind and makes it harder to type in Hex.

    32. Re:Oh come on. by Anonymous Coward · · Score: 0

      COBOL /run

    33. Re:Oh come on. by Talchas · · Score: 1

      I can understand the arguments behind learning assembly or c++. (Well, scratch assembly, you shouldn't start with that, and I'd recommend C over C++) But I really don't see anything ML buys you over python, and fortran is only used in certain narrow fields. Saying they should learn Visual Basic is just a joke.

      --
      As the Americans learned so painfully in Earth's final century,free flow of information is the only safeguard against...
    34. Re:Oh come on. by Z00L00K · · Score: 4, Insightful

      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.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    35. Re:Oh come on. by DinDaddy · · Score: 1

      +1. Most appropriate car analogy I've seen yet.

    36. Re:Oh come on. by Will.Woodhull · · Score: 1

      These are undergraduate students. It is safe to assume that each and every one of them has been writing programs in high school in Python, Perl, or Ruby. And that all would have some skill in Javascript. Fortran would not be their first language. And... they are bound to arrive with some bad coding habits already established.

      Fortran makes sense as an undergraduate course as it maps better to the realms of engineering and science than the C based languages, the Lisp based languages, or the Pascal language groups. In particular, I think Fortran would be an excellent choice to drill students on the rigors of structured programming. Fortran is also directly relevant in many of these subjects as it remains the best language ever for developing and maintaining libraries of differential equations and other exotic mathematical menageries.

      My direct experience with Fortran is limited: an introductory course in 1972 that was seriously bogged down by us students having to transcribe our coding sheets to Hollerith cards. There were an adequate number of key punch machines, but most of us were hunt and peck typists back then, and the process was slow, error prone, and caused much anguish.

      My indirect experience with Fortran is similar to everyone else's: for instance, I rely heavily on the Fortran libraries that were written in the 1950s every time I fly in a commercial jet, since those Fortran routines are still used to design wings and such.

      --
      Will
    37. Re:Oh come on. by sycodon · · Score: 2, Insightful

      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.

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    38. Re:Oh come on. by Z00L00K · · Score: 1

      No need for drinking, Don't drink and code.

      If you drink after coding it's to celebrate a decent system. VB coders has to drink to be able to cope with finding all bugs that the language allowed them to implement.

      But of course - no language is safe from stupid designs.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    39. Re:Oh come on. by Glonoinha · · Score: 5, Interesting

      Trust me, while you may wish you were learning how to write applications in the latest pop language during undergrad, the rest of the world wishes you had been taught computer language theory, set theory, data analysis by inference, proper documentation of your code, the 'non-coding' aspects of any number of different SDLC lifecycles, complete code coverage testing approaches, the interaction between software and the machine (where the machine is the network of machines, and the rest of the software running on those machines) and critical thought / problem solving during your undergrad years.

      Your disdain for COBOL, FORTRAN, and Pascal show exactly why it's a bad idea to teach a single 'current' language and spend four years focusing on all the APIs and subtle language quirks - languages come and go. Entire platforms come and go. And yet the same people adapt over time (if they are good) and continue to implement strong software engineering principles in whatever comes along to replace those obsolete technologies.

      Perhaps during those classes you weren't supposed to be focusing on the medium (the language) and rather be focusing on the lesson (data structures, analysis of algorithms, queue theory, set theory, or the one that has caused the world the most problems - handling every input that could possibly be handed to a routine.)

      All of the above can be taught in any language, including one made up by the professor (RIP Edgar Dykstra.)

      --
      Glonoinha the MebiByte Slayer
    40. Re:Oh come on. by Anonymous Coward · · Score: 0

      This trend to offer "Useful skills" is a sign of the degeneration of colleges and universities as places of learning. Useful skills come from first hand experience on the job, and any decent boss will give you the time to learn a new language if a requirement for using it comes up after you are hired.

      Students should be learning programming language concepts that will help them learn any language necessary.

    41. Re:Oh come on. by Yunzil · · Score: 1

      Yes, but with a good functional language like Haskell, you're 9/10 of the way there, not 2/3.

      Good. Now how fast does your Haskell program run?

    42. Re:Oh come on. by Glonoinha · · Score: 1

      Recursive programming is probably the number one thing that sets real programmers apart from the wanna-be's. Real programmers use it to get stuff done (and have fun while they are coding it), and the rest of the world not only can't code it, they can't even read it.

      Thanks, this post brings back years of good memories from working with self-taught 'programmers' and effectively demonstrates the difference between 'learning just enough to write code that fixes a problem' and professional software engineering.

      --
      Glonoinha the MebiByte Slayer
    43. Re:Oh come on. by icebrain · · Score: 1

      These are undergraduate students. It is safe to assume that each and every one of them has been writing programs in high school in Python, Perl, or Ruby.

      FAIL

      Where the hell did you go to high school? I went to a high-ranked public school in a nice area, and the only way you got any programming at all was if you took the special programming class... where you did visual basic.

      Remember, the article is not talking about budding CS majors or programmers. It's talking about engineers and science majors. In other words, yes, they are technically-minded, but I doubt most of them have any kind of programming experience at all. At best, they've used TI-Basic on their calculators.

      --
      The meek may inherit the earth, but the strong shall take the stars.
    44. Re:Oh come on. by infalliable · · Score: 1

      If you're teaching computer "programming" for mathematical and data manipulation, Matlab is really going to be the best thing to teach. It's VERY common in industry and quite powerful for that purpose.

      FORTRAN really isn't a good language to be teaching anymore. It's virtually extinct except at Universities, and in legacy programs that have been around 20+ years. I've not seen it used ever to make "new" code. If the goal is to teach a programming language so people can write their own code, something like C++ or other common language would be much more useful.

    45. Re:Oh come on. by Georgie2032 · · Score: 1

      >These are undergraduate students. It is safe to assume that each and every one of them has been writing programs in high school in Python, Perl, or Ruby. And that all would have some skill in Javascript. Fortran would not be their first language. And... they are bound to arrive with some bad coding habits already established.

      I don't agree with this at all. In my first year, there was a significant number of students who had never pogrammed, and this was for a Computer Science degree. The students this thread is about are Chemistry and Engineering students who may not have necessarily programmed in High School as the Chemistry etc taught there doesnt require programming.

      The first programming language I was exposed to was Scheme. I learned the principles of programming without being bogged down in the details of the language I was using. Ideal. I fully reccomend it for those interested in pursuing programming. Ideal for engineers and chemists? Im not sure

      --
      "Experience is what you get when you don't get what you want"
    46. Re:Oh come on. by swanriversean · · Score: 1

      fortran 2003 is an OO language ...

      and don't forget, you can write fortran in any language

      --
      Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seus
    47. Re:Oh come on. by DrgnDancer · · Score: 2, Insightful

      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.

      --
      I don't need a million points of light, just two points of multi-mode fiber and a 10 Gig-E router.
    48. Re:Oh come on. by Anonymous Coward · · Score: 0

      It could be worse.

      I taught FORTRAN to science undergraduates as a teaching assistant one year. The use of FORTRAN was stipulated, even though it wasn't my preference. Some of the students complained that they didn't get to do any graphics programming where they could draw or plot something interesting (like their data). I understood their point, but there wasn't an easy way to do graphics programming with the development system the university had set up (all command-line).

      So I did a couple of classes and one lab on Postscript.

      The response was strongly bimodal: they either thought it was quite cool to be able to plot and print things or they thought it was utterly horrible -- even worse than FORTRAN (reverse Polish notation isn't for everyone).

      A few of the people who understood the exercise subsequently wrote FORTRAN programs on their own time to output Postscript rather than hand-coding the Postscript. That's the way to do it (generate Postscript programmatically), and I was pretty impressed that they immediately put the two things they had learned together to solve their own research problems ... except, of course, it was FORTRAN, and FORTRAN isn't exactly well-known for its text string manipulation abilities.

      It still creeps me out thinking about some future scientist writing their scientific code that way. What Frankenstein monster had I created?

    49. Re:Oh come on. by avilliers · · Score: 5, Insightful

      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.

    50. Re:Oh come on. by TopherC · · Score: 2, Insightful

      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.

    51. Re:Oh come on. by icebrain · · Score: 1

      Georgia Tech grad, by chance?

      I will add that, from an engineer's perspective, Scheme was useless. Thankfully, the school wisened up (though not till after I took the scheme class...) and now has engineers doing a Matlab course. Non-technical majors take something with java or python, I think.

      --
      The meek may inherit the earth, but the strong shall take the stars.
    52. Re:Oh come on. by Sudheer_BV · · Score: 2, Insightful

      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.

      --
      Sudheer Satyanarayana
      www.techchorus.net
    53. Re:Oh come on. by rgviza · · Score: 1

      nah it's the IO capability of the mainframes...

      --
      Don't kid yourself. It's the size of the regexp AND how you use it that counts.
    54. Re:Oh come on. by OldSoldier · · Score: 1

      A few years back I tried to teach my kids programming. I chose C as then I didn't know Perl, PHP or Python. In short it was a disaster. Why? I blame the printf function because the difficulty of learning the quirks of getting output in C got in the way of trying to actually learn PROGRAMMING. But then there's also stuff like declaring variables, strings as string pointers,

      In hindsight, I now believe the best language to serve as an introduction to programming is whatever language has the fewest non-programming quirks. The "hello world" program is a horrible example of how simple some language may be. Consider writing a program to add and print 1+2 = 3 where 1,2,3 are stored in variables. Interpreted dynamically typed languages are the the simplest to do this in. You can get right to the core of programming w/o being bogged down in that other crap.

      That said... the main/only(?) thing I miss about Fortran is its ability to deal with matrices. But again, I seriously doubt I'd teach that in an intro to programming class anyway (or if I did, it'd be much later in the course).

      Every now and then this question comes up here on slashdot. Specifically "What's the best intro language to teach programming to [group x]?" This question is flawed from the start as you have 2 potentially competing goals, specifically: a) what's the best way to teach programming and b) what aspects of programming does [group X] need to know? The right way to phrase this question is simply "what's the best intro language to teach programming?" You can teach the specifics that [group X] may need in a 2nd course.

    55. Re:Oh come on. by Abreu · · Score: 1

      Hey Teacher! Leave the kids alone!

      Most of us don't need to program anything more complicated than a few lines of Python, so why should I suffer through assembly, c++, ML or Fortran?

      --
      No sig for the moment.
    56. Re:Oh come on. by Unit3 · · Score: 1

      AGREED.

      Seriously. Fortran? FFS.

      --
      -- sudo.ca
    57. Re:Oh come on. by n30na · · Score: 1

      Real math geeks hate showing their work.

      Also, fwiw, FORTRAN is too wordy imo. But I hatehatehate vb, and people seem to learn okay from that, so I don't know.

      Something like Java or a C-variant might be better, since they're not too wordy, but aren't too hard to jump into either.

    58. Re:Oh come on. by XDirtypunkX · · Score: 4, Funny

      Actually, the most hardcore lecturer/professor at my University in Australia both promoted the use of Ada and drinking heavily. I guess he taught me how to be a man.

    59. Re:Oh come on. by qdaku · · Score: 1

      You come across a bit arrogant here that the plebs shouldn't be allowed to write code because they aren't trained to do it. These are undergrads in physics, chemistry, engineering --the majority of whom are not going to end up as programmers. They need enough to get by and anything beyond that is probably a bonus for their employer.

      I am an engineer and I certainly don't use the language I learned in school (java in my first year, fortran in my third) because they aren't applicable to my problems. The majority of work I do is on commercial available packages (CAD, specialized 3D CAD, and problem/industry specific modelling software). I'm not out there writing my own finite-element tunnel stability software. I need to be able to parse a variety of different files and do something useful with the output --translate them into various scripts for different projects, drive various programs through COM, etc. Basically ugly little hack scripts or project-specific programs that deal with any of a number of odd file formats or input data the client gives us --and in mining, every client is different and it is a mess.

      One piece of in-house software is written in vbscript. It's ugly as sin and I could care less --it works. It cuts out a disgusting amount of hours of work I would have to do if I had to do it by hand. At the end of the day, as an engineer and not a software developer, I need to get my work done. If I need to write programs and occasionally cobble together some in-house tools to assist me then I will, in whatever language I have on hand, regardless of the fact I've had only a "few" months training. Get off your high horse --not everyone is a software developer.

      Cheers

    60. Re:Oh come on. by tthomas48 · · Score: 2, Insightful

      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.

    61. Re:Oh come on. by Anonymous Coward · · Score: 0

      I learned programming at a very young using some sort of turtle that you had move around a screen.
      I dont think that you could get much simpler than that.
      From the simple turtle you learn the basics of a finite automaton. This is great for kids.
      When it comes to the scientific community, FORTRAN is a fantastic language for expressing mathematics in an *efficient*, calculable way. The worst thing you can do is to set loose a bunch of scientists or engineers who think that the best way to solve a math problem is to use an excel spreadsheet, because it is easy to express the problem. While ease of expression is certainly one step that is needed, high performance solutions go way beyond that need. Teaching students that ease of use is more important thatn performance or correctness is dangerous.

    62. Re:Oh come on. by Anonymous Coward · · Score: 0

      er..The cancer known as Visual Basic is the last thing you should learn. What an horrible hybrid of various thing. The only reason Basic survives is because that was Microsoft's first product back in the 70s. It should have been killed years ago.

    63. Re:Oh come on. by Just+Some+Guy · · Score: 2, Interesting

      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.

      It's ironic to me that this came from the inventor of C++, IMHO one of the least expressive languages around. I spend most of my time in C{,++} explaining the means to an end, but most of my time in Python telling it what that end is.

      For example, I have a list of values (int, float, string, or whatever else) and I want to double each of them. A typical Python expression would be list2 = [item * 2 for item in list1]. The C++ equivalent would involve explicitly stating what list2 will be, how to iterate across list1, and that the items might be of different types. I have better things to do with my programming time than to hold the compiler's hand and spell out every single detail.

      --
      Dewey, what part of this looks like authorities should be involved?
    64. Re:Oh come on. by Anonymous Coward · · Score: 0

      There's a whole world of difference between the programming an engineer does and the programming a programmer does.

      As an engineer, when I have a calculation that needs to be done, if it can't be done in a spreadsheet, I'll knock up a quick Visual Basic or ForTran program to do it for me. I use it once, it's full of bugs, but as long as it takes me less time to get through the bugs than it would have taken me to do the calc in the first place I'm happy. Maybe I'll use it again next time I do the same thing, and I might even give a copy to a collegue, but it'll never need to be fast/secure/etc.

    65. Re:Oh come on. by lysdexia · · Score: 1

      Hmmm ...

      I wonder if this explains why Denny's always puts chocolate pudding on the salad bar?

      That being said: I love me some python.

    66. Re:Oh come on. by Anonymous Coward · · Score: 0

      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.

      I agree very much with this. The problem *I* see is when people who "took programming in college" end up trying to write production code.

    67. Re:Oh come on. by Anonymous Coward · · Score: 0

      If you can do math and "show your work", or punch numbers in a calculator, you're 2/3 of the way to a FORTRAN command line program.

      Unfortunately, in Fortran integer arithmetic, 2/3 works out to 0. Being 0 of the way isn't too encouraging.

    68. Re:Oh come on. by Just+Some+Guy · · Score: 1

      Good. Now how fast does your Haskell program run?

      Pretty well, I'd say.

      --
      Dewey, what part of this looks like authorities should be involved?
    69. Re:Oh come on. by lysdexia · · Score: 1
      Ah yes. Drinking heavily does help one clarify the stack to a beautiful woman or a confused young man. Drinking and anal beads.

      beads = range( 10 )
      for i in len( beads ):
      beads.pop( i )
      0
      3
      6
      8
      ... It makes more sense when you're drunk.

    70. Re:Oh come on. by eap · · Score: 1

      Yep, real men use ADA.

      ...And drink very heavily.

      I'd drink a lot less using Ada than C++. Ada has nice features aimed at keeping dumb asses from shooting themselves in the foot

      C++ is a set of boots with land mines for soles

    71. Re:Oh come on. by Amazing+Quantum+Man · · Score: 0

      Yep. When I was at UCSC back in '84, we all wanted a course in ....

      wait for it ....

      VAX Assembler.

      --
      Fascism starts when the efficiency of the government becomes more important than the rights of the people.
    72. Re:Oh come on. by skeeto · · Score: 2, Interesting

      We aren't talking about computer science students here. This is about teaching a useful tool to other disciplines. Physicists, for example, don't need to learn about pointer arithmetic and computer architectures to use programming as a useful tool. They are working at the level of mathematics, with high level concepts.

      And Python is one of the better languages for that. They probably wouldn't need anything else for a long time.

      The situation right now is that if they aren't learning Fortran, then they are probably learning Matlab, which, frankly, seriously sucks.

    73. Re:Oh come on. by jbolden · · Score: 2, Informative

      What makes C++ difficult is C. That is

      1) Deallocation of memory, bounds checking in arrays... is done manually

      2) Lots of direct pointer manipulation. You can't abstract away the "how the computer is going to do this"

      3) Multiple inheritance

      Getting rid of those things gives you Java which is much easier to learn but doesn't have the performance. The question is why did you choose C++ in the first place if you don't want the excellent performance?

    74. Re:Oh come on. by sznupi · · Score: 1

      But in the case of the summary/TFA...

      Look, I know recent biology and chemistry graduates who were forced to go through Fortran. Obviously "they hated it" doesn't mean anything, everybody would.

      The thing is...generally it was just a filler for them, "this weird, useless thing we all have to pass and nobody knows why". They focused only on how to pass the dreaded course, not on how to understand/learn programming. Not only they don't have any idea now how to program (nvm that majority are quite computer illiterate...), they even didn't know that during/right after the course!

      Using something like Python would greatly help in much larger number of them actually having a clue.

      --
      One that hath name thou can not otter
    75. Re:Oh come on. by clintp · · Score: 1

      For my money, it's more about teaching them languages that are as different as practically possible. Assembler, C, Fortran, a functional language (Haskell, F#, etc...), a scripting/control language, and maybe something more modern with OO and garbage collection (Java, C#, etc..).

      After 25 years of programming, I can honestly say that after a while it's all the same. I think the only surprise I've seen is the functional languages.

      "Hey, I know this!"* Awk is just a free-form RPG, Python is Perl is Ruby is Javascript is every other C-derived scripting language, 68000 assembler is 6502 is really RISC, and Basic is BASIC. It's all about recognizing the forms and patterns of the language and system. After that, it's just syntax.

      So how does Fortran fit into all of this? Its anachronisms are useful. Code doesn't have to *look* like code all free-flowy and outline-like. Sometimes columns are important (not just whitespace, Python). It has a crufty I/O system -- but damned useful. Implicit typing can be fun.

      I suppose if you didn't want to teach Fortran, another language of the same generation would be okay... perhaps RPG (a personal favorite) or Pascal. The lesson being that legacy code exists, and that good designs of the past have some lessons to teach.

      * Pardon the movie reference.

      --
      Get off my lawn.
    76. Re:Oh come on. by Anonymous Coward · · Score: 0

      ...you're 2/3 of the way to a FORTRAN command line program.

      Yes, but with a good functional language like Haskell, you're 9/10 of the way there, not 2/3.

      But with something like MATLAB, you're a good solid 18/19 of the way there.

      Beat THAT, fraction boy.

    77. Re:Oh come on. by gfxguy · · Score: 1

      The University of Nevada at Las Vegas... about 16 years ago.

      Don't laugh, the college of engineering is quite good, even if the university is overshadowed by it's "hotel management" program.

      --
      Stupid sexy Flanders.
    78. Re:Oh come on. by Anonymous Coward · · Score: 0

      Queue theory? That's one way to make 10 minutes sound like a whole class!

    79. Re:Oh come on. by bemenaker · · Score: 1

      You are right, that the intent is to teach proper coding, data analysis, algorithms, and what not, but that doesn't mean you need to hold onto old complicated languages to do so. What are you more likely to use in the real world? That is what these coding practices should be taught on. No it doesn't have to be the current fad language, but I have yet to see anyone program anything in Fortran anywhere. Yes, I know it is still used in high end simulations, but it isn't in the mainstream at all.

    80. Re:Oh come on. by iluvcapra · · Score: 2, Insightful

      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...

      --
      Don't blame me, I voted for Baltar.
    81. Re:Oh come on. by Will.Woodhull · · Score: 2, Interesting

      Amusing post.

      Things are changing pretty rapidly now. Please try to keep up.

      Most high school students interested in science or engineering careers learn a bit of some programming language in the same way they learn a bit about sex: from each other, Typically in a guy's basement on his family's old Win98 or WinXP computer, rather than in the back seat of Mom's car... but the kind of fooling around is the similar.

      The scripting languages are easy to come by. Firefox with Firebug and a foss text editor like Notepad++ make an excellent Javascript development environment. Heck, for the cost of a dozen good condoms and a visit to Portable Apps a geek-thinking high schooler can put an entire development package, complete with web server and database, on a 2 GB stick and have huge amounts of room for code monkey play. How could any kid interested in science or engineering resist this? And it is SO much easier than finding someone who would be interested in exploring the intended use of the condoms...

      So no, I'm pretty sure parent post is wrong. That is, I doubt very much that most of the college freshmen in any of the technical schools today are programming virgins. The majority of high school students may still be virgins wrt programming experience... but those are not the ones who apply to, and get accepted into, technical schools.

      --
      Will
    82. Re:Oh come on. by squidfood · · Score: 1

      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.

      I've got a strong C background, and just ported a C program to Fortran (to interface with some scientific libraries doing highly parallel stuff). It was easy (F95 not F77), and in fact when I showed my code to Fortran programmers they said "derived types in fortran? I didn't know you could do that (you can)." I made much better structured code from having an C with OO background. Hardest thing was shifting thinking in arrays (0 vs 1 indexing) when you spend your life picturing how C arrays map explicitly to memory, the indexing seems artificial.

      Also, after C, weakly-typed interpretive languages (python, PHP, perl) were a piece of cake.

      In college? I learned Ada. Because in 1988 Ada was "the wave of the future." What a waste of time!

    83. Re:Oh come on. by Anonymous Coward · · Score: 0

      Most Australians promote drinking heavily. Don't single out your prof for it.

    84. Re:Oh come on. by squidfood · · Score: 1

      They're scientists in other disciplines who's primary goal is to write programs to figure out problems in their own fields of study.

      I'm a scientist who started with a programming background. Scientists doing tiny projects like the above (short scripts) can get away with this. I do it all the time. But when scientists try to scale their project up (into say a scientific package to be used and shared by others) watch out! They produce the worst code, full of globals, spaghetti, messes, ugliness that's a nightmare.

      At the very least, scientists should have a course in a language that makes them think about types, containment, scope, modularity etc. otherwise you end up with code that makes reproduceability (a key to good science) nearly impossible.

    85. Re:Oh come on. by Anonymous Coward · · Score: 0

      Except then you still have to learn a usable language after you graduate... while you're unemployed.

    86. Re:Oh come on. by jason.sweet · · Score: 1

      The features you labeled 1, 2 and 3 are not limited to COBOL. Any "modern" language is capable of doing these things. The primary deficiency I find in COBOL is "that you really can't get too fancy in the code without it becoming unreadable and unmaintainable." Many problems require "fancy" solutions, and the key to making fancy solutions readable and maintainable is refining the solution into discrete, maintainable components. While it is possible to do this in COBOL, I find that it is much easier in other languages.

      ASP.NET? Your frustration is understandable now. Remember that the scope of a single code-behind is probably analogous to the scope of a single mainframe job. If there is a chance that your first JCL step might not create the file that the second step uses, then you put a condition on the second step. You have to do the same thing in your .NET app. If their is a chance the object didn't get instantiated, you put a condition on using it.

    87. Re:Oh come on. by John+Anonymous · · Score: 1

      I've never seen Python used in scientific research, except in control scripts or GUI front ends.

      I work for a company that does research in the physical sciences. Our scientists use a variety of languages; whatever tool fits the job, so to speak. We have clusters that run Fortran codes. We have folks who write mostly C++. We also have a lot of folks who use Matlab and Python. Those are great languages for exploring ideas-- you can write and modify code very quickly. Not to mention Matlab and SciPy have some really nice routines. Just because you haven't seen Python in scientific research doesn't mean it doesn't happen.

      One of the issues is that scientists are not necessarily good software engineers. In fact they're usually not good software engineers. The scientists who are good programmers usually write highly optimized algorithms. There are also those who know nothing but Fortran and have no idea what OO is or how it might help them. For many projects, Python would be a huge time-saver. But they're mired in their ways and use Fortran for even just little I/O projects, like transforming data from ASCII to NetCDF, spending hours doing something that could be done in minutes in Python.

    88. Re:Oh come on. by omuls+are+tasty · · Score: 1

      ...SDLC lifecycles

      I on the other hand believe that the paramount need is to teach them the principles of DRY repeat yourself.

    89. Re:Oh come on. by Will.Woodhull · · Score: 1

      There is a significant difference in orientation between Comp Sci majors and those who major in engineering or hard sciences.

      I'm inclined to think that the difference starts to show up in grade school. Here's a thought experiment:

      Give each of a bunch of eight year olds access to a Wikipedia article about time, a screwdriver, and a wind-up alarm clock and observe their behavior. Fast-forward ten years, and see which college track they choose.

      1. The future CompSci kids will look at the alarm clock, then start reading up about time. At some point they will wind up the clock and set the alarm, and so on. At some point they will tell you all about the escapement, and why digital time pieces are inherently more accurate, and they will tell you this whether you care or not.
      2. The future Science Majors will take the clock apart and play with the gears.
      3. The future Engineering Majors will also take the clock apart, but they will lay out all the pieces in order. Then some will attempt to put the thing back together again. Others will incorporate pieces of the clockwork into their Legos sets.

      I would not expect CompSci majors to be particularly interested in computer languages: their focus should be on how computing in a more general sense works. They are neither technically oriented like engineers nor driven by the "how does it work" curiosity of scientists; they are like musicians who seek beauty in the melodies and harmonies of pure algorithms. I don't pretend to understand them.

      Remember, to an Engineer, the glass is twice as big as it needs to be.

      --
      Will
    90. Re:Oh come on. by Ohio+Calvinist · · Score: 1

      The problem to do that is to make a degree in physics be effectively a computer science degree. They're talking about teaching physics students "enough" programming to do "physics" stuff. Most of their programs are going to be "problem" based, not all encompasing applications to handle complex/dynamic/ever-changing business processes. Every second spent not programming gives the student more time to do other things, and hammering out a quickly implemented application that "works" does well.

      Whenever you move to a new language there is a learning curve, best-practices, langauge conventions, new APIs to learn so teaching them something, and doing it well gives them a good start, and they can learn the newer languages once they have some programming experience under the belt.

      In my experience (as an anecdote) junior programmers who have solid language experience are quicker and more innovative than programmers who have strong fundamentals but minimal actual lines-of-code experience (not to introduce a necessarily false dichotomy).

      --
      Forgive my spelling from time to time. I'm often posting during short breaks.
    91. Re:Oh come on. by Anonymous Coward · · Score: 0

      I took a course in college that switched to a new programming language every two weeks. I learned more about the theory of programming in that semester than I could have by focusing in any one language for four years.

    92. Re:Oh come on. by westlake · · Score: 1

      Studying arcane programming languages like COBOL doesn't prepare you well to write a business application

      Taking that to its logical conclusion implies that you should be studying how business works before writing a program to be used in business.

      The COBOL program reads as it does because it was assumed code would have to be reviewed by an accountant or other specialist.

    93. Re:Oh come on. by Anonymous Coward · · Score: 1, Insightful

      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.

    94. Re:Oh come on. by david_thornley · · Score: 1

      Memory management can be done with smart pointers. Most of the time, anyway. It's not nearly as bad as it was. STL containers also help immensely, and std::vector does provide an .at() member that's a range-checked [].

      Direct pointer manipulation isn't a problem. Pointer arithmetic is. Combining pointer manipulation with objects with addresses is confusing (which does happen in Java, with int vs. Integer).

      You don't have to use multiple inheritance to use C++, and it wasn't in C. Not to mention there's plenty of cases where MI is useful and not a problem.

      One issue with C++ is that, if you want to do something screwy, the implementation's not likely to stop you, particularly if you insist (like with a reinterpret_cast). It's really, really easy to abuse something like operator overloading or multiple inheritance and make a real mess. C++ is a language that's been overused by people who don't know better.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    95. Re:Oh come on. by Richard+Steiner · · Score: 1

      While I generally agree, you obviously don't know much about the airline industry, where new Fortran development still happens all the time. :-)

      --
      Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
      The Theorem Theorem: If If, Then Then.
    96. Re:Oh come on. by icebrain · · Score: 1

      geek-thinking high schooler can put an entire development package, complete with web server and database, on a 2 GB stick and have huge amounts of room for code monkey play. How could any kid interested in science or engineering resist this?

      Err, maybe they'd resist it because they just don't care about programming? You're still thinking inside the box of a CS person here. Just because it's easy to get all of that programming now doesn't mean the kids are going to be interested in it. They're likely to be spending that time doing something else that's interesting to them--maybe taking flying lessons or building model airplanes (for the aero guys), working on cars (for the mechanical engineers), or working a summer job in the construction field (target^H^H^H^H^H^Hcivil engineers).

      I'm a recent college graduate (got out two years ago); went to Georgia Tech. I still keep in touch with several friends still attending, and though them meet a lot of the freshmen coming in. Very few of the non-CS majors have any kind of programming experience at all.

      --
      The meek may inherit the earth, but the strong shall take the stars.
    97. Re:Oh come on. by martyros · · Score: 1

      That said, having some reasonable choice for a language I think is pretty important. Teaching people algorithms in a made-up assembly language because "it's all mathematically equivalent" is like teaching someone all about linguistics using only Esperanto, and then sending them to China to translate. If you don't have a "real" language that someone uses, you're not going to know why proper documentation is important, or have a real grasp of other "non-coding" aspects of programming.

      Dijkstra's idea of using a functional language for the first year to get people to think a certain way (I think that was it) may be a good pedagogical tool, but it has to be followed up with a language people are likely to encounter.

      --

      TCP: Why the Internet is full of SYN.

    98. Re:Oh come on. by Anonymous Coward · · Score: 1, Insightful

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

    99. Re:Oh come on. by Anonymous Coward · · Score: 0

      People who sneer at Fortran are invariably people who have never in their lives done a serious calculation. "Modern" languages are fine for doing trivial things.

    100. Re:Oh come on. by sycodon · · Score: 1

      What I don't get is why, if asp.net is smart enough to know that an object has not been set to an instance...blah blah..., why doesn't it tell me which object has not been set?

      "Doesn't Work" is not very conducive to debugging.

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    101. Re:Oh come on. by westlake · · Score: 1

      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.

      But in fact the world does depend day-to-day on the "semi-skilled" worker. The worker who understands the problem well enough to get the job done.

      The plumber - to use your own example - knows the basics of sanitation. He knows how to work with pipe.

      He will have learned quite a bit of about water, electricity. Methane. Natural Gas. Carbon Monoxide. Carbon Monoxide - and the many and interesting ways they can combine to kill you.

      That does not make him a hydraulic engineer, a microbiologist or toxicologist.

    102. Re:Oh come on. by vaz01 · · Score: 1

      Getting rid of memory management and multiple inheritance from C++ doesn't begin to give you Java.

      Operator overloading? virtual, pure virtual functions? namespaces (not quite like packages)? Templates? (Even Java generics are less convoluted.) Destructors? Global variables? Const correctness?

      I'm not much of a fan of Java (the language), but C++ is just awful. I waste more time when I write C++ than I gain (compared to writing object-oriented C).

      C++: An octopus made by nailing extra legs onto a dog.

    103. Re:Oh come on. by colinrichardday · · Score: 1

      languages like C, C++, and Fortran tend to run much more efficiently than abstracted (and usually interrupted) languages like Python and Perl.

      Well maybe if you stopped interrupting them, they'd run faster!

    104. Re:Oh come on. by Anonymous Coward · · Score: 0

      Except that the last 1/10 involves writing a monad for printing your result to screen...

      Seriously, though, MATLAB is a much better language for starting engineers, and it's what most universities I know teach as well.

    105. Re:Oh come on. by Anonymous Coward · · Score: 1, Interesting

      It's funny that you should cite that paper. When Backus said "functional programming", he didn't mean Haskell. Rather, he was referring to a style of programming where everything (even numbers) are functions, and complex functions are created solely by composing other functions. In other words, there are no variables.

      In my experience, most people have a much easier time understanding abstract concepts when they are given examples. A function declaration in a language like Haskell is, essentially, an example; i.e. "if you call this function in this way, you'll get this output". If you have no variables, then you have no examples.

      Backus was undoubtedly a genius -- his name is in Backus-Naur Form, among other things -- but there's a reason that no one uses the language he described in that paper.

    106. Re:Oh come on. by janwedekind · · Score: 1

      When electronics students threaten me with their home-made software I fight back by putting together some circuits. I love to see them recoil in disgust.

    107. Re:Oh come on. by markkezner · · Score: 1

      Why would anyone learn\teach assembly as a first language? It's definitely not the kind of thing I would give to a freshman who has never programmed before, partly because it's too abstract. It's architecture specific, and also, they would not learn about functional programming or good OOP practices. That aside, most programmers in the business world do not use it on a day to day basis.

      What is it about visual basic that makes it a better first language than python anyhow?

      I'm happy for you that you have such a strong will, but would you please justify your convictions with a reason or two?

      --
      Dangerous, sexy, turing complete: Femme Bots
    108. Re:Oh come on. by cyberthanasis12 · · Score: 1

      But the free g95 compiler (www.g95.org) does support parallelization, which is superbly integrated with the rest of the language, according to the unofficial Fortran2008 standard. I have even written a paper using Fortran parallelization; it took me a couple of weeks from the idea to the implementation of fully parallel algorithm :)

    109. Re:Oh come on. by crumley · · Score: 1

      FORTRAN is really easy to pick up later anyway as it's "old fashioned" and line numbered based. I'd think the biggest problem teaching the class now would be getting students to take it seriously because it's a much older way of thinking about programs from our modern OOP languages.

      Fortran is line numbered based? What does that mean? You don't even have to use line numbers in f77, much less f90 or later. Yikes.

      --
      Preventive War is like committing suicide for fear of death. - Otto Von Bismarck
    110. Re:Oh come on. by Anonymous Coward · · Score: 0

      There ya go. I had a professor that built his own language and compiler to teach some of this.

      AND he named it KLUDGE.

      Now about that FORTRAN, which one?

      I
      II
      II
      IV
      66
      77
      9X
      Watfiv
      ??

      Gotta be a little more specific, here guys.

      PS: I loved FORTRAN, but I hated a good bit of the code I received from other "developers". They obviously didn't listen to their professors.

    111. Re:Oh come on. by chthonicdaemon · · Score: 1

      There is definitely a feeling of expressiveness being similar to practical power in languages. I think Paul Graham summed it up well here: http://www.paulgraham.com/avg.html

      --
      Languages aren't inherently fast -- implementations are efficient
    112. Re:Oh come on. by chthonicdaemon · · Score: 1

      Unfortunately, Haskell lacks good syntax for vector/matrix operations (by good I mean something that remotely resembles the formulas I have in my text book) and no clear way to create it. The infix operations are easy to make, but the slicing and the conditional assignments are very hard. And, let's face it, if you're doing numeric work, most of your problems are matrices and vectors.

      --
      Languages aren't inherently fast -- implementations are efficient
    113. Re:Oh come on. by Sudheer_BV · · Score: 1

      The point is why study COBOL at all? You could always write code in a current day programming language. It is very obvious that the programmer understands what he/she is writing. Needless to say, in the industry there are things like spec, prototype, design, tests, mock up, etc. If the students study a programming language better suited to be used in present day business applications it exposes him/her to modern day concepts and implementations. I cannot imagine how COBOL helps someone understand how to write modern business applications.Teaching COBOL to undergraduate students isn't very productive.

      --
      Sudheer Satyanarayana
      www.techchorus.net
    114. Re:Oh come on. by Will.Woodhull · · Score: 1

      You're still thinking inside the box of a CS person here.

      No, I don't think so. I'm more of an engineering-technician type; I have no more understanding of CompSci guys than I do of other theoretical knowledge workers like mathematicians and cosmologists. Or musicians. I work with nuts and bolts. I don't care why this algorithm is better than the others for a given application; I just want to know how to measure its fitness for purpose and how to implement it in code. Since I'm currently focused on web development, it's all rather simple. Compared to the problems in accuracy, reliability, and transparency that Fortran is designed to handle.

      --
      Will
    115. Re:Oh come on. by DrgnDancer · · Score: 1

      I got several replies like this to a similar comment I made farther up. I think I fell into the "I have a hammer, everything looks like a nail" trap, since I've worked mostly on big parallel computing boxes. All the scientific apps I've seen use C derived languages or Fortran, but I have not seen all scientific apps. Having said that, since many if not most hard scientists eventually want to utilize the power of large parallel computing systems, it still makes sense to me to teach the harder low level languages first. If only because to tends to be easier to learn scripting languages from a low level language base than vice-versa.

      --
      I don't need a million points of light, just two points of multi-mode fiber and a 10 Gig-E router.
    116. Re:Oh come on. by socrplayr813 · · Score: 1

      Get off your high horse. Quick and dirty programs written to help with calculations or sorting/analyzing data hardly have the same effect as real-world problems.

      I'm an engineer and work in the medical device field. There is no way in hell I'd let you or 99% of Slashdot try to do my job without one of a specific set of engineering degrees and at least several years of experience in the company/field.

      I can use my primarily self-taught programming skills to write working programs that do useful work. If you screw up a structure or medical device, the consequences are a bit bigger than if I screw up a program that sorts my validation data for me. I have to sort my data by hand. You pay fines, lose your ability to sell things, get fired, or even go to jail. Let's just hope you don't kill anyone. It's not the same.

      That's not to say that I don't respect programmers, but the vast majority of programming does not have nearly the effect of the engineering work you're talking about.

      Let's just leave it at this: You don't engineer anything more complicated than your basic car maintenance and I won't write programs that are sold for thousands of dollars.

      --
      The confidence of ignorance will always overcome the indecision of knowledge.
    117. Re:Oh come on. by Anonymous Coward · · Score: 0

      "....or force the professionals to use only tools designed for amateurs"

      Does this apply to GNOME ?

    118. Re:Oh come on. by shutdown+-p+now · · Score: 1

      Real men know that the name of the programming language 'Ada' is not an acronym.

      But it is. It means "Ada, dear Ada!".

    119. Re:Oh come on. by shutdown+-p+now · · Score: 0, Troll

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

      I find it ironic how there's lot of vitriol directed at the "unsafety" of VB (which is definitely quite real), while it still has a long way to go to reach Perl in that department.

    120. Re:Oh come on. by DarkIye · · Score: 1

      To clarify your pudding simile, I think you're talking about the fact that python gives you lovely shortcuts and different ways of doing things which help make programming more intuitive - too intuitive. I did exactly the same thing - I started with Perl, and then found myself floundering when I couldn't use foreach or until, or use special variables, in other languages.

    121. Re:Oh come on. by Anonymous Coward · · Score: 0

      I don't know about all that. I taught myself python first and when I got into a C++ class I already understood all of the basic concepts and stuff they didn't cover like exception-handling, databases, etc. It didn't hinder me at all. Nowdays I use python as a prototyping language and do the real stuff in C++. It was a fun way to be introduced to all the concepts and be able to get real results without drowning in all the hardcore stuff right away. YMMV...

    122. Re:Oh come on. by Richard+Steiner · · Score: 1

      I play with C, C++, and Fortran on a regular basis, and well-written Fortran is a lot easier to deal with (IMO) than the other two...

      --
      Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
      The Theorem Theorem: If If, Then Then.
    123. Re:Oh come on. by Count+Fenring · · Score: 1

      Taking that to its logical conclusion implies that you should be studying how business works before writing a program to be used in business.

      Heh. The current state of the U.S. Economy actually offers a pretty strong argument for that.

    124. Re:Oh come on. by n30na · · Score: 1

      I guess people are different

      Some people like languages that are more "readable" - use words over symbols, but I far prefer symbol-heavy languages, where most readable things are variables and objects. I guess to me, it makes symbols, particularly structural ones (code blocks, etc) easier to pick out at a glance, since they're unique in their usage, not a sea of letters. I think it depends on the kind of coding too, though. I tend to work with relatively abstracted and object-driven things.

    125. Re:Oh come on. by n30na · · Score: 1

      Subnote: I also use a good bit of C# (yes, i know evil M$, but you can blame my employer for that)

    126. Re:Oh come on. by Anonymous Coward · · Score: 0

      More accurately, it's statement-numbered-based. That is, you need to use statement numbers where in other languages you would use statement labels. It has nothing to do with actual line numbers in the source file.

      You're right that statement numbers, for the most part, can be avoided as of f77. On rare occasions they're handy for such things as computed GOTOs, 'loop break' GOTOs and FORMAT statements that are re-used heavily.

      Personally I much prefer other languages now, but I still have fond memories of Fortran as my first serious language. However, I would not recommend it as a first language -- even in its current OOP forms -- because so many superior and more popular OOP languages are available.

    127. Re:Oh come on. by DMUTPeregrine · · Score: 1

      No, they use APL. I won't post examples, the characters probably won't print.

      --
      Not a sentence!
    128. Re:Oh come on. by jbolden · · Score: 1

      C++: An octopus made by nailing extra legs onto a dog.

      You definitely earned funny points for that one. I got a good laugh.

      Operator overloading?

      Not sure if that makes C++ harder. But I've seen people disagree.

      Destructors?

      finalize

    129. Re:Oh come on. by beelsebob · · Score: 2, Interesting

      Rather, he was referring to a style of programming where everything (even numbers) are functions, and complex functions are created solely by composing other functions. In other words, there are no variables.

      Yes, he meant lambda calculus based languages... Like Haskell, in fact, Haskell is one of the most heavily lambda calculus based languages.

      but there's a reason that no one uses the language he described in that paper.
      Yes, because the language he describes there is the assembly code of functional programming. There's similarly a reason why people don't (usually) use asm.

    130. Re:Oh come on. by Anonymous Coward · · Score: 0

      Well I may only be in in High School but even there, the medium IS the subject of the lesson, not the concepts.

      At school, we are taught to use VB6, not how programming should be done, but just VB6 and this daft pseudocode that is so verbose, you'd be aswell just writing it as an essay. Now I know this is simply high school, But I fear that many of my generations future programming are currently getting their first bite into programming with this teaching style. I personally have taught myself PHP and currently learning Java in my spare time so its not for me personally, but the way in which they teach it makes it almost a complete waste of time to bother at all.

    131. Re:Oh come on. by Kotoku · · Score: 1

      Modern business curriculum at many schools includes high level mathematics. I guess the same reason. For their amusement.

    132. Re:Oh come on. by quanticle · · Score: 1

      The way I see it, Paul is using Lisp as a sort of admissions test. If you're motivated and bright enough to learn a "useless" language like Lisp on your own, you're motivated and bright enough to do excellent work in whatever language you're given. I maintain that Paul Graham's results came not from his choice of Lisp, but his choice of self-taught Lisp programmers (are there any other kind?). He could have had them programming in Java or even COBOL and his company would still have run circles around the competition.

      The problem is that, if everyone starts using Lisp, as Mr. Graham advocates, the value of knowing Lisp goes to zero. If everyone knows Lisp, then one can't use that as a measure to distinguish bright programmers from average ones. In that case one might have to use another, even more esoteric language (Brainfuck, perhaps?) to demonstrate aptitude and motivation.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    133. Re:Oh come on. by vaz01 · · Score: 1

      C++: An octopus made by nailing extra legs onto a dog.

      You definitely earned funny points for that one. I got a good laugh.

      Me too, I'm not sure who gets credit for the quote though.

      Operator overloading?

      Not sure if that makes C++ harder. But I've seen people disagree.

      I like the idea of operator overloading a lot. In Ruby it's great. I find it a bit cumbersome in C++ though, things like dealing with friend/global functions, e.g. for appending to a stream with <<.

      To the credit of operator overloading and templates, they make the standard library interfaces mostly nice.

      Destructors?

      finalize

      Unfortunately finalize is incredibly quirky as you have absolutely no say or guarantee about when your object will be gc'd. I've tried a few times to find the "right" way to use finalize and it seems to be almost always discouraged.

      For me: What makes C++ difficult is ++. :)

    134. Re:Oh come on. by budgenator · · Score: 1

      I took 3 languages formally, FORTRAN, COBOL and RPG II, RPG II is pretty dead now but 2 out of 3 ain't bad.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    135. Re:Oh come on. by Anonymous Coward · · Score: 0

      1. Backwards-compatibility with previously-written mathematical libraries is an empty excuse for "must teach noobies Fortran". Those libs can be re-written in any decent procedural language (and probably in some non-procedural ones, as well).

      2. _Which_ Fortran were you planning on teaching the noobies? I learned BASIC, assembly, and FORTRAN-IV were my first languages (and I enjoyed them), but those were poor languages for teaching data structure concepts.

              Fortran-90 has many modern features, but is a mutated Giant Blob which only vaguely resembles its predecessors. You get the worst of both worlds with F-90.

      3. Backward compatibility with mathematical libraries written in old flavors of FORTRAN is an empty excuse. There's no reason they can't be re-written in a modern language (or called with a wrapper).

      Pascal was the first "nice" language I learned, followed immediately by C.

      Does anyone out there remember "Gear's Assembly Language"? It assembled code for a simplified-for-teaching-purposes artificial computer architecture. The assembler and VM ran on our Control Data Corporation 3300L. Oddly, Google doesn't return any useful results ^_^. It'd be fun to dig that up and port it to a modern PC.

    136. Re:Oh come on. by Glonoinha · · Score: 1

      Just curious - from your understanding, how much COBOL code is out there still running today?

      --
      Glonoinha the MebiByte Slayer
    137. Re:Oh come on. by Anonymous Coward · · Score: 0

      Yes, but with a good functional language like Haskell, you're 9/10 of the way there, not 2/3.

      I see.
      So you are saying that FORTRAN is like getting a hard-on in the showers in front of the boys while talking about the cheerleaders you gang-banged the previous day, while Haskell is akin to a mass of oily male bodies with Cher and Celine Dion singing on the background.
      I will keep using C, thank you.

    138. Re:Oh come on. by ceoyoyo · · Score: 1

      Agreed. Because once you use Python you won't want to use anything else.

      Well, except when you decide it's time to drop down to assembly, of course.

    139. Re:Oh come on. by dcam · · Score: 1

      Keep multiple inheritance. Java and C# are somewhat crippled by the lack of multiple inheritance.

      --
      meh
    140. Re:Oh come on. by DoubleReed · · Score: 1

      What makes C++ difficult is C. That is

      1) Deallocation of memory, bounds checking in arrays... is done manually

      2) Lots of direct pointer manipulation. You can't abstract away the "how the computer is going to do this"

      3) Multiple inheritance

      Getting rid of those things gives you Java which is much easier to learn but doesn't have the performance. The question is why did you choose C++ in the first place if you don't want the excellent performance?

      What makes C++ difficult is the pointlessly complicated syntax and type system. What makes it worse, is all the top C++ people from Djikstra on down sing the praises of how templates are going to save the world, whereas in practice no compilers exist which can handle them the "proper" way. The problem with C++ is that the language design would never give AN INCH on theoretical perfection to accommodate practical considerations. Djikstra's book talks about "programming units" instead of files, just in case you should happen to be storing your code someplace other than a file system. This kind of pointlessly baroque exercise is the problem, trying to make today's technology work better with hypothetical future technology that doesn't exist.

      20 years on, and there still does not exist a compiler which can handle templates in the "proper" way that the books tell you they should be.

      The good part about C++ is that it has a basically usable sub-language inside it, namely C. In my (limited) experience, as C++ is used practically it is basically just C with this syntactic sugar:
      do_something(my_stuct*) ===> my_class::do_something()
      </rant>

    141. Re:Oh come on. by Anonymous Coward · · Score: 0

      DRY repeat yourself.

      You fail at DRY

    142. Re:Oh come on. by chthonicdaemon · · Score: 1

      So you're saying that, in your experience, all languages have similar power? Or at the very least that programmer skill and motivation is far more important language choice. That doesn't jibe with my experience at all. I have learnt many languages and I find that using them idiomatically gives benefits in their specific areas of expertise. I also find myself missing more things in some languages than others.

      Now, I don't think Lisp is necessarily the solution, but I think Paul has a point with his Blub paradox -- I have seen this argument from many people who are used to their tools. You say 'but, I can do X and Y with Blub'. They say 'but I can do the same thing in Excel'. Or VB or C or whatever. Because of the whole Turing completeness mess, you can pretty much do anything in any halfway decent language. What isn't clear from Turing completeness (and actually, one of the reasons for developing Turing tarpits like brainfuck) is that Turing completeness doesn't guarantee usability and language power. And that's what it's all about.

      BTW: comparing Lisp with Brainfuck is a really low blow. You need to distinguish between esoteric languages that were often designed to be hard to use (intercal, brainfuck, etc) and languages that were designed to be easy to use or powerful, but just haven't become popular (Lisp, Haskell, etc).

      --
      Languages aren't inherently fast -- implementations are efficient
    143. Re:Oh come on. by daver00 · · Score: 1

      You make the assumption that a scientist (or engineer) needs to be a good programmer. This is a totally false assumption. Coding math is goddamn easy, and requires nearly no understanding of computing other than floating point error and some basics on recursion. Scientific computing is far more about learning methods for numerical analysis, convergence of sequences, series, truncation errors and so on. You don't need to be a good programmer when all you really need to do is convert the units of 100000000000 data points you have stored in some text file and run them through a simple power law you worked out on the back of a napkin. The algorithms are there for you, no scientists would develop his own, they likely lack the skill in mathematics to do this effectively anyway.

      Its fairly obvious in this /. discussion who the scientists are and who the programmers are, because when it comes down to it scientific programming is only a slightly higher level than manipulating an excel spreadsheet (and you can achieve basically all of it using excel too!).

      This reminds me of the age old battle royale of Mathematicians vs Engineers. Mathematicians never let up about how poorly engineers understand maths but they are entirely missing the point: engineering is about achieving outcomes, it has nothing to do with mathematical rigor! This whole debate on programming is entirely analogous, goddamn programmers are being as arrogant as a bunch of mathematicians here. Meanwhile the scientists and engineers are out solving problems within tolerable error.

    144. Re:Oh come on. by mgblst · · Score: 1

      I think using matlab can do this, and even easier...

    145. Re:Oh come on. by MariusBoo · · Score: 1

      Do tell about the unsafe parts in C# "when it comes to data typing".

    146. Re:Oh come on. by Anonymous Coward · · Score: 0

      Do you mean 2.0/3 ?

    147. Re:Oh come on. by upuv · · Score: 1

      I would argue it's not that there is a disdain for the language but rather...

      Would it not be better to teach someone a language that they might be able to use for decades. As you say the good ones will adapt and flow into the next language/technique/style/idiom/trend.

      I feel there is zero point in teaching a language that quite simply is of no relevance to getting something done in Business or Research.

      FORTRAN should be dead.
      COBOL lives on because bean counters can't under stand the concept of upgrading.
      Pascal not actually a bad language. Long in the tooth, Got a few wrinkles down around the ankles but not bad.

      I have to agree on the pop language front. I see no need to become the GURU in Ruby in the next 10 years.

      P.S. This is a hint. The language that will truly change computing will be the language that allows us Apes to comprehend and write "true" multi threaded/core applications. I mean like 1000's of separate execution units working together for common purpose. ( Oh crap that's world piece not computer languages. )

    148. Re:Oh come on. by upuv · · Score: 1

      Doh. Peace / Piece

    149. Re:Oh come on. by Philip_the_physicist · · Score: 1

      The most hardcore CS lecturer at my University, as an undergrad, hand-coded the opcodes for entire programs into arrays of floats which he then executed, in order to meet the requirements that programming assignments had to be submitted as Fortran. Since then he has only become more epic, and so his students have updated WWJD? to WWDKD? in his honour.

    150. Re:Oh come on. by Raedwald · · Score: 1

      but for math geeks FORTRAN is probably the easiest language to get from pencil-n-paper to computer.

      What utter crap. As if you can't write mathematical expressions in any other language. Tell me, what features does FORTRAN have to assist transition from paper-n-pencil to computer, that other languages do not? FORTRAN has NO useful features that other general purpose high level languages lack. It also has vast quantities of legacy cruft that rot the brains of those who learn and use it.

      --
      Ne mæg werig mod wyrde wiðstondan, ne se hreo hyge helpe gefremman.
    151. Re:Oh come on. by speedtux · · Score: 1

      I wouldn't consider C++ "going beyond" Python; C++ is a bloody mess.

      Python is an excellent preparation for most languages other than C/C++, and the fact that people may have a hard time switching to C/C++ is not a strike against Python but a strike against C/C++.

    152. Re:Oh come on. by speedtux · · Score: 1

      The idea of programming as a semiskilled task, practiced by people with a few months' training, is dangerous.

      Even more dangerous is the idea of programming language design as a semiskilled task, which is, unfortunately, what has happened with C++.

      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.

      Professionals don't use C++; professionals use tools that are productive and don't get in the way. Aging grad students who love complexity for complexity's sake use C++.

    153. Re:Oh come on. by speedtux · · Score: 1

      Unfortunately GNU Fortran doesn't support this yet (unless it has been enabled lately).

      GNU Fortran supports OpenMP, MPI, and PVM; those are the current de-facto standards.

      G95 implements the new parallel Fortran primitives, but hardly anybody uses them yet, and they are still rather unproven.

      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.

      C# is, in fact, an excellent language to teach about type safety because it has an explicit "unsafe" construct. Ada has similar back-doors, but actually a lot less error checking; Ada is cumbersome, not safe or well-designed. Java is a toy language.

    154. Re:Oh come on. by Anonymous Coward · · Score: 0

      Um, the object upon which a method was being called when the exception was thrown? It's never ambiguous, but your debugging skills may require an upgrade...

    155. Re:Oh come on. by Anonymous Coward · · Score: 0

      Just out of curiosity, why is guy who merely agrees with +5 Insightful guy modded Troll?

    156. Re:Oh come on. by XDirtypunkX · · Score: 1

      Hand coding them into floats would be impressive, especially seems that not all binary values are legal floats, so there are some opcode combinations you just couldn't do.

    157. Re:Oh come on. by jbolden · · Score: 1

      I think I'm losing you. What book of Djikstra is about C++? What is the "proper way" to handle templates?

    158. Re:Oh come on. by bh_doc · · Score: 1

      Being somewhat a math geek I've always considered Haskell, or functional languages more generally to be much more "mathematical" than any imperative languages. Admittedly Haskell has much less history than Fortran.

    159. Re:Oh come on. by SL+Baur · · Score: 1

      Yep, real men use ADA. ...And drink very heavily.

      I think I've worked with you and many of your clones. Are you something like an anti-Twitter?

    160. Re:Oh come on. by SL+Baur · · Score: 1

      Actually, the most hardcore lecturer/professor at my University in Australia both promoted the use of Ada and drinking heavily. I guess he taught me how to be a man.

      Programming in Ada certainly put hair on my gf at the time's chest. Ewww.

    161. Re:Oh come on. by SL+Baur · · Score: 1

      Indeed, even the creator of Fortran said "actually, that was a shit idea

      Interesting link. John Backus is one of the Great(est) Ones. Whatever you think of the evolution of FORTRAN, it was historically a critical turning point in programming. The folks who refused to consider anything other hand coded assembly language were discredited forever with his FORTRAN compiler.

      BNF (the "B" is for Backus) is about equally as important. I wonder, teaching language for language sake, should BNF be the first language taught to students. I can think of a lot of reasons why it should be.

      (From a pragmatic standpoint). My CS101 was in FORTRAN. I've never been paid to code a single line in FORTRAN, no biggie[1]. I've been in many situations where sorting out input via BNF and situations where I'm maintaining code that the author obviously had no clue about it.

      [1] I took CS101 when I was still in High School through a special program and it was a lot more fun helping coeds doing their homework than the course work itself. There's a lot to be said about punch card rooms for socializing.

    162. Re:Oh come on. by Philip_the_physicist · · Score: 1

      Amazingly, he only messed up once, although when he did he took down the test server it was running on, and nearly got himself suspended for doing so, as he had never explained to the staff what he was doing, and they saw code with a huge block of embedded crap in it, but luckily he was able to demonstrate that all his previous work had been done in the same way without problems.

    163. Re:Oh come on. by Anonymous Coward · · Score: 0

      Was he called Bruce?

    164. Re:Oh come on. by jbolden · · Score: 1

      I agree its a great feature but it also is complicated. Small changes in one part of the code can introduce behaviors wildly apart. A minor syntax change could make it safer:

      If X inherits from A and B the method call must be explicit as to whether A or B's method is being called; which could still introduce compiler errors but at least not the subtle bugs. I guess the only safe things is that all methods need to be explicit.

    165. Re:Oh come on. by Anonymous Coward · · Score: 0

      Ada is not ADA. Real men will tell you that.

  3. YES... by Anonymous Coward · · Score: 0

    I had to learn it. Everyone else should have to go through that hell!

  4. How would you learn? by CRCulver · · Score: 3, Interesting

    Are there any cheap but quality tutorial for Fortran? O'Reilly has no contemporary introduction to the language and their last book on Fortran, Migrating to Fortran 90 , came out nearly two decades ago.

    1. Re:How would you learn? by wireloose · · Score: 4, Informative

      google Fortran tutorial download

      How new does the book need to be for the language standard when it hasn't changed much in 2 decades? It's a simple, easy to use tool for serious engineering.

    2. Re:How would you learn? by oldspewey · · Score: 3, Funny

      All the good tutorials are on punch cards, so unless you have a reader handy you're SOL.

      --
      If libertarians are so opposed to effective government, why don't they all move to Somalia?
    3. Re:How would you learn? by GPSguy · · Score: 1

      Actually, my favorite, and I've taught from it is "The Fortran Coloring Book". It's not a bad intro text, a little whimsical, and covers all the basics pretty well.

      --
      Never ascribe to malice that which can adequately be explained by tenure.
    4. Re:How would you learn? by bunratty · · Score: 4, Interesting

      How new does the book need to be for the language standard when it hasn't changed much in 2 decades? It's a simple, easy to use tool for serious engineering.

      Actually, Fortran has changed quite a bit in the last two decades. The Fortran 90, Fortran 95, and Fortran 2003 standards have come out during that time. They added quite a number of major features, such as free-form source code, recursive procedures, operator overloading, dynamic memory allocation, and object-oriented programming. The Fortran of 2009 is not like the Fortran of 1989 at all.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    5. Re:How would you learn? by idontgno · · Score: 2, Funny

      Real men can read Hollerith like Braille.

      At 20 cards per second.

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
    6. Re:How would you learn? by wireloose · · Score: 2, Interesting

      I really just meant from Fortran 90 like the previous poster. 95 is really pretty minor in changes. 2003, yeah, big changes. How many systems are likely to have 2003 on them? I can usually find a Fortran 90 compiler freely available for lots of platforms, and lots of the companies I know that use it use 90 or 95 because they had it already for their older legacy hardware. Specifically, I prefer Gnu and its current production release (4.30) really isn't 2003 compliant yet. http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gfortran/Standards.html#Standards

    7. Re:How would you learn? by Anonymous Coward · · Score: 0

      I was hoping to find a Fortran For Dummies or a Head First Fortran book.

    8. Re:How would you learn? by Sparcler · · Score: 1

      If you are serious about learning Fortran then you should start with Fortran 77, most Fortran code out there will be written in the 77 standard. The newer standards may have better ways of doing things, but they are not used as much in the real world. In my department both of our Fortran applications are written in Fortran 77. Our weather satellite application as well as our data feed application, are both \written in Fortran 77. These are just two applications, but I think you will find that a significant portion of the code out there that must be maintained, will be written in Fortran 77. It may seem odd but the best books on Fortran will be the older ones. The book I learned Fortran from was originally published in 1989, the revision I used mentions the later standards but it only discuses how thees standards differ from the 77 standard.

    9. Re:How would you learn? by Anonymous Coward · · Score: 0

      Dont be fooled, attendance at a industry standards meeting should be a compulsory experience for any sane developer, you can see perfectly reasonable people advocating absolutely daft proposals in the persuit, as in OOXML, of ___MONEY___.

      So, for example, adding "if E1 then C1 elsif E2 C2 else C3" to FORTRAN has NO downside and cleans up GOTO, SWITCHON is also OK, ___BUT___ recursive functions, dynamic ..., object ..., and overloading are (a) not needed, (b) complicate the semantics so either (1) more overhead is required, all the time, or (2) desirable optimizations are no longer possible.

      This is all caused by academics or tools-engineers who have a common interest in selling more complex tools.ÂRecursive functions make this point most clearly, in a general purpose programming language eg Python, recursive functions are the norm, that is convenient, but in a numerical programming language they are by and large un-necessary so you need to add RECURSIVE to the syntax, extend the language and take the risk someone recursively calls a non recursive function or you dont bother. What YOUÂDOÂNOTÂWANTÂTOÂDO is make the compiler assume all procedures be recursive and have to run a stack and allocate all locals on it. This can easily halv program speed!

    10. Re:How would you learn? by mako1138 · · Score: 1

      When I had to work with Fortran 77, I just went to the first google hit for "fortran tutorial".

      http://folk.uio.no/steikr/doc/f77/tutorial/

      It's pretty straightforward, once you understand the archaic numbering and spacing requirements. Fun in a strange way.

    11. Re:How would you learn? by Anonymous Coward · · Score: 0

      Excellent but may not qualify as cheap: "fortran 95/2003 explained" by Metcalf, Reid & Cohen. Oxford, 2004.

    12. Re:How would you learn? by rutlandn · · Score: 1

      ...their last book on Fortran, Migrating to Fortran 90 , came out nearly two decades ago....

      The clue's in the title, really

    13. Re:How would you learn? by godrik · · Score: 1

      I needed to learn fortran in january. I got quickly some slides of a physic teacher online and learned the syntax quite easily from them. I am not sure a book is needed here. Of course, I have probably missed some subtle points, but I got enough of it to understand/debug/optimize some piece of code.

  5. While there may be "newer" languages by wireloose · · Score: 5, Insightful

    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.

    1. Re:While there may be "newer" languages by conspirator57 · · Score: 1

      so is machine/assembler code, but you don't see nearly the advocacy for it.

      --
      "If still these truths be held to be
      Self evident."
      -Edna St. Vincent Millay
    2. Re:While there may be "newer" languages by wireloose · · Score: 0

      Specious argument given the readability and additional expertise required to manipulate registers and stacks in Assembly.

    3. Re:While there may be "newer" languages by mdwh2 · · Score: 0

      Citation needed.

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

    4. Re:While there may be "newer" languages by k2enemy · · Score: 5, Insightful

      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.

    5. Re:While there may be "newer" languages by Falstius · · Score: 4, Informative

      Fortran has tons of libraries specialized to whatever scientific field you are working in, and is unavoidable in high energy physics especially. Of course, most of these can be wrapped in C and then used in whatever high level language you like.

    6. Re:While there may be "newer" languages by MathFox · · Score: 3, Insightful
      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.

      --
      extern warranty;
      main()
      {
      (void)warranty;
      }
    7. Re:While there may be "newer" languages by ChienAndalu · · Score: 4, Interesting

      Use both. I used Fortran to create some python modules at my last job, and it was dead easy. Take a look at this.

    8. Re:While there may be "newer" languages by pzs · · Score: 1

      Is Fortran really that much quicker than Python+Numpy? I'm genuinely interested. I do large data set numerical stuff with Python and I find the performance is pretty good. As an example, I can z-score an array of 40 million data points in less than 2 seconds.

      There is also decent support for linking in more high performance stuff, using Cython or Swig. I'm also not convinced that the execution speed benefits of a dated language like Fortran stacks up against the convenience of programming in Python. I would not want to manage the kind of complexity and variety I need to deal with in a language without modern OO support.

      I'd rather it took a few weeks to write and a few days to run than a few months to write and a few hours to run. I guess this depends how many runs you expect to do.

    9. Re:While there may be "newer" languages by conspirator57 · · Score: 0

      in order to get meaningful speed increases out of Fortran versus C you need to know many of the same things so that you can code mindful of them.

      --
      "If still these truths be held to be
      Self evident."
      -Edna St. Vincent Millay
    10. Re:While there may be "newer" languages by jstults · · Score: 5, Informative

      Fortran is still one of the best, fastest, most optimized tools for number crunching.

      Agreed.

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

      This is a strength of Python too.

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

      It's not either/or, with F2Py you can put your inner loops in Fortran, and deal with the higher level abstractions with Python. So you get fast number crunching and all the 'batteries included' too.

    11. Re:While there may be "newer" languages by Odonian · · Score: 1

      I say teach them the really old one I used on our PDP-8 in high school (Fortran IV maybe?). Anyway single-letter variables, some of them are ints and some are floats, and you just have to know which are which. Type in on an ASR 33 Teletype, print on paper tape to save. Fun times, fun times.

    12. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      Decades of well tested and well optimised libraries.

    13. Re:While there may be "newer" languages by aaaaaaargh! · · Score: 4, Insightful

      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.

    14. Re:While there may be "newer" languages by wireloose · · Score: 1

      I believe I stated that it was still "one of the best, fastest, most optimized" languages. I did not say in any way that it was "the best" but I did imply that it was a good one. I offered that as a response to the OP OP.

      If you want citations, find your own. I only offer this one: http://en.wikipedia.org/wiki/Python_(programming_language) - note that Python is considered primarily a scripting language even by today's wiki authors. If you have an issue with that, correct wiki.

      There are plenty of newer languages with better features. C and C++ are both in the same category, although you can argue that it's a bit more complicated to write your first C program than your first Fortran program if you're new to programming. C++ offers a few more challenges. Remember that we're talking about engineers here and not computer scientists. They don't all arrive at college with programming backgrounds.

    15. Re:While there may be "newer" languages by fph+il+quozientatore · · Score: 5, Informative

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

      0) A lot of legacy code people still have to work with is written in FORTRAN. Sad but true.
      1) Many very optimized libraries available. Check if your language du jour has an implementation of a routine for solving a linear system using BLAS. That provides a huge improvement.
      2) Many libraries are in fact only available for FORTRAN. For calculating the eigenvalues of a sparse matrix, there is only ARPACK (for Fortran), Arpack++ (a kludgy C++ interface to the very same FORTRAN library), and Matlab's "eigs" (a Visual Basic-style interface to the very same FORTRAN library).
      3) Very expressive. For instance, you can reverse the entries of a vector of complex numbers in a single compiler instruction. This is a toy example, but for more complicate stuff this expressiveness pays: the compiler has an easier job in understanding what code can be safely optimized and what cannot. More complicate stuff involving e.g. C++ method calls suffers in terms of pointer aliasing problems and similar stuff. Of course you may write the very same thing in C or machine code, but for 99% of the computations you would use the "standard" interface to vectors/arrays of your languages and forget about this sort of micro-optimizations. A good commercial FORTRAN compiler (forget about gfortran, sorry GNU but sadly it's true) does this automatically.
      4) FORTRAN 95 is not a punch-card language anymore, it has most of the fancy modern stuff if you wish to use it. While "bad programmers can write FORTRAN in every language", good programmers can write well-factored and perfectly readable FORTRAN code.

      Nevertheless, I do matrix computations, and still I try to avoid it as much as I can. Most people in our field use MATLAB (which is essentially a Visual Basic-style interface to most of the awesome number-crunching FORTRAN libraries) even though for tight "for" loops its performance sucks. If performance is mission-critical, you may write FORTRAN subroutines and call them from MATLAB, and that's very convenient. Python still lacks many of Matlab's features, its only advantage is being Free Software.

      BTW, a very ill-advised design choice of Python: http://www.python.org/dev/peps/pep-0211/ Ask any numerical analyst to know why it is a terrible idea to solve a linear system with inv(A)*b. But make sure you have at least half an hour free.

      --
      My first program:

      Hell Segmentation fault

    16. Re:While there may be "newer" languages by koutbo6 · · Score: 3, Interesting

      FYI, numpy is just a wrapper around C and fortan based modules
      So you get best of both worlds, I think Python is a better introductory programming language.

      --
      You speak London? I speak London very best.
    17. Re:While there may be "newer" languages by wireloose · · Score: 4, Insightful

      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.

    18. Re:While there may be "newer" languages by MrMr · · Score: 1

      Depending on which languages you mean; at least a couple of the following:

      Speed
      Native complex numbers
      Optimized libraries
      Parallelized vector algebra
      Existing code base
      Portable code since 1959
      Ansi standard

    19. Re:While there may be "newer" languages by teg · · Score: 1

      in order to get meaningful speed increases out of Fortran versus C you need to know many of the same things so that you can code mindful of them.

      Writing and reading Fortran code for doing math is way easier than doing the same in C. In particular, Fortran is built around the concept of arrays and matrices.

    20. Re:While there may be "newer" languages by mdwh2 · · Score: 1

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

      Crumbs, looks like I upset one Fortran-fan with mod points today. I have nothing against Fortran. I merely asked the OP for evidence for his claim that Fortran was better than all other languages. I also pointed out that Python wasn't the only option.

      But hey, let's ignore debate and pretend Fortran is now the best language around.

    21. Re:While there may be "newer" languages by navanee · · Score: 1

      Matlab is now the de-facto language of choice for Engineers. It has a huge set of domain-specific libraries. That should be the first thing non-comp sci Enggs are taught... They can learn Fortran or Python much later if required.

    22. Re:While there may be "newer" languages by mdwh2 · · Score: 1

      That's a good point - although it's perhaps a shame that this becomes circular: Universities teach a language only because of the libraries, and then that's what people write more libraries in.

      That still doesn't answer why Fortran is one of the fastest languages?

    23. Re:While there may be "newer" languages by Lord+Ender · · Score: 1

      There may be better languages for specialized sets of problems. But for CS and Software Engineering students, schools would serve students best by teaching:

      • Python for "basics of programming"
      • Ruby for OOP classes
      • Assembly and C for Operating Systems and other more hardware-focused stuff.
      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    24. Re:While there may be "newer" languages by SatanicPuppy · · Score: 5, Insightful

      ...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.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    25. Re:While there may be "newer" languages by mdwh2 · · Score: 1

      Of course, most of these can be wrapped in C and then used in whatever high level language you like.

      Indeed, so it isn't that much of an argument for saying that Fortran is the best, or fastest, in the long run...

    26. Re:While there may be "newer" languages by mdwh2 · · Score: 1

      Well okay, that explains it - my point was that the article was wrong to highlight Python, but there are plenty of other languages such as C or C++ to consider also (or perhaps Pascal, if one is concerned about easy of use).

    27. Re:While there may be "newer" languages by mdwh2 · · Score: 1

      I agree entirely. But mod parent up? Surely he was saying the very thing you were arguing against, by saying Fortran was one of the best, and then saying Python was bad at it?

    28. Re:While there may be "newer" languages by Bazman · · Score: 1

      Except of course those poor newbie student engineers will have to fork out for Matlab licenses, or be stuck in the university labs.

      So we teach our 1st year maths students with Scilab, and show them how to install it on their machines. Sure, it doesn't have all the add-on libraries that Matlab has, but in my experience most lecturers who use those in teaching only do it because that's the only bit of Matlab they ever use....

    29. Re:While there may be "newer" languages by aaaaaaargh! · · Score: 1

      We were talking about students of Physics, Chemistry and Engineering, which is where Fortran is still widely in use. Since it doesn't matter which programming language you teach, because as you say the students need to learn the principles and concepts of programming and data structures, it doesn't harm to teach them whatever they encounter later. CS is a different pairs of shoes. In CS languages like Scheme should be taught because you can express all existing programming concepts and paradigms in it. (BTW, Scheme is my personal language of choice for many mundane tasks, too...talking about personal advocacy, hehehe.)

      BTW, what you say about OOP and Python is not really true. Python's object system is a nasty hack, you can get the job done with it but it violates many rules of sound OOP. For example, Python's idea of data encapsulation is that of a sort of gentlemen's agreement, which does not scale well to large systems with many programmers working on them.

    30. Re:While there may be "newer" languages by fitten · · Score: 1

      This is what I was thinking... the fact that the OP suggests Python over Fortran shows that he/she has no clue as to why Fortran is still used in preference over numerous other languages. When you have simulations that have runtimes on the order of *weeks* when written in Fortran... how long do you think they'd take when written in Python? Months? It's all about time to results. And why Fortran is better than machine/assembler is that it's portable and higher level and easier to debug.

    31. Re:While there may be "newer" languages by putaro · · Score: 1

      Well, I used to work for a supercomputer manufacturer many years ago. I'm more of an OS/C weenie than a Fortran weenie but I did get dragged into the Fortran side of things on occasion. We put a lot of effort into the Fortran compiler, especially the vectorizing Fortran compiler because many of the customers were physics/math types and they had lots of Fortran code that needed to run faster (we used to call it "dusty deck" code, implying that it had come from a deck of punchcards). So, part of it is just circular - Fortran runs fast on math because people use it for math problems.

      Vectorizing Fortran was significantly easier than vectorizing C/C++ because Fortran lacked pointers (apparently they've been added since then), it had real arrays (C arrays are really just pointers with syntactic sugar) and real math functions. I think Fortran FOR loops are more regular as well which makes extracting the vector operations easier. You can do some truly grody stuff in C. For example, this is valid C:

      #include <stdio.h>

      int main(int argc, char ** argv)
      {
        doit(1);
        doit(2);
      }

      int doit(int y)
      {
        int x = 0;
        switch(y)
        {
        for (; x < 20; x++)
        {
          if (x < 1)
          {
            case 1:
                  printf("y = 1, setting x = 1\n");
                  x = 1;
                  continue;
              case 2:
                  printf("y = 2, setting x = 10\n");
                  x = 10;
                  continue;
            }
            printf ("x = %d\n", x);
          }
        }
      }

      Don't ask me why someone would want to code it this way but you can (I've seen it done) and it makes the parser that checks for vector conditions harder (breaks reverse engineering tools too). Even with a simple for loop in C, it's possible to initialize and increment the counter in all kinds of different places. I think Fortran has less flexibility.

      Also, C math handling at the time was not really up to snuff. Things like numeric exceptions were not well handled. This extended even to the OS level at times. I recall having to fix the floating point exception handling in Solaris when we ported it to our hardware (we had a SPARC based supercomputer).

      I don't know where things stand today. When I saw the article title suggesting the high performance code be written in Python I cringed but I'm not really sure of the state of the art of Python. Python has never struck me as a "fast" language, though.

    32. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      But thats why god invented MATLAB...

    33. Re:While there may be "newer" languages by fitten · · Score: 1

      Well, just one example... the aliasing rules for pointers passed to subroutines allow for very aggressive optimization by the compiler.

    34. Re:While there may be "newer" languages by gwait · · Score: 2, Insightful

      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.

      --
      Bavarian Purity Law of Rice Krispie Squares: Rice Krispies, Marshmallows, Butter, Vanilla.
    35. Re:While there may be "newer" languages by codegen · · Score: 1

      Citation needed.

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

      The main thing that Fortran (and Ada too) has is a standard floating point model. There are some minor differences between compilers. This is unlike C, Java, Python which rely on the underlying FP hardware. Then to look at the loopholes in the IEEE FP standard for what NaN means. For citations, look at the Numerical Recipes series of books for a discussion of the differences. Also check out "What every computer scientist should know about floating point"

      http://docs.sun.com/source/806-3568/ncg_goldberg.html

      IBM has released a set of libraries for C and Java that provide the Fortran semantics of floating point, and there is a wrapper for them that uses operator overloading in C++ to make them easier to use. But they are still a pain to use compared to the

      --
      Atlas stands on the earth and carries the celestial sphere on his shoulders.
    36. Re:While there may be "newer" languages by Antisyzygy · · Score: 1

      Kudos. Im studying numerical mathematics, and I know exactly what you are talking about, however I didnt know python did it that way.

      --
      That brings me to an interesting point, / . is just "the ramblings of socially-inept, technology-literate news-mongers".
    37. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      No kidding. I was a CS major that needed just one more math credit. I decided to do it with the fluff class (to a CS major) Computational Mathematics. The professor allowed us to use whatever programming language we wanted, but he admitted a soft spot for Fortran. I decided to try using it for a few assignments. It was immediately obvious that Fortran is a language well suited to the problems that I was solving. I'm surprised that somebody would suggest python instead of Fortran for number crunching, and it makes me wonder if the person has actually used both.

      Incidentally, I did switch to Java later in the class. Once OO-style solutions started popping into my head as soon as the problem was presented, I decided it wasn't worth the time trying to find the Fortran solution. It was a fluff class after all.

    38. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      I almost spewed my cookies when I read "Python".

    39. Re:While there may be "newer" languages by ObsessiveMathsFreak · · Score: 5, Informative

      BTW, a very ill-advised design choice of Python: http://www.python.org/dev/peps/pep-0211/ Ask any numerical analyst to know why it is a terrible idea to solve a linear system with inv(A)*b. But make sure you have at least half an hour free.

      To make a long story short; solving Ax=b by calculating x=inv(A)*b is a terrible idea because calculating inv(A) is an inherently difficult thing. While it would be extremely useful to have inv(A), it's not strictly neccessary to obtain in in order to solve Ax=b.

      At the most basic level, the technique which most would be aware of to solve Ax=b is basic Gauss Elimination, with an augmented matrix and back substitution. In fact, this is often the very first thing people learn how to do in a linear algebra course. It isn't much better than finding the inverse, but it saves a lot of computation in the long run.

      Of course there are many other techniques. Happily however, most packages can now automatically make the best choice on which technique to use, depending on the properties of A. In Matlab and Octave, it all boils down to using the left division operator like so
      x=A\b
      instead of the inverse calculating
      x=inv(A)*b

      Using the first command, Matlab and Octave will choose a technique that best suits the matrix A. This page has a list of all the techniques that Matlab can use to solve the linear system. To my knowledge, Octave has a number of techniques as well, but I'm not sure if it's as comprehensive as Matlab. Also, Octave's left division operator has been known to have bugs.

      And to return to the main topic, Octave and Matlab both use LAPACK extensively, which is written completely in Fortran(and based on BLAS). There's really no other language for linear algebra.

      --
      May the Maths Be with you!
    40. Re:While there may be "newer" languages by thogard · · Score: 1

      The interlaced switch and loop is called Duffs Device.

    41. Re:While there may be "newer" languages by interval1066 · · Score: 1

      C is built around the concept of Input/Output and hardware access, and for building operating systems. You're comparing apples and oranges. But since its been so successful at that job, newer features have been put into it to make it capable of helping solve almost any programming job out there.

      I don't know that C would be my first choice for every task (Web CGI comes to mind, although its certainly seen its share of those jobs as well) it certainly can do the job of array and matrix manipulation as well, perhaps faster, but maybe not as easily as fortran. I don't know. But its sheer ubiquity make it my first choice for the bulk of what I need to get done with a computer.

      This is not the case with Fortran, where I may need to install additional compiler tools were I to choose to use it, and depending on the os platform I was on.

      Unlikely though since I know C and with the addition of a good arbitrary-precision library like bignum I doubt there's much I couldn't do that I could do with fortran.

      Ultimately you need to pick the poison that will get the job done for You.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    42. Re:While there may be "newer" languages by Fnkmaster · · Score: 1

      If you are using numpy you are using both Python and Fortran to do serious numerical calculations. I generally don't work with particularly large data sets, so I can't speak to that, but for the fairly serious financial number crunching I do, Python is a fantastic tool, with the help of lots of highly optimized Fortran libraries.

    43. Re:While there may be "newer" languages by GlobalEcho · · Score: 1

      For most users, it doesn't. The GP is apparently not familiar with numpy.

    44. Re:While there may be "newer" languages by ShakaUVM · · Score: 1

      >>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?

      For a first course? No. They taught C/C++ to CS people as their first language when I was at UCSD (now, Java), but Fortran to non-CS majors. I think it was intentional - the number of people wanting to keep doing programming after being exposed to Fortran as their first programming language ever was trivial, and the major was impacted.

      But then again, Fortran code being called from a C program was how most of the programs I worked with were structured at the San Diego Supercomputer Center, so it's really not a bad idea to teach students how to call code from other languages.

      Just maybe not in their first class, ever.

    45. Re:While there may be "newer" languages by Fred_A · · Score: 2, Funny

      I really expected that to be a link to TdWTF...

      --

      May contain traces of nut.
      Made from the freshest electrons.
    46. Re:While there may be "newer" languages by bromoseltzer · · Score: 1

      ...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.

      Exactly. One of the most fundamental concepts is how a computer works -- what is storage, what are the data types and fundamental operators, etc. There is no substitute for learning an actual machine language -- using an assembler, if that helps ;-) Back in the day, it was possible to test out of a foreign language requirement in grad school if you could show competence in assembler. Seemed like a deal to me!

      Then you need to learn one each of a classical procedural language (Fortran), a functional language (Mathematica?), an OO language (Python), and then a language with pointers (C) to see how to screw up royally.

      --
      Fiat Lux.
    47. Re:While there may be "newer" languages by drewm1980 · · Score: 1

      If you read the PEP you link to more carefully, you'll note that the context is that the octave developers were recommending adding an operator for multiplication to python, but ~against symbols for matrix inversion / linear system solving. Also, you can get away with doing inv(A)*b if A is well enough conditioned. There are better ways, but if you're just manipulating, say, a bunch of affine transformation matrices, an inversion or two won't hurt you.

      Also, Python as a language has many advantages over MATLAB in addition to being free software. Basically, Python is a great general purpose language with number-crunching tacked on, and MATLAB is a great number-crunching language with everything else (i.e. GUI Programming, Object Oriented Programming) tacked on.

      http://www.scipy.org/NumPy_for_Matlab_Users

    48. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      Actually python has nice libraries for numerical analysis. They are as feature complete as octave. Have a look at numpy and scipy. But Matlab is better suited for education. A teacher should not spend time teaching the students why the vector indexes start at zero. Plotting graphs should be interactive and colorful. Chemistry students should never have to worry about the perils of object oriented programming. This is where matlab has it's big strength.

    49. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      ...if somebody studies astronomy and will have to work with old legacy Forth code...

      Gah, don't remind me. Some of the engineering (ie. low-level backup) interfaces for the Herschel 4.2m at La Palma is in FORTH connected via vt220 terminals. No one turns these off in case they don't actually power on again. It's going to be "fun" when these eventually break.

    50. Re:While there may be "newer" languages by Prien715 · · Score: 1

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

      Thank you, Yogi Berra.

      If the person is in Chemistry/Math/etc just to learn the subject matter and learn tools for the subject matter, it makes complete sense to teach a language so that they know it later.

      I'd rather have a bad coder in Basic who at least uses the language after graduation for doing basic tasks than someone who "knew" assembly/Fortran/C++ backwards and forwards, but forgot it all and never learned any more, since it wasn't "useful".

      --
      -- Political fascism requires a Fuhrer.
    51. Re:While there may be "newer" languages by PvtVoid · · Score: 1

      Fortran has tons of libraries specialized to whatever scientific field you are working in, and is unavoidable in high energy physics especially.

      Hopefully not forever, since CERN standardized on C++ for the Large Hadron Collider in the 1990s, although they have enormous amounts of legacy FORTRAN code.

      Personally, I think FORTRAN should be taken out and shot. Godawful unmaintainable code is the norm , and there is nothing you can do in FORTRAN that you can't do in a cleaner environment like C++. People only still use FORTRAN because they are used to it, and it will not go away until all the old fucks die.

    52. Re:While there may be "newer" languages by Quirkz · · Score: 1

      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.

      Silly analogy time: The only reason to learn Spanish is to better understand how sentence structure and verb conjugation work. You wouldn't pick up Spanish to actually communicate with someone. That makes no sense at all.

      Being less silly, I don't think it has to be one or the other. I think you can both learn a language for the practical purpose of knowing and using it, and ALSO learn a language to become better at using other languages in the future. That's true of both programming and verbal communication.

    53. Re:While there may be "newer" languages by gknoy · · Score: 1

      I am glad you pointed out legacy code. In some engineering disciplines, there is a LOT of existing code written in Fortran. Understanding it, bug-fixing it, and improving it generally requires both engineering savvy (to know when answers make sense) and knowledge of Fortran. At least being able to READ Fortan helps, too, if you're looking at a reference implementation of something and want to transcode it to something else in a non-verbatim manner.

    54. Re:While there may be "newer" languages by Arthur+Grumbine · · Score: 1

      Don't ask me why someone would want to code it this way... breaks reverse engineering tools too

      I think you answered your own question.

      --
      Now that I think about it, I'm pretty sure everything I just said is completely wrong.
    55. Re:While there may be "newer" languages by SatanicPuppy · · Score: 1

      Coding has absolutely nothing to do with specific programming languages. Class programming assignments have almost nothing to do with real world applications.

      If you teach the language, then you're teaching someone to be obsolete. It's pointless. It's like teaching someone to use Office: to function in the real world, you're going to have to learn new stuff every few years to meet real world goals. Even old languages like Fortran have evolved dramatically over the years.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    56. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      http://code.google.com/p/mpmath/

    57. Re:While there may be "newer" languages by SatanicPuppy · · Score: 1

      Speaking of silly analogies. Programming languages are not natural languages.

      If you learn Spanish, it's still going to be Spanish in 10 years. No one is going to look at your CV and say, "Well, I see Spanish, but I don't see Spanish.net, or Spanish#. Haven't you kept your skills up to date?"

      Programming languages constantly change and evolve, and they don't do it like a natural language does. It's this arbitrary decision from the linguistic gods, "Thou shalt not use command()" and from then on, if you break that rule, you will be smote!

      When the '90's rolled around and the web started blowing up, the whole industry was dumped on its head. Languages like java and vb became huge overnight, and that's where the jobs went. If you only knew COBOL or RPG, you were screwed. Maybe you could hold on to a legacy maintenance position, but that was it.

      Learning general principles is vastly more useful than teaching someone syntax that could change at any time for a language that may not be popular in 5 years.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    58. Re:While there may be "newer" languages by StillNeedMoreCoffee · · Score: 1

      For number crunching Fortran is superior. C++ for example can be as quick but takes careful programming and deep knowledge of the language and the implications of the use of structures to not poison the compliers ability to optimize some calculation. If you are going for heads down number crunching then Fortran is the language. The language has enough restrictions that the compiler can optimize in most cases. In fact doing your own hand optimizaitions can be detrimental.

      As to advanced algorithms, advanced algorithms that revolve around data structures yes, but advanced algorithms revolving around numerical analysis probably no. Most of us don't work in that numerical, matrix algebra world. It is specialized and advanced. We tend to not appreciate that body of algorithms as much.

      I would vote for at least 3 fundemental languages with at least 2 not OOP for having a good base for being a Programmer. At least 3 language well enough to do problem solving and an introduction to several others.

      The important concepts are the value of specialization and the value of appropriateness. The right tool for the job. There are different problem domains with different types of problems. If you use the wrong language to program one, you probably will end up emulating language provided features of the appropriate language to get the job done anyway. The familiarity with the different problem domains gives you more conceptual tools to frame the solution of a problem and maybe, just maybe the guts to use a different tool or language from time to time when appropriate.

    59. Re:While there may be "newer" languages by wireloose · · Score: 1

      But then I have to install F2Py if it's even available. Look at the systems I might be using: an older Burroughs or Honeywell used for numeric calculations? CDC? Not every engineer has a pc with Python running on it. Fortran is available and installed in most engineering operations already.

    60. Re:While there may be "newer" languages by wireloose · · Score: 1

      Learn to read. This is the second time I had to note this for you. I said Fortran was one of the best. And I said, "No way I'd use Python for serious large data set numerical calculations." That's obviously a personal preference. I never said Python was bad at it. I really wish more /.'rs could read.

    61. Re:While there may be "newer" languages by drinkypoo · · Score: 1

      great, maybe next they can learn perl so they can analyze their output, and shell scripting to handle their files, and then they can learn java to make applets to put their results on the web, and then...

      WTF, are they getting a programming degree? Teach them Fortran so that they can get their math done. After that they can probably learn python on the job.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    62. Re:While there may be "newer" languages by DragonWriter · · Score: 1

      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.

      Sometimes you teach a language for that purpose.

      Sometimes you teach a language because it has particular utility in another field of study. If you are teaching it particularly to students in a particular, non-programming discipline, its utility in dealing with an existing body of legacy code that is important to work in that discipline may be as valid (and perhaps even more important) of a motivation for teaching a language as the desire to introduce general "programming concepts and methodologies".

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

      If it was anything other than a programming language, "so someone will know it later" would be a particularly normal, indeed the single most common, reason for teaching anything. While I would agree that there are other reasons for teaching programming languages that are also valid, I think it is ludicrous to suggest that it "makes no sense at all" to teach a programming language so that the student will know and be able to use that particular language later.

    63. Re:While there may be "newer" languages by ctrl-alt-canc · · Score: 1

      Sorry, this is no more true. Furthermore, having personally developed several FDFT algorithm both in fortran and in C, I can tell that rivaling fortran performances isn't that difficult. IMHO undergraduates should rather learn very well how to use data structures and algorithms: rem tene, fortran sequentur...

    64. Re:While there may be "newer" languages by ctrl-alt-canc · · Score: 1

      Totally second this: fortran legacy is wonderful (just think about BLAS, LINPACK, EISPACK, etc...), but we can use it from wherever environment we want.

    65. Re:While there may be "newer" languages by joib · · Score: 1


      BTW, a very ill-advised design choice of Python: http://www.python.org/dev/peps/pep-0211/ [python.org] Ask any numerical analyst to know why it is a terrible idea to solve a linear system with inv(A)*b. But make sure you have at least half an hour free.

      AFAIK PEP 211 and the related PEP 209 were never actually accepted into the language. Python users that want multidimensional arrays use the numpy package, along with the scipy package that builds on top of numpy.

      For solving a linear system Ax=b, you just use

      x = numpy.linalg.solve(A, b)

      which calls LAPACK behind the scenes. For a simple matrix multiplication (or M-V or V-V depending on the dimensionality of the arrays) A*B=C you do

      C = numpy.dot(A, B)

      which is implemented with a call to BLAS.

    66. Re:While there may be "newer" languages by Falstius · · Score: 1

      Personally, I think FORTRAN should be taken out and shot. Godawful unmaintainable code is the norm , and there is nothing you can do in FORTRAN that you can't do in a cleaner environment like C++. People only still use FORTRAN because they are used to it, and it will not go away until all the old fucks die.

      A lot of that has more to do with who wrote the code than the language. The new C++ analysis code coming out also tends to be "godawful". And FORTRAN95 supposedly has a lot of modern features, so new code can be reasonable. As the article you quoted points out:

      Finally, there is no need to be a religious extremist; these days, procedures in different languages can be intermixed (which will only become easier). Different subsets of applications can be written in the most appropriate language, e.g. Java for the web, and all can be glued together in a PYTHON framework. On the other hand, it is also possible to misuse almost any language: C++ includes C, and Fortran still has the GO TO function.

    67. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      Hmm. My school is on 10 week terms, so that situation is even worse.

    68. Re:While there may be "newer" languages by chthonicdaemon · · Score: 1

      For numeric work, it has a really well thought-out syntax, that is part of the language. For instance, you can assign parts of arrays to one another with slicing like in Matlab or Python, but with some additional good bits that automatically parallelise. I have looked far and wide, but I have not found anything in the c++/java world with as much expressive power for matrix and array based problems.

      Additionally, most of the choices in the language were made based on whether the features can be implemented efficiently. The fact that (for instance) fortran doesn't allow aliasing without notification makes it easier for compilers to optimize certain constructs. Keywords like pure (guarantees that a function is side-effect free) allow even more optimizion. You can also specify a function as elemental, which allows it to be mapped over the elements of an array automatically.

      For me, Fortran is more of a domain specific language. Modern fortran code resembles Matlab in many ways, but outperforms c/c++ with very little trouble. You can usually get similar (or even a bit better) performance from c/c++ but not without jumping through some pretty interesting hoops.

      --
      Languages aren't inherently fast -- implementations are efficient
    69. Re:While there may be "newer" languages by cyberthanasis12 · · Score: 1

      I agree. But I do the first implementation of a new idea (which I don't know if it works) with Python. It is much faster and safer to program in Python. If the Python implementation works, and it is very slow, then I convert the code to Fortran95.

    70. Re:While there may be "newer" languages by cyberthanasis12 · · Score: 1

      Unmatched flexibility with arrays. Guaranteed numerical precision between architectures (no #defines are needed). No headers. Safe pointers (there are no unsafe pointers). Built-in parallelization on multiple data. And in Fortran 2008, superbly integrated parallelization MIMD based on a few easy to understand commands (not functions, not libraries).

    71. Re:While there may be "newer" languages by shutdown+-p+now · · Score: 1

      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.

      I would strongly disagree here. Python doesn't even have proper encapsulation of class members, and that's a killer right there and then.

      For teaching OOP, it's still hard to beat Java in statically typed language department, and Smalltalk if you prefer dynamically typed (but it should really be both). Their main advantages is that they both present a fairly restrictive set of basic language features, which are just enough to cover OO prperly, and don't go far beyond that.

      Python, on the other hand, is a very good first language. You don't want to teach people OOP/OOD straight away - they have to go through basic algorithmic design and implementation first, with basic structural/procedural techniques. It's something that Pascal was widely used for in earlier days, but today I'd say that Python is a very good fit, mostly due to its high level of abstraction (having extensible lists and maps in the language helps), and very clean and easy to understand syntax.

      However, for proper OOD - which involves drawing class diagrams and such first, and coding them afterwards - it's a poor fit.

    72. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      You are right on almos all points.
      Except about the GNU Compiler - I have recently done an extensive speed analysis of libraries and compilers (my planned calculations will take 100+ days, so 5% are kind of important). Our Code is basically a huge, complex, non-sparse eigenvalue problem. A complete GNU toolchain (ATLAS -> FLAME/LAPACK -> Our Code) has about the same speed as hand-optimizes assembly (Goto-BLAS) and ifort-compiled FLAME/LAPACK/our Code on Athlons and is only ~20% slower on Xeons. If I substituted the Goto-Blas for ATLAS, the difference is within the margin of error.

      Give gfortran a try, it has come a long way and is really, really good by now.

      Note for interested people: FLAME gave a performance boost of about 30%. Hats off to those guys (and to Goto for his SSE coding skills).

    73. Re:While there may be "newer" languages by Kidbro · · Score: 1

      BTW, a very ill-advised design choice of Python: http://www.python.org/dev/peps/pep-0211/

      Only... it never happened. So your point (if there was any) is moot. Not arguing against the rest of your rant - but bashing a language for a poor design choice that was never happened seems a bit silly.

    74. Re:While there may be "newer" languages by j.leidner · · Score: 1
      > The plus of teaching Python is that it's a badass OOP language with clean and simple syntax.

      Not really. Last time I checked, client code using a class could modify local fields of all its instances, thus violating the tenet of encapsulation. You also have to explicitly pass "self" by hand each time.

      See Section 10 of this reference, for instance.

    75. Re:While there may be "newer" languages by jrumney · · Score: 1

      I'd have thought a higher level specialised language like GNU Octave or its commercial equivalent would be a good first introduction to computer languages for maths and science majors.

    76. Re:While there may be "newer" languages by ceoyoyo · · Score: 1

      Why not? Python has lots of free modules available that wrap some very powerful libraries... written in optimized Fortran.

    77. Re:While there may be "newer" languages by ceoyoyo · · Score: 1

      No, it's saying that a pile of stuff is written in Fortran and we don't want to have to rewrite it. So we wrap the Fortran code so we can still make use of it but don't have to deal with it directly.

      Ultimately, that is probably the best solution for the vast majority of scientists. Very few ever should have to write something that requires Fortran or C. In most cases they're much better off calling wrapped functions from a high level language.

      Traditionally that's been MatLab. I'm waiting for the day when that changes.

    78. Re:While there may be "newer" languages by ceoyoyo · · Score: 2, Informative

      Python includes a great deal of MatLab functionality if you go look for it, and has lots of other advantages over MatLab. It's a modern, general purpose, object oriented language that scales well. You can write multi-thousand line apps in Python that are elegant and easy to maintain and understand. MatLab is designed to write very short programs in, but people are always trying to write big, full fledged apps anyway.

      Plus Python is free and MatLab costs thousands.

    79. Re:While there may be "newer" languages by stephows · · Score: 1

      ...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.

      Depends on the course. If they are doing a computing course then, as you said, they should be learning general techniques, not a specific language.

      But if they are doing astronomy then you teach them how to use the tools relevant to astronomy (Forth in this example). An astronomer doesn't necessarily have to be a stellar programmer.

    80. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      Depends on the course. If they are doing a computing course then, as you said, they should be learning general techniques, not a specific language.

      But if they are doing astronomy then you teach them how to use the tools relevant to astronomy (Forth in this example). An astronomer doesn't necessarily have to be a stellar programmer.

      More likely quasi-stellar. Astronomers and physicists generally don't take computer language courses. They pick it up on their own, and the code quality is often not the best. But the best of them do study programming techniques, like OO and numerical methods, and some of them get to a professional level. In any case, they do well to become educated about techniques of problem solving in various programming styles and not "trained" to become coders in a particular language.

      Which is why I'm not ashamed to have to pick up a reference manual when I need to code anything beyond "hello world" in any of a dozen varied languages.

    81. Re:While there may be "newer" languages by metaforest · · Score: 1

      If I had mod points you'd get them, mono-spaced font not withstanding.

      Every computational language has it's sweet spot.

      Each one has a band of domains that it is well suited for.

      As for TFA I don't agree. FORTRAN is not a good language for first year students that need to learn what a program is, and how to adapt ideas to code.

      For that, I believe that ANSI C is a very good starting point. It presents a terse language that is close enough to the metal to deal with a vast number of 'first principles' concepts. It also exposes the student to a lot of the sharp edges that make software engineering such a challenge at times.

      Easy is not a virtue when a student is in the process of trying to determine if CIS is right for them. Throwing the students into a language that requires them to struggle with notation AND first principles becomes a weeder. If you can hang with ANSI C you can hang with anything.

      Computer languages, at the end of the day, facilitate and hinder the expression of computational concepts. Would a golfer putt with a Wood, or drive with a putter? Would one pinch-hit usefully with a wooden dowel, or play tennis with a golfball?

      The vast majority of our physical activities require that the practitioner use the correct tool for the task at hand.

      When I was in my first fur, BASIC was my starting point, and I quickly found that it was inadequate beyond a rather limiting subset of first principles. My only other choice was 8-bit assembly language. It was painful to take that step since I had to learn a huge number of peripheral concepts just to be able execute a "Hello World" program.

      While I am invalidating my argument a bit with my own personal journey, it is important to note that I didn't have access to a C compiler until I had 5 years of professional experience programming in BASIC and assembly. C at that point was a pain. Eventually I understood it, and found that I wished I had been able to learn it first.

    82. Re:While there may be "newer" languages by speedtux · · Score: 1

      Python still lacks many of Matlab's features, its only advantage is being Free Software.

      Python has plenty of advantages over Matlab, and plenty of libraries that Matlab doesn't have. I stopped using Matlab not because it cost money, but because it was a PITA and didn't get the job done.

      Ask any numerical analyst to know why it is a terrible idea to solve a linear system with inv(A)*b. But make sure you have at least half an hour free.

      Like many specialists, numerical analysts are often too close to the problem. inv(A)*b is fine if it gets the job done.

    83. Re:While there may be "newer" languages by speedtux · · Score: 1

      Python doesn't "do it that way" any more than Matlab or Fortran does. Python has many different ways of solving linear systems; if you choose to use inv(A)*b, that's your business. The PEP in question was a discussion whether Python should get a "\" operator.

    84. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      To make a long story short; solving Ax=b by calculating x=inv(A)*b is a terrible idea because calculating inv(A) is an inherently difficult thing. While it would be extremely useful to have inv(A), it's not strictly neccessary to obtain in in order to solve Ax=b.

      And who cares? What difference does it make whether it's "difficult"? Your computer wastes lots of time on lots of different things already. If it's fast enough and works, just use it.

      In any case, Python has multiple ways of solving linear systems directly; it just doesn't have the "\" syntax (yet).

      (Furthermore, just because the syntax is inv(A)*b doesn't mean that that's the actual calculation. Good matrix packages need to bundle up a whole bunch of expressions and then rearrange them for the best way of executing them.)

    85. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      Python doesn't even have proper encapsulation of class members, and that's a killer right there and then.

      I disagree. Python doesn't enforce the encapsulation -- you can dig around, find things, and change them -- but in practice I haven't found this to be a problem.

      Python, on the other hand, is a very good first language. You don't want to teach people OOP/OOD straight away - they have to go through basic algorithmic design and implementation first, with basic structural/procedural techniques. It's something that Pascal was widely used for in earlier days, but today I'd say that Python is a very good fit, mostly due to its high level of abstraction (having extensible lists and maps in the language helps), and very clean and easy to understand syntax.

      I agree completely. Python would be ideal for an introductory programming class, where you are trying to get across the very basics. More advanced computer science students should move on to a langauge with pointers; Python is too high level for the student to really understand what's going on deep inside the computer.

      Science students should probably learn some Fortran. But Python with SciPy kicks ass for science, and it's fast too. (The deep inside parts of SciPy are all written in C.)

      However, for proper OOD - which involves drawing class diagrams and such first, and coding them afterwards - it's a poor fit.

      I think I disagree, but I don't code that way (I never start by drawing class diagrams and such first) so I should defer to you on this one.

    86. Re:While there may be "newer" languages by shutdown+-p+now · · Score: 1

      I disagree. Python doesn't enforce the encapsulation -- you can dig around, find things, and change them -- but in practice I haven't found this to be a problem.

      It's usually not a serious problem in practice (though with large enough codebase, you start running into problems like accidentally overwriting a field that was "private" to your base class in a derived class - because you didn't know it was there). It, however, is a problem when teaching OOD, because encapsulation and access control are generally considered quite important parts of that, so they should be demonstrated early on.

      I don't code that way (I never start by drawing class diagrams and such first) so I should defer to you on this one.

      I don't code that way either :) Again, it's about teaching it - when it comes to that, it helps to draw diagrams first, explain basic concepts on them, and then write down the code. Just the same, when teaching the basics of structured programming, flowchart-first approach is similarly advantageous, even though you'd very rarely draw a flowchart of an algorithm before coding it in production.

    87. Re:While there may be "newer" languages by Anonymous Coward · · Score: 0

      Python still lacks many of Matlab's features, its only advantage is being Free Software.

      You sound like you have never tried out SciPy, which has many of Matlab's features, and is written in C for blazing speed.

      Yes, Python is Free. It's also easier to work with than Matlab. I love Python and hate Matlab.

      BTW, a very ill-advised design choice of Python: http://www.python.org/dev/peps/pep-0211/ Ask any numerical analyst to know why it is a terrible idea to solve a linear system with inv(A)*b. But make sure you have at least half an hour free.

      Damn, man, what the hell is your problem? You take a proposal from nine years ago, a proposal that was not accepted, and you call it out as "a very ill-advised design choice"? Anyone can propose anything. I could propose that Python add a "MAGIC" operator that would randomly screw up all your matrices. That wouldn't be accepted either. Would you then criticise Python because of my stupid insane proposal? Get a grip.

  6. How about Cobol? by PIPBoy3000 · · Score: 2, Informative

    Ironically we're doing an implementation of a "new" HR system and a big chunk of it was written in Cobol. We have one guy past retirement age who knows it, but otherwise the bulk of our developers just know those fancy new languages.

    Some of those older languages have a surprising amount of life left in them, out in the real world.

    1. Re:How about Cobol? by DaMattster · · Score: 1

      COBOL is geared towards business and not so much for engineering. Fortran is an engineering language and designed for complex simulations such as predicting the behavior of a fluid.

    2. Re:How about Cobol? by thethibs · · Score: 0, Troll

      Then stop hiring teenagers.

      --
      I'm a Programmer. That's one level above Software Engineer and one level below Engineer.
    3. Re:How about Cobol? by Anonymous Coward · · Score: 0

      If you want job security go legacy. If you want to change job every year, go funky language then get replaced by a student that costs nothing every year.

    4. Re:How about Cobol? by powerlord · · Score: 1

      But we don't have to pay them very much, they work ridiculous hours for no overtime pay, they LOVE all the new Languages that are laden with BUZZ words that our PHBs want to use, and when we're done with them in 5-15 years, we can throw them out.

      We WOULDN'T we want to hire teenagers?~

      --
      This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
    5. Re:How about Cobol? by dbIII · · Score: 1

      Some of those older languages have a surprising amount of life left in them, out in the real world.

      HR is the real world?

      While I've rarely met a HR person that will give an honest or accurate answer as to which way is up I get your point. Writing programs for HR people to ignore is part of useful work even if I'd save the "out in the real world" dramatic statement for fighting fires, clearing landmines etc.

  7. Python is just a fad. by Anonymous Coward · · Score: 0, Insightful

    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.

    1. Re:Python is just a fad. by GPSguy · · Score: 1

      C isn't IMNSHO, too complex for a first language, but the K&R book is too thin to use for a full semester.

      Honestly, C is a good choice, for a basic programming intro (I question if teaching C# while requiring Visual Studio accomplishes as much), but there are good reasons to teach Fortran to students who are not likely to become life-long, hard-core coders.

      Fortran has a large code base. It was designed for FORmula TRANslation. It's easy to teach someone how to code an equation in Fortran assuming they understand the equation in the first place. C isn't too hard, but also isn't as easy (except for the veteran C programmers out there who don't know Fortran).

      A bunch of our grad students and post-docs have learned Fortran over the years with little formal training, and are doing decent things with it. They hardly remember their intro C classes. Some are pretty good with perl and Python, but they've picked these up along the way to do specific tasks.

      To date, I don't know of any weather models that have been coded in Python. Until someone translates 750,000 lines of crufty Fortran to Python, and makes it run with the same (verifiable) results as the Fortran code, I'll remain skeptical that Python or one of the more modern languages has that much benefit over the "old age and treachery" model (Fortran).

      --
      Never ascribe to malice that which can adequately be explained by tenure.
    2. Re:Python is just a fad. by Chatterton · · Score: 1

      Pascal is well used in the industry. C is the worst language (ever) for programming thing other than low level routines, unfortunately it has a very big list of very useful library making it appealing.

      Python will be 'perhaps' fad into oblivion, but for a teaching language is not bad as it is a jack of some trades but unfortunately master of none as you can do structured programming, object oriented programming and a little bit of functional programming with it. I like it for the cleanness of it's language and use it more and more at home.

      But for teaching, and i will be killed here for syaing that here, I like Visual Basic because in one well defined environment you have the code editor, the user interface editor and the debugger. And when debugging you can change your code without restarting your program making an error less costly in time and frustration for the new programmer.

    3. Re:Python is just a fad. by goltzc · · Score: 1

      Java & eclipse will do the same thing that your visual basic environment will do (from a teaching perspective), and your students can install it at home and tinker with it at no cost to them if they so desire.

      --
      Our bugs are smarter than your test scripts.
    4. Re:Python is just a fad. by TheRaven64 · · Score: 1

      Smalltalk is a fad language now? The first version that still looks like a modern Smalltalk was created in 1976, a year before the first Fortran release that looks like a modern Fortran (although these weren't the first versions of either). Direct descendants of Smalltalk are incredibly popular (JavaScript - a descendant via Self - runs in every web browser, Objective-C is the main language for Mac and iPhone development) and Smalltalk itself is still used a lot, especially in financial circles (see Gartner report from last year).

      --
      I am TheRaven on Soylent News
    5. Re:Python is just a fad. by Ethanol-fueled · · Score: 1

      My junior college has two ways to start. Both ways may be done concurrently.

      The first "track" is to start with C/C++ (which is a cool intro because both C concepts such as arrays-as-pointers and C++ concepts like streams and classes are taught) and then go to Java 1 and 2, or C#, or object-oriented C++, or even VB in any order without prerequisites.

      The other "track", which does require prerequisites, is to start with scientific programming 1 and 2, then assembly/machine language, then engineering programming.

      There should be a range of options for the n00b depending on skill and course of study.

    6. Re:Python is just a fad. by infamous_blah · · Score: 2, Insightful

      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.

    7. Re:Python is just a fad. by Jake+Griffin · · Score: 1

      I started with C/C++ before I knew what I wanted to do (I took the class with my brother who needed it for EE), and that class got me into programming. I then went on to take Java (which was required for CSE majors INSTEAD of C/C++). I personally think that C/C++ was a VERY good starting language. Java would be a bit more fun to start in my opinion because we did some GUI stuff in that whereas C/C++ was all console, but I think either way works well. I am now graduated and working full time as a Software Engineer programming largely in Java for a government contractor (General Dynamics).

      --
      SIG FAULT: Post index out of bounds.
  8. Uses by DaMattster · · Score: 0, Offtopic

    My brother is both a mechanical and structural engineer and he uses Fortran for creation of simulations of simple to moderate complexity. I built him a FreeBSD box with an open source Fortran compiler and he uses this box for said work. I know nothing of Fortran myself. My brother just needed a UNIX machine and didn't want to spend untold sums of money for an HP-UX workstation. My brother seems to feel there is a lot of value in knowing Fortran. Personally, it looks evil to me. I like C/C++

  9. Agreed, but engineers still use Fortran by Bruiser80 · · Score: 1

    MatLab is essentially Fortran.
    When we did FEA work, we used NASTRAN, which still required inputs in Fortran.

    That being said, I think colleges should teach more relevant materials to get them better acquainted with current standard programs.

    --
    Arguing with an engineer is like wrestling a pig in the mud. After a while, you realize the engineer enjoys it.
    1. Re:Agreed, but engineers still use Fortran by conspirator57 · · Score: 1

      matlab is an interpreted language, and thus is slow as hell. you must've meant syntactically, but even there while i despise matlab, it is better than fortran.

      --
      "If still these truths be held to be
      Self evident."
      -Edna St. Vincent Millay
    2. Re:Agreed, but engineers still use Fortran by stewbee · · Score: 4, Informative

      I did my graduate studies in a university electromagnetics lab. Two of the professors main research area was FEA. By default, we still ended up learning some even if it wasn't our research area. Most the students were pro Matlab, where as the professors were pro Fortran. As a result, if you were doing FEA for your research, you were learning fortran. If you are doing small simulations, then go ahead and use Matlab, since it will be easier to code and debug. Once you start creating 3D meshes, the number of unknowns becomes huge. At that point a compiled language is a better choice. At least fortran has complex numbers native to the language, so its implementation is a bit more elegant than say C/C++.

    3. Re:Agreed, but engineers still use Fortran by Anonymous Coward · · Score: 0

      I've had the same experience, although I never learned fortran at uni and I wish I had.

      I work as a chemical engineer, and the process modelling software I use day to day (Aspen Plus and HYSYS typically) use fortran for some of their more advanced functions.

      Knowing fortran - even a little bit - would be quite useful.

    4. Re:Agreed, but engineers still use Fortran by Bruiser80 · · Score: 1

      Exactly. I meant the syntax is essentially the same. I guess you could make the case that it's also similar in syntax to a bunch of other languages...

      Coding for NASTRAN was a blast. It definitely gave us appreciation for visual analyzers, near-auto meshing, and integration into 3-d modeling :-)

      --
      Arguing with an engineer is like wrestling a pig in the mud. After a while, you realize the engineer enjoys it.
    5. Re:Agreed, but engineers still use Fortran by Anonymous Coward · · Score: 0

      matlab is an interpreted language, and thus is slow as hell.

      wat. lol.

    6. Re:Agreed, but engineers still use Fortran by deaton · · Score: 1
      I used both Matlab and Fortran in school. I would say that Matlab is more C like in it's syntax, and considerably easier to write number crunching code. I remember having to write subroutines in Fortran that were merely a function call in Matlab, granted, several of the Matlab toolboxes were available to me, but I had to wrtite everything from scratch in Fortran.

      I think that's why schools are still teaching Fortran, they are actually teaching numerical methods, not just programming, at least in the engineering programs. In fact, Numerical Methods was the title of my first Fortran class.

    7. Re:Agreed, but engineers still use Fortran by T+Murphy · · Score: 2, Interesting

      I'm an ME student at Rose-Hulman and we're taught Matlab in two quarters. I've used it for a few other classes, though I've also elected to take a couple of Java courses so I can't say I learned anything from the Matlab courses beyond Matlab syntax.

      As for Python, I've never used it, but I've heard it's basically pseudo-code. If Python isn't likely to be used by the students in a real job, I don't see why you'd teach it to them. It makes sense to use for an introductory CS course with the intention of then rapidly teaching students Java or C or something, but if one class is all students will have to prepare them for when an employer asks them to write up a quick program, I'd give them a full immersion with the 'real thing'. In my Matlab courses you have the whole array from students that could just as well be CS majors to those who never feel comfortable with programming. If you teach them Python, only to tell them anything they'd do at work would be more complicated, the latter half of the students would never feel ready to program on the job.

    8. Re:Agreed, but engineers still use Fortran by 0100010001010011 · · Score: 3, Informative

      Matlab stops being a 'slow' language once you learn how to use it.

      Matlab stands for MATtrix LABoratory. It loves to do matrix algebra more than any other kind. The worst offenders I see are people that try to use for loops for everything.

      for i=1:10
        y(i)=sin(i);
      end

      is much slower than:

      y=sin(1:10).

      And it just scales up from there. There were only a very few times I've ever had to use for loops and that's because of memory issues (on Win32).

      Unless your current state depends on the previous one, there is no reason to use a for loop.
      -
      I never learned FORTRAN, but I make my living on Matlab. Matlab is good for quick turn around. If I need to make a script NOW that does X for me, I can turn it around in a few minutes. No compiling, etc. If I really want speed, I can write MEX (compiled) code.

    9. Re:Agreed, but engineers still use Fortran by Bakkster · · Score: 1

      Many engineers actually do use FORTRAN, or one of many company-specific offshoots. I learned it in college for my numeric methods class. My father does process control in a FORTRAN-derivative, and I recently performed a rewrite of a FORTRAN procedure that is still used for production.

      Of course, my replacement for the FORTRAN analysis is in Matlab. For modern analysis, I would use Matlab first as it's usually fast enough, and saves a considerable amount of development time by having lots of library functions and quality plotting tools. For a controls environment, though, I would use FORTRAN.

      So should you be taught FORTRAN? Possibly, but I don't think it's required. More important is being able to learn FORTRAN. If you know Matlab and C or Java, you should have little problem maintaining or modifying FORTRAN with little more than a reference manual.

      It's not knowing the specific languages that's important, but being able to learn the language when the need arises. Otherwise, in 40 years, we get a similar problem where today's boutique-language programmers never learned a new language and are still writing in Python/C#/whatever language is 'dead' in 40 years.

      --
      Write your representatives! Repeal the 2nd Law of Thermodynamics!
    10. Re:Agreed, but engineers still use Fortran by maxume · · Score: 1

      Python is pretty close to Matlab as far as being the 'real thing' as a programming language. For engineers in general, Matlab still makes more sense, it is widely used in industry.

      Each language has some advantages over the other.

      --
      Nerd rage is the funniest rage.
    11. Re:Agreed, but engineers still use Fortran by 0100010001010011 · · Score: 1

      As I said above matlab is wonderful at matrices. Even if I prototype code with for loops, I'll convert for 'production'.

      Consider the following 2 statements with identical output:
      x=rand(1,1E5);
      y=rand(1,1E5);
      for i=1:size(x,2)
         z(i)=2*x(i)+y(i)^2+x(i)*y(i);
      end
      z2=2.*x+y.^2+x.*y;

      How much longer would you think the for loop took? The answer is 24000x. (42.4s vs 0.001761s). QUIT USING FOR LOOPS. You can even write your functions to accept matrices.

      If you HAVE to use for loops, preallocate your arrays.
      z=zeros(size(x));
      for i=1:size(x,2)
         z(i)=2*x(i)+y(i)^2+x(i)*y(i);
      end

      Takes 0.5 seconds. Not as fast as not using matrix algebra, but a hell of a lot faster than just using for loops.

      2) Only load what you need. If you're analyzing a 2GB file from an eDaq (edaq.com), only load the channels you're going to use. If you're analyzing data for stability control, there's no reason to read cabin temperature.

      data=load('data.mat','yaw','pitch','roll','throttle')

      Not only will it load multiple times faster (over networks especially) but you'll reduce memory overhead.

      We use matlab to crunch terabytes of data. Usually one off scripts designed to find a rare condition or event in the field. It doesn't take long to go through all the data.

      I just wish it had a bit more C in it, the thing that gets me the most is when I try to do a i++ and it bombs.

    12. Re:Agreed, but engineers still use Fortran by cpotoso · · Score: 1
      1) A good compiler would probably be able to turn the loop you mention into the latter formula. Evidently matlab is not a good compiler.

      2) Matlab is expen$ive. Fortran is basically free.

      3) Loops allow for more complex structures, sorry I am ignorant of matlab, but how do you code the loop y(i) = sin(pi*i/10.)?

    13. Re:Agreed, but engineers still use Fortran by 0100010001010011 · · Score: 1

      I did the exact same thing. I elected to take CS120 after ME123 after I got the highest grade in the class. Sadly I outscored most "CS" students in CS120. (I'm just a dumb ME, right?). And again with CS240 (C/C++) at Purdue.

      For me, it was my first exposure to 'for' and 'while' loops. Most of us didn't have any CS in HS. The only programming I had ever done was for my TI-89 in high school. The biggest help was the fact that all the documentation was right there. 'help' and 'lookfor' were the commands I called the most (and still do). If I want to know how to do eigenvalues, all I have to do is 'lookfor eigen' from Matlab and it'll give me every command with the word 'eigen' in it or the description.

      In my experience, most of the ME's did find the class useless. There were still people that didn't grasp the basic concept of loops, functions etc. Their .m script would be a single file with the same code that 'worked' 360 times.

      For me, it opened the world of programming, mechatronics and how you fit ME (dynamics, thermo, etc) into it. I have a near recession proof job because of it. (Given the option would you hire a CS that didn't know how the 'mechanical' world worked, an ME that couldn't program or someone that could do both?).

      Thankfully CANape scripting is almost identical to C.

    14. Re:Agreed, but engineers still use Fortran by stewbee · · Score: 1

      you would do something like this

      i = [0:.01:1]; %create a vector i which ranges from 0 to 1 in .01 steps
      y = sin(pi*i/10); %plug the vector into the function and y will be a function of i.

      Be careful though. y(0.1) would return an error, since array indexing is done by integers. To retrieve the value of sin(pi*0.1/10), you would need to know what the index value is of i when it is 0.1 (using mental math, it would be 11). so the value of y at i == 0.1 would be y(11).

      Hope this clears things up.

    15. Re:Agreed, but engineers still use Fortran by 0100010001010011 · · Score: 1

      How big do you want i?

      i=1:10000; (1 to 10000 in 1 increments)
      i=1:0.1:100; (1 to 100 in 0.1 increments)

      y=sin(pi.*i/10).
      (.* means do it element wise, same with ./ .^)

      For Loop: Elapsed time is 44.225897 seconds.
      For Loop (pre allocated): Elapsed time is 0.011962 seconds.
      Matrix Algebra: Elapsed time is 0.007736 seconds.*

      So now that you can see that pre-allocation for loops are much faster, I'm dropping the non-allocated (I don't have all day).**

      i increased to 1E5
      For Loop (Pre-allocated): 2.1s
      Matrix Algebra: .7s

      That 1.4s adds up if you're doing a lot of data.

      *Code
      clear;clc;
      i=1:0.01:1E3;
      tic
      for j=1:size(i,2)
         y(j)=sin(pi*i(j)/10);
      end
      toc;tic
      y2=zeros(size(i));
      for j=1:size(i,2)
         y2(j)=sin(pi*i(j)/10);
      end
      toc;tic
      y3=sin(pi.*i/10);
      toc;

    16. Re:Agreed, but engineers still use Fortran by Zaurus · · Score: 1

      I _have_ used Java, Matlab, and Python.

      Python is quite likely to be used in a real job. In fact, I require python skills for the development positions I hire for. My department uses it every single day.

      If an applicant or employee chose "Java" or "Matlab" to implement a "quick program" to try to solve the tasks we tackle at my workplace, I'd throw them out on their ear for choosing an inappropriate tool for the job. For example, creating a secure, asynchronous communications network with Matlab would be very difficult. Another example: automating system administration tasks across a variety of open-source OS's of various ages and architectures would be unnecessarily complex with Java and difficult to make portable due to the incompatibility of various Java versions, while a python script works quite nicely and portably.

      Mind you, there are other domains where Java or Matlab are the appropriate tool for the job (I mean, c'mon, who wants to process matrices with Java or Python?). I'm not saying they are useless. They're just useful in other domains than we are in at my workplace. There is definitely a place for Python in this world. It's quite often used in real jobs.

      I disagree that Python is an appropriate educational stepping stone to C, but that's just because my personal opinion is that things ought to start with the nuts and bolts and then taught upward (for example: binary, then machine language, then assembly, then C, then scripting languages).

    17. Re:Agreed, but engineers still use Fortran by Jake+Griffin · · Score: 1

      Just because you require it for your development positions doesn't mean that it "is quite likely to be used in a real job." I have had 3 different development jobs and have never even SEEN a single line of Python at work. Nor have I seen any Matlab. I have seen Visual Basic (as a part of MS Access 2003), VB.NET, C#.NET, C++, and I currently use Java. And I don't know why you think Java is "an inappropriate tool" for quick programming. I use it all the time and it is my language of choice for quick prototyping and my own quick projects. And yes, I do have experience in Python, just not at work, but I still prefer Java. The only thing I use Python for anymore is as a calculator on the command line, which I am quite fond of actually.

      --
      SIG FAULT: Post index out of bounds.
    18. Re:Agreed, but engineers still use Fortran by Anonymous Coward · · Score: 0

      You think people should learn to program in binary, machine language, and assembly before a higher level language like C? I hope you are never actually in charge of making such a decision, or any decision for that matter, for any schools... That's just scary...

    19. Re:Agreed, but engineers still use Fortran by shutdown+-p+now · · Score: 1

      As for Python, I've never used it, but I've heard it's basically pseudo-code.

      Any high-level language is "basically pseudo-code", by definition of pseudo-code - the latter should be obvious in what it does without following the grammar of any particular language. As Python is remarkably understandable, it's no surprise that it can be read like pseudo-code.

      If Python isn't likely to be used by the students in a real job, I don't see why you'd teach it to them. It makes sense to use for an introductory CS course with the intention of then rapidly teaching students Java or C or something, but if one class is all students will have to prepare them for when an employer asks them to write up a quick program, I'd give them a full immersion with the 'real thing'.

      What's the "real thing"?

      You say "C" - but how many developers these days actually have to go down to that level? I bet vast majority code in Java, C#, VB or PHP, and don't even know what pointer is.

      "Java"? It's still the most widely used language today, yes, but why do you assume that it will still be when the people who you teach it to will graduate? Programming language landscape changes a lot overtime. By your logic, people who were taught back in, say, 2000, should have been taught VB6. Which would make their skills effectively obsolete if they graduated in 2002...

      You really can't get away from the need to teach concepts and ideas, rather than specific technologies.

    20. Re:Agreed, but engineers still use Fortran by gringer · · Score: 1

      sorry I am ignorant of matlab, but how do you code the loop y(i) = sin(pi*i/10.)?

      Not completely sure if you mean the operator precedence you have there, but here's the R code for two interpretations (which should be the same as the Matlab/Octave code for this):

      y = sin(pi * ((1:10)/10))
      y = sin((pi * (1:10))/10)

      Just looking at other replies, you might need to replace '*' with '.*' for octave/matlab.

      --
      Ask me about repetitive DNA
    21. Re:Agreed, but engineers still use Fortran by Zaurus · · Score: 1

      Well, it doesn't sound like we really disagree very much. Python is a different tool than Java, so they don't generally compete head-to-head in my experience.

      True, my requiring Python for my department doesn't cause it to be much more prevalent in jobs across the globe. On the same note, your not having seen them doesn't make them less common.

      Still, I'm being objective when I say there's lots and lots of python jobs out there. Here's an example of a few dozen (hundreds? I didn't count them) Python job listings from just one site:

      http://www.python.org/community/jobs/

      I'm not saying that there's not lots of Java jobs too, because there obviously are. And I'm not claiming that there are more or less of one or the other, because I have no idea what the ratio is.

      On the "quick programming" note, I'm surprised you state you don't understand it and then give an example of how you use Python (not Java) for a calculator (an example of "quick programming")! That's exactly what I'm talking about. The ability to fire up the interpreter and instantly be in business, without ever creating a file, a class, or anything. I'll often want to crunch some data quick and dirty, or do some parsing that's a little too complex for command-line tools, and I can do it by just firing up a Python interpreter and having at it. My comment about Java was really just to reflect that (as far as I know--I'm no Java guru), no one fires up a Java interpreter and starts making stuff happen right then and there without at least creating and compiling a file.

      You can also make fairly sophisticated command-line utilities with very few lines in Python, which I was also thinking about as quick programming.

    22. Re:Agreed, but engineers still use Fortran by TroyHaskin · · Score: 1

      I am in a similar boat in my engineering department and have the same work flow. Matlab for small/simple problems (although, as computers become more powerful, "small" becomes larger), and Fortran for large/complex problems. And it works well. ( Large = someone in a separate group makes 2 GB binary information dumps with an FEA plasma code). I do know C and some portions of C++ (purely from my free time), and I must say that a majority of the threads above ignore the idea that Fortran is destined for computations. As such, having the worry about pointer assignments (mainly keeping * and & separated) or being required to make prototypes or load individuals libraries is just not needed for NUMERICAL computing.

  10. Python is hard too by vikstar · · Score: 2, Interesting

    Isn't as hard to write fast python code as fortran code? When you're paying large money for supercomputer time, your multi-day molecular dynamics simulations better run quickly.

    --
    The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.
    1. Re:Python is hard too by sakdoctor · · Score: 2, Funny

      No,
                            not really.

    2. Re:Python is hard too by Bill+Barth · · Score: 2, Insightful

      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.

      --
      Yes...I am a rocket scientist.
    3. Re:Python is hard too by T+Murphy · · Score: 1

      If you're submitting code for a supercomputer you better have more than one CS course under your belt. By the time you are worried about efficiency of code, you should have enough courses that you know a few languages, so the first language doesn't have to be modern or practical as long as you learn with it. I think the question here is what do you teach students if they only get a semester of programming experience.

    4. Re:Python is hard too by SatanicPuppy · · Score: 3, Informative

      The point everyone misses with Python is that Python was designed to play very nicely with external libraries. Python isn't as fast as C at some things, and isn't as fast as Fortran at some things, but is much easier to develop in than either, and can incorporate libraries in both of those languages.

      You can eat your cake and have it to.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    5. Re:Python is hard too by shutdown+-p+now · · Score: 1

      The point everyone misses with Python is that Python was designed to play very nicely with external libraries.

      Scratch the "very nicely" part, and then it will be factually correct. You still have to write tedious boilerplate code in C to expose C APIs to Python, which is quite unfortunate, and not really any different from what many other languages have to offer. You'll have to try hard to find a modern language that doesn't have a C FFI one way or another, and the convenience of Python's FFI is generally below average.

      Yes, there's SWIG, but if we're looking at it, then it covers many languages aside from Python, so it doesn't enjoy any particular advantage there either.

    6. Re:Python is hard too by Anonymous Coward · · Score: 0

      Just now in my intern i have to make work a fortran program AVL(Athena vortex lattice) with some pretty neat user interface. I'm doing it in python, as i can find no easy way to visualize (will be using VTK) or create nice gui in fortran. For all that Fortran is good for, it does nothing more than pure number crunching. If i have to do anything beyond, i'll prefer to use python and wrap fortran with f2py if custom code in fortran is required.

  11. So what? by bsDaemon · · Score: 3, Insightful

    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.

    1. Re:So what? by Rogerborg · · Score: 1

      They should be learning the concepts of programming

      Did you spot who "they" are?

      students of Physics, Chemistry, Engineering

      Do you also think that carpenters should be taught the concepts of transfer of energy, elastic and inelastic collisions, and molecular bonds, rather than how to use a chisel to carve wood?

      --
      If you were blocking sigs, you wouldn't have to read this.
    2. Re:So what? by BVis · · Score: 1

      Does it really matter what language they're taught in? They should be learning the concepts of programming, not just a language.

      Yes, it bloody well does. With students graduating with six-figure debts from getting a bachelor's degree, colleges have a responsibility to teach skills that are immediately applicable in the real world (meaning the mass market, not 'pure science' positions which will require experience beyond a degree anyway) so that students don't have to spend their entire lives paying off their student loans.

      You want to learn FORTRAN? Great. Don't make me waste my time sitting in a FORTRAN class when I could be learning something useful (and marketable) like Java or C/C++ or even Perl, PHP, or Python. If you get these 'fundamentals' that everyone is going on about (which are great in an ivory tower) then you shouldn't have a problem picking up another language AFTER YOU GRADUATE.

      --
      Never underestimate the power of stupid people in large groups.
    3. Re:So what? by Crazy+Man+on+Fire · · Score: 1

      I don't really see what you're objecting to. Physics, Chemistry, and Engineering students aren't being taught programming for the sake of programming. It is being taught as a data crunching/modeling/analysis tool. This certainly is something that they should have in their proverbial toolbox if they want to do research that requires analyzing large quantities of data. I'd tweak your analogy to say that it could well be useful to teach a carpenter to use software that would assist them in the design/visualization/structural analysis of what they are going to build.

    4. Re:So what? by cheftw · · Score: 1

      Certainly.

      Not that you can't learn both.

      --
      Always back up, never back down. ---- Think you're cool 'cos your uid is prime? Take mine, modulo the one digit integers
    5. Re:So what? by Xolotl · · Score: 1

      Does it really matter what language they're taught in? They should be learning the concepts of programming, not just a language.

      Part of the problem (and I speak from experience) is that in many science/engineering departments the Fortran is taught by scientists/engineers who never learned any modern programming concepts, and who learned Fortran from people who frequently taught themselves Fortran back in the early days when Fortran was limited and many modern ideas didn't exist yet. Which has the effect of propagating many of the bad practices Fortran is (in)famous for.

      Other languages are better for teaching because they often enforce (or at least encourage) good practice, and people trained well can then go and write good Fortran in a modern dialect.

    6. Re:So what? by icebrain · · Score: 2, Interesting

      I think you're missing the point.

      See, the point is not to teach all students FORTRAN (or Matlab, or whatever). The point is to teach it to those who might actually use it.

      RTFS--the author was asking what language NON-CS people should be learning. For example, I was an engineering major (aerospace). Teaching me Java or php would be absolutely useless, because I am never going to use those in the real world. Matlab and FORTRAN are quite fine, though, because there's a decent chance that I would wind up using them later on in my career.

      (Of course, at the time, GT made everyone take Scheme, which was completely pointless for about 80% of the student body... I would have much rather learned Matlab properly than try to figure it out on the fly later)

      --
      The meek may inherit the earth, but the strong shall take the stars.
    7. Re:So what? by Will.Woodhull · · Score: 1

      Please don't go into engineering or any of the hard sciences. Don't take this as an insult, but you don't have the right mind set for the work.

      The overwhelming concern in engineering or the sciences is GETTING IT RIGHT. Not making money, nor paying off debts. To be sure, a number of persons who should have done something else with their schooling get various engineering or science credentials every year. But that leads to things like the placement of the fuel tank in the Ford Pinto-- several not-so-good engineers signed off on that mistake long before the first fireball.

      Relevant to this discussion: in the narrow field of handling complex mathematical expressions, Fortran excels in accuracy, reliability, and transparency to critiques and audits. It was designed from the first to meet these needs, and it has been consistently improved toward that end. It is an essential engineering and scientific tool. Not because it is "better" than any other computer language (though it does have certain strengths). But because it is safer. By design.

      --
      Will
    8. Re:So what? by SlashDev · · Score: 1

      I would have to disagree here, "programming concepts". Take Assembly, C and Visual Basic. 3 completely different languages that share no common concepts.

      --

      TOP DSLR Cameras Reviews of the top DSLRs
    9. Re:So what? by bsDaemon · · Score: 1

      I make no bones about the fact that I'm a liberal arts grad, in English Lit and Classical History. I thought that I wanted to be a Comp Sci and Bio major, but wasn't really happy at it. However, I was a general nerd in jr high and high school.

      I taught myself QBASIC in 8th grade, and then got a book on C. I got into Unix, with a FreeBSD 2.2.8 shell account from my dial-up ISP, and later a copy of RH 4.1 from my uncle, because I needed it for GCC. In 10th grade, I found a copy of an F77 manual in my high school library, took a look at it seemed just like BASIC, only less dumb, so I checked it out and followed the examples, did some exercises, and even implemented some of my maths homework in it from time to time, though I usually would just use C.

      These days I work at a web hosting company as a systems admin, and hardly ever program in anything other than Perl, though my first job out of high school was working at a physics lab programming IC and spotsize detection in C. Then I went to college and ended up ditching to the English faculty for a number of personal reasons, which had nothing to do with grades or whatnot.. largely, Java killed my interest and I felt like there was more out there than chilling in the air conditioning and never seeing the sun (not to be confused with starting at a Sun workstation).

      The point is, if you think that everything in school is supposed to teach you how to do some function in society, then, maybe teaching Java or whatever makes sense. Then again, that's not what my studies were for, and as the chairman of my Classics department, under whom I studied Latin, once said "a liberal arts degree prepares you to fully enjoy the life you'll probably never be able to afford." If you take education as an opportunity to help you grok all, then details of implementation can fade into the background of the theoretical concept. And the OP is talking about engineers, physicists, chemists, etc -- not c.s. majors who are going to become php code monkeys writing shopping cart plugins, but people who actually have data to manipulate which is generated through their other, primary activities. How many of them are trying to be "marketable" as programmers? I'd wager not too many.

    10. Re:So what? by BVis · · Score: 1

      The overwhelming concern in engineering or the sciences is GETTING IT RIGHT. Not making money, nor paying off debts.

      All that attitude gets you is exploited by others who make money off your hard work and don't share any of it with you. Your "GETTING IT RIGHT" is the product of society's deception: It claims to value knowledge gathered by the sciences and applied by engineers, but at the end of the day, all that matters is money. Those with money make the rules.

      Make no mistake, if you can't make money doing a job, then don't do it. Life is too short to eat Ramen three times a day. Every time I hear someone say "I'd do this for free" I cringe, because now people will expect that from others with similar jobs. Sometimes a job is just that: a job. A way to keep a roof over one's head and food on one's family's table.

      --
      Never underestimate the power of stupid people in large groups.
    11. Re:So what? by Will.Woodhull · · Score: 1

      The overwhelming concern in engineering or the sciences is GETTING IT RIGHT. Not making money, nor paying off debts.

      All that attitude gets you is exploited by others who make money off your hard work and don't share any of it with you.

      Within the context of parent post's value system, this is absolutely, perfectly true. Good science and good engineering are not profit-oriented occupations.

      Because of that, author of parent post should look elsewhere than the sciences or engineering for a rewarding career. Physician or dentist might be a good choice for someone who is technically inclined and profit oriented. You get to apply the techniques developed by others in very demanding settings which can really exercise your problem-solving capabilities, you get paid a lot to do so, and sometimes you get incidental rewards too, like being regarded as some kind of hero.

      There are a lot of highly technical professions that are neither engineering nor science, although they usually depend strongly on both. As an added benefit, you would not need to learn Fortran for these, either. But Fortran is still an excellent basis for an undergrad program for science or engineering majors.

      --
      Will
    12. Re:So what? by offrdbandit · · Score: 1

      The hard part about teaching principles (especially to those who are not educated in the internal technical mechanics of a computer) is cutting through the "magic" of it all. Those who study Computer Science get a heavy dose of Computer Engineering education for one simple reason: it's almost impossible to really understand good software principles without understanding (I mean, really understanding) how the hardware does what it does. Without a foundation based on the basic knowledge of data paths, ALU's, registers, state machines, etc, etc, pretty much any principle or knowlege can be trivialized away as "magic" or "someone else's job". Without a doubt, the most enlightening class in my college career was the class where we had to write control unit microcode for a given architecture (in a simulator), then develop software in assembly, manually translate that code into binary, and run it. I think it's unreasonable to expect anything more than operational knowledge of programming from someone without such knowlege.

  12. Well by buchner.johannes · · Score: 1

    The answer is that there are so many libraries readily available, especially those for certain areas of physics. With python, this is not the case.

    While Fortran is old, and I'm not a fan either (and can't program it), I was surprised when I heard a presentation about a code in Fortran.
    It is a high-level programming language, and aside from syntactic ugliness (like this uppercase stuff), it is as powerful as python (aside from lambda).
    So let them. The effort of reprogramming the huge amount of libraries will not be paid. Maybe a good python-fortran bridge can help both sides.

    --
    NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    1. Re:Well by ceoyoyo · · Score: 1

      The existing autowrappers aren't too bad.

      The Python - Objective-C bridge is truly fantastic though. Those certain areas of physics would be in nirvana if someone put the time into something similar for Fortran.

  13. Yes by lxs · · Score: 1

    For their sins.

    1. Re:Yes by Anonymous Coward · · Score: 0

      What makes you say that? Scheme isn't a structured programming language, so it's a poor choice for teaching structured programming. It's not a bad idea to study it in addition to our ideal teaching/learning language, though.

      Hell, why not use Pascal? It was designed specifically for education. Not that I've ever used it.

    2. Re:Yes by shutdown+-p+now · · Score: 1

      Hell, why not use Pascal? It was designed specifically for education. Not that I've ever used it.

      Which Pascal? The standard one (Wirth's, and later ISO) has crappy array handling, and absolutely crappy string handling. Given that simple operations on strings ("reverse the string", "count words", stuff like that) are particularly useful as a teaching tool at beginner levels, this is inexcusable.

      Then there's Turbo/Borland Pascal, and numerous clones such as FreePascal. They're okay, but the main problem with them is that they had the language changed and extended such that it isn't "designed specifically for education" anymore.

      That said, the school I studied in used Borland Pascal to teach programming (as most schools in Russia did back then, and as many still do), and it worked remarkably well. I just wish we had something along these lines updated for modern OSes and hardware...

    3. Re:Yes by Anonymous Coward · · Score: 0

      No... Scheme is the devil spawn from hell... useless for any application that is not intensely recursive in nature and largely not used outside of academia for that very reason. Impossible to use unless you're brain is wired in a strange-loop anyway.... You can stuff 'car' and 'cdr' where the sun don't shine and I'd be perfectly okay with that.

      Scientific language - I vote C. It's a case of "good enough" and let's face it - engineers won't actually use structs or functions... they'll put everything in main() and call it a day - so what to we care about the elegance or structuring of a language? They're just going to abuse the hell out of it anyway... so give them C (it's hard to make that language any uglier than it already is... even with abuse). Throw in a course in MATLAB just for kicks since most of the useful I/O functions in MATLAB look just like C and you've got yourself an engineer ready to enter the workplace.

      There is, by the way, a good case for FORTRAN. I work with a firm that still makes heavy use of it. Most legacy numerical libraries are written in FORTRAN and even though just finding a compiler for it is difficult these days - that doesn't seem to dissuade most companies from still using it.

      Just my two cents...

    4. Re:Yes by Anonymous Coward · · Score: 0

      You don't seem to have read the GP's question at all. You've just explained why Scheme was exactly the right answer.

  14. Considering Professors Teach What They See Fit by eldavojohn · · Score: 3, Insightful
    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.

    --
    My work here is dung.
    1. Re:Considering Professors Teach What They See Fit by Nyeerrmm · · Score: 1

      I think you're right for the most part. Teaching FORTRAN for non-CS students makes a lot of sense as an introduction, partially because its simple (except for the damned exponent function, ** instead of ^) like you said, and also because a lot of legacy code is written in Fortran. I'd say that professors continue to teach it because that legacy code is there.

      However, I'd also say no new code should be written in FORTRAN, so its necessary to teach something newer. C++, Java, Ruby or Python are probably not the best choices. For Aerospace/Mechanical, and probably civil engineering MATLAB/OCTAVE is the obvious choice. It's an industry standard, makes matrix manipulation incredibly easy, and allows you to display data easily. For science groups who deal with a lot of statistics, I've heard R/S work well. For Chemical Engineering, apparently, VB in Excel is the way to go... makes me glad I didn't go that way, but if its what industry uses... and again the professors/department are going to select this well.

      Sadly, I think so much of the debate is from CS people who don't realize that we're not talking about trying to write highly-optimized, deployable code. We're talking about people trying to get an answer. If it takes half the time to write and double the time to run in my mind its a pretty good trade-off if its for your own use.

  15. WD40? by Finallyjoined!!! · · Score: 1

    Nah, give them a can of AC90. Encourage diversity..

    --
    If I had an Ass, I'd call it Fanny Bottom, then I could slap my Ass; Fanny Bottom, on the Arse.
  16. libraries. gigabytes of libraries by lkcl · · Score: 5, Informative

    i spoke to someone studying engineering in 1990 who was being taught fortran. they were using a mathematical library that would solve partial differential equations, by presenting the user with the actual mathematical formulae to them.

    these kinds of libraries are staggeringly complex to write, and they have been empirically proven over decades of use to actually work.

    to start again from scratch with such libraries would require man-centuries or possibly man-millenia of development effort to reproduce and debug, regardless of the programming language.

    so it doesn't matter what people in the slashdot community think: for engineers to use anything but these tried-and-tested engineering libraries, that happen to be written in fortran, would just be genuinely stupid of them.

  17. I still use Fortran for sciantific calculations by sigxcpu · · Score: 5, Informative

    If all you need is to crunch numbers, Fortran is a good choice even today.
    It might not be the best language to introduce someone to computer science, but it is very powerful for anything that has to do with matrix operations.

    A few years ago in a physics graduate course we had a simulation project which left the choice of language to the student.
    We compared performance between implementations in C C++ and Fortran.
    Fortran was consistently faster by a big margin.
    It's also very easy to learn.

    That said, I do most of my coding in C.

    --
    As of Postgres v6.2, time travel is no longer supported.
    1. Re:I still use Fortran for sciantific calculations by InfiniteLoopCounter · · Score: 1

      We compared performance between implementations in C C++ and Fortran.
      Fortran was consistently faster by a big margin.

      I hope you took row major/column major into account and had any libraries using the same mathematical techniques and error margins. C should always have the slight edge in a fair comparison because Fortran tries to make things easy for the programmer (arrays start at 1, IO anything, function/method calling, etc) and is not quite as optimized for speed.

    2. Re:I still use Fortran for sciantific calculations by Anonymous Coward · · Score: 0

      Agreed. About fifteen years ago, a bunch of us (NASA physicists) decided we needed to learn C++, so we organized a self-taught course. After a couple months, we gave it up, because the language was ill-suited for high-performance computing.

      It's also amusing to hear all those objections (Uppercase weirdness! Special columns! Short variable names! Antedeluvian control structures!) that simply demonstrate that the complainer hasn't looked at anything newer than Fortran IV. Array syntax alone makes the modern language worthwhile.

      That said, I don't think teaching Fortran as a first language makes much sense. When Fortran was new and shiny, scientific/engineering number crunching was a primary market. That's no longer true. While Fortran has continued to evolve as a specialized language supporting high-performance computing, using it to develop a GUI-based app is simply a particularly horrible form of self-mutillation. It makes the most sense to teach a first language that's more general-purpose, and if you find later that you need Fortran, it's easy to pick up as an nth language.

    3. Re:I still use Fortran for sciantific calculations by NekSnappa · · Score: 2, Interesting

      My first engineering class after leaving the Marine Corps in '86 was a 3 credit hour class that met twice a week. The first class each week focused on engineering graphics (drafting), the second was Fortran 77 programming.

      The computers in the lab were, I believe, 286 based Epson machines with dual 5.25" drives, running MS-DOS. As an added bonus our "development environment" as you say now, was edlin!

      At that time I had no personal experience with computers. I didn't know the difference between the OS, the text editor, and the compiler. Yet I had no problems with picking up the concepts and learning how to use both the language and a general use computer. I guess it was unofficially a trial by fire computer literacy class too.

      Since then I've taught myself enough of a couple of different programming languages that I needed in the course of my work. Back in the day Lisp was the daddy for customizing and automating AutoCAD!

      --
      I want to shoot the messenger!
    4. Re:I still use Fortran for sciantific calculations by Anonymous Coward · · Score: 0

      I used to work at a research laboratory - much of my time was spent either translating FORTRAN to another language or writing routines in another language to use FORTRAN built libraries. Most of the PhD's in the science community are most comfortable with FORTRAN - it's about all they write in. So... that said, I think it's almost a necessity to teach FORTRAN so that you can use/debug/understand the stuff that others have written.

    5. Re:I still use Fortran for sciantific calculations by honkycat · · Score: 1

      C should always have the slight edge in a fair comparison because Fortran tries to make things easy for the programmer

      That's only if you consider "fair" in a nonsensical way -- i.e., if by "fair" you mean that the code in both cases is completely optimal for the language and you're just comparing the efficiency of the CPU's executing the language. That's not what I would call fair -- fair is more along the lines of equal programmer time to generate the solution, since that's a more meaningful real-world metric. In that case, I wouldn't even raise an eyebrow when the more programmer-friendly solution provides the faster performance. This is, after all, part of why Python and other scripting languages have become so popular for numerical processing. The parts that are compute cycle limited are implemented in underlying libraries (Fortran or C) by people who take the time to optimize them. The high level interface makes it easier to assemble those blocks in an efficient way.

    6. Re:I still use Fortran for sciantific calculations by UID30 · · Score: 1

      Lesson learned? C code written by people who have programmed Fortran for 20+ years runs slower than Fortran code written by people who have programmed Fortran for 20+ years.

      It is incredibly easy to write inefficient C code, and only years of exposure will give you the understanding necessary to write truly efficient C code.

      Unlike your typical /. post, I present evidence, Duff's Device, of what an efficient C coder can do.

      --
      "Glory is fleeting, but obscurity is forever." - Napoleon Bonaparte
    7. Re:I still use Fortran for sciantific calculations by sigxcpu · · Score: 1

      There is (was?) a problem with Intel floating point precision. The register internal precision is higher than that specified by the IEEE standard, but when a value is stored it's precision is truncated to meet the standard.
      -This might not seem like a problem at first glance, but this can happen unintentionally if your code is interrupted by kernel code or HW interrupt.
      Therefore you can get two slightly different results depending on whether you were interrupted of not. This is unacceptable.

      The Fortran libraries, at a significant overhead, keep storing floats into memory to get consistent repeatable results while the C code did not.

      Fortran still came up ahead.

      If you want to read more about stuff you have to take into account when optimizing matrix operations you can take a look at Ulrich Drepper's long article at lwn.net
      http://lwn.net/Articles/250967/

      --
      As of Postgres v6.2, time travel is no longer supported.
    8. Re:I still use Fortran for sciantific calculations by julian_t · · Score: 1

      Although I have to use quiche-type programming languages a lot of the time, I've always reckoned that Fortran, C and Lisp would enable me to do most things...

  18. Yes they should. by Ed+Bugg · · Score: 1

    As with any profession, in order to work effectively, you need to know the tools. Just like the classes teach notation/language of the specialty. Would anyone even think not to teach mathematical symbols for Calculus. The students will be dropped into jobs using and maintaining programs written 40 years ago.

    If the majority of special written software is python, then yes the initial programming should be python. Go with what they'll need to know.

    --
    -- Ed Bugg --You have freedom of choice, but not of consequences.--
  19. "Introductory" by nine-times · · Score: 1

    Disclaimer: I am not a programmer.

    It seems to me like there should be a good "introductory" language where, though the utility of knowing that language may or may not be practical, would help teach programming concepts and good practices to new programmers. That is, if the goal is really to teach programming. Usually, when you're introducing someone to a topic, it's a good idea to start with something representative and likely to instill interest in the topic.

    I don't know which programming language fits the bill, though.

    1. Re:"Introductory" by Ed+Bugg · · Score: 1

      It's called Pseudocode

      --
      -- Ed Bugg --You have freedom of choice, but not of consequences.--
    2. Re:"Introductory" by Anonymous Coward · · Score: 0

      Beginner's Allpurpose Symbolic Instruction Code perhaps?
      Of course, because BASIC was designed in "before structured programming" days, it lacks useful and modern abstractions.
      Back in the mid 70s, UCSD used Pascal as the educational language... It provided the necessary constructs and such to learn good practices, and the instructors made no claim that you'd ever use it for anything else (since the dominant language in engineering at the time was FORTRAN, although various Algol variants were popular at UCSD).. They felt once you learned in pascal how to structure things, you'd be able to write in anything.

      At UCLA in the same time frame (when they had no CS department, per se), MIXAL and PL/I (or PL/C) were the languages of choice. PL/I wasn't bad (and was implemented better than Calgol, another language used.. yet another custom variant of Algol) but it never got traction in the industry. Could it be because you had to PAY for PL/I, and C compilers were (almost) free? Clever folks those marketeers at Bell Labs..

    3. Re:"Introductory" by idontgno · · Score: 1

      It's called BASIC. I recommend the original Dartmouth dialect. It's got a nice Ivy League blue blood feel to it.

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
    4. Re:"Introductory" by TheRaven64 · · Score: 1

      Depends on the dialect of BASIC. BBC BASIC was one of the main reasons why Acorn won the contract to provide computers for the government-funded BBC Computer Literacy Project and why anyone who grew up in the UK in the '80s learned to program on a BBC micro in school. Although it did use line numbers and support GOTO, BBC BASIC also included a lot of support for structured programming. This included high-level local flow control constructs (FOR and WHILE loops, IF statements) and subroutines (GOSUB and RETURN). It also included a built in assembler, allowing you to write compilers for other languages relatively easily, and PEEK and POKE for accessing and writing directly to memory addresses, making it very good for controlling external hardware. Even today, it's not bad as a teaching language, although I'd probably still recommend a dialect of Smalltalk like Squeek over it.

      --
      I am TheRaven on Soylent News
    5. Re:"Introductory" by lightversusdark · · Score: 1

      It is a little known fact that Acorn computers and their ROM contents cause gender identity disorders.

      --
      "There is nothing nice about Steve Jobs and nothing evil about Bill Gates." - Chuck Peddle
  20. Give it a break by pjt33 · · Score: 1

    I think it's a shame Slashdot can't go a month without someone submitting a "Which programming language is best?" flame war firestarter. This has been done to death.

  21. Not punched cards by davebarnes · · Score: 1

    I love Fortran (or FORTRAN as we old folks spell it).
    But, no one should be forced to use an IBM 026 Keypunch (http://en.wikipedia.org/wiki/Keypunch#IBM_024.2C_026).

    --
    Dave Barnes 9 breweries within walking distance of my house
    1. Re:Not punched cards by AllergicToMilk · · Score: 2, Informative

      I spent an entire summer doing exactly that (data entry on an 029). I spent every penny I made on AD&D :-)

      --
      There are only 6,863,795,529 types of people in the world.
    2. Re:Not punched cards by Sanat · · Score: 1

      Among other equipment (CDC 3200 systems) I maintained a room full of 026's and I would love to have a nickel for every star-wheel I had to reinstall after the coding cylinder was ripped out without first releasing the star-wheels pressure.

      --
      And in the end, the love you take is equal to the love you make
    3. Re:Not punched cards by Helen+O'Boyle · · Score: 1

      I hear ya on the IBM keypunch.

      I lasted on that for about 7 days of a 4.5 week summer class before realizing that the 2-3 really smart kids in the class were never in the keypunch room and set about solving that mystery.

      It turns out that the smart kids were hunched over these odd, pale blue, rounded wedge-shaped TV thingies whose screens glowed blue (ADM3A's, for the uninitiated). I eventually learned that if one was willing to sign an oath of non-annoyance(1), one could get access to the HP 3000 system attached to those terminals, which could do RJE (remote job entry) to the IBM mainframe used to run our class' programs.

      I signed the oath. I wrote my user ID and password in the inside front of my PL/1 book (yes, I still have it) back in the days where it was nearly unthinkable that anyone would try to log in to an account that wasn't theirs, because it just "wasn't done". I learned HP edit. And my life got much easier in terms of the class, and much more complicated in terms of life, because I became one of those rare geek girls who hung out in the computer room for fun.

      And yes, FORTRAN (totally all upper case) is one of the languages I eventually professionally coded in (scientific analysis for a chem prof, using a vector processing unit), along with C, a half dozen assembly languages, SAS, PL/1, COBOL (yes, I really did it for 6 months), etc.

      (1) The oath of non-annoyance (just my name for it) was a promise that you knew where the manuals were and would not bother the other computer room users with "how do I?" questions, in exchange for the privilege of being given an HP account. At least at my school, in those early days, you could either cut it on your own, or you couldn't cut it, and not much slack was given until you'd proven you had enough talent and work ethic to make it through the program.

    4. Re:Not punched cards by Trouvist · · Score: 1

      But I'm entirely sure, as a girl, that your Oath wouldn't have mattered even the slightest bit because any of the other people (men) in the computer room would most likely have been excited at the prospect of helping you out, even if you did happen to already know the material. Considering where they spent their time, it might have been the only cross-gender exposure they could reasonably get.

    5. Re:Not punched cards by Count+Fenring · · Score: 1

      Oh goodness, sir! Your implication that all programmers are nerds, and starved for female attention, is most certainly the most original, delightful witticism ever to pass our way. Please, keep delivering to us your priceless bon mots, and raising the quality of internet discourse.

    6. Re:Not punched cards by Nefarious+Wheel · · Score: 1

      Yes, the 029 was definitely the way to go. But you had to have your own programming drum for it, people were always nicking them.

      --
      Do not mock my vision of impractical footwear
    7. Re:Not punched cards by Nefarious+Wheel · · Score: 1

      these odd, pale blue, rounded wedge-shaped TV thingies whose screens glowed blue (ADM3A's, for the uninitiated).

      Ahh, the ADM3A. For years I used an ADM3A "Dumb Terminal" clone that I built from the Heathkit catalog (H-19 I think it was). Great little terminal.

      I remember seeing an ADM3A in the Hobart (Tasmania) Department of Health building, smack in the middle of one of those ergonomic workstations that had a raised centre and separate space for the keyboard. To use it that way you would have to be part orangutan. I learned everything I needed to know about bureaucracy from that single gestalt.

      The building lost funds for branding before they completed the outdoor signage. All you could see from the street was "Depart". Say what you like about Taswiegens, but they do have a finely tuned sense of irony.

      --
      Do not mock my vision of impractical footwear
    8. Re:Not punched cards by fractoid · · Score: 1

      You weren't around back in those days, were you? It's OK, I wasn't either. But my mum was, and she's told me a lot of stories about that era of computing, and for maybe 5 years was Australia's expert on COBOL. You see, back then, typing was something done by secretaries, and secretaries were women. So mere 'programming' was a woman's job. It wasn't until people realised that computers were handling (and generating) huge, huge volumes of money that men shouldered women aside and set up shop as the stereotypical software developers. Which is a pity, because it'd be awesome if coding were something you could do 'to meet chicks', like vet studies or psychology or nursing. ;)

      (I think the era that the GP was referring to is slightly after this phase, but there still would have been more women in the technical side than there are today, percent-wise. I know mum has lots of stories about punch cards and at one stage I believe actually entered a program via a plug board.)

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    9. Re:Not punched cards by Helen+O'Boyle · · Score: 1

      To be honest, I did rarely lack for offers of assistance, even (as the parent points out) when I knew what I was doing. ;-)

      That was what my comment about life getting more complicated was referring to.

      On the flip side, I was also the target of a few jokes among some of the guys until they recognized that I really did "get" computers and was more than just decoration in the computer room.

    10. Re:Not punched cards by Helen+O'Boyle · · Score: 1

      Just some data points for slashdot posterity. When I first saw a functioning corporate computing department as a high school intern, back in the late 1970's, it looked like this:

      Women worked in the basement computer room in operations and keypunch/data entry.

      Men worked upstairs as systems analysts, and used ADM 3A's to enter their programs and (even back then in CORPORATE AMERICA, they wore suits) play Battleship, Hangman and Star Trek. They also taught interns how to play Battleship, Hangman and Star Trek.

    11. Re:Not punched cards by Helen+O'Boyle · · Score: 1

      Yes, there were the original blue ADM3A's (which I believe did not even offer lower case) and then there were the beige ones, which were numbered slightly differently... was it ADM3A+? Or ADM5A?

      The parent noted an odd workstation configuration and said he learned everything he "needed to know about bureaucracy from that single gestalt." Great observation, especially juxtaposed with the information that it was located in a department of health building in Australia. I know enough Aussies to know that your bureacracy can be pretty intense, and it's just perfect to hear that an erogonimc, but unusable, computing workstation was in the Dept of Health. LOL.

      Anyway, wot's a "Taswiegen"? I've spent a fair amount of time in Australia and never heard that word. Do you, like, use that because you don't like the demonic association of "Tasmanian"?

  22. Fortran is weak sauce buddy by Anonymous Coward · · Score: 0

    Fortran sucks.

    Get those 50+ year old programmers out of the industry if they are using such an old language.

    Fortran needs to retire, just like every single programmer that thinks that Fortran is worth using.

    1. Re:Fortran is weak sauce buddy by conspirator57 · · Score: 4, Funny

      Yes, everything should be written in a fresh, clean language.

      I nominate VBScript.

      --
      "If still these truths be held to be
      Self evident."
      -Edna St. Vincent Millay
    2. Re:Fortran is weak sauce buddy by dkh2 · · Score: 1

      You owe me a keyboard. This one just got filled with a mixture of coffee and snot.

      --
      My office has been taken over by iPod people.
  23. Re:In a word... by Anonymous Coward · · Score: 2, Funny

    No.

    You make a persuasive argument, but on the other hand, yes.

  24. I learned C in engineering undergrad by Anonymous Coward · · Score: 0

    I was never formally taught to use Fortran, just C. I think this worked best for me since this seemed to be the vanilla of languages and it gave me what I needed, a solid understanding of how and why to program. I did not need to know the intricacies of a specific language, that comes later depending on:

    A) Where you end up.
    B) What you end up doing.

    So really, the language isn't the point, but more so the techniques of programming. Early courses should be basic, but challenging in that you need to know how to work with the power of number crunching and programming is the tool.

    As an aside, I've later taught myself Perl and Fortran as needed and knowing the fundamentals helped.

  25. Even NASA can't get it right by Maximum+Prophet · · Score: 1

    One of the staff at Purdue (back in the 80's) was a Fortran guru. He had never seen a true fortran complier, i.e. one that would pass all the standards tests. I don't know if this is any different today, but I doubt there's a compiler that will compile any and all arbitrary Fortran programs.

    Besides, just write your code in a real language (one with a real grammar) and link it to the time tested Fortran libraries. What value is there in actually writing in the language?

    --
    All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
    1. Re:Even NASA can't get it right by Joey+Vegetables · · Score: 1

      Is there a compiler that could compile any and all arbitrary Java programs - say, for instance, one with if statements nested several trillion levels deep?

    2. Re:Even NASA can't get it right by Maximum+Prophet · · Score: 1

      I wouldn't suggest Java as an example as a good language, but yes, given a BNF for Java, you could produce a Turing machine that would parse Java several trillion levels deep. You would need lots of space and several trillion time units.

      On the other hand, I don't know that parsing Fortran has been proven Turing computable. I do know that back in the 80's people tried to develop a BNF grammar for it, and decided it couldn't be done. A quick google shows at least one BNF for Fortran 90 but it has this caveat "The BNF forms do not provide a complete description of the syntax; additional constraints are described with text."

      Fortran is best parsed ad-hoc rather than by a strict grammar.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
  26. I learned FORTRAN by SailorSpork · · Score: 1

    I had a half-year "Intro to Engineering" class at Purdue my freshmen year (1999) - Frosh Engineers weren't allowed to pick an engineering discipline until sophomore year, so we got all sorts of intro classes. In it, we first learned FORTRAN, and then we learned C.

    The reason we learned FORTRAN:

    * We had to compile code from one language and reference it from code in the other, to prove it was all worked the same once compiled.
    * We had to have it beaten into us that, if we ever wanted to bitch about how confusion C was, all they ever needed to say is "at least it's not FORTRAN."
    * They had read an article out there saying that FORTRAN coders were the highest paid coders out there, since lots of companied had legacy code and systems to maintain, and very few people cared to learn legacy languages anymore.

    So yeah, it didn't kill us being part of an intro class where it wasn't the only thing we learned. Quit bitching about, it and GET OFF MY LAWN!

  27. different languages for different purposes by rotor · · Score: 3, Insightful

    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.

    --
    Addlepated - punk & metal
  28. Can't change overnight by fermion · · Score: 1
    I have been reading about the advances in Python for the physical sciences. I think at some point it will be a major player, and it would probably be a good idea for the undergraduate to learn it.

    OTOH, we tend to teach what we know and what has worked well. This has been Fortran. It is stable, which means it is easy to get and easy to teach. Most universities has extensive mathematical and scientific libraries, which means that unless one is teaching programming, all that is really neccesary is some glue code to put the functions together.

    As an aside, it is also moderately difficult to debug. While this is annoying to the undergraduate, debugging a fortran program does teach important investigative skills and encourages a level of precision that is not so necessary in some more modern languages.

    --
    "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
  29. Python is not programming. by Weather · · Score: 2, Informative

    Python is scripting. FORTRAN is programming. MPI is vastly more supported by FORTRAN than any other language - grow MPI support for C++ or Object C, and then FORTRAN can go away.

    1. Re:Python is not programming. by vikstar · · Score: 1

      There is currently a movement to develop a language which can replace Fortran for high performance/productivity computing by focusing on parallelism, such as X10 and Chapel.

      --
      The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.
    2. Re:Python is not programming. by Vanders · · Score: 1

      MPI is vastly more supported by FORTRAN than any other language - grow MPI support for C++ or Object C

      MPI for C is pretty well supported. It's not that complex. What sort of support would "MPI for C++" look like other than the C interface?

    3. Re:Python is not programming. by gestalt_n_pepper · · Score: 1

      Please explain the difference. Both are code interfaces that allow you to give instructions to a machine. One has a set of pre-built functions for math. The other uses libraries. Are you saying that I don't program because I don't manipulate memory directly or use "void virtual functions?" What's the story here?

      --
      Please do not read this sig. Thank you.
    4. Re:Python is not programming. by EnglishTim · · Score: 1

      I'd be interested to know what the difference between 'scripting' and 'programming' is...

    5. Re:Python is not programming. by Just+Some+Guy · · Score: 1

      I'd be interested to know what the difference between 'scripting' and 'programming' is...

      Well, when you "script" a solution, it takes an hour to write and 5 seconds to run. When you "program" a solution, it takes 4 days to write and 4.5 seconds to run, plus another 3 days to make fun of the scripting guy for writing something so slow.

      --
      Dewey, what part of this looks like authorities should be involved?
    6. Re:Python is not programming. by JorgeFierro · · Score: 0

      I wish there was a 'Yeah Right' mod.

    7. Re:Python is not programming. by ceoyoyo · · Score: 1

      If you're talking Objective-C, try out distributed objects and you'll spit every time you see the word MPI.

  30. Not so easy by michaelepley · · Score: 1

    Fortran has all sorts of what we would now consider artificial limitations and restrictions on its syntax that make writing even simple programs a lot less simple and intuitive. For example, line length limitations, special columns, short & special variables names, etc. I'd rather not spend time teaching/learning (especially non-standard) syntax and more time on the concepts while encouraging good stylistic conventions (use commenting, readable variable/function names, etc). I found Pascal a much better first language. Not to mention that many of these programs using FORTRAN are arcane, dated in their teaching concepts, and force FORTRAN despite students who often already know many other languages.

    1. Re:Not so easy by Anonymous Coward · · Score: 2, Informative

      They ditched those line length limitations, special columns etc. twenty years ago. I suppose that is the burden of being the oldest computer language in use today: lots of people evaluate it on the basis of what the language was way back when they learned it.

    2. Re:Not so easy by teg · · Score: 4, Insightful

      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).

    3. Re:Not so easy by TheRaven64 · · Score: 1

      Sounds more like you are describing APL than FORTRAN. I'm a bit surprised APL or a domain-specific language like Mathematica isn't more common in mathematics and the physical sciences.

      --
      I am TheRaven on Soylent News
    4. Re:Not so easy by jstott · · Score: 1

      I suppose that is the burden of being the oldest computer language in use today: lots of people evaluate it on the basis of what the language was way back when they learned it.

      Aww c'mon, this is Slashdot. How many posters here actually ever learned Fortran in the first place?

      On Slashdot, we evaluate it on the basis of what our CS professors and told us about Fortran. That and what we read on the Internet...

      -JS

      For the record, yes, I both know and have written significant programs in Fortran, but on the other hand I'm a physicsist and not a CS major (and when I learned Fortran, F77 was the most recent spec available!).

      --
      Vanity of vanities, all is vanity...
    5. Re:Not so easy by david_thornley · · Score: 1

      It wasn't that long ago that I read that McCarthy's old Lisp 1.5 book was one of the better-selling Lisp books. It's the exact same thing: people think things of Lisp that were valid forty or forty-five years ago.

      That's what you get with a language that's over 50 and still in use but not mainstream.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    6. Re:Not so easy by ceoyoyo · · Score: 1

      I've never done much more in Fortran than translate it to something else, but I've seen a LOT of awful MatLab code. With the addition of a few extra modules to Python you can make it look very much like MatLab.

  31. Don't fear modern languages by ZenGeek · · Score: 3, Interesting

    I work at a university research lab and Fortran is still very much present. If nothing else, students need to be able to work with legacy code. I agree, however, that new projects should make use of more modern languages. Special consideration should be given to functional programming which naturally fits many science problems and is easily parallelizable due to its "no side effects" philosophy.

  32. Re:libraries. gigabytes of libraries by Anonymous Coward · · Score: 0

    why something that was written in a year and used over two decades, need millenia to be reimplemented?.

  33. My Physics Degree + Fortran by Brit_in_the_USA · · Score: 1

    Back in the mid-90;s I was taught Fortran (77?) during my 1st undergraduate year of my Physics Degree at Imperial College, London. We were told not to use the first 4? characters on any line as a left over form the punched cards day. This was quite amusing to myself and my fiends as most of us had been programming for years, and had PDA's that could manage a faster baud rate terminal interface to the mini computer than the 9600 baud green screen terminals we told to use. 2nd year was Fortran 90 on unix workstations so things got a lot better. By the time I was doing my PhD the computer labs Windows PC, with visual studio and C++. The course had got a lot harder during the switch and was teaching more advanced numerical methods and object orientated programing methods.

    1. Re:My Physics Degree + Fortran by Anonymous Coward · · Score: 0

      Glad they "upgraded" to Windows PC's. Must have made the number crunching must faster. ;-)

  34. Yes by tygerstripes · · Score: 4, Insightful

    It's called Scheme.

    --
    Meta will eat itself
  35. FORTRAN is better than Python by tjstork · · Score: 0, Troll

    because Python is interpreted and FORTRAN is compiled. And honestly, lets admit it, the whole object oriented thing has pretty much failed and its time to pack it up and get procedural again.

    --
    This is my sig.
    1. Re:FORTRAN is better than Python by Anonymous Coward · · Score: 0

      Yeah.. that's why languages like C++, Java and C# are so popular - because of the massive failure of OOP.

      You don't have a freakin' clue, do you!

    2. Re:FORTRAN is better than Python by jgtg32a · · Score: 1

      OOP hasn't failed it has its uses it works great if you want to create a user interface, the only problem is that people are convinced that everything needs to be an object

  36. It could be worse. In fact, it was... by Remus+Shepherd · · Score: 1, Insightful

    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.

    --
    Genocide Man -- Life is funny. Death is funnier. Mass murder can be hilarious.
  37. History lesson by kfractal · · Score: 0

    Yes, teach it to them for historical purposes. So they see how awful it is and no one makes that same mistake again :P

  38. I had to learn it... by digitalhermit · · Score: 1

    so, damnit, everyone else better go through the same thing.

    Seriously though... though I learned it as part of my CS coursework, I used it more often in the math minor portion. Lots of the examples were in Fortran, and I remember having to write Newton-Raphson and trapezoid functions. It served the purpose of showing how numerical methods worked.

    I'm not certain how useful it would be in a current CS course. Today you'd just link a library and and make a call. I'm not saying that's in any way worse than how I learned it, but may not be as useful as a learning tool.

  39. Still going to be around for a while by gustgr · · Score: 2, Interesting

    In my opinion, yes. I am an undergrad Physics student (senior) and had my first contact with Fortran in my third semester, in a course called Computational Physics I. We learned the basics of Fortran 77/90 and how to solve some numerical problems using it. We also simulated some interesting problems that amazes undergrad students such as chaotic oscillators, Magnus effect in action and a few other simple yet curious systems. I had already some programming experience, but most other students didn't. They got it quite quickly and I think this is due Fortran's simplicity.

    Even if you are never going to use Fortran in your own projects, you will stumble on it now and then if you are going seriously into applied and theoretical research field. NASA, for example, has tons of production code written in Fortran and even new codes are written on it. Many many Physics and Chemistry groups around the world have their most important codes in Fortran, and sometimes they use clever hacks to make the code faster, so a minimum understanding of it is necessary. I work with a Computational Chemistry group and much of the code they still develop, even for new applications, is Fortran. It is good and solid code, they are very experienced on it, and they are not willing to change to another technology so easily.

    As a first language I don't know if Fortran is the best, maybe Python or Java would be my choice in this case, but it is definitely worth learning.

  40. The real problem: programming literacy by Anonymous Coward · · Score: 0

    The greatest misconception about fortran is this: although yes, it goes with heavily optimized compilers for number crunching, the real problem is beyond. The problem, as I have constantly witnessed for decades, is that the people who write fortran usually have no basic knowledge of computer science, and e.g. have never even heard of algorithmic complexity, balanced search trees, hash tables, nearest-neighbor problems, and the like. So they write, spaghetti style, very efficient code, which is then turned into very efficient object code by the compiler, implementing utterly inefficient numerical methods. I can remember blank stares when I told some of them that, despite very clever space partitioning, their nearest-neighbor search was still O(n^2), and that switching to a binary tree would obviously gain so much that they would be able to run the whole thing on a Linux box instead of a Cray.
    I'm not making this up.

    1. Re:The real problem: programming literacy by Anonymous Coward · · Score: 0

      BTW: fortran is not 40 years old, but 55. Bad habits never seem to die...

  41. No fortran - just Python by Anonymous Coward · · Score: 2, Insightful

    > 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..

    1. Re:No fortran - just Python by Will.Woodhull · · Score: 1

      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..

      Uh, well, no. In the areas where Fortran is still dominant, that is not the key thing at all.

      What is most important when developing a new airplane wing, flu vaccine, or artificial respirator for use during heart-lung operations, is that the libraries used for the complex math formulas are completely debugged and totally trustworthy. That requires the use of a language whose source code is simple for humans to read and critique, and whose compilers are fully transparent in the way they handle optimizations.

      Python is a great scripting language (even though I personally dislike it).The Python with C optimizations that parent post describes is an excellent way to make business logic systems, build games, or construct an EssayGenerator that will give you a passing grade in Writing 101 with the push of a button. But Python is not a very good choice when a failure in accuracy in some unlikely edge case would cause death. Fortran is a better choice in that context, since it was explicitly designed to avoid those kinds of problems that can arise between source code and implementation.

      --
      Will
    2. Re:No fortran - just Python by dodobh · · Score: 2, Insightful

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

      --
      I can throw myself at the ground, and miss.
  42. PYTHON???? by Fantom42 · · Score: 5, Insightful

    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.

    1. Re:PYTHON???? by slim · · Score: 2, Insightful

      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.

    2. Re:PYTHON???? by Anonymous Coward · · Score: 0

      If you want a surprise, go look at how LISP stacks up compared to C. It is better than you think

      This many times has to do with the alg you are using. Then *KNOWING* what your compiler will do. I have seen a few of these comparisons over the years. Many times the example they start with was optimized for a particular language. Be careful of these comparisons many times people are just trying to prove a point that 'X is better than Y language'.

      What do I mean by that? You can write horrible code in all languages. But it takes the thing holding your ears apart to make it 'good' code. Many programmers have gotten lazy and or do not know how to do it. Many times you ask them to optimize something and they give you a deer in the headlights look.

      It is all about O(N). What algo is applied to do something. Then how good is your compiler at recognizing that you are using something that it can apply its optimized pattern for. Many people treat compilers as some sort of magic tool. They are not. They are just pattern interpreters. Some compilers are bad at it and you have to force the issue. Either with hand assembly or crazy looking code.

      With ideal virtual machines such as Python, Java, .NET you get a intermediate interpreter. You are at the mercy of how good 2 things are, the interpreter (compiler) and the ideal virtual machine (JVM,CLR,etc...).

      People like to claim that 'X language is better than Y language because it is faster'. Which is hogwash. The real crux of the problem is how good is the compiler.

      To give an idea of what I am talking about go look at the comparisons of IronPython vs Python. Same language different backends. IronPython is beating Python in many cases in others it is way slower. For the SAME code.

      I also find many times when people claim a language is 'faster/slower' they are really talking about the 'standard' library that go along with many languages. That the FORTRAN one is fastest is not too surprising. It was built in a resource constrained environment where speed was critical. So its 'standard' libraries are optimized for machines that had a couple of meg of memory and a 2-4mhz proc if you were lucky. It is like trying to play a early 80s IBMPC game on todays hardware. They are usually impossible to play as they are crazy hand optimized to run on slow hardware.

    3. Re:PYTHON???? by TheRaven64 · · Score: 1
      I'm definitely not a Python fanboy - in my experience the only language where people consistently write bad code than Python is VB - but they premise of the article is not too far wrong. Most of the Fortran code these people write will be using external libraries for things like linear algebra, differential calculus, arbitrary-precision arithmetic, and so on. Profiling the code, I'd be surprised it if spends even 10% of its time in their code, with the remaining 90% being spent in the library code. If you go to a language that is 1/30th the speed of Fortran, you are only making the total 1/3rd slower.

      Take a look, for example, at something like GNU Radio for how Python can be used where high performance is needed. This project uses Python as a glue for joining together DSP modules written in a lower-level language. Most users of the system only need to use the high-level interfaces. Even though the Python is very slow, the overall code is very fast because it spends most of its time in the DSP modules.

      --
      I am TheRaven on Soylent News
    4. Re:PYTHON???? by Hatta · · Score: 1

      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)

      It seems kind of backwards when the fundamentals of a subject is considered an advanced topic.

      --
      Give me Classic Slashdot or give me death!
    5. Re:PYTHON???? by m_maximus · · Score: 1

      They relearn the lessons of CS he hard way over 10-20-30-40(?) years of experience.

      Some of them still don't learn how to write decent code after 40 years. I've said it before, but the danger posed by a programmer with a set of tools is only surpassed by an engineer who thinks they can write code.

      --
      I have a solution but you're not going to like it. (Something I say far too forten to my boss)
    6. Re:PYTHON???? by Fantom42 · · Score: 2, Interesting

      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)

      It seems kind of backwards when the fundamentals of a subject is considered an advanced topic.

      I agree with you in principle. However, do engineers really need to understand the intricacies of ZF set theory and peano axioms to formulate and solve a differential equation? What are considered fundamentals for a given topic really depends on how you intend to use it (in a practical sense, at least). People only have limited times, and limited brains, and while it would be nice to understand _everything_ from the ground up, and first principles, sometimes you have to settle for just knowing how to effectively use a tool and focus on your own area of expertise.

    7. Re:PYTHON???? by Fantom42 · · Score: 1

      If you want a surprise, go look at how LISP stacks up compared to C. It is better than you think

      This many times has to do with the alg you are using. Then *KNOWING* what your compiler will do. I have seen a few of these comparisons over the years. Many times the example they start with was optimized for a particular language. Be careful of these comparisons many times people are just trying to prove a point that 'X is better than Y language'.

      Yeah, I've seen those waste of time articles too. I'm referring to a real study of many languages that showed that a particular implementation of ANSI Common Lisp was almost as fast as C for some tasks and an order of magnitude faster than many scripting languages, and consistently beating by a small margin at others. The article didn't have a particular axe to grind about Lisp, but did mention that part of the reason for the speed was the simplicity of Lisp syntax, greatly reducing the complexity of the interpreter. Also a factor was a quite large amount of effort optimizing the compiler. I included the comment about Lisp more as an aside than anything else.

    8. Re:PYTHON???? by Fantom42 · · Score: 1

      You're advocating premature optimisation.

      Not really. I'm responding to Python advocacy. Specifically, I'm saying that Python isn't a good replacement for Fortran, pedagogically or otherwise, and the the "solution" really has less to do with any particular language and more to do with how we teach engineers computer science. Regardless, Fortran remains prominent in scientific computing for good reasons.

      The choice of glue language isn't really interesting or relevant to the core of the issue, which is that engineers feel like they aren't really learning what they need in their classes. To be honest, MATLAB ends up being a much more useful glue language because it can read the output of typical Fortran codes and create all kinds of shiny graphs right out of the box.

    9. Re:PYTHON???? by dodobh · · Score: 2, Insightful

      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.

      --
      I can throw myself at the ground, and miss.
    10. Re:PYTHON???? by MtHuurne · · Score: 1

      It all depends on the granularity of the operations you perform in Python. Multiplying two giant matrices by iterating over all items in Python is going to be very slow indeed. Multiplying them by writing "C = A * B" in Python and having the actual multiplication done by a native library can be very fast.

    11. Re:PYTHON???? by ceoyoyo · · Score: 1

      "Great language. But its also a factor of 30 times slower than a compiled language like C."

      Not if you use it properly. Python is an interpreted language. There's an art to using it properly. Here's a hint - if you're writing big for loops, you're doing it wrong.

      Incidentally, the solution to that problem often involves calling a function written in Fortran.

    12. Re:PYTHON???? by sciurus0 · · Score: 1

      There's a lot of alternatives in between pure python and pure C or fortran that can be speedy to write and run.

  43. University != Trade school by SpinyNorman · · Score: 5, Insightful

    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.

    1. Re:University != Trade school by dkh2 · · Score: 0, Redundant

      Dinsdale says "mod this guy up!" He makes some very good points re: good/bad choices for teaching programming principles vs legacy/forward interactions.

      There are a lot of places where scripting languages (Perl, PHP, Javascript) are appropriate and useful but they miss the mark for teaching a lot of programming methodology. Object languages (Java, C++) are better because they expose more of what as likely to be seen in the actual workplace but, for teaching core, base level, algorithm development and optimization a student should be exposed to at least 2, preferably 3 languages. One procedural like Pascal or Modula 2, one Object based like C++ or Java, and others as the need demands.

      --
      My office has been taken over by iPod people.
    2. Re:University != Trade school by Rhys · · Score: 4, Insightful

      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.

      --
      Slashdot Patriotism: We Support our Dupes!
    3. Re:University != Trade school by Anonymous Coward · · Score: 0

      They are using it as a tool to accomplish science and engineering goals; not computer science goals.

      And, do you not think MBAs spend time using Excel AND being taught how to write macros? They are things to be done in this world which require other than a liberal arts major or computer science major.

    4. Re:University != Trade school by Anonymous Coward · · Score: 0

      Well for starters, jackass, large-scale computational codes are not written in JavaScript or "Microsoft Clippy", whatever the hell that is. And speaking as a practicing engineer not long out of school who is writing such software, I would have appreciated instruction in a language that I would actually use in practice (Fortran 90), instead of some CS wanker jerking me off with yet another sorting implementation in Scheme.

    5. Re:University != Trade school by dkf · · Score: 1

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

      So you advocate teaching full-on computer science to physics, chemistry and engineering students? Why? Shouldn't they be learning about the fundamentals of their own fields instead?

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    6. Re:University != Trade school by Anonymous Coward · · Score: 0

      I agree 100%. There's simply no reason why a university can't simultaneously teach core principles and methods using a modern language. Frankly I think a large part of the problem is the faculty themselves (having experienced this personally, graduating with a CIS degree from a large university). In fact, the two most insightful classes I took throughout my entire career were taught by adjunct professors whose day jobs involved actually working in the real-world.

      Note that I'm not implying faculty professors don't play a significant role in the evolution of computer science, because they obviously do. However when it comes to readying CIS students for entry into the workforce, it certainly seems as if there's much left to be desired.

    7. Re:University != Trade school by Peter+La+Casse · · Score: 1

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

      I used to agree, but I changed my mind. In addition to having learned core principles and methods, graduates from universities should be able to support themselves immediately after graduation. That means that they should be able to bring enough value to an organization (possibly one they form themselves) to justify their employment, to provide themselves with food, shelter and the other essentials of life. University is not Trade School: University is a superset of Trade School.

      Granted, most of those "job skills" should be learned before a student enters the university: every high school graduate should be able to make a budget, provide themselves with food and shelter, tie their own shoes without help and so on. Obviously we're far from that.

      On the specific topic of this story: some scientists need to know Fortran to do their jobs. It may well be good to teach some other language first, or to require a Programming Languages course in every undergraduate science program, but it's essential for undergraduates to learn the programming language(s) that dominate(s) their field.

    8. Re:University != Trade school by snl2587 · · Score: 1

      May as well teach them Excel macros and how to interact with Microsoft Clippy while you're at it.

      Interesting that you mention that. When I took the undergraduate programming course for Chemical Engineers at my university, the class focused exclusively on Excel and VBA. That's it. And people in the class still had extensive trouble with it.

      In an ideal sense I think you're right: an undergraduate in physics, chemistry, or engineering should be able to just take and extend concepts learned in any language to whatever their jobs required. In practice, though: have you met some of these undergraduates? While I firmly disagree with teaching to the lowest common denominator at any level, it's sometimes shocking to witness the difficulty they have even getting "Hello World" to run, let alone a simple N-R algorithm.

    9. Re:University != Trade school by westlake · · Score: 1

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

      But whose core principles and methods do you teach?

      There are other majors besides CS.


      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.

      The modern university is quite practical-minded. That decision was made when the classic Latin and Greek curricula was overthrown.

      Mastering the Excel spreadsheet has become - in many settings - as essential a skill as a basic command of the English language.
       

    10. Re:University != Trade school by Anonymous Coward · · Score: 0

      University may not be trade school, but engineering and "lab science" ARE trades. There's no sense teaching computer science in this case, just hand them the tool and tell them what is needed to do the actual work.

  44. Short answer, no. by sizzzzlerz · · Score: 2, Insightful

    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.

  45. Old Fortran Code by Anonymous Coward · · Score: 0

    In my area of Research, almost every program written has been in Fortran. Maybe Python would be better- i wouldn't know. But it is a lot easier to update a program written in an old language than learn a new one and start from scratch. And fact is Fortran does work and works quickly. Being 40 years old means people have spent that time optimizing the routines.

  46. Re:libraries. gigabytes of libraries by Quothz · · Score: 1

    why something that was written in a year and used over two decades, need millenia to be reimplemented?.

    He said "man-millenia". Look: If you have two guys who each work one hour on a task, then you've expended two man-hours on that task, even though only one hour has passed. I've no idea whether the OP is right or not about the manpower that would be needed, but it's not implausible.

  47. no....it's all about the architecture, people by NickBlack · · Score: 1

    FORTRAN is still used so heavily because a) the architectures used for HPC are some of the rarest, most singularly-purposed machines on earth -- your Crays, your J-Machines, your Cell BE"s. These are not the commodity architectures for which gcc is designed; in many cases, gcc support might not even exist. In any case, it's certainly not going to have the intense and often, frankly, bizarre optimizations necessary to properly make use of these machines. Does python even allow one to manage cache prefetching, SIMD, the floating point model, etc? b) FORTRAN's easily parallelized by compilers -- even moreso than C with OpenMPI, etc -- due to the simplicity of its loop constructs and a rich heritage of automatically parallelizing these constructs (look at Ken Kennedy's work etc. google for DOALL and DOACROSS). For HPC, you're often working with massively parallel architectures, often SMID-heavy. Check out the Banerjee inequality sometime if you want to see something cool. c) Vector notation in FORTRAN is easily compiled into vector registers and operations. Python slices could probably be amenable to this, but Python isn't really ... d) Array-oriented. Everything in the microarchitecture world is designed around fast access to and operations on arrays. If you're not working in the array model, it's gonna be hard to compile it in a fashion that one can make use of architectural features designed for high performance. Language research is ongoing that seeks to address these issues. Python doesn't get there.

  48. Depends on the version by DoofusOfDeath · · Score: 1

    I'm currently porting a large Fortran 77 program to C++. I can safely say that Fortran 77 is a dangerous, bad, damaging language to teach anyone, especially impressionable young programmers.

    There are several idioms in F77 that must not be taught to future generations. Probably most importantly, the use of "common blocks", and "entry" points, and the hacks needed to get around the lack of dynamic memory allocation.

    I'm sure that newer versions of Fortran are more reasonable, though.

    1. Re:Depends on the version by michael_cain · · Score: 1

      There are several idioms in F77 that must not be taught to future generations. Probably most importantly, the use of "common blocks", and "entry" points, and the hacks needed to get around the lack of dynamic memory allocation.

      I know "computed goto" has been declared to be obsolete, but has it ever actually disappeared from the language? If not, I nominate them for inclusion on your list. I recall porting about 10,000 lines of code from one OS/compiler to another around 1977 that was simply riddled with the damned things. The original programmer had left comments indicating that he thought they were faster than function calls. Moving the code blocks into actual functions, and untangling the spaghetti that had grown up around the gotos, reduced the run time on the test cases by a consistent 25%.

      Common blocks had their place at that time, although they could certainly be abused. The same program had a collection of subroutines (consistency was not the original coder's strong point) that each took 30-40 arguments, all but two or three being global state variables. A common block cleaned out all of that mess. As I recall, that change alone resulted in the program succeeding on several test problems that had been failing, due to multiple places where the variables in the argument list appeared in the wrong order.

  49. Wrong question being asked by GreatBunzinni · · Score: 1

    I'm a civil engineering student who had Fortran in the curriculum. Although I don't use Fortran very often, I believe the article poses the wrong question. Instead of "why learn fortran" the question that the article's author should ask himself was "why am I forcing Python as a replacement of a tool that benefits from a battle-hardened technology that has the benefit of having a extremely serious, decades-long test on production environments in the real world?" I mean, "fortran is old" is not a technical argument. So it's first inception was decades ago. Is that even relevant?

    More to the point, mentioning Python as a tool for numerical analysis is laughable, not because of having any blatant weakness but because there are a whole lot of tools that fit that job even better than Python, both in terms of speed and available APIs. If we were forced to abandon Fortran then why exactly would we adopt Python when there are other tools that are far better suited for the task? (Read C, C++, Maxima, Mathematica, Matlab, Octave, R, etc...)

    --
    Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
  50. What's the server programmed in? by Bananenrepublik · · Score: 1

    Whatever the server's implemented in, it's definitely not fast enough.

    Today's Fortran is not the Fortran of 40 years ago. Ever since Fortran 90 (i.e. for almost twenty years) the language has real dynamic memory allocation and real ways of sharing data between different parts of the program. Fortran got its bad reputation because the lack of these features caused most old Fortran code to be hard to follow -- emulating memory allocation by using lots of large arrays, and tens of lines of repeated COMMON blocks scattered all through the code .EQ.ual very opaque code. And let's not forget that those codes were written to be extremely efficient in terms of CPU time as opposed to developer time.

    It's no surprise that Fortran got this bad reputation some 25 years ago when the art of language design had advanced significantly beyond what was in Fortran originally, but people who still think they need to pontificate on that point should catch up with the times -- or at least with 20 years ago.

  51. IMHO by kenp2002 · · Score: 1

    IMHO I would have to say yes. With the rise of multi-core systems I found that FORTRAN has some programming habits that would carry into multi-threaded and multi-core programming. While I don't think it has a high relevancy for finding employment I do think that FORTRAN, along with at least a 3 credit hour course in assembly is crucial for fundamental programming skills.

    I think we can drop PASCAL (If they haven't already) and swap it with either Ruby or PERL for undergraduates.

    --
    -=[ Who Is John Galt? ]=-
  52. Esperanto by dkh2 · · Score: 1

    May as well require them to speak Esperanto too just to make sure nobody understands them.

    I still work with Cobol geeks. It's actually in regular use. But I don't know of anybody who uses Fortran except for comp-sci departments. And if you're using it to teach programming practices you might as well teach said practices in a language they stand a chance of using.

    --
    My office has been taken over by iPod people.
  53. High Performance Computing by mdmkolbe · · Score: 1

    In the high performance computing and physical simulation world, Fortran and C are still king. In large part this is because of the BLAS, LAPACK, MPI and OpenMP libraries which are the standard libraries to use for linear algebra and parallel programming and upon which most physical simulation software is built. These libraries started out in Fortran but C ports are also widely available. Thus a new engineering graduate is much more likely to need to work with Fortran and these libraries than with Python.

    Also while most code written by scientists/engineers isn't written very efficient (because they don't know algorithm design and analysis), it needs to be written in a language where someone (usually a CS person) can come in a cleanup/tune the critical bottlenecks. At that point the efficiency of the language does become important. In this field, a 3% improvement in performance can make or break you. (Yes, you can mix C and Python, but its easier to stick to one language rather than having to keep marshaling back and forth.)

  54. Schools don't teach basics anymore by gbr · · Score: 1

    They should be taught SOMETHING. I recently saw a case where a new programmer was asked to add CR/LF to the end of his text strings. Well, when we saw the code, he had done exactly as asked. Each string had "CR/LF" (the string literal) added to the end.

  55. Newer doesn't always mean better. by Churla · · Score: 3, Insightful

    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"?

    --
    I'm a fiscal conservative, it's a pity we don't have a political party anymore
    1. Re:Newer doesn't always mean better. by Jawn98685 · · Score: 2, Insightful

      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.

    2. Re:Newer doesn't always mean better. by Churla · · Score: 1

      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?

      --
      I'm a fiscal conservative, it's a pity we don't have a political party anymore
    3. Re:Newer doesn't always mean better. by Jawn98685 · · Score: 4, Insightful

      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.

    4. Re:Newer doesn't always mean better. by twrake · · Score: 1

      I think this comment profoundly restates this entire threads argument. The construction industry suffers from what would be called in the software industry level 1 companies. Most for profit construction companies have adopted nail guns over two decades ago. Nail guns are clearly more productive and level 1 companies understand this when they see this. But this isn't really the point most construction delays and costs are associated with management of the job as a whole and getting the right pieces from the suppliers ( and checking an reordering them if incorrect) and knowing that the specs will chance of that cost saving material has required you to redo work "completed" a month ago.

      Companies have legacy code in FORTRAN and COBOL and few new programmers fluent in either, this makes the legacy costs even higher. Sure rewrite it all in the newest language is the programmers dream but it will never happen. The newest nailgun makes little difference to the companies with these legacy problems and programmer call for call these new languages. Let em starve it was those guys who got us these legacy problems in the first place is the corporate attitude.

      FORTRAN IV was old when I learned it in 1975 a semester early so I could breeze through the spring term, I bought the textbook and went down to the computer center and punched the cards, and typed on the terminals like any good hacker to be. It was easy for me I had studied machine language in 4th grade from a book I purchased, computer are just dumb machines doing step by step stuff these languages just translate one set of instructions to another...

      FORTRAN is worth teaching as was pascal and C and java and lisp and PERL.

      Language wars are a waste of time.

    5. Re:Newer doesn't always mean better. by Anonymous Coward · · Score: 0

      Good analogy. Growing up, a friend's dad was a carpenter and I remember watching him drive 10d nails with 2 hits. I still need many times that to do the same thing - there's a lot to be said for familiarity and experience.

  56. ForTran = Formula Translation by Bloody+Peasant · · Score: 1

    Remember what the name means.

    Because the language has been around for decades (40 years?) it has matured to the point where the libraries and compilers are highly optimised and reliable, and performance on the most significant and "heavy" computational problems has been tweaked to go as fast as possible.

    Maybe in another couple of decades, Python, Perl, and other interpreted languages will come close. But not now (IMHO of course).

    --
    -- This .sig intentionally left meaningless.
  57. Bindings by Anonymous Coward · · Score: 0

    From what I understand, most of the scientific computing applications of python involves using bindings to C/C++. Efficient, fast code for crunching numbers is written in the lower-level language, and the program is organized at a higher level using Python. This way the program is both easy to read and runs fairly quickly.

  58. More FORTRAN please?! by laxsu19 · · Score: 3, Interesting

    I am a manager in a highly technical organization that relies on computer codes to do our job. In my experience, there isn't ENOUGH FORTRAN teaching in the college level. Maybe its location based, but most of our new-hires (we get most from the northeast, but still get a noticeable amount from as far away as University of Washington, Univ of Hawaii, and USC) actually are NOT taught FORTRAN and instead are taught something object-oriented, typically C++ or Java. I know for a fact that Penn State suggests C++ for all undergrad engineers (FORTRAN is offered though - the classes hold less than 50% total students than does the C++ course). In my organization we also have a 'double-hump' age distribution: lots of people ready to retire (or could have retired 5 years ago...) and lots of people who are within 5 years of their first day on the job. This creates a problem of knowledge management; our new guys need to know the details of the FORTRAN code they are using every day to the extent that our ready-to-retire guys know it, and fast. If they are not taught FORTRAN, this creates an even larger learning curve for them which isn't desirable. So one option would be to 'rewrite the code for the future generation'.. We definitely do not have the resources to rewrite our workhorse codes that have been in use and development since the 70s. I don't know if an organization as large as Microsoft could rewrite Windows in a new language. Also, we can't retire our old codes because they are still actively needed to respond to emergent issues (it is easier to maintain the codes than it is to make a new model to be inputted into a new code). So, our hands are tied (mine specifically!) and my organization actually needs MORE FORTRAN programmers coming from the university just to maintain the status quo.

    1. Re:More FORTRAN please?! by Hatta · · Score: 1

      I've got a fever! And the only prescription is... MORE FORTRAN!

      --
      Give me Classic Slashdot or give me death!
  59. Re:libraries. gigabytes of libraries by Bagels · · Score: 1
    "Man-millenia" - it might only take a year (or less) to reimplement, but the number of hours put into the project (spread across a large number of programmers) would be huge.

    Except I'm pretty sure that there are modern languages and libraries that can handle this without Fortran. I don't have much experience with it myself, but I'm pretty sure that's exactly what MATLAB is for, for one.

    --
    --- Bwah?
  60. python? by Anonymous Coward · · Score: 0

    Yeah--let me know when python is even 50% as fast as optimized fortran out of the box. Look--I've used numpy, scipy and all that--python for distributed computing. And it's *great* stuff. But when it comes right down to it--while you can do numeric computation in python--it just isn't as snappy. C, Fortran--they're still faster, and they probably will be for some time.

    It isn't the byte code--todays CPU caching and branch prediction seems to handle all that...it's the freakin' memory structure and GC as best I can tell. Maybe if that gets better...problem solved.

    1. Re:Python? by DrgnDancer · · Score: 2, Interesting

      That was my thought. An general purpose, interrupted scripting language for scientific computing? Say what? I've never seen anyone do any sort of scientific research programming with Python, unless it was a control script or GUI interface to something written in Fortran or a C derivative. What's the point of running on the kind of huge multi-CPU systems they use for scientific modeling, if you're going to use a an interrupted language?

      --
      I don't need a million points of light, just two points of multi-mode fiber and a 10 Gig-E router.
    2. Re:Python? by motek · · Score: 4, Insightful

      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.

      --
      I would like to die like my grandfather did - sleeping. And not screaming in terror, like his passengers.
    3. Re:Python? by digitig · · Score: 3, Informative

      Not all scientific programming is heavy duty number crunching -- I'd suggest that only a minority is. My postgrad research proposal (involving Monte-Carlo simulation) said that I'd use Python for the framework and would swictch to C/C++ where Python got too slow. Python never did get too slow, and I never needed a single line of a C-derivative language. I also used Python for some continuation of Robert Axelrod's classic work on game theory (is that science, math, or psychology?).

      Anyway, you're making the classic assumption that undergrads are taught the language for the sake of the language; that it will be the language they will use in the real world. Rather (even in the sciences, not just in computing) it's programming that's being taught, and the language is simply a means to an end. It's futile to try to double-guess what they will be using when they get out into the real world; even if you look at what's in demand now, no language has a monopoly and the language-of-the-moment will change anyway during their career. The person who can program Python will pick up any other procedural language quickly enough, because Python has pretty much all of the relevant constructs, and Python has the advantage of being easy to learn. FORTRAN certainly isn't easy to learn (I did my undergraduate project in FORTRAN), and even the newer versions of FORTRAN that have things like Object Orientation don't present the constructs as clearly as modern languages such as Python. I agree that Python is unlikely to be the only language they'll ever need (don't try saying that on the Python mailing list, though!) but it's at least a contender for the best first language.

      --
      Quidnam Latine loqui modo coepi?
    4. Re:Python? by XDirtypunkX · · Score: 2, Interesting

      One thing that Python doesn't teach is static typing. I'd say having 2 languages (one static typing, one dynamic) and talking about the advantages of both. Hell, you could even use Boo as the statically typed language, which is very close to Python.

    5. Re:Python? by digitig · · Score: 3, Interesting

      If it were a computer science course then I'd say that something in the Lisp family, something in the OCAML or Haskell family, and somthing from the Prolog family. I agree that they're likely to encounter static typing at some point but this isn't a computer science course so it shouldn't try to teach everything, and static typing shouldn't come as too much of a shock. Heck, my first language was FOCAL, and I managed to learn to cope with it.

      --
      Quidnam Latine loqui modo coepi?
    6. Re:Python? by story645 · · Score: 2, Informative

      Say what? I've never seen anyone do any sort of scientific research programming with Python

      My research lab (satellite data processing) is all python and the psychology department in my school is thinking of switching over to python. There are tons of great scientific computing libraries either written or wrapped in python. It's a great language for social science research because it's so simple and clean, and the libraries make it easily extensible to the hard science crowd. I'm working with pretty big data sets at the moment and don't find python that slow in comparison, plus it simplifies so much of the data organization/sorting/filtering tasks.

      --
      open source modern art: laser taggi
    7. Re:Python? by SSCGWLB · · Score: 2, Informative

      I guess it depends on the type of scientific computing you are doing. If you need a cluster to crunch numbers, don't use python. However, there are huge areas in scientific computing where: 1) speed isn't the primary concern or 2) languages like python are fast enough. Also, python has some pretty significant scientific computing tools like scipy (see http://www.scipy.org/), visualization using matplotlib (see http://matplotlib.sourceforge.net/ ), etc. I personally know a lot of people doing scientific computing and general research who use python.

      If speed was the only concern, people wouldn't be using tools like Matlab, IDL, python, and the like. Obviously, a significant number of people doing scientific computing find these tools fast enough.

    8. Re:Python? by Anonymous Coward · · Score: 0

      nitpick: Interrupted? I think you mean interpreted scripting language.

    9. Re:Python? by Darinbob · · Score: 4, Insightful

      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.

    10. Re:Python? by Anonymous Coward · · Score: 0

      I write and use scientific simulation codes, and it's true that for these large codes (several thousand processors), getting good performance is vital. Languages such as FORTRAN and C/C++ are therefore dominant.

      Interpreted languages like Python and IDL are however widely used by scientists for analysing data and the results of large simulation codes, because:
      - They tend to come with large libraries of (relatively) easy to use functions
      - They can easily produce high quality plots for publications
      - The programs are much easier to tinker with and debug, and man-hours are much more expensive than CPU-hours
      - Algorithms can be quickly tested in an interpreted language, then later re-written in a faster language if needed.

      Anything which takes less than a few hundred CPU-hours to do is therefore (generally) better written in an interpreted language than in FORTRAN/C.

    11. Re:Python? by AliasMarlowe · · Score: 1

      Humph.
      My first two languages in Chemical Engineering were FORTRAN and APL. Of the two, the interpreted language APL was used far more, especially for making quick programs to do computations & graphs for lab reports. We used FORTRAN IV (pre-F66, FWIW), with decks - nay, boxes - of punched cards, for larger scale stuff, such as projects extending over a whole term. I can still recite the JCL incantations needed...
      Now get off the retirement center's lawn.

      --
      Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    12. Re:Python? by DrgnDancer · · Score: 1

      As a sort of general reply to all the replies above....

      Most of my experience with research computing involves being the admin on big iron boxes in the computer room for a couple of universities. I suppose I should have qualified my statements by saying so. All of the programs run on the big boxes were compiled and written in either Fortran or C derived languages. I suppose that since I have a hammer, everything looks like a nail.

      Having said that, and in reply to some of the "the point is to teach programming, not teach the language they are going to use" comments: given that many of these students are likely to need a low level language eventually (since I think we can accept that MOST hard science students eventually have to do something using big iron parallel system), doesn't it make more sense to learn a low level language first? Most people I know that start with a scripting language and move to lower level languages have a hard time with a lot things. On the other hand, people that start with low level languages and move to scripting languages can get a pretty strong hold on the new language in just a week or two.

      Also, I apologize for letting my spell checker replace interpreted with interrupted. Duh.

      --
      I don't need a million points of light, just two points of multi-mode fiber and a 10 Gig-E router.
    13. Re:Python? by ottothecow · · Score: 1

      Out of curiosity, why would you suggest something like lisp? The first course of my schools CS sequence was done in scheme and I found it intersting to learn a functional language since all my previous coding had been in more typical languages but I was never quite sure why they chose a functional language for what was an introduction to programming for about a third of the class.

      --
      Bottles.
    14. Re:Python? by digitig · · Score: 1

      I wouldn't choose it as a first language, but I think if you're doing Computer Science then I think it's a useful set of concepts to be aware of. Not to mention the fact that I have a real-world need to hack some Scheme at the moment -- a language I don't know yet -- so it's on my mind :-)

      --
      Quidnam Latine loqui modo coepi?
    15. Re:Python? by Nefarious+Wheel · · Score: 1

      I can still recite the JCL incantations needed...

      "Aha! Think you can dominate me with your IEBGENR Mind Flay?" (casts saving throw). "I counter with CORGZ" (Rolls dice. Then rolls again. And again...)

      --
      Do not mock my vision of impractical footwear
    16. Re:Python? by dannys42 · · Score: 1

      I don't know of any highly optimized Python compilers for big metal.

      Do you know of any moderately optimized Python for the desktop even? =) seems like all the redhat/fedora install scripts still make new computers run like they did 7 years ago. omg, and scons is awesome, but it takes longer for it to scan the source tree than it does to compile!

    17. Re:Python? by gringer · · Score: 1

      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.

      I've rewritten my R code in Java a couple of times. The first time, it was a program that took about an hour to finish (or ~20 hours for the whole genome), but ended up being used many times. I only rewrote it after the ~4th time I needed to use the program. The rewritten code took about 2 minutes (similar to the length of time it took R to just read in the input file).

      The second time, my supervisor wanted something done in under a week, and I calculated that it would take about a week and a half with the R code. Rewriting (in Java) something that took around 6 hours to complete took me about 4 hours, and I managed to speed it up to about 25 seconds completion time. That demonstrated to me the extreme slowness of R's handling of character arrays.

      However, I usually just leave R to its own devices, because coding in R for what I do is a quick process, and needs very little debugging. The amount of time spent writing in a lower level language is just not worth it for the numerous one-off projects that I do.

      --
      Ask me about repetitive DNA
    18. Re:Python? by gringer · · Score: 1

      We got Java in first year, MIPS and C++ in second year, then Haskell and Prolog in third year for my undergraduate computer science courses. That was a good spread, but I'm somewhat disappointed that we weren't given more time on the functional languages.

      --
      Ask me about repetitive DNA
    19. Re:Python? by Philip_the_physicist · · Score: 1

      Python is nice for doing text scraping and other similar tasks, so it is a useful language to know if you, particularly if you have equipment which gives horribly formatted text files which you need to convert to a more sane format for processing. OTOH, I certainly agree that FORTRAN is the obvious choice for numerical work, just as C[++] is for bit bashing. It is all a matter of choosing a good language for each job, but those three will cover pretty much everything a non-programmer would need.

    20. Re:Python? by tb()ne · · Score: 5, Informative

      I think you are mistaken regarding what most undergraduate science students actually do (they are not maintaining/upgrading old fortran libraries). Most of the high performance capability that undergrads need involves matrix computations, FFTs, convolution, etc., all of which are included in the python numpy/Numeric module (which is a wrapper around fortran libraries, so they're just as efficient). And since they'll likely spend as much time analyzing data as producing it, python + numpy + matplotlib is a perfectly suitable solution.

      I'm not suggesting that fortran isn't of value to some scientists in some situations but many science students will never have to touch fortran code unless they're forced to take a class that teaches it. As you said: "They're being taught to program as a mere tool for the important stuff being taught." Which is why it makes sense that their intro language is one that is easy to learn, supports multiple programming paradigms, has efficient numerical libraries, has easy-to-use visualization tools, an interactive interpreter, and can be used as a general purpose programming language. And while I personally prefer python for a high level language, there are others that could serve the same purpose.

    21. Re:Python? by Incredible+Elmo · · Score: 1

      Besides, when using modules like numpy, the numerically intensive functions are written in C or Fortran anyway (e.g. LAPACK, ODEPACK). Python then becomes the glue to tie all those high-performance routines together, without the need for malloc, common blocks or whatever time-consuming things there may be in the compiled languages.

      Else, just use lisp :)

    22. Re:Python? by daver00 · · Score: 1

      "I've never seen anyone do any sort of scientific research programming with Python, unless it was a control script or GUI interface to something written in Fortran or a C derivative"

      Like, say NumPy? Seriously dude, the others are right, get out more, Python is gaining a lot of momentum in the scientific community because it is fast to code in, open source, and has fast libraries written in C for doing the number crunching (NumPy). It also has some functional flavour to it.

      In my engineering degree, we learny Python, the Mech eng department uses a lot of python for scientific modelling, and they do some high class research. In CS at my university they have replaced Scheme with Python. Python simply rocks, and is used quite widely in science and engineering.

    23. Re:Python? by daver00 · · Score: 1

      "but it's at least a contender for the best first language."

      The exact philosophy adopted by the Mechanical engineering department at my university. Engineering students aren't typically computer minded, and balk even at learning a dead simple language such as python. Scoff at this all you like but its the plain truth of it. The professors use it too.

    24. Re:Python? by Anthony · · Score: 1

      I agree with tb()ne. While I am impressed with FORTRAN and its durability, Python is the tool for my scientific programming. The Sage notebook to be precise, with its access to a raft of mathematical tools and libraries. If you are going to teach programming to science and engineering students, you could do a lot worse than teaching them to do it in Python.

      That being said, I have punched cards in FORTRAN IV and slaved over a vt100 with FORTRAN 77 and most recently written some code in FORTRAN 95. When the times comes to do some heavy-lifting with MPI, FORTRAN will be the choice. [With a bit of work on Sage, perhaps writing something to use MPI from Sage that played nicely with schedulers such as PBS and derivatives would be worth looking into.]

      --
      Slashdot: Where nerds gather to pool their ignorance
    25. Re:Python? by lordSaurontheGreat · · Score: 1

      This applies to many languages - many languages are popular precisely because they are popular, not because of inherent elegance or suitability.

      So that's why we still have Java, C++, and BASIC! Gee I never really thought it out...

      --
      Consider yourself spoken to.
    26. Re:Python? by fractoid · · Score: 1

      Yeah, Python is great because it's so easy to extend with native code. You can do all the heavy lifting (which often isn't particularly complicated) with C(++) and do all the algorithmically complicated stuff in Python.

      As for teaching FORTRAN, well, it's still used a bit in scientific computing, so it's not a dead loss. It does seem a bit like teaching engineering students to smelt wootz steel, though.

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    27. Re:Python? by anarchyboy · · Score: 1

      As a physics student I did see python being used, mainly because it makes sorting and manipulating data very easy and little programs can be written very quickly in it. However for Monte Carlo simulations which is what i spent some of my time doing the language of choice was either C or Fortran. In simulations where the amount of computer time available is a major restraint then I don't think python would be used.

    28. Re:Python? by dublin · · Score: 1

      ...and Python has the advantage of being easy to learn. FORTRAN certainly isn't easy to learn...

      Guess it depends on what you're used to. I found FORTRAN to be dead easy, and Python quite a bit harder - enough harder that I've never really gotten fluent at it. I'm mostly convinced that whatever you learn first (a procedural language or an object-oriented language) will warp you for life - and once having learned one, you'll never really master the other. (And yes, it does work both ways - most of the new young OO guys can't do procedural programming to save their butts...)

      Although Python is a popular choice, I really think that Tcl is perhaps better in many ways, it's one of the easiest languages on the planet to learn, it's very consistent, and very powerful - enough so that Tcl is very commonly used to provide some pretty hairy astronomical calculations and transformations (look up the Starbase project from Harvard) - interestingly, in addition to being called by Tcl, these are also made available to *shell scripting* for easy integration in to pretty much anything else.

      Although FORTRAN is great, and will be around for a long time, there are probably better langauges to learn. I really hate this trend of teaching Java, which is relatively user-hostile, and way too "CS-programmer"-centric. Python is better, and you could make a decent case for Ruby or Erlang, but if I was recommending today, I'd consider languages like Lua, but then there's no gaurantee it'll still be around or used in 20 years either.

      It's the "useful in 20 years" criterion that convinces me that the *most practical* language to teach in colleges is Unix shell scripting, which would include the Unix text processing utilities like cut, paste, etc., plus a smattering of more advanced tools like sed and awk. These are somewhat obtuse, but very useful, and my code runs just the same on any Mac (or PC with U/Win or Cygwin) as it did on the $100K workstations where it was written.

      --
      "The future's good and the present is nothing to sneeze at." - Roblimo's last ./ post
    29. Re:Python? by digitig · · Score: 1

      I'm mostly convinced that whatever you learn first (a procedural language or an object-oriented language) will warp you for life - and once having learned one, you'll never really master the other.

      Nope. I started with FOCAL, then FORTRAN, then TRS-80 BASIC, but had no problems transitioning to OO programming. It probably helped that before OO languages became commonplace I was already hand-rolling dynamic despatch tables in Pascal because that seemed to be the only way to handle the way I was thinking about design.

      It's the "useful in 20 years" criterion that convinces me that the *most practical* language to teach in colleges is Unix shell scripting

      If you read what I wrote, you'll find that I consider the "useful in 20 years" completely irrelevant. We have no idea what will be useful in 20 years -- we have no idea what will be useful to undergraduates in even 3 years, because we have no idea who they will end up working for and what tools they will be expected to use. If we teach them a language then we are crippling their prospects. If we teach them to program then we are helping them. I came out of university and spent 27 years with a company that used PDP8s, then a brief diversion into VMS, them Microsoft Windows. I was never allowed to install Cygwin, and still wouldn't be if I were still with that company. What the hell use would Unix shell programming have been to me, had they taught it at university?

      --
      Quidnam Latine loqui modo coepi?
  61. Re:libraries. gigabytes of libraries by dword · · Score: 1

    so it doesn't matter what people in the slashdot community think: for engineers to use anything but these tried-and-tested engineering libraries, that happen to be written in fortran, would just be genuinely stupid of them.

    So, your idea is to teach everyone FORTRAN because if they become engineers, they might need it?

    How many projects do need those kind of computations? There are some cases, I agree, but I could also argue that everybody should be taught assembler, because they have tons of microchips in every-day devices, such as mobile phones, televisions or cars. NO! Leave FORTRAN where it should be, with the mathematical experts, don't feed more useless stuff to undergrads.

    Next question, please!?

  62. I don't think its too bad by dublindan · · Score: 1

    While I agree that languages like Python may be better as an introductory language, Fortran is still heavily used in the scientific community, which these students will (theoretically) all eventually be part of. It makes, at least some, sense to teach the tools which they will be using. In any case, once you know one imperative language, its not too difficult to pick up another. Syntax is easy to learn.

    Personally, I think learning Fortran as a first language is better than learning Java as a first.

  63. Not sure it's a big deal by Kirby · · Score: 1

    I tend to think that the goal is not to learn specific instances of skills in college (ie, a particular language), but learn principles. It's very much worth any science student's time to know a programming language. It's a reasonable thing to learn programming well enough to pick up any language - but really, this is one path of many, and is probably best called 'minor in computer science'. Yes, Fortran is not exactly cutting edge, but it's a fine example of one kind of language.

    If you wanted to learn the language most commonly used in science labs, sad to say as a programmer type, probably spend some time with Visual Basic.

    As an ecosystem, the best thing is probably variety. It's good that some percentage of new graduates know Fortran, so it doesn't become burdensome to hire people to work at places with legacy codesets, but it's also good that it's possible to hire someone working in a language that might be more suited to what you're doing. Or to a different type of brain. Diversity is good in a larger sense - someone who might be a mediocre Java programmer might be a star Perl programmer, and vice versa. The more diversity gives more individuals a chance at finding a niche they excel in. I think this aspect is overlooked massively when people talk about 'the right tool for the job'.

    If you're a scientist that likes programming, though, a minor in CS so you can pick up whatever language comes your way is an approach with a lot of practical potential. (Or a double major, but CS is hard and most Science programs are hard, so I'm not sure it's worth it - even the people that hire programmers that like degrees would not find fault with a Physics degree and a CS minor.)

    --
    -- Kate
  64. It depends by Anonymous Coward · · Score: 0

    I'm a post-doctoral researcher and never had any Fortran training in my undergraduate studies and I've spent this week trying to learn Fortran as there are several pieces of code I need that are written in it. Unless people start porting old code/models to a new language then it's necessary to learn it.

  65. What to learn first by vlakkies · · Score: 1

    For a scientist, FORTRAN is still a valuable skill since there are so many libraries and applications that represent many years worth of development to draw from. Plus it is efficient, etc.

    The question here is what is the best way to introduce students as a first exposure to programming. FORTRAN has many quirks so it is debatable whether it is really the best language to learn first. You can write truly horrible code in FORTRAN, but that is true to some extent of all languages, although Python does make it harder.

    On balance, if students are taught a modern dialect of FORTRAN and the instructor stresses good programming practices, it remains a good way to introduce students to solving a problem numerically and of getting the job done for people who may not code for a living.

  66. Power tool without any safeguards. by Anonymous Coward · · Score: 0
    Though the newfangled Fortran 90 has introduced dynamic memory allocation, type testing and all the goodies found in C++ or c, the original fortran up to Fortran77 is essentially a powertool without any safety equipment.

    Static memory allocation, all arguments pass by reference all the time, no type checkin anywhere etc lead to a function call overhead being a simple jmp instruction. Imagine a clueless physicist passing a large std::vector by value in C++. A simple oversight of missing an & in the function declaration. At every call a copy of the vector gets passed in and discarded at exit... There is no way a higher level language with all kinds of dynamic type testing and dynamic memory allocation and dynamic binding to be as fast as Fortran.

    I am not arguing Fortran is better in anyway. It is very easy to create very hard to debug bugs in fortran and maintenance is a nightmare. But once the bugs have been ironed out and the code has been trusted, it is hard to beat fortran using modern languages. Heck, fortran is nothing but one small step above assembly language. It comes with all the benefits and disadvantages of assembly language.

  67. Well my answer is... by fran6gagne · · Score: 1

    No

  68. Re:libraries. gigabytes of libraries by Anonymous Coward · · Score: 0

    This is why they should be teaching the science undergrads Python. When they get to the point that they need to do some serious numbercrunching, F2PY allows them to interface to any Fortran library.

    http://www.scipy.org/F2py F2PY is part of the SCIPY project to create a science-oriented distro of Python.

  69. Y2012 problem: Mayan calendar runs out by David+Gerard · · Score: 5, Funny

    The Mayan Long Count Calendar turns over in 2012. Mayan date 12.19.19.17.19 will occur on December 20, 2012, followed by the start of the fourteenth cycle, 13.0.0.0.0, on December 21st.

    The event was first flagged by megalith scientist Terence McKenna. The end of the thirteenth cycle would break many megalith calculations — which conventionally use only the last four numbers to save on standing stones — with fears of spiritual collapse, disruption of ley lines, Ben Goldacre driving the chiropractors back into the sea and the return of the great god Quetzalcoatl and the consequent destruction of all life on earth.

    Megalith programmers from 4000 years ago are being dredged up from peat bogs and pressed into service to get the henges updated to handle the turnover in the date. "It could be worse," said one. "I could still be programming COBOL."

    --
    http://rocknerd.co.uk
    1. Re:Y2012 problem: Mayan calendar runs out by juggledean · · Score: 2, Funny

      Get a grip, it's only been about 400 years since the last turnover.

    2. Re:Y2012 problem: Mayan calendar runs out by sycodon · · Score: 2, Funny

      The only reason it stops at 2012 is that they ran out of space on the stone and the quarry workers were on strike.

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
  70. Re:In a word... by koutbo6 · · Score: 1

    I find it difficult to accept the argument of one, while overlooking the other, which is why I'll go with
    maybe

    --
    You speak London? I speak London very best.
  71. Certainly not! by thorsen · · Score: 1

    There are problems, where fortran is a better (or at least probably a faster runtime) solution. But teaching fortran to every undergraduate would be a big mistake.

    They should be taught how to program, not how to do it in fortran. (And if you don't understand the difference here, you don't understand the problem.) Use any kind of language that is easy to teach and learn, or something that is used regularly out there.

    Anyone programming fortran or cobol (same issue, just with banking instead of physics) will tell you that it takes about three weeks to teach a decent programmer how to do this language as well. But if you start out by teaching them the old school stuff, there is almost no way to get them up to speed on todays programming styles.

    So teach them how to do proper programming, and make specialized courses for those very few who needs the legacy languages.

    Bo Thorsen.

  72. luxury by Hognoxious · · Score: 1

    In my day we had to learn it on our own. Without a book. Or a computer.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:luxury by alexj33 · · Score: 2, Funny

      ...And we liked it.

  73. Re:libraries. gigabytes of libraries by T+Murphy · · Score: 1

    There's always Maple.

  74. how to program is most important by cats-paw · · Score: 1

    As many on these hallowed pages have pointed out, the focus needs to be on how to program, not necessarily the language.

    As for those who think that languages like Python are too slow, they are being too simplistic.

    Writing an LU factorization routine in Python for real world use is silly.

    Writing such a routine in Python for educational reasons is perfectly fine.

    And using such a routine for real work will involve calling a LAPACK routine _from_ Python, and will
    work great until the problem size isn't doesn't get too large.

    So numerical work in Python or similar is perfectly fine, just as long as you use the right tool for the job.

    So back to that FORTRAN thing... Why not ? Ultimately it depends. I'd say that other languages _are_ more suitable unless the student is going on to a life of hard-core number crunching. Dedicated simulation tools and programs like Mathematica and MATLAB are really what people use for everyday work.

    --
    Absolute statements are never true
  75. Python? by Anonymous Coward · · Score: 0

    Who programs in Python anymore? ...Oh wait...
    I forgot I had my time travel suit on. Sorry about that.
    Oh, of course Python. Good choice.

  76. "Objective" comparison by Novus · · Score: 1

    Using the criteria specified by Mannila & de Raadt [1], the answer is: NO! As far as I can tell, Fortran is just as bad as C by their criteria.

    [1] L. Mannila & M. de Raadt: An objective comparison of languages for teaching introductory programming, Proceedings of the 6th Baltic Sea conference on Computing education research: Koli Calling 2006

  77. Sillyness by T.E.D. · · Score: 4, Insightful

    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.

    1. Re:Sillyness by apoc.famine · · Score: 4, Informative

      I'll add a "+2" to this. My background is in Astrophysics, and the coding there is largely done in Fortran. The friends and people I know spread between 4-5 different universities all program in Fortran. I'm moving into Geophysics/Atmospheric/Oceanic sciences, and all that work is done in Fortran. From fluid dynamics to stress fault calculations, Fortran is the de facto language.
       
      To be clear, we're not talking about programming here. We're talking about math. Pure, hardcore, overwhelming math. The crunching of terabytes of data. Matrices with millions upon millions of cells, being combined with more of the same.
       
      If we were talking about pure programming, Fortran is a terrible language. What we're talking about here is automating massively complex mathematical calculations on enormous amounts of data.

      --
      Velociraptor = Distiraptor / Timeraptor
    2. Re:Sillyness by Anonymous Coward · · Score: 0

      Numerical computation is one job that a chemist of physicist may need to do. They also may need to collect data from a number of test instruments. There are libraries of VB, Python, Labview,... that can do the job a lot better. Undergrad science students should be aware of these tools.

    3. Re:Sillyness by Anonymous Coward · · Score: 0

      I'll add a "+2" to this. My background is in Astrophysics, and the coding there is largely done in Fortran.

      Do you have one of those t-shirts that says:

      "As a matter of fact I *am* a rocket scientist!"

    4. Re:Sillyness by McSnarf · · Score: 1

      The problem with modern CS students is that they do not understand that, for some people, a computer is not much more than a BIG pocket calculator. A modern high energy physics experinemnt can create a staggering amount of VERY simple data (so serial file access might be all that's needed) - and we are not even talking Monte Carlo. Who in physics would need most of the concepts of non-FORTRAN programming languages? (Besides, people succeeding in physics will easily be intelligent enough to pick up some other language when there is a need. Remember that a lot of the INTERESTING developments in CS came from someone with a background in physics...)

    5. Re:Sillyness by Anonymous Coward · · Score: 0

      Also, a lot of models produced by government agencies such as the USGS and Army Corps of Engineers are written in Fortran. In engineering often comes down to the fact that if you ever get drug into court over model results you used in your work the only models that are easily defensible in court are those written by the government.

      And they're written in Fortran.

    6. Re:Sillyness by ceoyoyo · · Score: 1

      Realtime aerospace simulations is not a set that encompasses all of "Scientific Computing."

      I also do scientific computing and I've never written much Fortran code. I do use a lot of excellent Fortran (and C) libraries though, by calling them from Python.

      A LOT, perhaps the majority, of scientific computing these days is done using MatLab, which is an awful "language." Of course, it also depends heavily on the venerable old Fortran libraries.

  78. Re:libraries. gigabytes of libraries by bloobloo · · Score: 1

    Where did you get the idea that he's talking about everyone?

  79. Anonymous Coward by Anonymous Coward · · Score: 0

    All our calculation kernels are still written in FORTRAN 95. They are parallelized using Open MP very easily on a loop level (admitted they are quite easily parallelized problems). This was painless to do in fact.

    We do financial optimization (risk, credit, futures and portfolio analysis), electrical optimizations (hydropower, gas power, plant portfolios) and cross-border energy trading. With the amount of number crunching I've done using Fortran (IMSL), C/C++ (Boost, COIN-OR CLP) and Java (with COLT from Cern). I'd say that Fortran was the easiest, most concise, manageable and complete solution.

    So yes, teach good fundamentals in Fortran. Great to learn, interesting projects to work on, fast and future safe (50 years and counting)!

    1. Re:Anonymous Coward by Anonymous Coward · · Score: 0

      Just to add, I'm 29. Have a MSc, an engineering degree and routinely program in languages all over the spectrum (Assembly x86, Fortran, C(++), Ada, VB / VBA (yuck), Perl, PHP, .Net C#).

      When faced with problems, I use the best tool for the job. For the moment, haven't found anything better than Fortran for Maths.

  80. FORTRAN is still widely used by Nuclear Engineers by sandwall · · Score: 1

    There was a point in my graduate career where all the students in the class were asked if anyone knew fortran, only one student raised his hand. Not that the other students couldn't learn it, but the student that already knew it, had a great advantage. Python and other newer languages may not always be in vogue and may eventually be defunct, while fortan will always be a rock solid foundation.

  81. Starting with Python, Refining with Fortran by Anonymous Coward · · Score: 0

    I have seen several arguments above regarding the speed of Fortran. Sure, its faster. But speed is not the point. The majority of these undergraduates aren't going to be a position to benefit from the speed. They are doing homework and projects, not optimizing a serious computational problem.

    Simply put, python is much better at handling all of the non-numerical work and good enough at performing the numerical work. Where it is deemed too slow a method could be reimplemented in fortran and almost trivially integrated into the existing python program. Heck, f2py is even integrated into Numpy at this point:
    http://www.scipy.org/F2py

    So all the students should learn python and your serious thinkers will learn fortran as well and only occasionally be called on to use it.

    Another argument one should consider is that python enjoys broad adoption across many scientific disciplines. There are active projects for practically every discipline. The Fortran material seems to be less accessible or isnt shared as broadly. Having a helpful community is useful.

    A benefit of python's adoption is that it has interfaces to many other programming languages. For example Gnu R and MATLAB. If fortran has any integration with these, I would bet that its not as extensive and actively maintained as the python interfaces.

  82. should be taught more often by Anonymous Coward · · Score: 0

    im a 4th year math student soon to be grad student
    and i was not taught fortran had to learn it on my own on the fly
    really wish i had been taught it though

    there is a huge code base out there for various types of models
    and recoding all that is just pointless and not to mention stupid when fortran is the fastest for it

    i mean some of these simulations already run for weeks or days on numerous computers at a time
    do u really want to slow that down or take the hit in over head from other languages

  83. No by po134 · · Score: 1

    No. No. No. and No. We already learn enough useless theorical stuff at the university let us at least learn something usefull in the industry in the few practical course...

    You have to teach in those very few practical course the bit that will be usefull right out the university. If you really do need fortran (in the case you go on specific area of specialisation/research) you'll learn it on your own easily because of the basic understanding you'll have of other language.

    stop teaching stuff only usefull in very narrow field or research !

  84. Yes. by Anonymous Coward · · Score: 0

    I had to suffer with Hollerith so why shouldn't they.

  85. Re:Are You Serious? by Anonymous Coward · · Score: 0

    Uh, just a point of note, I believe my TI-89 from high school in 1999 solves partial differential equations. Hell, I think Mathematica could do this when I used it in college in 2003.

    I did my PhD in mathematical modeling......
    Which algoritham do you think *I* trust most to give the correct answer to the squillianth decimal place..... The one in your TI-89, the one in Mathematica, or one proven bombproof since the 1960's ?
    Which one do *you* think will be the fastest to run?

    Thought so :-)
    How did we ever make progress with people like you around?
    Change for changes sake (esp in mathematics) does nobody any good.
    Show me better code, and we WILL use it. We're not masochists you know ;-) -Posting anon as I've moderated.

  86. keep it by PalmKiller · · Score: 1

    FORTRAN is much better at very large and very small number calculations, and it seems to keep the significant digits and all in play, and is able to deliver output in a nice form without much work, its best they keep on teaching it. I know we would all like to see students learn python as a requirement, but if they have to replace one to do it, this is certainly not the one to replace.

  87. Re:libraries. gigabytes of libraries by bmcage · · Score: 2, Informative
    Maple does not solve PDE's. It can solve some simplified things on rectangular grids with FD. MatLab has a toolbox for FEM analysis, but it takes skill to set that up.

    Freefem++ (GPL code) however is C++ and solves PDE's by writing the weak formulation. I never saw fortran recently.

    Even the famous VODE fortran code to solve ODE's has been rewritten to C++. It's now called sundials (BSD code), and guess what, there is a python implementation, pysundials.

  88. Newsflash - science is real by SuperKendall · · Score: 2, Insightful

    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.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  89. Fortran vs. Python for parallel computation by SpaFF · · Score: 1

    Python may be great for serial processing, but when it comes to massively parallel computing, fortran is still king.

    Maybe when MPI-aware Python gets out of Alpha stage you can dump fortran. Until then I don't think you're going to see much python running on the world's supercomputers.

    --
    -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GIT d? s: a-- C++++ UL++++ P++ L+++ E- W++ N o-- K- w--- O- M+ V PS+ P
  90. Definitely not! by Market · · Score: 1

    Having taught CS (and non-CS) Undergraduates I have to say that you should teach Fortran...or Python. They should be taught some data representation, basic algorithmic design and how that might be used to develop programs. If you teach them a language, you're almost always starting from the wrong point. At least, that's my experience.

  91. From an engineer's viewpoint by dw_g · · Score: 4, Informative

    I'm an engineer with a large aerospace firm. All our major programs are in Fortran and have to be used, modified, and maintained. I remember a few years ago we hired a new grad from MIT; she had studied Basic, Pascal, and C; so of course we had to teach her Fortran so she could do her work. The engineering world is heavily dependant upon Fortran, and to not know it puts you at a huge disadvantage.

  92. Wanted Fortran programmer with 5-10 years experien by Anonymous Coward · · Score: 0

    The only way Fortran be taught to undergraduates is if they have a corporate sponsor that have agreed to hirer some if not most of the graduates. Why? Because the all jobs I have seen posted for Fortran is to replace the guy that has been doing the job for the last 35 years and HR thinks they need a replacement with 5-10 years or recent experience. What is the point to learning Fortran if you can not get a job using Fortran, and all the jobs that require Fortran tend to need mutli-years of experience in Fortran.

    Reminds me when I applied for a job as a Java Developer... long ago. I did not even get an interview so I phoned the HR department and ask why not. They said that they needed someone with 10 years of Java experience. At the time the earliest publish book on Java was only 7 years old. I asked how the company was able to afford the an inventor of Java. The HR seemed dumbfounded by my indications that if the person they hirer claimed 10 years of java experience they where lying to them.

    I have seen many stupid moves by bureaucratic HR personnel and trying to learn Fortran in school then finding a job is backwards. Either claim you are a Fortran expert and learn on the job or join a company and a result of drawing the short straw become the company's Fortran resource (learning on the company's dime). I have found my programming skill translate over to any language - the underlying principles are basically the same on only the syntax and structure changes. I have learned new languages in a week and was able to efficiently work on large teams with individuals with years of expert knowledge in the language. Schools need to teach the underlying programming principles that can be adapted to any language - that way the company you work for can training you in their preferred language and expect that you will be some what skilled and productive.

  93. Great post by SuperKendall · · Score: 1

    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?

    That is totally the core of the question. How can the body of CS be distilled into something that would improve the base of code coming out of hard sciences? As you say they learn enough to produce working code but possibly not enough to design an API well or have really robust code, especially in Fortran... a lot of these guys are going to intro to programming courses but there needs to be some glue between that and the practical stuff they do later.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  94. FORTRAN is fine by Corson · · Score: 1

    Python is a scripting language. FORTRAN is a language for high performance computing. Engineering, Physics, Chemistry need high performance computational tools. Has anyone ever tried performing Molecular Dynamics simulations in Python? I didn't think so.

  95. Re:libraries. gigabytes of libraries by jstults · · Score: 3, Informative

    Except I'm pretty sure that there are modern languages and libraries that can handle this without Fortran. I don't have much experience with it myself, but I'm pretty sure that's exactly what MATLAB is for, for one.

    Dude, what do you think the libraries Matlab uses are written in? Check out netlib to get an idea, ATLAS, BLAS, LAPACK, LINPACK, etc. Matlab stands on the shoulders of the giants of scientific computing (implemented for the most part in Fortran).

  96. Does FORTRAN not offer any value? by Anonymous Coward · · Score: 0

    What does it mean to be "taught" FORTRAN? Does this mean that students are merely exposed to the language from a historical perspective, maybe asked to write a few simple programs, and then offered notions about the benefits and drawbacks of using this language? Or does it mean that they have to craft complex programs to solve difficult engineering problems, thus displaying their mastery of the language? There's a big difference between those two objectives.

     

    I think that every computer science student should at least KNOW about this language, what it offers, and the drawbacks of using it. A language is a tool... and even ancient tools can frequently be applied to modern problems (everyone remember that whole fulcrum/lever thing?), so discounting FORTRAN, simply because it's an older language, is simply "linguistic ageism" and is not a conclusion based upon sound logic.

     

    If anything, a university should be teaching about how to find the right tool to do the required job, regardless of the age of that tool, and how to apply sound reasoning in making that selection. Any programmer can learn any language... the point is to optimize your learning, coding and debugging time in an effort to solve the problem that needs solving. When we start discounting tools because they are "dangerous" or "too complex" or "lacking in strong typing", then we're presupposing that we know better than the talented artist that we hope each programmer will be.

  97. Why? by AtomicDevice · · Score: 1

    It seems like fortran would be an awful choice, sure it's fast and lots of big-deal libraries use it, but who cares?

    Firstly, it's not as if you can't call fortran libraries from another language (matlab anyone?), secondly, if you learn to program, and become a professional, then you can learn another language. I don't think there's too many people out there who honestly find it easier to program in fortran than ${ANY_OTHER_LANGUAGE}

    I've always felt C and C++ to be ideal intro languages, they are fast on their own, they very closely represent what is happening on the CPU (pointers, they're easy enough to optimize by hand) so as a student you get some good insight into how the computer actually works, and they are much more similar to modern languages (matlab python php etc etc) than fortran.

    Furthermore, the speed of the language isn't the only thing that matters, if I'm writing stuff for in-house processing, and it takes me a month to write it in fortran, and a day in python, I don't really care if the python is twice (3 5 10) times slower, because my calculation will still be done faster. Furthermore consider the time it takes to debug matlab/python vs a compiled language like C or fortran, matlab and python (or java, etc) tell me where and what the problem was, as opposed to "SEG FAULT" 5 hours into processing.

    And what happens when I decide I need to change my code? Attempt to decipher fortran or C, rebuild it, test it, sic it on my huge dataset and hope all goes well? Or just edit a text file and have things work.

    Not to say C and other truly compiled languages don't have their place, I still use them for my biggest of big data, and I know in a lot of fields (let's take particle physics for example) the data is just too big to do in anything slower than C.

    But for teaching first year students, a language that they can understand, will be useful to them, and will give them a taste of what they can do with a text editor and compiler/interpreter is what's really important. Teaching fortran like that seems like early optimization, and we all know where that leads.

    --
    Ze Atomic Device! It iz Ztolen!
  98. Scared Straight! by ewg · · Score: 1

    They should be taught Fortran by screaming lifers to save them from a life of static compilation.

    --
    org.slashdot.post.SignatureNotFoundException: ewg
  99. Fortran is still common in science by damn_registrars · · Score: 1

    I regularly find myself compiling scientific applications that were written in fortran. Which means that plenty of scientific software development is still done in fortran as well. Even if the students aren't going to write their own software, there is a good chance that they will at some point need to be able to install scientific software, and a little basic knowledge of fortran can go a long ways towards understanding the snafus that they will likely encounter along the way.

    That is in no way something of insignificant value in addition to learning the basic logic structure of a language like fortran.

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
  100. Dude... by Balinares · · Score: 2, Interesting

    ... You're WAY behind the times.

    I got a buddy who is an astrophysicist and worked at NASA, and he tells me his department ditched FORTRAN years ago in favor of Python+Numeric.

    I hear you about the need for badass number crunching tools. It's your assumption that only FORTRAN fits that particular bill which is erroneous.

    Not to say that FORTRAN doesn't have its use. It's just that other tools have since become better at some of those.

    Python Numeric homepage. Check it out.

    --

    -- B.
    This sig does in fact not have the property it claims not to have.
  101. Only if... by Anonymous Coward · · Score: 0

    Only if they misbehave...

  102. C++ on Particle Accelerators by tarlss · · Score: 1

    Most physicists I know have moved onto C++ code. At least I know they use this at the Brookhaven and Tskuba Particle Accelerators in Long Island,NY and Japan respectively.

    1. Re:C++ on Particle Accelerators by Lord+Byron+II · · Score: 1

      Sort of. I've worked on experiments at both labs in the last five years that were using significant amounts of Fortran.

    2. Re:C++ on Particle Accelerators by mbone · · Score: 1

      About 15 years ago I was involved in several efforts to take old scientific analysis software packages and rewrite them in C++. Every one of those efforts failed. Code was produced, but it took so long to get it working right that the old package was upgraded with new features, so the new code was "born obsolete," never used that much, and allowed to die on the vine.

      Your milage, of course, may vary.

    3. Re:C++ on Particle Accelerators by invisiblerhino · · Score: 1

      CERN uses a lot of C++, at least for the LHC experiments. Just look at ROOT...

      --
      xterm -n 8
  103. Fortran is simple. by iVasto · · Score: 1

    The reason why universities teach fortran still is because it is very simple to learn. My roommates were taught it and they had trouble with the language. I couldn't imagine trying to teach them a more complex language. The most important thing about learning your first language is not the actual syntax, it is learning how to think.

  104. act well THY part by Anonymous Coward · · Score: 0

    I feel that they should only be taught one or two languages that help accomplish their projects and goals as physical scientists. Only computer scientists and the like need spend so much time with languages that enforce low-level concepts like memory allocation. If a physicist wants a program to be more efficient, he should hire a computer scientist!

  105. Yes and no by baryluk · · Score: 1

    Yes for FORTRAN, but no as a first language. Hi, students of Physics and Chemistry here in Cracov Poland also are learning FORTRAN somewhere on first or second year. I think it is horiblle language compared to modern ones, but it is really fast, and libraries are really robust. So FORTRAN is needed, but i think most times students should write C code which talks to FORTRAN libraries, this is simpler. And FORTRAN shouldn't be first language teached. I opt for Phyton, it is so easy to learn complex aplications. I also personally like D. :)

  106. Re:Are You Serious? by robbyjo · · Score: 1

    I think ODE is going to be one of the simplest case of numerical library. I can simply copy algorithms from Numerical Recipes and get away with it. But, there are a LOT more written exclusively in Fortran that you don't want to touch with 10 foot pole.

    For example, you should know R and why R does contain some Fortran libraries, especially BLAS and LAPACK. I think BLAS is the easiest one to translate over albeit tedious. It's simply matrix operations (add, subtract, multiply), but there are lots of them with multiple cases making it really fast. LAPACK (and other associated libraries like LINPACK, etc) requires a more intimate matrix theory. I have the necessary background to do, say, Singular Value Decomposition (SVD). But to date, the only fast SVD routines I know are in Fortran or derived from Fortran, ALONG with quirks and limitation of Fortran 77. Don't believe me? Check Jama's SVD routine and how it doesn't handle matrices with number of columns greater than number of rows with only one pass. You can get around that by invoking the routine twice (and believe me, that happens in a lot of places although 1 pass is possible), but that's partly due to the limitation of Fortran 77 of not being able to dynamically allocate arrays. The routine is so tight and fast that the option of translating it to other languages depend on the luck of machine translation (and making sense of it and try to clean up the mess, yada yada).

    You have no idea that many of the libraries in the 80's are still in Fortran 77 and left untouched. Try Netlib (http://www.netlib.org/liblist.html) and try to pick one Fortran library and translate it to another language. See if you don't cry river. Believe it or not, many of them are still in wide use, usually as a part of other newer algorithms. I myself have done that. For example, a B-spline shrunk smoothing library of GCV (downloadable from Netlib) from 1985 is known to have a very good result. It's not your usual (and cheap) B-spline smoothing that you can find off the net, it's almost heaven-and-earth differences. This GCV is used in Q-value routine of 2003 to determine false discovery rates by smoothing over the P-values of thousands of genes. Nobody has tried to translate that off of Fortran. I did a daring job and spent 200 hours to translate that one library to Java with success. If I had the option not to do that, I'd rather spent 200 hours somewhere else and use whatever Fortran-Java glue to get around it. Seriously.

    So, if you've never been into serious scientific library development, please don't make such arrogant and ignorant assertion. Although you can assert that Operating System is complex, the principle behind it is simple. Much simpler than a scientific formula, which requires much more math skills than just Calc1-3 and DE1-2. It's not simply translating differential or integral or what have you, that's the easiest part if somebody is giving it to you. The hard part is to read the scientific paper behind that Fortran code in order to try to make sense what the code is doing. Many of the algorithms contain some hack that makes the formula work. For example, certain algorithm define limits, magic constants, assumptions, etc that are NOT explained anywhere in the paper AT ALL. Some can be found from the papers cited by that paper, with reasons that might be unclear to you. Now, if you translate the mathematical formula off of the paper without reading it, wouldn't it be a recipe of disaster?

    Many people may be gifted in coding, but very very rare have sufficient skills to translate highly numerical algorithms. Seriously. Most coders know absolutely nothing about higher-level maths. Netlib is just a start. They only contain algorithms of the 80's and early 90's (which are still widely used). Even Numpy uses plenty of untouched Fortran codes for its backend.

    This ignorance of gigantic proportion of yours needs to stop. Now. If you still cling on your assertion, start an open source project that translates gigabytes of Fortran numerical library into a more modern language. See if you can even get some contributors. Good luck.

    --

    --
    Error 500: Internal sig error
  107. Teach em everything by SoulRider · · Score: 1

    Sure, make undergraduates learn to implement theory in as many languages as possible. Teach them the theory make them learn that the language is irrelevant.

  108. Yes! But not for CompSci majors. by Lord+Byron+II · · Score: 1

    I'm a graduate student in physics and let me say that I feel that I've been able to go further and do more with my degree because of my knowledge of Fortran. There is a TON of code out there that is in Fortran and will always be in Fortran. My first undergraduate job was doing optimizations on 30yr old Fortran code. My current research uses about 30K of Fortran code.

    I'm not a big fan of the language, but for the stuff we're doing, it works well and reliably and fast, so there's not much incentive to move to anything else.

    Of course, it's completely dead from a CompSci perspective, so those students should be spared.

  109. MathLab by Anonymous Coward · · Score: 0

    Forget Fortran, forget Python

    In my university I teach MathLab ( or Octave the GNU version) to students of Physics, Chemistry, Engineering. If you are not from computer science you probably hate programming, so it is better to use a more user friendly environment. With MathLab/Octave

    MathLab has a large set of libraries. It is easy to plot charts, do statistics,do matrix operations and the language is very simple (C like without types).
    A simulation can be up and running in no time. Other languages require too much knowledge in CS to be useful to these people.

    For the more experienced users, it has C, java and python bidings.

  110. c? by buddyglass · · Score: 1

    I'd imagine C would be more useful. I went through a graduate program in CS and took several classes cross-listed in the Computation and Applied Mathematics program, as well as some numerical methods classes in the CS dept. We had to link with Fortran occasionally (BLAS), but we always did it from within C code. Just have to make sure your two-dimensional arrays are laid out correctly (i.e. column major).

  111. Teach them Fortran and .... by Anonymous Coward · · Score: 0

    I believe science undergrads should be introduced to a few languages. A quick list of the languages I would teach:
    1. Fortran
    2. Python or Visual Basic
    3. Maxima or Mathematica

    After introducing these languages, I would have the students do a few programs in each language. The programs would involve such tasks is data collection, data analysis, and numerical simulation. I would have them each task in all languages.

    The result is the students should discover a few things:
    1. They can quickly write a program to take in data from various source and do some analysis on that data using a language like Python or Visual Basic. This is appropriate to tasks where computational speed does not matter. Having a computer collect all the data samples from various test equipment that runs one test every second does not need a supper fast language, you just need to get it running.
    2. When doing a large number of calculations the Python and Visual Basic languages are a lot slower then Fortran.

    Maxima and Mathematica are included to introduce languages that can do symbolic evaluation.

  112. matlab by Anonymous Coward · · Score: 0

    Around my old research lab everyone used Matlab. Fortran is great and all, but most researchers are terrible programmers (think 1 method per 2000 lines of code). Matlab is just easier. Money for a license usually isn't a problem. Octave is available if money is a problem.

  113. Computer Science by Anonymous Coward · · Score: 0

    They should have it in the computer science curriculum too. I was upset when I found out that it is no longer taught by my university's Computer Science department.

  114. Pick the tool suited to the task... by bradley13 · · Score: 1

    In principle, you can solve any programming problem in any complete language. But why not take the right tool for the job? Fortran is suited to numerical analysis and is highly optimized for it. Python isn't, nor is Java, nor is C++. In particular, if you are doing numerical number crunching, you do not want object oriented crapola getting in your way. OO is great for the vast majority of standard programming problems, but it is a hindrance in a lot of scientific and numerical analysis tasks.

    Here's an example: you are analyzing radar signals. These come in as a continuous stream of numbers, which are packed into arrays and analyzed. There are no objects yet, just lots of numbers to crunch as quickly and efficiently as you can - and that's what Fortran is good at. Once you have identified airplanes and figured out their distance, speed, etc - then maybe you want to pass these on to an OO module written in another language.

    --
    Enjoy life! This is not a dress rehearsal.
  115. Force them to learn many languages by Zarf · · Score: 1

    Seriously, force all undergraduates to learn at least 4 programming languages.

    --
    [signature]
  116. No Python... Yes PHP by Anonymous Coward · · Score: 0

    They should teach PHP because it is the strongest programming language right now.

  117. Python? by Anonymous Coward · · Score: 1, Insightful

    OK, OK.

    Fortran is old.

    But Python? Are you serious?

    pffht.

  118. Re:libraries. gigabytes of libraries by xZgf6xHx2uhoAj9D · · Score: 1

    The question was very specifically aimed at physics, chemistry and engineering students. I can't speak for engineering students, but I know that in physics and chemistry virtually all useful software is written in Fortran. All the code works perfectly, so why rewrite it? Not only does it work, but it's fast (Fortran code almost always outperforms the best optimizing C compilers). The difference between running a 3-day simulation of Fortran code vs. a 4-day simulation of C code (plus whatever development time there would be) can come in handy sometimes.

  119. Fortran is analogous to hazing by 93+Escort+Wagon · · Score: 3, Interesting

    The Elders feel that if they had to go through it, so do the young'uns gol durn it!

    Seriously, though - as far as I know, Fortran has always been the language of those humonguous numerical models because of its optimizations with regard to array handling. I think it makes perfect sense as a first (or second) language for science majors. However I imagine the person asking this question is likely one of the young'uns being forced to learn it; and that person doesn't really have the perspective as to *why* this is so. After all, he's been hacking around in C and Python for years - they're in his comfort zone and have been good enough for the sorts of things he's been dealing with.

    --
    #DeleteChrome
  120. Re:It could be worse. In fact, it was... by Anonymous Coward · · Score: 0

    Same here. Pascal was the primary language used for the CS degree track. This was back in 1990 or so.

    Personally I didn't care because when I got to college I had already been programming for almost 10 years and knew a whole bunch of languages. For me, college was just a bunch of bullshit busy work so I could get the "worthwhile employee" stamp (actually that pretty much sums up my entire scholastic experience).

  121. Python (and C, and Fortran) by AaronParsons · · Score: 3, Interesting

    I'm a scientist who does the bulk of his programming in Python. Numpy (the numerical package for Python) runs at only a 30% overhead over C. When that's not fast enough, I drop into C/C++ for bottlenecks and wrap that back into Python (using the Python C API more often than swig/boost). When there's a great Fortran library that's fast and battle tested, I wrap that into Python using F2Py--and I don't even know that much Fortran.

    Just like it's good to know more than one spoken language, it's good to know more than one programming language. It's a mistake to think one programming language fits all needs. That said, it can also be helpful to know one really well, and others enough to convert them into your primary language. For me, Python fills that role very adequately, and I would highly recommend it be a part (read: part) of the undergraduate programming curriculum.

    1. Re:Python (and C, and Fortran) by ceoyoyo · · Score: 1

      I'm the same. Except that I used to write C API modules. Now I just write Objective-C code and use the pyObjC bridge.

  122. Fortran rocks by Bushcat · · Score: 1

    Many years ago I did a real-time military radar simulation using a flavor of Fortran. At the next job, I helped build a stratigraphic wellhole analysis package using Fortran. At the third job the team built a package that predicted thermal, radiation and other propagations through hardware, wetware and urbanware. At no time was there more than 4 people in the development team. Fortran has done serious work over the years, and people forget there's more to life than the GUI.

  123. Re:libraries. gigabytes of libraries by UID30 · · Score: 3, Insightful
    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 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

    --
    "Glory is fleeting, but obscurity is forever." - Napoleon Bonaparte
  124. It's about reliability by thethibs · · Score: 1

    Since this is not the place to find actual engineers, it's not a surprise that no one has pointed out one of the primary rules of engineering: "Minimize Innovation."

    FORTRAN and the vast mathematical and physical libraries that come with it have been tested and matured over a period of decades to create an open-source, highly dependable, essentially error-free framework for mathematics, science and engineering computations. We teach FORTRAN because it's the only language that meets that spec and because open-source is useless if you can't understand the source language.

    The intent is not to develop programmers but to give mathematicians, scientists and real engineers a working knowledge of a vital tool.

    --
    I'm a Programmer. That's one level above Software Engineer and one level below Engineer.
  125. Of course by No2Gates · · Score: 0

    They should also learn Latin and Sanscrit

    --
    Every time you call tech support, a little kitten dies.
  126. Bring back Basic and FortranII by cvtan · · Score: 1

    When I started working at Kodak in 1983 I had to use a Tektronix Basic computer with 32k memory and 8-in floppy drives. The language would only allow variable names that were two characters so you would have names like V9 or A2. Of course after a while you ending up using I1 and O0 so on a dot matrix printout the code was unreadable. On a PDP-11 I used FortranII. If the program was too large I would get "Fortran Start Fail" error messages and would remove lines of code until it ran. Occasionally I would have syntax error messages like "Error 142 on line 629" and find that there was no line 629... (Insert Twilight Zone theme here.)

    --
    Sorry, but gray text on gray background is making my eyes bleed.
  127. Fortran is still useful for calculations by golodh · · Score: 5, Insightful
    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.

    1. Re:Fortran is still useful for calculations by ojustgiveitup · · Score: 1

      Seems to me that if those are really their only requirements, they should be using Matlab.

    2. Re:Fortran is still useful for calculations by ojustgiveitup · · Score: 1

      Pardon, what I meant was, the should *just* be using Matlab - what does FORTRAN do that Matlab can't?

    3. Re:Fortran is still useful for calculations by Anonymous Coward · · Score: 0

      Given that Fortran is essentially used in academics circles (where it's ubiquitous), I don't think that learning Fortran as a first language as early as college is necessary, nor a good idea. Most of those students won't end-up in academics career. A more standard language is probably more appropriate. It's always time to learn Fortran while working on your Master degree. Early on for non-computer-science students, I'd say go for language with which it's easy to illustrate procedural and object-oriented programming (doesn't need to be "pure"), because once you get your head around those two concepts, it's easier to learn most of today's popular languages. A versality that Fortran won't give you (that might change as the 2003 norm gets implemented).

    4. Re:Fortran is still useful for calculations by Anonymous Coward · · Score: 0

      I think ATLAS is mostly written in C, with optional Fortran interfaces.

    5. Re:Fortran is still useful for calculations by Anonymous Coward · · Score: 0

      It warms my heart to read someone who knows what he's talking about! (BLAS, etc ...).

      Computing is not 100% web 2.0. Software to compute car crashes or optimize molecules need languages like fortran.

      The fancy languages like Python, Perl, Java would be orders of magnitude slower for those tasks.
      Simulating a car crash is a process that can take a week of compute time on a super computer in Fortran. If you program that in Java or Python, it could take a few years to run, and 2010's cars would be available in 2015 ...

      Remember that Fortran can address vector processors and other exotic processors.

      Also, would you learn about letters or numbers after learning to read, add and multiply???

    6. Re:Fortran is still useful for calculations by markrich · · Score: 1

      We use FORTRAN to develop missile models because the language is fast, has low overhead and provides the percision that is needed for flight calculation. It is legacy code that incorporates differential equations to do calculations and so having low overhead is beneficial to speed. If it runs too slow or doesn't provide enough precision we can't use it. Even recurrsive functions cannot be used if it doesn't meet real time timing constraints. FORTRAN is fast and easier than assembler.

    7. Re:Fortran is still useful for calculations by Snowtred · · Score: 1

      I'd have to agree with the above poster. I am a physics grad student who picked up Fortran 77 earlier this week to finish some work for my professor. In fact I'm on lunch right now, with my fortran book in front of me and my inherited programs minimized on the screen. I learned C, C++, Java in HS through classes, and then to a much greater degree on my own, although thinking back, Fortran would have done just as well. 95% of the programming I use for physics are script-like data processing. There is a few pages of mathematical work, which I convert into simple programs to process large amounts of data, or run simulations based on a random initial parameter space (Monte Carlo calcs). The runtime is short, the math is generally rather simple, and most importantly, the turnover of a grad student is 3-4 years, and the turnover of undergrad interns is a fraction of that. A lot of the new students know the math and the physics, and may have taken some sort of programming class, or may not have. But its a lot easier passing down a Fortran program to a new student than C++ or something higher (I cant speak for Python or anything else, never had a reason to learn it)

    8. Re:Fortran is still useful for calculations by JumpDrive · · Score: 1

      what does FORTRAN do that Matlab can't?

      Run a lot faster and cheaper to implement.
      If it is something that is intensive in calculations, I'll use C++, then transfer the results in and out of MATLAB using a database.
      MATLAB costs $2000 dollars for a base system add another $1000 dollars if you want to run it on multiple cores on the same machine. If you want to run it on multiple machines then it's another $6000.
      So we are talking $8000 to start running it on multiple machines.

      If you want to compile a Matlab program and run it on another machine, that's another $5000 +++.

      So that's FORTRAN, C++ running on multiple machines with the ability to distribute a compiled version $0.

      MatLab $13000.

      Oh, you were using the student version.

    9. Re:Fortran is still useful for calculations by iron-kurton · · Score: 2, Insightful

      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?

      --
      Change is inevitable, except from a vending machine -- Robert C. Gallagher
    10. Re:Fortran is still useful for calculations by jpmorgan · · Score: 1

      Mathematica is a computational algebra system and isn't designed or good for large calculations.

      Matlab and Octave are okay for prototyping, but hideously slow for anything non-trivial.

    11. Re:Fortran is still useful for calculations by Anonymous Coward · · Score: 0

      "but it's a lot simpler (and therefore quicker and easier to learn) than C++"

      True... but real men use C anyway.

    12. Re:Fortran is still useful for calculations by iron-kurton · · Score: 1

      I've never programmed in Fortran, so I'm curious what gives it such a performance boost over other languages (particularly Octave since it was written in C)? Also, what kind of performance gains are we talking about here, and are there any publicly available benchmarks we can reference?

      --
      Change is inevitable, except from a vending machine -- Robert C. Gallagher
    13. Re:Fortran is still useful for calculations by Anonymous Coward · · Score: 0

      > 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.

      Hey, with these red glasses on all cars are red or black! Red must be popular for cars this year.

    14. Re:Fortran is still useful for calculations by tkw954 · · Score: 1

      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?

      Matlab can be considerably slower, unless you specifically write your code to take advantage of the fact that it calls fast precompiled and optimized routines, such as BLAS (FORTRAN), LAPACK (FORTRAN), EISPACK (FORTRAN), FFTW (OCaml), etc.

  128. Fortran: from a TA's perspective by Anubis+IV · · Score: 1

    As someone who has actually helped to teach Fortran at the university level (I was TA for the course, just this last semester), here are two reasons I think Fortran is still useful to teach:

    1) It's still relevant. As others have pointed out, libraries have been highly optimized over decades of use and reuse, and it's hard to throw that legacy code out for a newer language, especially when there is no benefit to doing so. In many cases, you would actually be trading better performance for worse, even, and when you're dealing with things like weather models or geological simulations, raw performance means extra/better information. So, much as I may personally not find Fortran useful and wish it would go away, the fact of the matter is that there is plenty of legacy code around that has been kept around for a good reason. Before I ever worked as a TA at my university, I interned for two summers at Lockheed Martin Space Operations working on, guess what, Fortran code that was being used for meteorological purposes (the code had edits that were initialed by my office mates from before my birth, which was an odd experience, to say the least).

    2) It's a good place to start. It may not take up the mantle of OOP like Java or even C++, but Fortran is a great starter language since it is syntactically very simple, which lets the students really dive right in and not worry about getting hung up on things like semicolons or curly braces. Having TAd C and C++ in previous semesters, I cannot tell you how many concepts students simply misunderstood or never used because of the fact that they were still struggling with syntax. While all of these things are painfully simple to you and me, remember that these students are coming from a place where an if statement will take a day to explain, and arrays are pushing them pretty hard at the time.

    As a very quick example, I probably had dozens of students out of the 130 in my last C/C++ class use the phrase "if loop" at some point in the lab or in office hours, since if and while statements look very similar syntactically. In contrast, I never once had that issue with the 50 students in my last Fortran class. To go along with that little fact, in the C/C++ class, it was not at all uncommon, despite frequent correction, for students to persist in trying to misuse an if statement as a loop, but I think I only saw that attempted once in the Fortran class, simply because the syntax between a loop and a conditional is so drastically different and dead simple.

    When the language is simple syntactically, it means that they can focus more on the concepts and less on the language, which is really the ideal situation. I had more students who took Fortran come to me at the end of the semester, express an interest in learning more languages, and ask what additional or more advanced courses they could take, than I ever did when TAing C and C++. And for an intro-level course, the concepts are really the important part, not the syntax, since you want them to be able to take what they learn and apply it practically, whether that means Excel macros or just the ability to communicate an idea logically to a developer.

    ---

    Fortran and I have a love-hate relationship. Compared to more modern languages, it's not as pure, it's not as easy to program (for someone from a CS background), it's not as convenient, and it's not as concise. All of that said, it still has raw practicality going for it, as well a low learning curve and continued widespread use, which makes it, in my opinion, great for teaching to students in related fields. It's hard to make a decent case against Fortran. Even so, my university has cancelled the class for upcoming semesters, so, after decades of being taught here, this last semester that I TAd really IS the last semester of Fortran at my university, period. Maybe they know something I don't.

  129. faculty often only know excel, fortran &| matl by goatbar · · Score: 1

    This often comes purely from what the teaching faculty knows... which causes a lot of teaching of excel (+ maybe visual basic) too. If you don't know it, you can't teach it.

  130. Pascal! no - Javascript! by ggpauly · · Score: 1

    The Intro to Programming course I took at Indiana University (a few years ago) taught the basics of programming in Pascal followed by 2 weeks or so of FORTRAN. Both languages are primitive compared to modern languages. But I learned the basic idea of programming, which is still exciting to me, and the lesson that learning a new language is not so difficult and well worth the effort.

    I used both languages as an undergraduate: FORTRAN in part time jobs in the chemistry department and Pascal for an undergraduate thesis project.

    I'd like to give a plug for Javascript as an intro language. The language itself (not the browser DOM) is extremely simple and surprisingly powerful, with OO, C syntax, type, functional, and imperative aspects. Perhaps a version with an integer type could be used for practical considerations.

    In my opinion the current practice of teaching Java to new students is a mistake, but then again I think any use of Java is a mistake.

    --
    Verbum caro factum est
    1. Re:Pascal! no - Javascript! by catherder_finleyd · · Score: 1

      I would also add that JavaScript is available with almost every computer. If you have a browser, you have JavaScript!

  131. Re: by Anonymous Coward · · Score: 0

    Interesting. I just retired after 30+ years as a software engineer at a large R&D lab. For many years now, the overwhelming majority of people we interviewed for jobs had learned Matlab in school, not Fortran or any other language. This applies at the undergraduate level, Masters, PhD, and post-docs. I can't think of a single resume that mentioned Fortran. I wonder what schools the author is thinking about?

  132. Pascal by sulfur · · Score: 1

    I learned Pascal as my first programming language. As far as I know, Wirth specifically designed it for teaching. Sure, it doesn't provide low-level hardware access as C does, but it enforces good programming practices by not giving a programmer as much freedom. However, nowadays it is hardly used anywhere, so I would probably recommend C++ or Java as the first language to learn. My school chose Java and I think it is was a good decision, mostly because for a beginner Java code is much easier to debug in a good IDE (as opposed to C++).

    1. Re:Pascal by ZmeiGorynych · · Score: 0

      > it enforces good programming practices by not giving a programmer as much freedom.

      Which is why I hated it on sight, and happily avoided learning it. Didn't it force you to declare all variables at the start of your program, and stupid shit like that? Good programming practices are good because they're a result of conscious choice between alternatives, and thus what's good depends on the context - not on the preconceived notions of Wirth's.

      For teaching, I think one should use a language which is very expressive, but consistent (which rules C++ right out, for example), so python would be a good choice - everything is a first-class object, including doubles, user-defined objects, types, and functions, and in fact functions are just objects you can execute. And it has built-in closures. Also an interpreted language is much better for teaching because you can stop at a breakpoint anywhere in the program and evaluate arbitrary expressions, and then resume - can one do that with Fortran?

    2. Re:Pascal by shutdown+-p+now · · Score: 1

      Also an interpreted language is much better for teaching because you can stop at a breakpoint anywhere in the program and evaluate arbitrary expressions, and then resume - can one do that with Fortran?

      I don't know if any Fortran implementation provides such a feature, but it's definitely not restricted to interpreted languages. It is provided by Visual Studio for C++, C# and VB, for example.

    3. Re:Pascal by ZmeiGorynych · · Score: 1

      At least with unmanaged C++ it's a total pain to use in VS, in my experience. Maybe the managed .NET languages do better.

  133. Yes, Python -- to MANAGE the calculation. by Anonymous Coward · · Score: 0

    You cannot (well, actually should not) do it in pure Python, but even today, there are very few people working in pure Python systems (PyPy is the only project I know of). Python is a language that allows easy use of functions written in other languages, including C, C++, Java, C#, and FORTRAN. Yes, more easily than in native C. See The NumPy and SciPy and libraries for access to massive piles of FORTRAN libraries.
    I've run 4-day programs "with Python" where total execution time of the Python interpreter (if measured properly) would
    have been less than ten minutes of execution. Python manages the calculations well, but the actual array processing was in a blend of C and FORTRAN (and, no, I neither know nor care what the mix was there).

  134. Re:libraries. gigabytes of libraries by greed · · Score: 1

    Engineering still uses a bunch of Fortran. It may be called from C or C++, it may be standalone, but it's all still there.

    It even optimizes better than C and C++: there are no pointers to muck up the alias sets. The language is very simple and well-defined, and that makes the compiler very, very happy. And reliable, you don't get into this "oooh, you assigned to a float from an int pointer and that breaks the ANSI Alias Rules so the compiler trashed your code for you".

    It may be a bit clunky, but it is well-defined. (Compare the rampant "implementation defined" behaviours in ANSI C++....)

    Sun's Performance Library is Fortran. IBM's ESSL is in Fortran. (Both are derived from the famous BLAS and LAPACK libraries.)

  135. Fortran in Aerospace Engineering by bgray54 · · Score: 1

    Fortran seems to continue to be the standard in aerospace engineering. I think that anyone getting a degree in AE should take the time to at least familiarize himself/herself with Fortran.

    1. Re:Fortran in Aerospace Engineering by falconbrad · · Score: 1

      I disagree. As a fairly recent grad (Aerospace/Mechanical Engineering, USC '06) who was taught Fortran in his first formal programming class, I would say HELL NO. If you're going to teach interpreted languages, then you should be focusing on Python and MATLAB, both widely used in a number of industries. If you're going to teach students a compiled language, then why in the world aren't you teaching C/C++, which has an infinitely greater reach? I haven't even so much as looked at Fortran since leaving school, but I've become quite good at C. Even if I did have to go back and work with Fortran, I'm confident that a couple of weeks of review would be sufficient to get me going, now that my fundamentals are strong. Really, the only exception I can see is if you're going to be running a simulation on a supercomputer, and how many of us do that on a day-to-day basis?

    2. Re:Fortran in Aerospace Engineering by bgray54 · · Score: 1

      Well, I'm a ... less recent grad and in all of the time that I worked as an AE, almost all of it was with Fortran. All of our CFD codes are in Fortran. All of the legacy aerodynamic performance codes are in Fortran. This also seems to be the case with our partners in the Air Force and with other corporations. Perhaps it's different in your sub-discipline?

  136. If it aint broke, don't fix it by docbrody · · Score: 1

    'nough said.

  137. Netlib by Anonymous Coward · · Score: 0

    A good portion of the *tested* and *reliable* scientific computing libraries, in http://www.netlib.org/ are written in... yes you guessed it, FORTRAN. Sure some of the code there is in some of those other languages, but most of them were machine-translated with things like f2c. (Also, NAG and IMSL code is in FORTRAN)

    To paraphrase Twain, efforts to get it replaced are frickin' exaggerated. Maybe the author should try rewriting LAPACK in his favorite language. :P

  138. Reminds me of Pirates of Silicon Valley... by Commander+South · · Score: 1

    Ballmer:
    So I got these girls in the other room, and they're naked, I mean like gorgeous naked, and I told them you were making a computer language, and they started moaning. Oh computer language, Fortran, ohhhh Fortran. So don't say I never did anything for you.

    Gates:
    Drop dead Ballmer...

  139. Fortran is also REALLY simple by alexhmit01 · · Score: 1

    For a Freshman seminar (now 12 years ago), we used Fortran 77 because that was the last version that GNU had (at the time) a compiler for. We were doing really simple modeling, and the limitations of a then 20 year old language weren't a problem, we weren't building UIs, just crunching numbers. Fortran 90 cleaned up most of the Syntax and made it as friendly as Pascal, which is probably the cleanest teaching language for it's simplicity. Later version supposedly added object oriented and other modern niceties.

    Wrapping Fortran in Python seems simple enough, the languages are all fundamentally the same. But if you leave your logic in Fortran for sciences, where you have 40 years of libraries, you can certainly use Python to build a simple enough UI, but why NOT learn Fortran, it's damned simple, works, and teaches the basics. All the modern syntactic sugar pulls away from the basics of programming.

  140. Since I'm on both sides of the fence by jinxed_one · · Score: 2, Interesting

    Ok here goes:
        Should science undergraduates be taught Fortran? Yes
        Should it be the FIRST language, NO, not any more

    So much of science, especially physics, is done on computers now - as both a software engineer and someone transitioning into Physics I ran into many people that had severe problems learning FORTRAN and applying it to problems. I really feel science students should have a couple of general courses in programming in C before moving on to other languages or even programming classes specific to their science. Here's the reasoning:
    A) Science students need to learn programming basics away from the pressure of also learning within their science field at the same time - if your learning the science at the same time, the actual basic programming concepts get lost and muddied with the science being learned.

    B) It can allow a science major to learn the concepts of programming in a general purpose language without muddying it with a lot of OS specific, library specific, attitude specific usage (aside from the compiler use)

    C) There is a C compiler on almost every system you will most likely use in your lifetime as a scientist

    D) C has enough structure to be "readable", but doesn't have so many constraints that it has problems being fast

    E) C syntax is the basis for many other programming languages including Python and Java (both of which are heavily used in science as well)

    and finally if a science major has a good understanding of programming concepts they can know what to look for when they're learning a new language (whatever it might be) - they will know that they have to learn the syntax for control structures in the new language (for, while, if, etc) as well know they'll have to find out more esoteric language specific concepts like how do I create functions and libraries? How do I use them?

    ALL THAT being said, yes FORTRAN is a critical language to know with the sciences, because of the availability of libraries. HOWEVER, many of those libraries are now available in other languages and/or can be called from a different language via an abstraction (a concept that would be taught in a more general computing course)

  141. Yes, but no. by Sobrique · · Score: 1

    It's ok to teach people who are liable to be working with FORTRAN, how to do FORTRAN. It's one of the better tools for certain tasks.
    However I wouldn't include computer science people in on it. Computer Science shouldn't be about learning a language, it should be about learning a paradigm. FORTRAN is therefore a subject of curiosity, rather than a subject of study.

  142. Sometimes we need the *right* answer! by Anonymous Coward · · Score: 0

    About 10 years ago, an industrial firm asked me to review converting from its "obsolete" FORTRAN code to C. This company used many-dimensional matrix and linear algebra to solve for the correct solution in its physical processes. And, yes, I wrote much of that code. I re-wrote the core calculations in C, using the libraries available at that time, and compared the results. The C code was slower, but the solution results were also significantly different. When I plugged those results into the process simulator, it caused a (virtual) violent reaction. That review ended with "... and people could die." The firm decided that FORTRAN wasn't so bad after all, and they would continue investing in scientific computing folks rather than general CS majors (as it turns out, saving money on staffing was the real motivator). OTOH, they were very happy when I suggested moving to more modern languages for user interfaces.

  143. Hell yea by sucitivel · · Score: 1

    Absolutely... I'd rather see the children learning FORTRAN than something awful like .NET or to a lesser degree Java -- I'd actually like to see the whole .NET thing go away permanently... but in all reality I think c/c++ is the best language to start in because it is in at least some ways syntactically similar to many languages, and is a good introduction to object oriented design. ...or as of late I've been finding objective c to be a worthwhile endeavor.

  144. What do I think ? by mbone · · Score: 1

    What do people in the Slashdot community think?"

    That almost all of the physicists I know program in Fortran. People trying to do better than "double precision" tend to be fairly conservative about such matters.

  145. The answer is: no by Spazmania · · Score: 1

    I'd only recommend Python to my enemies, but I don't hate anyone enough to suggest that they learn Fortran.

    Pure sciences folks would be better served by something like Mathcad or Mathematica, advanced mathematics packages which include reasonably rich scripting languages. No form of "real" software development will serve you well in your core discipline.

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
  146. FORTRAN for scientists and engineers by Anonymous Coward · · Score: 0

    I had trouble logging in so I'll do the Anonymous Coward.

    A very surprisingly large amount of the actual calculations in software, from car crash simulations, to aerodynamics, to stream flow and groundwater simulation, and all EPA air quality models and weather prediction models use FORTRAN. The user may see interfaces that are written in other languages, but in the guts of the thing, FORTRAN is what drives the model. At some point in the student's Senior thesis or soon after they get out in a real job, they may run into the need to get into the model. Certainly in the atmospheric sciences and air quality areas - you are really handicapped, and your employer is, if someone doesn't know FORTRAN. If you look at the list of top supercomputers a lot of them are spending most of their time running FORTRAN. We had to start a Computations in Meteorology class for our upper level undergraduates and graduate students in atmospheric science, primarily to teach them FORTRAN and how to deal with the multitude of flavors of "standard formats" that data comes in. Our word back from employers is that knowing FORTRAN and C is a definite plus, four B.S. and is virtually assumed for higher degrees.

  147. Master of the obvious here... by Anonymous Coward · · Score: 0

    The languages taught to undergrads need to be driven by industry, period. Educational institutions need to focus on what they want their students to get out of their program. Are they being prepared for grad school, to perform IT tasks, to develop system software/operating systems or to write some other kind of software with different needs. Once you have that defined the choice of languages is very obvious. Some schools are already doing this and the difference is very noticeable when it comes to interviewing candidates with specific skills.

  148. Difference between teaching and what I use by Anonymous Coward · · Score: 0

    There is a difference between asking what should be taught and what do I personally find useful in my work.
    I don't know what should be taught...I am not a teacher.
    But I can tell people what I find useful in my work.

  149. Engineers use Numerical Methods, not OOP by Carbaholic · · Score: 2, Interesting

    It doesn't matter what language Engineers and physicists learn as undergrads, the language isn't what matters. It's the numerical methods that matter.

    In fact, I think it's good that they learn FORTRAN because so much of the code they'll work with in industry is written in FORTRAN.

    In my first programming class we spent the vast majority of the time learning numerical methods like taylor expansions and how to write them. In the very last few lectures we talked about what OOP did one homework assignment where we wrote and used a class. This was the right way to go because for an engineer, because the mathematics are far more important than the structure.

    I've seen aerodynamic, structural, and acoustic calculations where the mathematics make your head spin, but it only takes two or three functions to write the numerical method to solve the equations. This is the kind of program engineers need to be good at.

  150. Matlab by decsnake · · Score: 1

    I work in space science and engineering, and the two most widely used computing tools used directly by scientists and engineers are Matlab and Excel. FORTRAN is still used, but it is used by _programmers_ to solve numeric science and engineering problems.

    The only problem I have with Matlab is that it is proprietary. I tried Octave but it just wasn't quite good enough -- there were some things that worked in matlab that broke octave.

    I wont say any more about excel, other than it is the most widely used computing tool by engineers, other than maybe powerpoint :)

  151. Inferior Text Book Clearing House by Anonymous Coward · · Score: 0

    I started Engineering School in 1988 and we were required to take Fortran. The required text was a lousy, out of date and cheaply published (mine fell apart before the end of the semester) book that was written by the chair of the Computer Science department in the late seventies. The professor barely used the book, relying mostly on handouts.

    I think the book was used to keep the prof in royalties.

  152. Computer Science w/o Fortran or Cobol... by matt_kizerian · · Score: 1

    is like birthday cake without catsup and mustard.
    Seriously, it's time for Fortran to die. I'm a Chemical Engineer and end up having to use Fortran for programming custom routines inside commercial chemical process modeling software. I was just talking to one of our support reps the other day, and he deigned to pull out the "C++ code doesn't run any faster than well-written Fortran code" argument. The problem isn't about speed or code execution efficiency anymore, it's about 1) ease and efficiency of programming/debugging, and 2) availability of people who are competent programming in the language. Fortran is an epic fail on both fronts; it had its place, now it's time to cede it to better tools. Python would fill its place nicely for many uses when relatively small programs are required (NumPy is a great numerical method's module for arrays and such.) More powerful languages like C++ are well-suited for larger projects. It should be telling that the authors of the venerable book Numerical Recipes have decided to no longer update the Fortran version of the book and only update the C++ version.

  153. Ask ACES what they think by EmagGeek · · Score: 1

    There is a reason FORTRAN is still used heavily in numerical computing. I still develop software I started nearly 10 years ago as part of my graduate program. I looked into rewriting it in other languages and none seemed as well-suited for numerical computation as FORTRAN.

  154. Medleys by itomato · · Score: 0

    Bands play 'medleys' it when the times have progressed, but the tunes are still a vital part of their lineup, why their fans came in the first place, etc.

    If anything it should be taught as part of an "Exploring Legacy Computing 102" course. A little FORTRAN, a little Pascal, some LISP (no threats, please), BASIC, COBOL, as well as magnetic and paper media technologies.

    1. Toggle an Integer BASIC interpreter of your own design into the Altair 8800 you wire-wrapped in 101, using the front-panel switches.
    2. Punch a master card with a FORTRAN program to perform a bubble sort on the following data set:
            2a.: 12, 14, 66, 31, 988, 292, 747, 90922, 1...

            2b.: Error-check and reproduce Master until 45 copies can be created with the IBM 514 reproducing punch.

    3. Restore PDP/11 from with 2.11BSD from tapes.
            3a. How many tracks are available on your tape?
            3b. How tracks would be present if you circumambulate the PDP/11, and beginning at the rearmost right corner, affix the tape to the exterior of the machine, with no overlap, with each course at approximately 22 Degrees?

  155. My 2 cents... by tekiegreg · · Score: 1

    My thinking is computer science programs need to focus on Programming rather than Language I wish they'd teach just one language regardless of what it is, and teach it well. Rather than try and cram 40 different languages in 4 years. Be that language Java, C#, Fortran, LOLCode, etc...

    Within those guidelines, which languages should it be? Probably having to do more with the ethos of the Computer Science program in particular. Do they pride themselves on training for math and engineering? Fortran should be a consideration. Business world? Java or C#. To work for LOLpeople...well you get the idea...

    --
    ...in bed
    1. Re:My 2 cents... by DaveV1.0 · · Score: 1

      Except the article is not about computer science programs, it is about physics, chemistry, and engineering programs.

      --
      There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  156. On a different note: Objective-Fortran by clay_buster · · Score: 1

    Objective-C, used by Apple, was originally implemented as a preprocessor on C. During the NeXT computer days, we used to sell Objective-Fortran and Objective-Cobol. Both put the Objective-C's object syntax and constructs on top of the base language while being backwards compatible. It was an interesting way to update a language.

  157. Python? by Anonymous Coward · · Score: 0

    I wish there was a repellent I could use to keep away all the python fan boys. I think a course in the history of programming languages would be a valuable addition to the curriculum and, in such a class, do some programming in Fortran, Smalltalk, Ada, Algol, and so on. In a 101 class, teach something practical. As ugly as it can be, something as simple as javascript can be used to illustrate a lot of concepts in programming and is useful to most people who will never write anything more than a greasemonkey script.

  158. I RTFA. by DaveV1.0 · · Score: 1

    What I got from the article is:

    1. The author was a physics student.
    2. The author thinks FORTRAN is a great tool for engineering and science.
    3. The author and some of his friends had a hard time learning FORTRAN.
    4. The author thinks FORTRAN should be dropped in favor of something else, like Python

    The most telling points in the article are:

    Did you learn FORTRAN at University? Are you still using it? If you answer yes to both of those questions then there is a high probability that you are still involved in research or that advanced numerical analysis is the mainstay of your job. I know a lot of people in the (non-academic) IT industry - many of them were undergraduates in Physics or Chemistry and so they learned FORTRAN. They don't use it anymore.

    In other, he knows a lot of people who are now working out of their degree field and aren't using the programming language they learned specifically for said degree field. Apparently, this is his justification for suggesting the removal of FORTRAN programming from undergraduate science and engineering courses.

    Here is a neat idea: If you are going to work in IT, get an IT degree so you will know IT things. Don't get a physics or chemistry degree where you will learn things specific to physics or chemistry then complain that those degrees didn't prepare you for your career.

    I will give him one point. It may be worth while to have an intro to programming course that uses something a bit simpler than FORTRAN, but if one is going to be doing serious science and engineering (you know, what the degree is about) one should be required to learn FORTRAN.

    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  159. Might be OK... but please be careful! by Anonymous Coward · · Score: 0

    Should undergrads be taught FORTRAN as an intro language? It depends.

    If the purpose is an intro to programming, then the answer is a resounding "NO. NOT EVER." FORTRAN really has no place in a modern programmer's toolkit.

    However, if the purpose is to give a certain class of physical science students a 'quick-'n'-dirty' tool to write computationally-intensive applications as research or scientific problem-solving aids, well... I'm not thrilled, but okay. Just beware if any of those students go on to do any more serious programming, because the worst thing in the world is a software developer who thinks like a FORTRAN programmer. And for God's sake, at least teach them some proper functional programming methodology with it!

    I work for a company that has a very substantial base of FORTRAN-77 code that is actively maintained. It's UGLY -- but that's only partially due to the language. It makes heavy use of global data structures, and violates just about every rule of good programming -- even good FORTRAN programming. I don't even know why it's written in FORTRAN, since it's a financial app & therefore one would think COBOL would have been a better choice.

    Bottom line -- it's okay to teach someone to use an outdated tool if it suits their needs. Just don't neglect to teach proper tool safety just because "it's only a hammer".

  160. Wrap Fortran in Python -- best of both worlds by lothario · · Score: 1

    I'm the developer in a Google Summer of Code project that integrates Fortran support in Cython.

    Cython (http://cython.org/) is a project that takes a python program with partial type information ('cdef int foo', 'cdef char *str') and generates a C file that is compiled to an extension module. It is possible for Cython to generate pure C code for the hotspots, all while keeping the nice python syntax. It can also call external functions very easily, so you can integrate other libraries as long as the compiler can link it together.

    Thats where the GSoC project comes in -- it allows the programmer to take Fortran source code, wrap the subroutines/functions he wants, generates a fortran wrapper and a C header, which can then be called from any C code or Cython and by extension, Python. There's an older project, called 'f2py' that overlaps, but our GSoC project has some different aims, and is focusing on all versions of Fortran -- 77, 90, 95 with full array support (assumed shape, assumed size & explicitly shaped) and support for derived types.

    Lastly, there is an entire numerical/scientific community in Python, known as scipy (http://www.scipy.org/) that has all the functionality of Matlab/Octave, with the full power of Python. Scipy has optimized arrays with a very good array syntax. Just like Matlab, Scipy hands off all numerically intensive work to external libraries, BLAS, ATLAS, etc.

    So to the OP's question -- certainly teach Fortran, since that is the langua franca of numerical programming and will be for a while. But learn Python, too. They play very nicely together, and its getting better by the day.

  161. Teach a bunch of obscure languages by LordNimon · · Score: 1

    I think every undergraduate computer science student should have one semester where he learns a large number of different languages, and has to write a simple program in each one. Every two weeks, you switch to another language. This will give the student some exposure to different language types, and if a particular language appeals to him, he'll remember it.

    --
    And the men who hold high places must be the ones who start
    To mold a new reality... closer to the heart
  162. Re:Rhetorical question by Anonymous Coward · · Score: 0

    Taco docks a jock cock.

  163. FORTAN alive and kicking in meteorological world by klchoward · · Score: 2, Insightful

    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.

    --
    âoeQuestion with boldness even the existence of God.â - Thomas Jefferson
  164. Depends by DarthVain · · Score: 1

    ...if it is instructive or not.

    Disclaimer I graduated in 2000.

    People get too hung up on this or that language. A programmer is a programmer, either you know the fundamentals or you do not. Knowing the particular syntax of one over the other is pretty limited in the grand scheme of things really I think.

    When I started University the standard was Pascal of all things. My second year they changed the Standard to C. Go figure. We also did VB, and in my 3rd year did some Cobol and Assembly. I actually found Cobol a pretty simple and interesting language, though somewhat limited. Practice and theory changed between instructors as well. Some (most) were all horny about programming recursively for efficiency, on my final Cobol project I did just that, and nearly gave the prof a heart attack and he actually took marks off me for doing so... shrug. Assembly was horrible as you can well imagine from it being such a low level language, but it was sort of novel as it is the closest I have come to typing ones and zeros in machine language. Stuff like that also helps tie into other courses like architecture and binary algebra etc...

    Anyway long story short a new language comes out every couple of years. A few stick around in one form or another for a long time, but may have limited use. If you want to program you are pretty much committing to learning new languages for the rest of you life as demands change.

    Having said that, I don't really program much anymore. Mostly I script in specialized languages to simply make my life easier by automating certain processes, and VB of all things, because that is what is commonly integrated in some off the shelf software. As for application design and development I mostly just find out where something is going wrong and say "fix that" to a vendor. 9 times out of 10 it has nothing to do with syntax or the abilities of a language, but more a misunderstanding of the specifications or requirements or perhaps the process. In any case I am pretty confident that I can take whatever modern language I want out there and in a pretty short span of time be able to use it functionally.

    Its just like there are a number of specialty languages out there that will never be taught at any school, so you will either have to have your workplace bankroll the ridiculous training fees from a private training company, or learn it on the job (to buy the software is usually out of the reach to do it personally because of the cost).

    Hell I had a friend (mind you he was pretty bright) who bid on a job that required a language he had never used (Pearl I believe). He learned it over a weekend and did just fine. He now works pretty high up in a corporate IT structure. Anyway so far as I am concerned I think I would rather hire someone who has a broad base of knowlege, than someone who knows one language really well. Unless I am getting someone for one contract, and that is the language it is to be written in, then and only then would I take the mono language guy.

  165. Fortran is Prefered for calculations! by Anonymous Coward · · Score: 0

    As an old Fortran programmer now doing Java work by way of Pascal, C, C++ Fortran is a good base for learning.

    I also have taught all of those at a university level so have some context as well as working for many years.

    There are several different things involved in the art of programming. The first and most important parts are being able to turn a problem into steps with assignments, conditionals and loops. The data structures are best learned by having to do them yourself. Too many wimpy programmers today have never implemented a data structure, they just use them out of the box, and look for a framework or library solution to a problem rather than having any desire or confidence they can program it themselves. We need knowlegable and confident programmer that use tools reluctantly, or design the tools themselves. Those are the programmers that make the changes.

    As to Fortran and teaching it to Math and Science students, my understanding is that Fortran 90 which has restrictions on pointers and a support for parallel processing and a simpler memory mechanism is well tuned for scientific programming. It optimizes better and more easily, has a shorter code/debug cycle and no memory leaks. Just what those scientific programmers need for large scale quantum, high energy and molecular, fluid flow computing. Why teach them a language that is not the best for their type of field.

    Of course I feel a good CS education requires learning multiple languages. I don't think you "get it" until about your 3d language. It is not about a language, it is about your ability to work in this virtual computing envirionment with the tools and approaches from all fields brought together to solve the problem.

    But Fortran for the audience that was suggested seems more than appropriate.

  166. Fortran is far too high level. by argent · · Score: 1

    Everyone should have at least one semester in PDP-11 assembly language.

  167. This leaves out a very important point... by that+IT+girl · · Score: 1

    ...and that is that even new folks coming into a modern job may need to support older programs and need to understand the language it is written in. I am not in programming, but as another type of example, my clients run software from the 90's and some of their hardware is at least that old. Having the knowledge of those "obsolete" programs is a necessity.

    --
    10 FILL MUG WITH COFFEE
    20 DRINK COFFEE
    30 GOTO 10
  168. Horses for courses by Winter+Lightning · · Score: 1

    I started using FORTRAN (66 and 77) as a Physics grad. student in the early 80s; since then I've also used C and C++ heavily, dabbled in Perl, Java and Python. As well as developing a lot of code, I've also had to troubleshoot other people's complex systems, particularly C++ and Java. I now describe myself - somewhat tongue-in-cheek - as a "born-again FORTRAN programmer".

    Java, C++ etc., are useful for complex applications that are event driven and require independent threads of excution performing many different tasks, but I prefer to avoid these for simple number-crunching tasks unless I need additional layers of abstraction or interaction.

    When I write FORTRAN I know what's going on under the hood; I know that memory is not going to be allocated without me knowing - in fact, allocatable arrays are a relatively new addition to the original static allocation model. I can concentrate on the implementation of an algorithm and achieve deterministic performance.

    Flexibility comes at a price and C++ and Java applications frequently run into performance problems as they become bloated by hidden activity, particularly where the OS is called behind the scenes (e.g., hidden constructor methods). This is a particular problem for real-time codes where an unplanned trip into the kernel may hurt determinism.

    I think FORTRAN still has an important place; with extensions such as OpenMP it has tremendous value for parallel computing on multi-core systems. With MPI it can exploit cluster/grid systems. FORTRAN generally has an edge in performance for HPC codes.

    If you're building something from scratch that contains requires numerical computation then consider FORTRAN, if only for computational kernels that are called by other languages such as C++ or Java (e.g., the latter for GUIs, external interaction/communication, with the heavy work in FORTRAN).

  169. Fortran is very important by NotNormallyNormal · · Score: 2, Interesting

    Fortran is very important in the world of modelling and high speed computation. When I was an undergrad Fortran was taught for the physical sciences but the computer science dept refused to teach it so it was being taught by some geophysical modellers. I'm not sure that the university even offers Fortran anymore.

    However, frustrated by that, the dept of physics and astronomy now has two courses in computational physics (both in Fortran) taught by modellers from the department. They deal with real world issues (well, real world modelling issues when applied to a spherical cow right?). Only one course is mandatory but both courses are very popular.

    For myself, I use several modelling programs that are purely Fortran that I've had problems dealing with. I'm glad I did take a bit of Fortran though I am much more fluent in other languages these days. In fact my wife, in the private sector, has proprietary software that they use for modelling digital elevations and gravity fluctuation that is written purely in Fortran as well - simply for speed. Until someone invents a real quantum computer, I don't think Fortran in the physical sciences is going anywhere.

  170. what is it they say about crap code? by grep_rocks · · Score: 1

    you can write FORTRAN in any computer language...

  171. Smart people should not program by Animats · · Score: 0, Offtopic

    Lee Smolin, the physicist, writes that "Smart people should not program". He used to program, and at one point insisted that his department continue to teach physics students programming. But then he realized that the needed functionality was either available off the shelf or could be written by lower level people. So he now recommends against wasting students' time on programming.

    1. Re:Smart people should not program by sitarlo · · Score: 1

      There may be some truth to this idea. Some of the best programmers I know are dumb asses!

  172. Fortran by Anonymous Coward · · Score: 0

    I graduated from college in 2002. I've seen over 20 different software packages written in Fortran. Many widely-used applications are written in Fortran or COBOL. You're going to see it, so learn it. Also, I disagree with those who want to learn .NET or some other flavor of the month. It's useless to know too much about .NET and nothing about other languages, like Fortran. You really box yourself in for life if you become dependent on a single language. Many students today have disdain for anything but an drag and drop, plugin based system with 15,000 unnecessary libraries. Therefore, they're unemployable to our organization.

  173. Why not let the interpreter replace inv(A)*b A\b by ZmeiGorynych · · Score: 1

    Matlab lint (code-checker) recognizes constructs like x=inv(A)*b and suggests you use x=A\b instead. I wonder if it's so smart why doesn't it just make that substitution internally before interpreting the code.

  174. Math and Alcohol don't mix... by Amazing+Quantum+Man · · Score: 1

    Please don't drink and derive.

    --
    Fascism starts when the efficiency of the government becomes more important than the rights of the people.
  175. MOD Parent up by DeadDecoy · · Score: 3, Insightful

    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.

    1. Re:MOD Parent up by anotherdjohnson · · Score: 5, Insightful

      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. :-(

    2. Re:MOD Parent up by Darinbob · · Score: 1

      Actually this isn't because the instructors don't want to teach certain concepts, but because there is a lot of pressure from the industry that universities churn out programmers who know the languages that industry wants. That is, they want the universities to be tech training schools. It's a short-sighted goal of industry to be sure, but the pressure is there. This is the primary reason I think that Pascal fell out of favor in universities as the first programming language learned, and C++ and Java took over.

      There is also a lot of pressure from the students. Especially the non-CS students. Ie, if they only are going to take a couple programming classes so they can get a job, then they want to learn the tech skill that will get them the job. Because they're smart enough to know that companies aren't in the business of on-the-job training of entry level grunts anymore.

    3. Re:MOD Parent up by St.Creed · · Score: 1

      When I studied computer science, we started with Pascal, proceeded to program MC860xx assembly (a maze-solver) and ended with having to implement the microcode (in an emulator) for a processor for various computations (addition and subtraction I believe). Especially the last one gave me a lot of insight in how a processor works. Oh, we also had a course called "Programming languages" where we did the theory behind the classes of programming (functional, imperative, parallel) and had examples for more than a dozen languages. Now that was a thorough grounding. Combined with the compiler development, the theory on grammar, the Turing stuff and functional and parallel programming courses we had, i have not yet seen any language that was "too difficult". It may take some time to learn the libraries but almost every language I can reduce to some other one I have already seen. Ofcourse, in the last analysis they're all Turing machines anyway :P

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    4. Re:MOD Parent up by Anonymous Coward · · Score: 0

      As a young programmer who started with Java, I can tell you that it does not have to be a hindrance. I began with Java but to earn my degree I also took courses in C, C++, Lisp, and assembly. By the time I left school I certainly knew what a register was and had a pretty good understanding of the decisions that go into implementing a programming language. I do agree that for a good grasp of computer science you must look beyond Java, but I dont think it was a bad place to start. It was good that I learned object oriented programming first because it has been very useful in my career. I have met many old-timers who fail to utilize object oriented languages to their full potential. They write C++ code that might as well be C. That can greatly slow down the development cycle and hinder maintenance of an application post deployment.
      Moving back to the original question involving physics majors I would tend to agree with the poster. I donâ(TM)t have anything against Fortran and at some point they may need to learn it, but for a non-CS undergrad it may not be the best choice. Matlab would be easy for them; although, I question how much of what they learned would carry over to anything else. If students in this field are expected to encounter other programming languages something like python, c++, or a variant of LISP such as scheme would probably be good.

    5. Re:MOD Parent up by Warbothong · · Score: 1

      My University's CS department teaches nothing but Java, even for embedded, except for Haskell in the one module they do on functional languages. It's pretty scary, especially when many high-level ideas (data structures, algorithms, etc) are taught in Java only. That said, they do teach how computers work from the ground up (logic gates, ALUs, registers, RAM, cache, etc.) quite well.

      Fortunately my course is 'Physics with Computer Science', and I've been taught C and C++ directly by the Physics department, whilst I did a recent Physics simulation project in Python (my language of choice, self-taught).

      I also taught myself the basics of FORTRAN and Haskell for alternative implementations of the simulation, but stuck with Python as it ended up much smaller and more readable.

      Not touched any type of assembler yet, but I'm sure when I do it will be self-taught and recreational (like I'm currently learning Smalltalk and Scheme).

      IMHO students who can't transcend the languages they're taught are doing it wrong. Learning is not something which can be offloaded to an institution, it requires a desire to go above and beyond what is formally taught. Blaming lack of skills on one's University doesn't hold water, no matter how poor it may be, since there are many people out there who are great in the same areas without having any privilege such as University.

      As for the original topic, I think a language with the minimum of boilerplate should be used, so the instructions can be focused on rather than any language quirks. Assembly is OK in this area, but pretty limited without getting bogged down in complexity. Python is also nice, although still has some boilerplate (nowhere near as much as Java, C++ or C though).

    6. Re:MOD Parent up by BikeHelmet · · Score: 1

      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.

      I learned about registers when I first learned Javascript!

      A rather strange jump, but I loved Javascript's syntax, and I heard machine code(or "assembly") was faster; to make a 2D FF type game, I needed something faster than Javascript, so off I went to research it.

      Turns out I wasn't smart enough to learn assembly, at the time - but it did teach me some interesting basics on how stuff works. Knowing roughly what the computer does has made me recognize all the steps that must happen when a simple call like substring(5); is used.

      I never did finish that 2D FF RPG; but I did use the knowledge I gained to create a double-buffered clip-pane tile scroller, which I thought was pretty impressive. It was getting 1500fps on computers from 2004. ;) Too bad that knowledge is obsolete now; I need some OGL experience!

    7. Re:MOD Parent up by Gooba42 · · Score: 1

      I don't need to know what resin my Legos are made of in order to use them for what I consider to be useful application. I get what I want out of them without knowing the intimate details and in fact knowing wouldn't do me any good at all.

      Does knowing a processor has registers improve your code? And moreover does it improve or guide your code in a specific language? Unless you're doing some very low-level work, which not everyone aspires to or needs, that knowledge is entirely academic, not exactly useless but simply of no consequence.

      The parallel argument to yours would be that car mechanics who are trained in materials engineering or thermodynamics are too rare these days. If the machine is a black box with discrete, replaceable parts, that's just as good for most purposes.

      --
      I just found out there's no such thing as the real world. It's just a lie you've got to rise above. - John Mayer
    8. Re:MOD Parent up by Nefarious+Wheel · · Score: 1

      I think a primitive, fixed type language like Fortran is a good intro - not necessarily as a language to become their dominant one*, but to form one's thinking processes. It may seem like busy work from the outside, but learning the discipline and understanding the fundamentals such as the simple difference between data and algorithm is important. If you don't have the fundamentals understood, then subsequent applications - in any language - may suffer.

      Case in point - a business programmer once did a very logical thing - nested a huge number of "else if"'s into a popular 4GL some years back (Cognos Powerhouse). He was getting four transactions per hour and couldn't understand why. What he did was logical, but did not map to what was "computable". A deeper understanding of data, parameter passing, manual stack manipulation taken as a school exercise would have cured him of aberrant practices early on.

      Basically, you tend to remember later that any language you use, no matter how modern, can look awful if you forget the fundamentals in how to use a computer correctly.

      *Disclaimer: It certainly was a dominant language for me, for a while. I've delivered a bit more than a quarter million lines of production Fortran.

      --
      Do not mock my vision of impractical footwear
    9. Re:MOD Parent up by Anonymous Coward · · Score: 0

      I need to thank my programming teacher then. In High School programming, my teacher taught us from the ground up, starting from basic logic systems, skipping assemble, but still teaching us about registers and pointers in basic. I have been successfully using GOTO since I started programming, and I know (not well, but i know them) java (least favorite) c, c++, d, VB, Ybasic, Pbasic, am learning Fortran, and so on.

      I think of it like real languages, once you know the basics (latin or assembly) and then the rules of each general language based on latin (assembly), which would be the old basic languages, it becomes fairly easy to use most languages, except for the sucky evil that is the uselessness of java. Trying to learn python an pearl, but not enough time lately.

      The Hatchet.

    10. Re:MOD Parent up by sillybilly · · Score: 1

      I'm a big Basic fan, and love how FreeBasic is like one of the top languages in terseness and execution speed at http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependability-of-v1.html. (The updated version doesn't even mention the word "basic.") Unfortunately there seems to be a massive campaign against assembler and basic these days in favor of bytecode compiler languages, simply because the heavy extra layers that are placed between the user and the cpu, layers that can be claimed as intellectual property and the whole computing world sort of blackmailed into paying for a rental fee for living on top of it. Assembler is difficult to work with, but cheap. Basic is so simple anyone can do it. The drive towards dotnet/java or other so called "professional" languages is like having to use Latin in the middle ages for both religious ceremony and scientific writing. This kept the bulk of the population who didn't speak latin clueless. These days very little official discourse is in latin, and knowledge is more freely accessible to the general public. You could argue that the general public doesn't know how to write proper programs just like hillbillies don't know how to properly spell and create written text that monks properly trained in Latin would cringe at. So what? That's not a good enough reason to deny them the right to write anyway.

      It's been a few years since 2005 when I was looking at a replacement for VB6 to bangup a quick and dirty db interface for SQL Server to manage some lab samples. I simply can't stand dotnet and java bloat and slowness, and even interface reaction time - I can't zip through the menus with the speed of light in the newer Visual Studios, and the test programs were similarly sluggish. I almost settled on programming in C++ and wxWidgets, which had decent speed, it it weren't for the codesize - DevCpp static linking minimal programs were well over 1 MB, for a previous VB exe app that used VBRUN600.dll was less than 64 KB. Win32 C apps were just too verbose to write and debug compared to VB. I ended up sticking with VB6 even to this day, which pretty much has both feet in the grave by now and a few nails driven into the coffin, but I still couldn't find anything better than VB6/Excel VBA that would be officially supported by MS, so my ass is covered when I give it to a large corporation. I'm quite tempted to go for unofficially supported things like sqlite in the future with a simple file access protocol, because even ADO/SQL Server is becoming ridiculous compared to old ADO classic/MS SQL Server 2000 version that was quick and dirty and flying like a breeze. I set up this VB6 frontend/ADO/SQL Server 2000 backend db app in 2002 to replace an old file-access based Foxpro app that was very slow, but the daily security patches sometimes break the whole show, with ADO getting messed up with an MDAC update, and good luck trying to fix that. Going back to a slow file access based db where all the data is pulled across a network to be locally sorted seems retarded, but in view of the heavy layer of moving targets in an officially supported server-client setup, something simple that relies on Win32 API with sqlite and simple file access is starting to seem like a breath of fresh air.

      By the way I never really knew what i386 registers were, and these days I'm learning assembler programming, starting with http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html and http://asm.sourceforge.net/intro/hello.html . Jeebus, assembler is hard, but it's so sexy, supersmall, superfast, with all middle man libraries out of the way. Libraries are like having someone else do a repair job on your car that you don't know how to do. Knowing assembler is like knowing how to repair it yourself, and when you take your car in for repair, you don't get shafted, because if t

    11. Re:MOD Parent up by inline_four · · Score: 1

      The article is about students in science majors. They're not studying to be programmers, they're learning how to do science.

      --
      Alexey
    12. Re:MOD Parent up by St.Creed · · Score: 1

      The parent I replied to was discussing Computer Science majors...

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    13. Re:MOD Parent up by Anonymous Coward · · Score: 0

      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.

      Good! Because in my experience, which involves systems level and server programming for combinations of stupid and hostile client software, most people who know what a pointer is don't know how to use one properly.

      The sooner the mindset of reaching into arbitrary memory locations for reading writing and/or executing in any code but the smallest, tightest, most privileged routines, the better for everyone from ISA designers to OoO designers for extant ISAs to compiler writers to end users.

      Fortunately it's appearing in fits and starts because of security flaws. We already have no-execute pages which have killed off self-modifying code rightfully as being too dangerous to be worth retaining, we have read-only pages which prevent against abusing pointers, and we have heap management libraries that allocate (and even runtime link) randomly through large address spaces to avoid "home invasion" buffer overrun attacks. This encourages the use of languages which have never incorporated dangerous pointer semantics in the first place.

      This is not just a legacy of C; even aging Lisp-like languages have destructive mutators, which were once encouraged for performance reasons that modern compilers have rendered historical.

      A decent compiler should scream Warning: THIS IS UNSAFE whenever pointer operations are in the source code and disabling these warnings or ignoring them should be discouraged. Do strict typechecking (and use your typedefs!), a modern real string library, and analogues for objects and sets you'd normally handle with pointers, and don't look back.

      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

      I'm sure you've also run into people who thought the world was a VAX or that all you need for portability is #include "linux.h".

      Oh yeah, there are only three GP registers on today's object platform, so I'll make dual use of this one local variable by having the upper half word hold some state while I use the lower half word as a loop index. Scalability problems will never happen!

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

      I am pleased to say that my knowledge of PDP-8 and Macro-11 assembly and the like is entirely obsolete. I don't miss it. Bondage & discipline languages are more fun and expressive, and dynamically-typed lexically-scoped languages are no longer dog slow or as useless at predicting run time errors at compile time as they used to be.

  176. Legacy code vs new rewrite by cwills · · Score: 2, Interesting
    The fact is, there is an enormous base of existing tested FORTRAN code that is still in use and still being developed within the scientific community. The issue is not simply writing new code in a newer language, the problem is setting up a new tested base in the new language.

    Lets say that you are working on a project to evaluate the effects of theoretical gravity waves through a nebulae. You have a choice

    1. Use 3 college interns to modify some code that you have been working on using a library of subroutines that have you and your prior researchers have been building up and using over the last 40 years
    2. -or- Use 3 college interns to write new code from scratch in a new language that the compiler/interpreter was just released 2 years ago.

    And oh, you have to publish results in 2 months in order to get your next NSF grant.

    Yes, the new code might be all object orienty, and you can use the latest IDE to develop in, and you can hire a bunch of fresh young (cheap) grad students that are familiar with the latest python, perl, C#, etc. development and they can bang out thousands of lines of code a day. But are you really really sure that that freshly written eigenvalue routine produces the correct result? Has that new compiler been tested on the super-computer you have limited access to, can it even take advantage of all the power of that system?

    I'm not saying that FORTRAN compilers are not bug free, but I suspect that the chances of finding a basic compiler or runtime library bug is lower in FORTRAN then in say Perl 6.

    A couple of years ago my son spent some time doing some intern coding work for a private atmospheric research group. The group was/is doing bleeding edge research. My son was helping out one of the researchers in updating code that handled 2D models to 3D models. All the code was in FORTRAN and there was no desire to move away from it.

  177. Re:It could be worse. In fact, it was... by oliderid · · Score: 1

    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.

    Pascal...I had to learn it early 90's.... On the other hand, what's the point to bore students to death with such languages lacking all the nice stuffs of modern languages? I remember that I learn a lot more by my own playing with graphic library because it was funny, extremely visual. And once you want to make some animation, you need to understand the logic behind buffering, and other basic concepts.

    I would rather take a high level language and then I would gradually move to the core. It's like being in front of a car...first you want to drive it. Once you master driving...You wonder how this thing works? I always had the feeling that CS takes the opposite road, first you have to know how an engine works before driving...What you learn has no practical use ( read funny for a teenager) until very late in your study.

  178. Don't overlook the performance by OrangeTide · · Score: 1

    FORTRAN is one of the fastest compiled languages around, at least for numerical problems. Using one of the slower interpreted languages around is no substitute. The commercial FORTRAN compilers out there produce very efficient code suitable for commercial, industrial, medical, research and military use. When, and if, Python gets anywhere near that point we can consider it.

    Having easy and pretty syntax is not the only metric we should go by. If after a decade or two you can't squeeze out some performance where it counts in a general purpose language, then I believe your language's design is flawed or there is a lack of interest in your implementation. Python really is supposed to be general purpose (as is Ruby), and neither seem to compare favorable against Java, C, FORTRAN or a number of other languages.

    You can argue about how performance isn't the only metric either, and I will agree. What's the point of a language if it's too hard to use for anything. But swinging the opposite way is not a solution either, ideally we want both speed and ease. And I am not aware of any specific law or property of compilers that prevents us from having both.

    C - advantages: fast, moderately easy to use by ex-assembly programmers, easy to implement a compiler(a single target compiler that is, multi-architecture is hard to get right)

    C++ - similar advantages to C, but the compiler is harder to implement. The rest of the bits are neither a clear advantage or disadvantage, just a matter of preference if you like the modular and OO style it has built-in.

    Java - advantages: still fairly fast, abstraction makes it easy to improve the performance of compiled code, syntax is easier than C (but harder than Python). The rest of the bits I don't see as an advantage or disadvantage (like the built-in OO support or large library). .. I won't go over my thoughts in too much detail on Python, Ruby, Io, JavaScript, PHP, Lua, etc because it could be easily interpreted as a flame. Although at least some of those languages are special purpose languages, and I think therefor the criteria we use to judge if they are good or not should also be special. If Python was a special purpose language, instead of a general purpose one, it would be a lot easier to dismiss all of its performance flaws. There are benefits to using Python, I'm just not willing to explore them too deeply them until it can meet some basic needs we have for a general purpose language.

    --
    “Common sense is not so common.” — Voltaire
  179. from the teacher side... by Anonymous Coward · · Score: 0

    I recently graduated with a degree in aerospace engineering and, during my time in college, I was a TA teaching Fortran to freshmen and sophomore (primarily) engineering students. During that time I realized that the objective of teaching Fortran to these students was not necessarily to have them learn the language, but to learn how to think in a procedural manner. Say what you will, but engineering and the scientific process is full of procedures. These kids come in to college not knowing how to analyze, formulate, or even how to follow procedures and learning programming, especially in a language such as Fortran where you don't have a choice, is one large step in that direction. Therefore, when I would teach, I would focus on the program design process rather than the syntax because, as we all know, anybody can learn a syntax.

    I realize that the previous argument was more programming-general rather than Fortran-specific, so here's my Fortran plug. It all comes down to this: Almost Every Major Company in the Aerospace Field Still Uses Fortran! Many of my fellow TA's moved on to become employees at NASA, Lockheed, Boeing, Harris, and others based primarily on the fact that they know Fortran. I should also mention that I have a friend in a graduate physics program who uses Fortran for his modeling because of the extreme computer-intensive computations it requires. It's still out there. It's still strong. It's still important.

  180. Teaching language by RogerWilco · · Score: 1

    FORTRAN has it's uses, mostly in legacy applications, but I don't think it's a good language to learn programming in. I'd go with either (object)pascal or Python there. Certainly not Java.

    Compare
    -------
    print "Hello World"
    -----or------
    begin
        writeln("Hello World");
    end.
    ------
    with
    ------
    class myHelloWorld
    {
                    public static void main(String args[])
                    {
                          System.out.println("Hello World!");
                    }
    }

    ----------

    A language to teach people to program should not have to bother students with class definitions, "public static void" or any of that. I'm no expert on FORTRAN, but what I've seen it isn't stellar either in it's ability to minimize syntactic sugar.

    --
    RogerWilco the Adventurous Janitor
  181. What's the purpose? by JeffDeMello · · Score: 1

    If the purpose is to show how a computer really works ... teach an assembly language course ... have the last project be to write a simple device driver. That will teach a person to appreciate what a computer REALLY does! If the goal is to teach Fortran for modern programming ... not worth it (I can say this after programming in Fortran from '78 - '90 !!!).

  182. Pushing Python was his agenda by synthespian · · Score: 1

    I totally agree that Fortran is inadequate for a first language. In fact, at my university, we had to learn C (now some are getting around to Scheme), Pascal (cleaner syntax, etc.) as a first language. Then we get around to learning pointers in the context of data structures and algorithms. This use of pointers is just something you have to go through in life, just like learning your ABC. A little bit of Maude (yes! In the context of specifications) was taught. Applied Math students learn Fortran later, but they also learn Matlab prior or simultaneously. R is learned in statistics. Maple is also used in ODE, etc., classes.

    In terms of the article, Python is a very weak choice. You need to learn about pointers. Then, if you need a simple language high-level language for math/physics you should do what everybody does: use MATLAB (sadly, the excelent Scilab is neglected - probably due to it being European and not having the marketing penetrating capacity the MATLAB firm has), use Maple. IIRC, even the Python numerics packages are not on par with its proprietary counterparts, lacking many things. I'm not sure, but it seems to me that in terms of data visualization, Java might be a good choice (C++ being an obvious one). So Python doesn't seem to fit anywhere, in my mind. It has this niche as a scripting language (and some would argue it's not well designed) and it should stay there. As a "glue" language for scientific computing it doesn't achieve much, it seems. At least, it seems there are other options that deliver more speed, more features, more power (want abstraction + foreign functions interface? I'd do Common Lisp) and, thus, more productivity. In fact, were it not so, Python wouldn't be such a minority choice. Now, if your talking web sites...That's another issue altogether.

    There's no way around Fortran for numerics. Numerics code is the domain of experts, and they work in Fortran (Fortran being faster than C for this task), Let's hope Sun Microsystems gets Fortress in a usable state - because that has a lot of good ideas in it (ideas from functional programming).

    --
    Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
  183. Don't teach languages at all by LennyP · · Score: 0

    What should be taught is the ability to look at and analyze a problem to find the best available tools (in this case computer language) to accomplish the solution of the problems, not how to use a tool or tools directly. It needs to be taught how to decide whether to use a screw or a nail, then which tool is better (a screwdriver for a screw and a hammer for a nail), and finally how to use that tool in a practical way. Schools should be teaching computer languages as after thoughts and as a means to problem solve, not as an end in themselves.

    Learning and using most all higher level programming languages is a no-brainer for someone that has been trained in problem analysis, compilers/interpretors are self-teaching tools. Has C++ brought us better solutions (more efficient, easier to maintain, less complexity, ...?) over C? over Ruby? over Cobol? over fortran?

  184. FORTRAN, no... LISP, yes... by neo · · Score: 1

    Your computer programming ability will only marginally change should you learn FORTRAN. Your time is better spent on it's children that copied and made better it's functional properties.

    However LISP will expand you programming experience and should be taught at some point after C++ or PHP and before Python. This would have a profound impact on the way you program.

  185. Re:Are You Serious? by blueturffan · · Score: 3, Funny

    An operating system is staggeringly complex to write yet a single man can write one.

    That's because a married man has to spend so much time trying to figure out how to keep his staggeringly complex wife happy.

  186. what else should we use by Anonymous Coward · · Score: 0

    I was taught fortran 77 this past year as an undergraduate to do atomistic modeling. People tried to use C, C++, matlab, etc but they were too slow

  187. Re:Are You Serious? by synthespian · · Score: 1

    You are so clueless, you are beyond help. Your TI-89? Throw in the garbage (you should have bought an HP, anyways).
    What a joke education has become.
    Now go program your PHP site.

    --
    Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
  188. maths oriented language for physics: YES by Anonymous Coward · · Score: 0

    since you're talking about physics - it sounds like yes it should still be taught.
    I would have thought either matlab or fortran is perfect. a language for calculating
    shit. as opposed to a general purpose langage.

    languages like python can be particularly cumbersome to do maths in.
    (unless python has got some sort of maths module which I don't know about).

    I don't know much about fortran vs matlab tho so perhaps matlab is a decent alternative.

    anyway fortran is still used in all sorts of areas in code hardware or systems etc where you need
    actual number crunching for example radar systems and that sort of thing.

    I'm not a fan of fortran myself but the fact is it's a tried and tested language for
    numeric computations.

    however having said that, the question was not 'is it any use' but should it still be taught.

    the answer to that really depends on the course. the course I learnt it in was called
    'programming paradigms' and the intent was to show different types of languages. fortran
    is a good example of a different paradigm from your bog standard boring procedural C
    style languages.

    so, yes it should be taught. at least there's no reason it shouldn't be used as an example
    of that type of language.

    also, I have to say, learning how shit some of these old languages are provides appreciation
    of features of modern languages.

  189. Fortran is *not* 40 years old by slashdotlurker · · Score: 1

    F2003K is less than 5 years old in terms of implementations.

  190. Re:In a word... by Arthur+Grumbine · · Score: 1

    You make a persuasive argument, but on the other hand, yes.

    Are you insane?!! Only an idiot would not see the clarity and logic of the arguments for 'no'! It's people like you who are ruining the internet and rational discourse with your constant contrarianism. A pox on you!!

    --
    Now that I think about it, I'm pretty sure everything I just said is completely wrong.
  191. This is quite backwards by DragonTHC · · Score: 1

    Fortran is not the future.

    My college is pushing perl as an engineering and scientific language since 99.9% of the work a scientist might have to do will be in Unix or Linux whose administrators favor perl over fortran for such tasks.

    --
    They're using their grammar skills there.
  192. What about other languages? by DutchUncle · · Score: 1

    Despite the fact that they are hundreds or thousands of years old, people are still being taught English, French, Spanish, German, and various other Romance and/or Germanic languages. Not to mention the various non-Indo-European families.

    They still work. They each have history and legacy.

    People are still using fire to cook, too, and that's got many thousands of years on the odometer. It also still works.

  193. The language is not the issue by wolfguru · · Score: 1

    Several posters here have made the point I answered to espouse - It is not the language per se, but the concepts of organizing and structuring data, preparing logical flow and execution, and maintaining a standard of documentation and coding which others can interpret and verify that is the essence of the teaching. There are any number of "quick and dirty" languages, and the argument that there is excess capacity available to make up for their inefficiency is merely a cover to excuse the lack of clarity in these solutions. Analysis and interpretation of hard data requires the same rigor as gathering and validating that data, and none of the easy ways of manipulating the "for dummies" languages will meet the test of that exacting and essential process. Teach python as a quick tool for making approximations; but first teach, through whatever language that meets the standards that science must hold itself to, the process of managing the idea and logic in code. Computers are fast idiots; they do what we tell them to do at fantastic speed; not what we want them to do. Failing to understand that will produce results that never stand up to the level of accuracy needed.

  194. If you're not a CS major by Anonymous Coward · · Score: 0

    they aren't going to teach you PROGRAMMING. They will teach you CODING, and probably do that pretty poorly.

  195. OO Fortran95 by plopez · · Score: 1

    Fortran 95 is a fully munitioning OO programming language. Get rid of you biases and old misconceived ideas. All that, built in parallel programming and fast.

    It's a natural choice if you need number crunching.

    If you need string processing, Perl or Ruby or some other scripting language.

    Python lower on the list.

    --
    putting the 'B' in LGBTQ+
  196. FORTRAN for Undergrads by Anonymous Coward · · Score: 0

    I vote NO.

    Sure, there's a heck of a lot of working legacy code out there (e.g. NAG, &al.). There are also a lot of clay tablets lying around with pre-written cuneiform on them. There's a difference between "re-inventing the wheel" and switching from a wooden-axle-through-a-roundish-stone to a truck with independent suspension, and well balanced wheel bearings.

    I spent several years working as my research group's primary computer "guru" -- including having to port old code that had been written to run on an out-dated UNIX box (in FORTRAN) to run on a newer computer system. 1st, I ported from the old FORTRAN 77 to FORTRAN 95. Worked fine -- only took me a couple of hours. Later, as requests for improved functionality started coming in, I compiled the old FORTRAN code into a .dll, and wrote the calls in C++. Still fast, accurate, and all -- from a user's perspective -- but UGLY from a programming/maintinence perspective. Eventually, I spent the better part of an evening re-writing the core functionality in C++ (with - I'll admit - some embedded ASM), and got a result that ran fine on a 486 box just as fast, and just as reliably as the original FORTRAN code on a it's dedicated workstation... and it was a *heck* of a lot easier to maintain. After that, I just left the old FORTRAN compiler alone. [For the curious, the code in question modeled the physical response of a visco-elastic microstructural composite material to applied stress/strain -- not an entirely trivial application -- and involved a fair amount of tensor calculus]

    I know that FORTRAN has come a long way since the old days -- but it's still a beast. Anything that you can do in FORTRAN, you can also do in C/C++ -- but the same is not true the other way around. Pointers/dynamic memory access/allocation. Graphics. Hardware interfaces/communication. Cross-platform compatibility.

  197. Programming in Practice by sitarlo · · Score: 1

    I think colleges should teach the fundamentals of programming using a variety of languages first, then offer specialization courses and research opportunities. Teaching "programming" using one language is a seriously outdated idea. Modern software developers need a solid understanding of fundamentals that they can apply to any number of programming languages. It's like music where one set of fundamental rules can be applied to a large number of existing and future instruments each with their own interface. I currently work in Objective-C, Java, C, C++, and a bunch of scripting languages like perl, python, etc. For me to do this effectively I have to view the language as an interface to the machine or platform while applying techniques, concepts, algorithms, and data structures that transcend language alone. Taking a FORTRAN class may be beneficial to one's completeness as a programmer, but I don't think it should be required for a CS, PHYS, or ENG program.

  198. Re:Are You Serious? by Yunzil · · Score: 1

    How did we ever make progress with people like you around?

    Yes, let's do it your way and rewrite rock solid, decades old, high performance math libraries every time a new language hits the streets. Just think of how much progress we'd make!

  199. Fortran is old? by Anonymous Coward · · Score: 0

    You damned kids, get off my lawn!

  200. As long as it's FORTRAN 95 - Okay. by j.leidner · · Score: 1
    I agree. Why teach them Python which is slow and doesn't have the libaries that FORTRAN 95 has?

    Modern versions of FORTRAN don't have the odd reliance on source code formatting anymore that come from the punchcard era (although ironically Python relies on identation now).

    I've taught graduate students FORTRAN 90 and they could pretty quickly implement matrix calculations, use imaginary numbers and I/O to solve the kind of problems they need to solve, often without prior programming experience. Science and engineering computations often require vast numerical throughput, and FORTRAN compilers are unrivalled at that (and have the best optimizers and parallelization support).

    I'm not saying Python can't do the same, but change for change's sake is a pretty poor argument, and the existing huge FORTRAN libaries and code bases mean FORTRAN users truly stand on the shoulder of giants.

    1. Re:As long as it's FORTRAN 95 - Okay. by jeff4747 · · Score: 1

      Why teach them Python which is slow and doesn't have the libaries that FORTRAN 95 has?

      Because Python has those libraries. Ex: NumPy

      For extra bonus points, some of the libraries are actually wrappers around FORTRAN.

    2. Re:As long as it's FORTRAN 95 - Okay. by j.leidner · · Score: 1

      I guess a native call from FORTRAN will be faster.

  201. I guess it all depends by sheph · · Score: 0

    It really depends on what you are planning to do. Fortran is certainly still being used in real world applications. We use it here to write custom functions for software that controls the electrical grid. I would imagine that it's still in use in other environments that require engineered modeling as well. I didn't learn it in school, but I did learn C++, Java, Perl, and PHP. When I started here I had enough general knowledge that it was really just a matter of learning the syntax. So I think it's plausible to expect a student to be able to pick it up as long as they are taught the basics of programming in some respectible language.

    --
    I don't believe in karma, I just call it like I see it.
  202. Why is this being discussed here again? by Anonymous Coward · · Score: 0

    There are no new facts to this whole thing. FORTRAN fans will come here and praise the advantages of using numerical routines developed over the last 40+ years. Lazy grad students and alikes will say they have to use it because the old code they were handed is written in FORTRAN.

    The truth is that even though FORTRAN is an efficient language with loads and loads of available numerical routines, it is old, and we should gradually change to something more modern. If only we weren't so lazy!

    I for one, am a graduate student in Physics, working in a group with several other students and post-docs. Even though our supervisors legacy code was sure written in FORTRAN, we all write our own serious stuff in C or C++. Most of what we do is Monte Carlo, and Linear Algebra (BLAS, LAPACK, etc). We use MPI, OpenMP and the threaded version of Intel's MKL very heavily. I doubt FORTRAN programs would give us any performance gain over this setup, but it sure would require us to keep writing stone-age code, making sure to leave enough space on the right-hand side for the holes to be punched!

    Give me a break! If you are a senior programer, than you might be excused for sticking to your old programming language and codes. If you are new in this game, and you don't want to take advantage of the best tool available, fine too! I just hope I won't have to work with you. Ever!

  203. LHC languages. by Bill,+Shooter+of+Bul · · Score: 2, Informative

    My friend at cern working on programs for the LHC has to do everything in c++ or python. So python might be a good one to learn. I love fortran 90/95 its a good language that only has a hint of the unpleasantness that was fortran 66. As, I'm sure others have posted there are some very high performance libraries/compilers for fortran number crunching. But, its not that hard to pick up if you know c/python.

    But it was pretty funny taking that FORTRAN class with some cs students who only knew ADA. They were sort of freaked out by its "modern" features and "easy" string handling. It was right then and there that I realized I had dodged a major bullet by not becoming a cs major at the school.

    --
    Well.. maybe. Or Maybe not. But Definitely not sort of.
  204. What other old languages should be taught? by sirgoran · · Score: 1

    Let's get real. If you're going to make the case for every CS student to learn FORTRAN, then why not COBOL? Or why not PASCAL? Perhaps it should be broken out to it's own course structure, based on the field or major/minor of the student. That way you don't bore the crap out of someone that will never use it.

    I still have the books and notes from the PASCAL I learned in High School, and the notes and printouts from the FORTRAN and COBOL courses. Never use them now, and never used them after I left College.

    - Goran

    --
    Carpe Scrotum - The only way to deal with your competition.
  205. Way over 40 by Nofsck+Ingcloo · · Score: 1

    Just for the record, FORTRAN is at least 50 years old. I wrote a program at GE Evendale for the IBM 704 using FORTRAN in the summer of 1959. The language was very young at the time. The documentation, such as it was, was typewritten, not printed. Typical FORTRAN scenario: run it once, tqweak it a little, run it again, all done.

  206. Ab-solute-ly! by BruceSchaller · · Score: 1

    I really wish that I had experience in programming in FORTRAN before I started my current project. It's very fast, simply because it is so lightweight. We're doing resevoir simulations...ie....how much CO2 can one put in a rock formation. The extensive programs already written (and often free or inexpensive) for FORTRAN make it a great language. The only problem is....thought must be put into threading FORTRAN applications. MATLAB and Octave already handle threading many programs. This gives great advantage to the user, who can easily scale to cluster-size computing without a lot of thought.

  207. Call me crazy by Ohmaar · · Score: 1

    Call me crazy, but shouldn't they be learning Chemistry, Physics and Engineering?

  208. Computers can become much more empowering by GPS+Pilot · · Score: 3, Insightful

    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.

    --
    That that is is that that that that is not is not.
  209. Egads by Weaselmancer · · Score: 1

    ...but we geeks are getting old. Fortran, punch cards, and then you had to go and drop the D&D bomb. Now people are going to start bragging about what color box set they started playing on. Well, I'll nip that one in the bud, dammit.

    My D&D box was clear. Yup, you heard me. Clear. Not blue, not red, not white. Clear. Gary Gygax made it for me himself out of cellophane tape and saran wrap as a gift commemorating the fifth anniversary of the D Day landing. The books were written on bar napkins and held together with roofing nails and bubblegum because staples hadn't been invented yet. The cover was done in Dodo pelts. Monster manual actually had an entry for North Koreans. There.

    So top that.

    --
    Weaselmancer
    rediculous.
    1. Re:Egads by AllergicToMilk · · Score: 1

      You had a Monster Manual??? Luxury! But you tell kids these days that and they won't believe you.

      I would tell you that I did, in fact, have a first edition white box set of D&D AND a copy of Chainmail, but you would only mock me so I won't. :-)

      --
      There are only 6,863,795,529 types of people in the world.
    2. Re:Egads by Weaselmancer · · Score: 1

      Dammit! Someone always throws down the white box/Chainmail geek cred!! AAARGH!

      Ok, ok...you win. I confess. Red box here.

      And extra bonus geek points for the Yorkshiremen. I am officially pwnt. =)

      --
      Weaselmancer
      rediculous.
  210. Not specifically by Anonymous Coward · · Score: 0

    They should learn functional programming, for sure. Fortran specifically need only be taught to those who need extreme performance for scientific/mathmatical calculations.

  211. PERL RULZ by Anonymous Coward · · Score: 0

    Perl is the FORTRAN of interpreted languages.

  212. What year is it? by Anonymous Coward · · Score: 0

    The answer is - NO! There is no compelling reason to teach FORTRAN since it doesn't offer any concepts not available in almost any structured or OO programming language. If you know how to prrogram in almost anything, you could program in FORTRAN.

    When I started Purdue University in 1984, they had long since dropped FORTRAN from the CS curriculum.

  213. Chainsaw massacre by Anonymous Coward · · Score: 0

    Use the right tool for the right thing. Do you hammer with a chainsaw ? Why would you crunch numbers with Python ? Sure, a Chainsaw is a lot more powerful and can chop trees, but what you need to get the job done is a hammer.

  214. assembly language by Khashishi · · Score: 1

    Assembly language is almost always totally impractical to actually use, but gives tremendous insight into what a computer is and what the limitations are.

  215. Modula 2 by mujadaddy · · Score: 1

    ...anyone else?

    --
    Populus vult decipi, ergo decipiatur...
    "Force shits upon Reason's back." - Poor Richard's Almanac
  216. The point of teaching computer programming by juanergie · · Score: 1

    Many posts I've read seem to be missing the whole point of computer programming.

    It is not computer science: that is another course and I agree it should be taught in a language-independent manner; it is not scientific computing, as many posts have implied; it is not job-skills workshop. The point, I believe, should be to make as many students as possible fall in love with computer programming and understand its usefulness, to the others it will only be an experience better forgotten.

    I love FOTRAN (I even capitalize it, see? I'm young but old-fashioned) but let's agree that it is not the simplest language, and it has a steep learning curve: it takes longer to see your work done, and this might act as a deterrent for weak hearts. I have never taken a computer programming course, yet I am competent (at least not incompetent) in C, C++, FORTRAN, and Perl and Python. When you love computer programming, you don't need a teacher, you only need time to spare.

    My belief is that the computer programming course should aim for making students fall in love. I would lean toward Python, and have students see their computers obeying them sooner rather than later, allowing them to imagine further ways to dominate the computer and just get shit done.

    FORTRAN is faster? This is the same as saying Linux is free. Only if you don't take your time into account! Sure, inverting a matrix with your processor-optimized LAPACK works great in FORTRAN, but the kids are not designing rockets or predicting weather, they are learning how to program. If they learn how to do it and, most importantly, they learn to love it, they may very well end up designing rockets in assembly if you will. They will pick up girls with hexadecimal compliments. Maybe not the last one.

    As anything else in high-school or college, the point is to "get it in the bull-park", learn to love knowledge, and learn how to learn.

    --
    Aeroespacio.org
  217. Opinion of expert Wybe Edsger Dijkstra by Device666 · · Score: 1
    Apparently not according Edsger Wybe Dijkstra (to famous computer scientist and influential pioneer), these are his quotes about Fortan:

    • FORTRAN's tragic fate has been its wide acceptance, mentally chaining thousands and thousands of programmers to our past mistakes.
    • When FORTRAN has been called an infantile disorder, full PL/1, with its growth characteristics of a dangerous tumor, could turn out to be a fatal disease.
    • FORTRAN, 'the infantile disorder', by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.
    • In the good old days physicists repeated each other's experiments, just to be sure. Today they stick to FORTRAN, so that they can share each other's programs, bugs included.
  218. Re:libraries. gigabytes of libraries by Anonymous Coward · · Score: 0

    I think we're seeing two completely different questions here. You're seeing "get rid of Fortran? BLASPHEMY!".

    The actual issue is not about removing Fortran. The actual issue is that we should teach programming first, then teach fortran. Currently we try to teach both programming and Fortran at the same time, therefore often doing a poor job at both, therefore additionally often making it much harder to learn other languages later than might otherwise be so.

    Why is it important to not cripple the ability to pick up other languages? Besides that students might switch to something else? It's important because while the libraries stay the same, the stuff that calls those libraries is in flux. (And it's also important to know *how* the libraries work, so that one can use them correctly.)

  219. Wrong by Anonymous Coward · · Score: 0

    Teach them C or assembly first. They will thank you later when they have switched to Python because of experience, not because you forced it down their throats.

  220. Perl or Python by Average · · Score: 1

    The point is to learn how to use programming to accomplish a task on a set of numbers (most likely some big comma-separated text document) and output some other set of numbers.

    I want the students to get to the point that they have the numbers read and writable on the first day.

    Perl or Python. Suck it in, split on commas, and it's in a 2D array. 3 lines. Bob's your uncle. Write it out in a preformatted template. Boom.

    I coded some things with my undergrad science major friends (atmo sci roommate). The FORTRAN students not only devoted pages of code to the trivia, they spent hours debugging it. The code part was simple for any of them. Our Perl scripts were seriously 10 lines long to their pages, and better looking output to boot.

    1. Re:Perl or Python by Anonymous Coward · · Score: 0

      In shell:
      sed 's/,//gc' filename > temp
      mv temp filename

      In Fortran:
      open(70,file='filename')
      do i = 1, bound1
        read(70,*) array (1:bound2,i)
      enddo
      close(70)
      write(format,'(A1,I5,A6)') '(',bound2,'F12.8)'
      do i = 1, bound1
        write(*,format) array(1:bound2,i)
      enddo

      Hm.... 9 lines. And I even formatted the output! Okay, I skipped variable declaration (but I could use implicit types... Hey, just kidding. Please, put down the gun!)

      Yes, it gets nasty pretty fast for complicated stuff. You can't do easy splits, search-and-replace, and whatnot. Who cares? Fortran is the king of numbers. If I want to play fancy games with strings, I use perl.

      And I would argue that someone who has mastered Fortrans IO has a very, very good grasp on how to format and read files so that there is never, ever something unexpected coming in - which is a good thing. Unlimited SQL injection vulnerabilities on the 'net stand witness for that.

  221. Undergraduates Should Be Taught As Many Languages by J_Pierpoint_Finch · · Score: 1

    Old programming languages never die. If the code written in those languages still work, then they are run forever, which is why 50 years after its invention, FORTRAN (and Cobol) are still in use.

    To become a truly competent programmer must learn as many different programming languages as possible. My first programming class was split into 3 sections over the school year; FORTRAN, Cobol, and Assembler (IBM 360). During my CS education my professors exposed their students to as many types of programming languages as possible. We learned the design and functionality of these many programming language examples so we would be able to pick up any new languages in the future without problems. You want a hard language to learn, try APL or LISP... I did, and got a paycheck for the work I did.

    It is likely that as a new graduate, you will enter the programming world and encounter legacy code written in some ancient programming language like FORTRAN. If you tell your boss, "I can re-write this in X (java, python, ) and it will only take me a month (likely 6...)", your boss will nod his head with a smile and tell you he will think about it. What he is really thinking is "Why would I pay to re-write code that was paid for 40 years ago, that already works".

  222. Precision by Anonymous Coward · · Score: 0

    Whatever you use, it better have 128bit precision support for when you have to do large matrix diagonalization (often needed in the sciences).

  223. Fortran for scientists? by Punk+CPA · · Score: 1

    Here is my qualified "yes": it should be required only for archaeologists.

  224. Re: Suck it Perl or Python by uassholes · · Score: 1
    I don't agree with that, and I don't agree with the ankle biter that wrote TFA. Like him I took a course called something like "Numerical Methods" as a physics undergraduate, but about 25 years earlier than he did. But the era doesn't entirely explain our difference of opinion.

    What a great many posters here miss is that these are not CS majors, this is not a programming course, per se. This is about preparing them for coding their science problems; maybe even on supercomputers. If you're never going to do that, fine.

    But, what a few insightful posters have pointed out is that ForTran is still used quite extensively, and was designed for exactly the problems that these students are dedicating their careers to.

  225. So Fortran should be Taught by Roger+W+Moore · · Score: 1

    Exactly: clearly you should teach the appropriate computer language for the course. So Fortran should be taught...but in ancient history not science (of any discipline).

    1. Re:So Fortran should be Taught by digitig · · Score: 1

      Yes, absolutely. People studying linguistics learn Latin and Old English, so I see FORTRAN having a place on an equivalent computing course. Not necessarily to use it, but to understand how we got here.

      --
      Quidnam Latine loqui modo coepi?
  226. Idiot by Anonymous Coward · · Score: 0

    FORTRAN is still widely used and newly written in many computational tasks, simulation, fluid/aero mechanics, elasticity, oil ... and many necessary libraries are only available in it. Compilers, and certainly not GCC can do a very good job of optimizing it since its semantics allow this. BTW FORTRAN is type safe unless you deliberately break this using EQUIVALENCE statements.

    Now let me be a little more extream, strongly typed languages especially nastily complicated ones like C++, object oriented or otherwise, do absolutely nothing to teach people how to program or develop large complicated critical systems, just the reverse. It introduces completely un-necessary complexity and JARGON that simply confuses the beginning developer, and by the time they have been drinking the kool-aid for a while they dont have a clue why they are doing what they are but they saw it recommended in a book or magazine. For C++ you at least have Scott Myres books, to make them learn by heart how to avoid the worse problems but you tell me how these people, who can barely write what they mean are going to debug CTOR/DTOR sequence problems without also knowing an assembly debugger and how the code is compiled.

    Please, academic/tools-consultants go away. Learn to write correct code yourself and stop the lie that goes "Just use Language X" and all will be OK.

    We have too many programming languages now. We need about six or seven.

    Fortran and C, but not COBOL, Java/C++ (which can be well written), Perl, Python and Erlang.

    Assembly and Lisp will always be with us.

  227. Yes, teach them LOLCODE by Nefarious+Wheel · · Score: 1

    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 ...

    HAI

    CAN HAS STDIO?

    VISIBLE "HAI WORLD!"

    KTHXBYE

    Why is it written that way? Because I CAN HAZ CHEEZBURGERS!

    --
    Do not mock my vision of impractical footwear
  228. Maybe not ALL tenets... by Weasel+Boy · · Score: 1

    I use GOTO quite often. It is useful for keeping code from getting deeply nested, which in fact can impair code clarity.

    Where you might say:

    if( OK ) {
    ... function body ...

    }

    return;

    I would say:

    if( NOT_OK ) goto DONE;
    ... function body ...

    DONE:

    return;

    Now imagine the above example, with 8 or 10 different places where the value has to be tested before proceeding. Without GOTO, your code is indented at various depths across the screen. With it, your code lines up neatly and is easy to scan.

    1. Re:Maybe not ALL tenets... by labnet · · Score: 1

      Toally agree with you weasel boy.
      I don't use goto often, but in cases like you descibed it is perfectly OK.

      --
      46137
    2. Re:Maybe not ALL tenets... by Shaiku · · Score: 1

      That's if/elseif structure and "break" are for. You can accomplish the same thing in just about every widely used language without using a GOTO. The fact that you see the world as either an ever-deepening forest of nested conditionals or vertical stream of logic punctuated by a bunch of magic "get me the fuck out of here" GOTO statements is a testament to your own limitations and lack of creativity. Well-placed breaks and returns combined with a more logical conditional structure are going to do more for you than escape-pipe GOTOs.

    3. Re:Maybe not ALL tenets... by St.Creed · · Score: 1

      I don't use goto often, but in cases like you descibed it is perfectly OK.

      No it's not. And I'd still be screaming at someone who would write code like that.

      If you have to test 8 conditions, for starters you could use boolean logic: AND and OR aren't invented to be ignored. Secondly, you could assign the testresult to different variables if you insist on short lines, and test on the value of the variables:

      BOOL boundary_okay := (x > 10) and (x < 99);
      BOOL value_expected := | x - previous_x | < defined_max_delta; ...

      If (boundary_okay AND value_expected AND other_tests_okay) then { ... }

      It's clear, easy to adapt, and easy to read. Not a single use of GOTO anywhere. And while I agree that only using forward goto's at least mitigates the problem (we had a rule like that on the mainframe with COBOL), it does not prevent another coder from implementing a goto jumping back in your code.

      And another thing: by the time your code reaches more than a single screen, it's probably time to refactor it into simpler and smaller components anyway.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    4. Re:Maybe not ALL tenets... by Weasel+Boy · · Score: 1

      Boolean combinations doesn't really address my need. Most of my functions follow a pattern something like this:

      Set the return code to fail.

      Check the parameters. If there's anything wrong, just bail and return.

      Perform step 1. If it fails, don't bother going any further, just bail, perform necessary cleanup, and return.

      If step 1 doesn't fail, then use the results of step 1 to perform step 2. And so on through step N.

      Set the return code to success.

      Clean up and return.

      Without the use of GOTO, the indentation level gets deep in a hurry. With GOTO, you know that at any given point in a function, all the dependencies are successfully met in order to get that far.

      You may call it bad coding style; when I was a TA for freshman programming, I know I would have. But in practice, I find it to be a very elegant solution that dramatically improves code readability and debuggability in some cases.

    5. Re:Maybe not ALL tenets... by Weasel+Boy · · Score: 1

      Excellent response. Using break statements would have the same effect that my GOTO statements have, with non-GOTO syntax.

      Using multiple return points in my experience is more trouble than not. It is just another magic "get me the fuck out of here", plus you have to duplicate your cleanup code.

      When I'm chasing a bug, tracing the a program is easier when I know a function only exits in one place.

    6. Re:Maybe not ALL tenets... by HornWumpus · · Score: 1

      With GOTO, you know that at any given point in a function, all the dependencies are successfully met in order to get that far.

      Late back:

      And what if you are looking for why code didn't get to a given point in the function? ('you' are a coder years from now when the function has grown to many pages long)

      You argument is 'anti-indenting conditionals and using {}' not 'pro GOTOs'.

      Granting putting GOTO in your code would let the coder grep for 'goto' and the comment delimiter. Calculate a goto to comment ratio. Then tell his boss without looking at the code, 'We should rewrite this, the original coder is long gone and we can't force the M.F. to support his own shit': If that is your intent then well done.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  229. It's a marketable skill... by sitarlo · · Score: 1

    A quick search on dice nets around 80 jobs looking for FORTRAN skills. In this economy that isn't bad for a language that is perceived as dead. I also noticed the jobs look entirely more interesting than the typical Java coder is going to get. Personally, I'd rather write scientific code than web apps. I noticed the pay was good too. I say learn some FORTRAN and go to work dong something a little bit more specialized. I haven't written a line of FORTRAN in 15 years so I won't be applying anytime soon!

  230. my first project after graduation.... by motherpusbucket · · Score: 1

    back in 1989 was an engineering analysis tester written in FORTRAN. The language was chosen because my assignment was temporary and the guy that was permanently in the department only new that language. The tester code was a combo of FORTRAN and Micro$oft Assembler for all the bits FORTRAN couldn't handle. Even in the late 80's, as a EE student, I thought FORTRAN was outdated when it was required in our studies. However in my case, it did prove useful.
    Since graduating, I've learned many other languages on my own, but FORTRAN was the cornerstone. Not the language, but the concept. As long as the concept of programming is taught correctly, other languages should easily be picked up as needed and it shouldn't matter what course you took in college. C is probably a bit much for the casual programmer, but FORTRAN is a simple alternative. Chasing the latest 'flavor of the week language' really shouldn't be the goal. Teaching 'programming as a concept' is the important thing. If done correctly, a person should be able to easily apply the concept to whatever language their job demands.

    --
    "You can't really dust for vomit" --Nigel Tufnel
  231. Well... by Anonymous Coward · · Score: 0

    Fortran 2003 is a very different language to ancient fortran.

    Teach them modern fortran at least.

    But no, don't teach them python. Python is a toy scripting language.
    If you're going to teach a bunch of mathematically inclined people (engineers!) a higher level language than fortran, they are way, way better choices than python, such as Common Lisp or Haskell.

  232. Such astouding ignorance by Anonymous+Cowpat · · Score: 1

    His two reasons why everyone hates Fortran can be made to apply to any language (let's get that out of the way), or indeed any course where some of the students already know the subject materials and others don't know it at all.

    I don't know what 'foibles' of Fortran he's talking about, except perhaps having to type numbers in with a .0 on the end if they want them treated as floats. That's all that I can think of.

    Fortran 77 was painful - I never learnt it, but as an F90 programmer was exposed to it and saw how ugly it was. F90, on the other hand, is not painful. Stuff works, the language is forgiving (with the exception of the thing about getting integers to behave as floats) and it does what you want with the minimum of fuss. Compared to C (I'm only going to compare to C - you don't do scientific programming in high-level languages); C may be (at a stretch) twice as powerful, but takes 4 times as long to write, and 10 times as long to debug. Most stuff that you want to do is build directly into the language - you don't have to monkey about linking math libraries in to get a square-root. Fortran is case-insensitive (this is GOOD - it shouldn't be possible to have two variables named power and Power)

    Donâ(TM)t believe me? OK, write a program in pure Fortran that gives a plot of a Sin(n*x) for integer n and x ranging from -2*pi to 2*pi. Now connect that plot up to a slider control which will control the value of n.

    Now, that's just stupid - that pretty picture drawing and should be accomplished in matlab or similar. Fortran is not supposed to be used for writing programs with a GUI, and whining that it's hard to shoehorn it into that role is monumentally stupid. You can bosh that out with minimal training in some higher-level language like matlab - what you cannot do it write some efficient, high performance program after 'learning programming' in matlab, and being given a crash-course in Fortran. Granted, it doesn't give you as much of an idea about what is going on on the underlying metal as, say, C, but it gives you enough. If you don't initially tell your students that they can copy part of an array using colon-notation, they have to do it with a for-loop. Now they get the idea about how ugly such an action is to perform. That sort of thing, and having the number of clock-cycles that common operations take explained to you, is what gets you into a programming mindset where every other line you think 'how can I be doing this more efficiently?' How many python programmers do you know who, when needing to divide a number by 2, multiply it by 0.5 instead?

    I still use Fortran,. when I was an undergraduate I used it for my project, and as a masters student I chose to use it for my dissertation, despite it not having been on the syllabus. My Fortran skills also enabled me to help some of my colleagues who had to use codes provided by their supervisors which were written in fortran, as they were hopelessly out of their depth, not having been taught any fortran at all.

    His rant about compilers shows a total lack of backbone. A small number of shouty people call for their own preference of compiler and he seriously considers buying them all. The choices are, of course, obvious. gfortran or G95. If you're using the supercomputer you can also have access to the Intel compiler. Choosing a compiler because it's very standards-compliant isn't very clever. Firstly because standards compliance is best achieved through good teaching and secondly because at least one part of the standard (invalidness of tab-characters) needs to be safely ignored, without having to teach the students about shutting the rest of the standards off with compiler switches. The idea of picking a compiler on the basis that it allows you to shoehorn fortran into being a GUI language boggles the mind - if you must have some sort of GUI, write it with a C-library and cross-compile.

    What he doesn't seem to realise about first programming languages, is that they're like a ratchet - it's very hard to later go to a lower level language than the one that you started with. If you start people on python or matlab, they'll be very hard to turn into decent fortran programmers later.

    --
    FGD 135
  233. There should be a survey of languages class by Anonymous Coward · · Score: 0

    Where you spend one week on each important languages and actually write a program in each language. Fortran, Pascal, Basic, Algol 68, Lisp, Scheme, C, C++ , java, and a few others. A different survey of scripting languages would cover sh, ksh, bash, tcl, perl, and others.

  234. C0B0L-encounter Story from Late 80s by billstewart · · Score: 1

    Scene: Group of us sitting around the lab. Mike and I were 30-somethings, Brenda and Padmini were 20-somethings.

    Usenet article appears:
          Bullwinkle: Hey, Rocky, watch me pull a computer program out of my hat!
          emerging-from-hat: 100 PROCEDURE DIVISION...
          Bullwinkle: Arrgh!
          Rocky: Guess you gotta get a new hat!

    Mike and I: [laughter]

    Brenda and Padmini: [blank stares]

    The scary part wasn't that our younger coworkers didn't recognize C0B0L - they did.
        They didn't know who Rocky and Bullwinkle were! Arrgh!
        (Brenda had grown up American; Padmini at least had _some_ excuse, though she'd been over here since high school...)

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  235. Yeah, but by koreaman · · Score: 1

    My slashdot user ID is lower than yours.

    1. Re:Yeah, but by plague3106 · · Score: 1

      Hmm... even I feel late to the game, and my UID is much lower than yours.

    2. Re:Yeah, but by dublin · · Score: 1

      A very large number of us posted to /. as ACs until they finally made having a login necessary to avoid being treated badly - sometime around 1999, IIRC. As a result, lots of us were Slashdot regulars, but wound up not getting an ID until years later, so the number isn't necessarily all that indicative of an early Slashdot user. Although I have no idea of the numbers, I'm pretty sure there were a large number of us that didn't sign up for an ID until the crackdown on AC posts.

      Interestingly, I and many other Slashdot posters of that era actually signed our "Anonymous Coward" posts at the bottom. Worked for me - I posted everything as AC, but signed everything except the posts I really wanted to keep anonymous (usually the ones with some over-the-top snarky comment.)

      --
      "The future's good and the present is nothing to sneeze at." - Roblimo's last ./ post
  236. Perl by Anonymous Coward · · Score: 0

    but interesting one. Fortran was my first language. It's good but not modern enough, and not multi-purpose enough.
    C/C++? Not sure about that either. Most students are dirty and don't clean up after themselves. So writing clean code,
    where the students have to de-allocate memory etc. may be a way to turn off students.
    Java? (the circumcised language) Maybe?
    Perl? Why not? Perl!

  237. Re:Are You Serious? by dookiesan · · Score: 1

    > This GCV is used in Q-value routine of 2003 to determine false discovery rates by smoothing over the P-values of thousands of genes

    Are you referring to this paper ?

    http://www.genomine.org/papers/Storey_Tibs_PNAS_2003.pdf

    The authors didn't mention any numerical difficulties. Maybe it would have been worth contacting one of them for help--assuming you're not one of them.

  238. Perfect example of why GOTO sucks. by HornWumpus · · Score: 1

    The reason you indent is so you can quickly scan for all conditions affecting program flow (if, while etc). i.e you are looking for the reason the program isn't reaching a block of code.

    You GOTO hack fails this scan test. If you insist on using a GOTO flow control you damn well better indent.

    If you want things to 'line up neatly' just don't indent. Results are the same.

    'Easy to scan' is in the eye of the beholder. Your code will grow in maintenance.

    If you get too indented it's a sign you should break your functions up.

    I'd fire your ass, second use of GOTO.

    At least it's not a calculated GOTO (FORTRAN lets you calculate the line number you want to jump too) like jumping to a pointer but uglier.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  239. CS folks: Pls stop trying to impose your will... by Glasswire · · Score: 1

    In the real sciences (chemistry or physics) where they need to get real things done, the elegance of the language is a very minor consideration. Major ones are: are there libraries that contain key specialised functions and subroutines that apply in my discipline and does it avoid any obscure object paradigms that though a steep learning curve into the procedural code I really want to write and does it manage variable memory for me in ways that will not create unstable code from poor pointer management?
    For most scientists, FORTRAN fits this requirement perfectly and I doubt Python will ever have 10% of the scientific libraries FORTRAN has acquired over the years.
    Even in commercial technical codes FORTRAN is widely used. 80% or the computational-assisted-engineering cluster cycles at automakers (and at many other industries) are consumed by materials deformation codes like LS-DYNA which has always been and is still written in FORTRAN. (Lots of the key engineering codes were written in the 60s for NASA and they survive today)
    People use languages that work best for them, not what some meta-discipline like computer science says is the right thing.

  240. Don't put lipstick on a pig... by DoubleReed · · Score: 1

    My opinion / experience, for what it's worth, is that the style of education can only do so much to turn out a good programmer. The smart, motivated students will be stuffing themselves to the gills with everything they can get their hands on. The resources online are incredibly abundant. There is MIT opencourseware, tons of books are made available by their authors free online, pretty much every other book is available via torrents. Not to mention hundreds of programming blogs, and sites like this. Even more importantly, the FOSS movement has triumphed in making so many programming tools available for free. Someone trying to learn a new mainstream language can expect to start by downloading a good, free IDE.

    In short, I think that the good students have the resources available to make themselves into great programmers. The students that see computer science as a gravy train, and just want to scrape by with the minimum necessary to pass each class are never going to be great programmers. No matter how much the curriculum prods them towards greatness, as soon as they don't have a grade on the line they will stop working. I met way too many of these second class of student in my undergraduate career, and precious few of the first.

    In Electrical Engineering, it is accepted that many of the graduates are going to be second class. The career path for these individuals is sales, technical management, and marketing/application engineers. Maybe it would be helpful to have a similar tacit understanding in Computer Science. Only the top 10% or so are actually going to be programmers, the rest should go into sales, management, IT, etc.

  241. APL by mcgoohan · · Score: 1

    I have fond memories of Fortran from the only programming course I took in college 25+ years ago. Warm, fuzzy, marshmallow-scented memories. That will sound weird until I tell you that the *other* language we had to use in that class was APL. That wacky-charactered, right-to-left, overstruck, array-spouting beast was the unholy spawn of Greek and Chinese psychotics, raised by ancient Egyptians. While marveling at the power available in a single dense line of APL code was fun (for certain values of "fun"), when we were allowed to use Fortran we felt like subsistence hunter-gatherers visiting McDonalds. "You mean you just *tell* it what to do and it does it? And these words actually mean what they say? Wow!" These days when I dabble with Linux and work on social science software syntax files, I'm grateful for two things from that long-ago course: the general programming concepts I learned in Fortan, and the fact that I don't have to touch APL. Mailbox! Open Mailbox!

  242. Actually, its about 52 years old. by G_of_the_J · · Score: 1

    But it's still really efficient at matrix math, so for some science/math applications, it a great choice.

    --
    Even if it is not broken, hack it anyway! You'll learn something in the process!!
  243. FORTRAN I/O is a killer by nsaspook · · Score: 1

    I once had to copy Nixdorf data-entry files to 360K single sided 8" floppies for General Dynamics in San Diego. So I wrote a FORTRAN program to reprogram the floppy controller to write the data in raw mode to 128 byte sectors to emulate a card punch. The floppy drives were connected to the serial port on the I/O controller (Harris H-series) So to make it work we would drop the data-entray tape in the harris tape reader and mount it, insert a blank floppy in the monster driver, start my program to begin reading the tape and keep swapping new floppies as they filled up with data. Why they needed the data in the archaic format I will never know.

    --
    In GOD we trust, all others we monitor.
  244. it's actually OK by jipn4 · · Score: 1

    As a language, Fortran supports pretty much what C++ supports (including overloading, templates, and objects), but is probably easier to use.

    In terms of compilers, GNU Fortran supports Fortran 95 and many newer features; it's pretty much as good (or bad) as commercial Fortran implementations.

    Python probably is a good first language. But writing numerical code in Python is actually harder than in modern Fortran because a lot of "natural" code in Python (loops over arrays) will run very slowly; in Python, if you want to write fast numerical code, you need to figure out how to convert it to array expressions. Fortran has both array expressions and loops, and they both run fast.

    If people are going to learn just one language, with modern Fortran dialects and compilers, Fortran may be a reasonable choice again. In many ways, for people writing numerical code, Python is not an easy language. In fact, many people may opt for Matlab, because Matlab now (apparently) has a JIT that makes numerical loop code run fast as well, so it combines some of the advantages of Fortran and Python (but it's hugely expensive and a not a very good language IMO).

  245. Laughable Python advocacy by dugeen · · Score: 1

    The idea of Python as a modern replacement for FORTRAN is totally risible, given that Python is actually more dependent on significant whitespace than FORTRAN. In fact that's why Python is so called.

  246. Pfft by Rumata · · Score: 1

    I've found watching the facial ticks and foam build up around the mouth from real programmers when they encounter a GOTO to be quite entertaining!

    Clearly you've never met a Real Programmer.

    Cheers,
    Michael

  247. Your assign-to-temporary by warrax_666 · · Score: 1

    strategy doesn't work: In your example value_expected may not be computable if the boundary_okay condition doesn't hold. (I.e. you're not doing short-circuit evaluation). If your language is lazily (or non-strictly) evaluated you might get away with it, but given your example syntax I doubt you were thinking of lazy/non-strict language. :)

    --
    HAND.
    1. Re:Your assign-to-temporary by St.Creed · · Score: 1

      True, it's just pseudocode and bad one at that. But that wasn't the point I was trying to make.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
  248. C is not so bad either by Anonymous Coward · · Score: 0

    I think one should take into account that someone who decides to study chemistry or physics has a specific "mind-set". She wants to know how things work. And for every little detail in the explanation of how things work, she wants to know how _those_ work.

    If you use a programming which is close to the machine, it's easier to explain why things are they way they are.

    At my university, the introduction to computer programming was given by the CS department, and they used a special "educational language" where MAXINT was 10000. This was deliberately chosen because the real MAXINT (4G) would look arbitrary and weird, and thus scare the students.

    All the physics, chemists, and mathematicians immediately fell over this number. 10000! What a wonderful and weird coincidence that "the largest number" would be a nice power of ten! All of them had to be explained "Well that was just chosen as an artificial limit. The real number is 2^32, since this is a 32 bit machine." And they all went "Ahh, of course."

    If you balance it all out, I still think C is not so bad a choice for a first programming language. Disclaimer: I wrote an introductionary computer programming book. (http://www.curly-brace.com)

  249. Fortran is the right choice. by Anonymous Coward · · Score: 0

    Fortran is entirely reasonable here. For numerical algorithms Fortran is still king. C is the alternative not python. You don't write numerical code in python. Either C or python are the sensible choices. Fortran has an edge in general because of the existing size of existing code. However, it is also true that fortran is easier to optimize than C (strict aliasing is the default there). Fortran has lots of optimzation constructs that made it a decent choice here.

    If you've ever read "real" numerical code ... Its aweful. If it was in python it would still look aweful. it would just be slower and differently ugly.

    Optimizing C and fortran is easy (even if it can take longer) .. optimizing most HLL gets hard fast.

    So, no .... fortran or C is 100% right here.

    If they were CS majors (and not taking a course on optimization / computational science ) ... Fortran is the wrong choice of course.

  250. Re:Are You Serious? by Larryish · · Score: 1

    Perhaps he should use the DIVORCE libraries.

    Of course he will have to be cautious while calling from a library created by lawyers.

  251. yaah right... by neo110 · · Score: 1

    only if toddlers be taught Latin or Greek..

  252. APL, I have to plug APL as cryptic and techie by jimcaruso · · Score: 1

    APL - good for matrices too. Plus, there's the fun of trying to write your entire program in a single line of impossible-to-decipher code.

  253. Alas, Yes. by sjames · · Score: 1

    There is a great deal of scientific code already in Fortran. I wouldn't be surprised to see the same code with or without revisions STILL being used 20 years from now. Some of the code being used now referrs to the input file as a deck because when it was written, the input and output happened on punched cards if that gives you any idea of it's longevity.

    Unfortunately, much of that code accomplishes it's tasks in spite of the source being a horrible jumble of spaghetti without comments.

    Really Fortran AND python would be a good choice. Fortran for long running simulations that need to be as efficient as possible to complete in a reasonable time and python for less performance sensitive cases.

  254. Re:libraries. gigabytes of libraries by seawall · · Score: 1

    While I agree FORTRAN (especially the older dialects) is relatively easy to optimize for parallel operations and clusters and the like and the libraries are platinum, I do think they need rewrites from time to time; those libraries can be hard to understand and I want every generation to have lots of people who understand, not just use, the things.

    Also, every 10-20 years assumptions change. The early libraries did floating point entirely in software and memory was tight, in 2009 we can almost assume any desktop (and most laptops) have floating point to IEEE standards available in single and double precision plus virtual memory.

    Now we are seeing GPU's being used in non-graphics computation so algorithms that are stable in single precision and can actually use 64 pipelines are being written and memory is tighter.

  255. Forth codes by Anonymous Coward · · Score: 0

    No, you should learn Forth codes. Forth is good program language that you should learn how to do it

  256. Ya Python Would've Been Cooler by spaceWeepul · · Score: 1

    I learned to use fortran77 in college. I would've been better off learning Java or C++. I would've enjoyed a class that discussed collecting data, processing it and producing control signals on the cheap. Every place I worked used some kind of customized system to do that and I almost never worked with anything I had seen in classes I had taken.

  257. Some value to older languages by stanjam · · Score: 1

    Not 100% sure about Fortran, but I do know there is good value to learning older languages. Take COBOL for instance. Anything you can do in COBOL can be done in more modern languages. The problem is that there is a LOT of COBOL out there. It works, and businesses have found that projects transferring all their old programs to newer languages ultimately fail more often than they succeed. It is much better for them to find a COBOL programmer than translate everything to a newer language.

    --
    Open Source: Eroding the Digital Divide
  258. Teach programming, not languages by SL+Baur · · Score: 1

    All of the above can be taught in any language, including one made up by the professor (RIP Edgar Dykstra.)

    Edsger Dijkstra maintained that anyone who was first taught an unstructured language like BASIC was completely and totally brain damaged from there on. See:
    http://www.brainyquote.com/quotes/authors/e/edsger_dijkstra.html
    I hope he rots in hell and I'm glad you totally mangled the spelling of his name.

    The rest of your post was +5 insightful.

    My CS 101 in college was in FORTRAN on punchcards, though by that point I already knew an assembly language and four or five flavors of BASIC. I've lost count of the number of different languages I've been paid to write code in. I've lost count of the number of languages I've forgotten. When I was very young I kept count of the number of computer languages I had learned until I, well, lost count at something like 20.

    I think a better example is Donald Knuth. I can't find one of his intro quotes to _The Art of Programming_, but he maintained that dealing with code in several different languages before lunch was something one had to deal with. I fully agree. I also like:

    The most important thing in the programming language is the name. A language will not succeed without a good name. I have recently invented a very good name and now I am looking for a suitable language.

    Ref: http://www.brainyquote.com/quotes/authors/d/donald_knuth.html

    There's nothing intrinsically wrong with traditional BASIC or traditional FORTRAN, and traditional FORTRAN is extremely important historically - it proved that compiled languages could produce better code than skilled assembly language coders. Just keep in mind that learning *programming* as versus the FOTM computer language is the most important thing and you'll be fine.

  259. Re:Are You Serious? by robbyjo · · Score: 1

    No numerical difficulties at all. But the algorithm was implemented in R. It uses smooth.spline which in turn was implemented in FORTRAN. The original FORTRAN code was GCV and PPPack from Netlib. As far as I know, nobody off the net other than me has ported these routines out of FORTRAN so that I can reasonably use them for QValue routine without invoking R whatsoever.

    --

    --
    Error 500: Internal sig error
  260. Fortran advantages by golodh · · Score: 1
    I expressly mentioned Matlab (and Octave and Scilab) in my post because they are so powerful when it comes to (numerical) computations. As a matter of fact, when I have to do linear algebra calculations, I think of such a language long before I turn to Fortran.

    As other posters point out however, the prowess of languages like Matlab and Octave at linear algebra, differential equations, etc. comes from the fact that in such cases the interpreted language merely acts as the glue between successive calls to subroutine libraries (BLAS, LAPACK, FFT, etc.). The amount of work spent in Matlab (or Octave) mainly consists of setting up the library calls and storing the results. The hard work is done in the libraries.

    Of course this is of no interest if you just want to get the calculations done. Octave etc. will get you the right results, and make them easy to inspect and process as well. Therefore, provided you can arrange your calculations so that the bulk of the work can be confined to a couple of library calls, by all means: use Matlab, Octave, or Scilab.

    However ... sometimes you need to carry out massively repetitive computations on data that is not easily expressed in terms of function calls to standard libraries. In other words: loops. When you code such loops in an interpreted language (like Matlab) the overhead of the interpreter is added to every iteration you do. To the detriment of your runtimes.

    Now Matlab afficionadoes will contend at this point that you only need to configure loops as vectorized code to still get the speed benefits (because vectors are handled inside the libraries that Matlab etc. call). I agree that whilst sometimes loops can be so vectorized this by no means holds for all all of them. And even if the code can be vectorized, the process takes insight, effort, and concentration. On the other hand, coding an algorithm exactly the way you would do it by hand is a lot easier, and a lot more suited to the real world of non-programmers writing programs. What's needed in that case is a compiled language, not an interpreted one, which doesn't impose all kinds of overhead when you do loops.

    Java proponents will rear at this and will proceed to wax eloquent about byte-code interpreters, JIT compilation, and lazy evaluation. Unfortunately Java is a very poor choice for numerical work. Mainly due to the way the floating-point stuff is implemented, and how the interpreter e.g. doesn't respect the flow-sequence of your code but feels free to substitute any expression you write with one that's algebraically (but not necessarily numerically) equivalent without ever telling you about it. This tends to disqualify Java from numerical and scientific calculations in favor of a language that allows the programmer more control over the way that expression evaluation is done.

    Thus a simple compiled language is needed. Just about any third-generation compiled language will do. C or C++ for example will deliver the same kind of performance as Fortran. Pascal will do likewise. Ada is fine too.

    However, as we all know, coding in C or C++ is not for those who are sloppy about implementation details. At best the code won't run at all. Even worse, the code may run and silently hand back nonsense. It takes time to learn how to program properly (and safely) in C and C++, which is something the average Chemistry or Physics student can ill afford. Even if he has the inclination to learn.

    Pascal is great for clarity of expression in programming and maintainable programs. Unfortunately it's less well suited to writing reusable programs, and (barring non-standard extensions) its strict typing can play hob with resizeable arrays. And as soon as you go allow extensions, you lose compatibility. I can be quite confident that I can take my old standard FORTRAN-77 code and run it in Japan, Russia, France, and Brazil with no more than a recompile and get the same answers every time. Try that with manufacturer-specific add-

  261. No. by grahagre · · Score: 0

    Undergraduates should be taught programming principles that should easily carry over to different language paradaigms. Direcly learning Fortran in an undergraduate cirriculum is unneccessary.

  262. My Experience by Anonymous Coward · · Score: 0

    As someone currently doing a postgrad in Particle Physics, the answer is very much no. They should be taught C++, preferably on a Linux machine using the GNU compiler. Nothing I see is in Fortran, it still exists somewhere but the old guys who actually like it are covering that for the time being. We do use a little bit of Python for some basic scripting for "jobs", but you can cut and paste those easily from examples.

  263. FORTRAN is still prevalent by Anonymous Coward · · Score: 0

    In my company, a HUGE number of our analysis codes are still in FORTRAN. I never learned it in school and have had to teach myself enough to keep the codes working properly. I've even suggested in the past that we upgrade our codes, but there was much howling from the gray beards that own them.