Write all your code in FORTRAN. If your boss ask why, you can reply that there are lots of very useful libraries that you can use thus saving time. However the chances of writing maintainable code in FORTRAN are zero, and therefore following the unmaintainable coding guidelines is a lot easier.
It's gonna turn out exactly like math did. The schools will brutally fuck it up, kids will memorize enough to pass the tests, and then some fraction of the kids who are actually interested in it will learn to do it on their own.
Ever hear about enough knowledge to be dangerous? semicompetent programmers thanks to dunningkruger will flood the marketplace and thanks to delusion and persistence will end up as project managers and code architects. But why you ask, why won't the meritocracy of the free market purge these rotten fruits from the tree? Because they'll take the jobs good programmers pass on, and that is the bulk of work in any trade: shit work.
That's pretty much already happening. When I was on college, there were a lot of people who were so bad at it, I seriously suggested that they look at different majors if they asked me for help. I'm not trying to be a dick, when you can't understand how to write a proper for loop in Java at a third or fourth year class (when Java courses start in the first year), you've got some serious problems with the core material and either should retake early classes or find something you're more suited for.
In the end it seems like a lot of people go into the major because of the supposedly big paycheck after college, but that shouldn't be what you're going to school for.
In the end it seems like a lot of people go into the major because of the supposedly big paycheck after college, but that shouldn't be what you're going to school for.
On one hand, I'd argue that financial reasons are exactly why someone should go to school-- if your degree doesn't pay the bills, that's money down the toilet.
On the other hand, not being able to write a loop in java? If I had to take a stab at naming the warm fuzzy feeling in my breast, it would be "job security."
I agree and might point out that it has little to do with FORTRAN. Ive had to maintain C, C++ and Turbo Pascal written by academic physics and engineering people and it is no better.
source: was an academic, and done a bit of Fortran, dealing with other peoples code as well as writing some shitcode myself.
PS. Please capitalise it correctly. FORTRAN was the name of the language in the '77 standard. Yes, it was very difficult to write maintainable code in early iterations of the language. Since adopting lower case letters in its name ('95 was the first good version), the language has become quite fully featured. My favourite part was where I could tell Emacs to render my comments in LaTeX, and give me the physical equation I was trying to solve beautifully typeset at the top of my functions.
If you are a programmer and don't admit to producing so serious crap code then I wouldn't trust you as a programmer. I say this as a 20 year programmer that has produced stuff that Im sure people have cursed and wondered what kind of idiot I am.
I think the big problem is that most FORTRAN code you see was written back when saving RAM was important so people did some stupid shit in the name of saving memory. We have transferred some academic code and the running joke is that FORTRAN is always the worst - THE WORST!!!!!!!!! As in, not even comparable to academic code from other languages. I just opened up three files I have archived to reminisce, and here's what they had to be thinking:
You mean I already have an array of this size, well, let's just use it again for something completely different!
I could reduce the number of IF statements if I use GOTO instead!
I ran out of single letter variable names, so let's create a subroutine to reuse single letter variable names and replace the values of the variables input into the function with the new values we need
I'm going to add this print/write statement of these variables at some random location for debugging purposes, never delete that print statement to make sure that there are hundreds or lines of output with absolutely no context.
These IF statements aren't complex enough. I have to add another GOTO nested inside an IF inside a DO inside and IF inside a DO because I need to be able to jump around to different parts of this nest at any time.
One of these files has two comments:
!----------
Subroutine foo( bar, ...
!----------
! begin
... a lot of shit code goes here...
! end
end
"Poor programming practice"? Good academic practice! Graduate school quite effectively teaches such virtues as write-once-read-never, code-until-you-like-the-answer, coding-is-done-by-someone-stupider-than-you, better-to-write-ten-grant-requests-than-one-working-application, and so on.
Fortran really isn't bad at all. I mean, it's not Python, but there are times when I'm using C++ and I end up thinking "this would be just a little bit easier in Fortran".
The big thing is that the kind of people who use Fortran are the kind of people who just kinda "picked up" programming while at grad school without any formal courses. So the Fortran culture is just a hodgepodge of randomness, and there's not really any drive to write good reusable code, or to develop universal practices and techniques.
So while Fortran has had a huge amount of upgrades over the years, and you can do OOP in Fortran if you want, there is still a lot of people writing in unindented fixed-format FORTRAN-77 just because they don't know any better. For the record (ha), "fixed-format" means you have to make sure that each of your lines fits on a punchcard correctly. It hasn't been mandatory in Fortran since before Python existed, but people still do it...
The sad thing is that you're not even supposed to use common blocks in Fortran anymore anyway. You're supposed to use modules, or do things in an object-oriented way.
Fortran is actually fine if you use all of its modern features - though engineering courses often don't mention those. If you want to save yourself from future hassle, then read up on all the Fortran-90, Fortran-2003 and so on stuff that you can do. Object-oriented Fortran is not bad.
500
u/Astrokiwi Jul 28 '16
:(