FORTRAN for Mech E?

<p>Hey CCers, </p>

<p>As the second semester of my freshman year is approaching, I'm looking for some advice about whether or not I should take FORTRAN programming. I am a mechanical engineer at a state university. </p>

<p>The thing is, FORTRAN programming is part of the curriculum here. But I am almost certainly going to transfer to a different university (likely going to try Northeastern U) for particular reasons. I'm not sure, but I don't think that FORTRAN is the programming language they focus on at the schools I am looking at transferring to. Is FORTRAN even still a skill that mech e's should have?</p>

<p>Any input or suggestions is highly welcome. Thanks!</p>

<p>Don’t. It won’t be terribly useful to you immediately because most FORTRAN code is just legacy code that hasn’t been translated to something better. Of course, there will be those jobs that need a guy who knows FORTRAN but it’s unlikely that a lot of companies still use it since there are better options. You’d be better off learning C, C++, Java, or some other related language (MATLAB doesn’t really count).</p>

<p>Honestly, FORTRAN is still more common than you would think. For scientific calculations, there isn’t much better as far as speed and ease combined. C may be faster but it’s more complicated to learn and implement.</p>

<p>Working as an ME/AE, I have run into a lot more reasons to learn FORTRAN than C or Java.</p>

<p>That said, matlab should be first. You will use it more and once you learn it, it is almost identical to FORTRAN in many ways.</p>

<p>That’s weird, the only people who I’ve heard still use FORTRAN are research scientists, though I suppose engineers could fall into that category. I could see the situation being that there’s not enough benefit to justify putting in so many hours that could be spent on research into rewriting legacy code. As far as efficiency goes, though, Microsoft is making some fantastic leaps with C# and related frameworks in .NET… but that probably won’t matter to scientists or engineers any time soon. Regardless, it’s still happening and is still faster, plus harder to learn.</p>

<p>I mean, if you can learn C# or C++, it’s reaaaaally easy to learn FORTRAN (except for all the quirks and weirdness, it is around 60 years old). It’d be difficult the other way around, so it’d be beneficial to pick up C/C++, though I can’t see too many engineers using C# yet. Making it easier to learn marketable skills can only be beneficial…</p>

<p>Also, FORTRAN sucks, and I can’t imagine how much more annoying it could be if I were to learn it as my first language. I would argue that C++ would be easier to learn, Java the easiest (but I don’t know how much this could be useful since it’s rather slow).</p>

<p>The thing is, Fortran is specifically designed for scientific calculation. Its entire functionality is built around that, so using it for other things will be very tedious. Using it for that purpose is about the only thing it is useful for anymore. You aren’t going to be coding the same types of things as you would with the C family. You could certainly do the same things with C, it just isn’t specifically built for that so it isn’t as… straightforward all the time from what I know.</p>

<p>Matlab is pretty much ubiquitous and has almost the same format and syntax as Fortran and has much better graphical capabilities. It is a lot slower though.</p>

<p>I’d suggest learning C and then looking through a Fortran book. In general, if you can learn one language well, learning the next is a small fraction of the original effort. On performance, compilers for different languages from the same vendor often use the same back-end code generation so you’re going to get pretty good code. What you may miss is specific language constructs that explicitly allow you access to high-performance instructions in modern CPUs for scientific programming. Examples are Altivec and the SSE, SSE2, SSE3, SSSE3, SSE4 and AVX SIMD instruction sets on IBM and x86 processors.</p>

<p>Thanks guys for the input! Because FORTRAN and C++ are the only two languages offered here, I think I will take C++. I appreciate the help.</p>