How Not to Write FORTRAN in Any Language 502
gManZboy writes "In an article that's sure to p/o Fortran programmers, Donn Seeley has assembled a rant that posits there are characteristics of good coding that transcend all programming languages, except Fortran. Seriously though, his point is that early FORTRAN made coding ugly. Thus the joke 'Don't write FORTRAN' was applied to anyone with ugly code. Though Fortran has in recent years overcome its early challenges, the point -- 'Don't write FORTRAN' (i.e. ugly stuff) -- still applies."
FORTRAN - The ugly but lovable little SOB (Score:5, Interesting)
Although that was a toothache of a programming experience, I have never lost this bizarre fondness I have for that ugly, unwieldy, but somehow cool FORTRAN. Writing that stuff makes you feel like you're talking the language of a retro-scifi computer, like the ones in the original Star Trek that spoke in that odd mechanical monotone. Robby the Robot had to
have been programmed in FORTRAN (and NO he was NOT a guy in a suit! I'm not listening! La la la!).
At any rate, old-fashioned FORTRAN may deserve to be bashed, but I can't help shedding a tear.
Re:FORTRAN - The ugly but lovable little SOB (Score:3, Funny)
see: http://www.pbm.com/~lindahl/real.programmers.html
Re:FORTRAN - The ugly but lovable little SOB (Score:5, Informative)
Unfortunately, FORTRAN has achieved a role in scientific computing it will probably never lose. One co-worker of mine was a recent physics PhD who spent his entire academic career trying to persuade his fellow scientists that they'd save themselves a lot of grief by switching to C -- with no success.
hardly unfortunate (Score:5, Interesting)
It is *possible* to write C that runs as fast as Fortran for heavy math. However, it involves hand-optimizing your C until this happens.
Fortran handles calculations quite well, thank you. It take less Fortran code to handle many common operations, and array options are built in and optimized to high heaven.
With Fortran 90 and 95, the grammars that led to the CS horror (e.g., computed gotos) are marked either deleted or obsolescent (meaning expect deletion in another standard or two).
Also, due to the selection of which features are included in Fortran and which are not, Fortran compilers can make much stronger assumptions than, for example, C compilers working with pointers.
There's nothing unfortunate at all about Fortran's (not FORTRAN any more) role in scientific computing. The tragedy is the number of people who bought into those silly C campaigns.
hawk
Re:hardly unfortunate (Score:3, Interesting)
With libraries like SPOOLES [netlib.org] I don't need to. One of the primary advantages of C is the availability of many libraries out there that have been developed over the years. Of course, this is in general. In specific domains (like particle physics) the great deal of Fortran code out there ensures that the language won't go away any time soon.
Re:hardly unfortunate (Score:4, Insightful)
Pointers are useful in systems programming, but K&R made C a much less useful scientific language by not including the multidimensional array dereference operator. That's fine -- they weren't writing a language for scientific computation. I even think they made the right design choice, since there was already one around; it was called "FORTRAN".
Re:hardly unfortunate (Score:3, Informative)
http://sokar.cwru.edu/multidim.html [cwru.edu]
Note that the code that calculates the offset into the x array (italicized for convenience) is one instruction shorter for x[i][j] rather than the code you listed.
Re:hardly unfortunate (Score:5, Informative)
I know this for a fact as I have written graphics software that treated multidimensional arrays as a contiguous blocks of memory accessing it using x[i][j] notation and iterated pointer notation depending on the circumstance and both worked the same. I have also read the assembler output from a C compiler and it indeed compiled x[i][j] the same as *(&x + 10*i + j).
To further back up my statement here is a direct quote from Kernighan and Ritchie's "The C Programming Language" Chapter 5:
So the notation x[i][j] will compile down to either *(&x + 10i + j) or *(*(x+i) + j) depending on whether x was declared a true multidimensional array or an array of pointers.
One caveat (and possible source for your confusion) is that when declaring a true multidimensional array you must know the dimensions at compile time. You cannot for example declare x[width][height], and if you allocate a chunk of memory with malloc, you can access it as a single-dimensional array using the x[i] notation, but there is no notation for treating it as a multidimensional array. I have had to manually index dynamically allocated chunks of data using *(&x + 10i + j) before, and I agree it is a pain. Fortunately C++ fixed that and you can allocate multidimensional arrays at runtime and use the x[i][j] notation.
To be fair however, I'm pretty sure that FORTRAN 77 did not have automatic or allocatable arrays either - there were some implementation-specific ways of doing it, but it was not officially added until FORTRAN 90. But I am young enough that FORTRAN 90 was my first FORTRAN, and what I know about 77 is only from historic reading, not experience, so take that with a grain of salt.
Re:hardly unfortunate (Score:3, Insightful)
'
Sure, you *can* write those operators and templates, but they tend to already be there in Fortran. And if they're not, it's near certain that you can find existing, well-tested libraries.
The "less code" was my own experience several years ago while still using both for this kind of work. It's been long enough that I"m straining to remember specifics, but the dusty brain cells want to say [no, scratch this example; it make no sense].
Re:FORTRAN - The ugly but lovable little SOB (Score:2)
(I think this was circa Fortran IV...)
Oh man, writing code with nested loops and multiple comparisons was a
Re:FORTRAN - The ugly but lovable little SOB (Score:2, Funny)
COBOL too ... interesting that it hasn't been mentioned in either the article, or the comments I've read so far. *grin*
Re:FORTRAN - The ugly but lovable little SOB (Score:3, Informative)
Then there was PL/I which allows writing FORTRAN and/or COBOL within an ALGOL structure.
In addition to the punch-cards, remember that second generation mainframes were the equivalent of 64k bytes. Cramped, very cramped. The 7070 was 10,000 10-digit words (decimal) with three signs, which comes out in the same neighborhood.
In Soviet Russia... (Score:2, Funny)
Punched Cards and Rubber Bands? LUXURY! (Score:3, Funny)
Re:FORTRAN - The ugly but lovable little SOB (Score:5, Interesting)
My highschool offered its first computer science course, and I took the first class.
We had Apple computers running Basic, NEC (or was it NCR?) machines running Fortran, 2 terminals and a printer/terminal connected to a mini computer at school district headquarters.
I don't recall the specifics of the version of fortran - all I recall is you would actually boot the machine into a fortran interpreter, then you would type in your program by hand and run it. We might have been able to save our application onto a 5 1/4" floppy disk not sure...
The only printer was the terminal - so if you wanted a printout, you had to login via terminal/printer and output your program contents (provided you had typed it in previously and saved it) and/or run it to capture the output. I want to say the system could run both basic and fortran applications - so access to the printer/terminal was always tight - particularly if a project was due.
This was my first experience with a time-sharing system - we had quotas - that if we went over the number of hours alotted we would be denied access. The eggheads in our group loved the mini and tuned up their noses at the little micros in the lab.
I played dungeon (precursor to the Zork trilogy)on the county's computer, in addition to doing my assigned tasks, and spent many hours in the computer room after school. I recall one kid claiming to have changed his grades on that machine (apparently all of our grades were entered in the mini through terminals in the school office) - but I never validated that.
We did a lot of flow charts and wrote our programs out before entering them in the system (or we were supposed to). Just glad we did not have to deal with paper tape/punch cards - although punch cards were to revisit me in a few years (I unintentionally played 52 card pick-up with a deck of them when delivering them to a data center - but that is another story).
I wonder what kind of programming classes are available in highschools today? My daughter took a course involving HTML and CSS markup - but I don't recall seeing any programming classes on her curriculum. Are kids learning java/perl/python like we learned basic/fortran?
Yes, older languages can be ugly... (Score:5, Interesting)
(I'm saying this as a programmer who spent 12 of the past 15 years doing exactly that -- writing and maintaining Fortran 66 code that was part of a critical production system at a major airline).
As with any language, the onus is on the programmer who is writing the code to organize it and implement it in a way which is easy for subsequent programmers to follow and understand.
We were able to do it even within the limits and conventions present in the environment (external variable/parameter references limited to six (6) characters, internal references limited to either five (5) or one (1) character, subroutine names limited to six characters) by using common sense and trying to use a consistent coding style.
Yes, arithmetic IFs are ugly, computed GOTO statements can be confusing, and strings defined using Hollerith notation are strange to folks who haven't seen it before, and programs are hard to follow when everything is lined up neatly in column 7 without any spacing between code and comments. So don't use that style, avoid confusing notation, and refrain from using confusing syntax or statements which might make the intent of the program unclear.
It's the same advice in any languages -- cute tricks might save a few bytes or clock cycles, but in a production environment it's usually long-term MAINTAINABILITY that counts -- and that's true in *any* language!
Re:Yes, older languages can be ugly... (Score:5, Interesting)
Which led to the loss of a space probe, back in the day.
Re:How not to write irritating articles on the Web (Score:2, Insightful)
So the artificial 'page' breaks are a byproduct of profit motive, nothing more.
Sad, but true.
fool! (Score:5, Funny)
You mean "sure to p
Re:fool! (Score:5, Funny)
Re:Ah... But which notation is clearer? (Score:3, Insightful)
We're still using F77 here, so I didn't know that. :-)
Fortran 90/95/2003 are well worth 'upgrading' to -- for starters, the array syntax is fantastic. If A and B are arrays, you can assign from one to another simply by 'A=B'. Likewise, 'A=sin(B)' would set each element of A to the sine of the corresponding element of B. Code like this is a doddle to parallelize automatically, enabling one to write parallel code with very little effort.
Excellent points (Score:5, Insightful)
While I take issue with his blantant anti-FORTRANism, he makes the excellent point: Write good code in whatever language you write. Just because you can write Perl that looks like line noise does not meen you must.
Re:Excellent points (Score:3, Insightful)
Let me add to that -- writing well in Human Languages is important too. Otherwise you're going to lose your audience of yore with loose usage.
Re:Excellent points (Score:2)
Re:Excellent points (Score:2)
Stuff I write just for me (small utilities, etc.) can be 'clever'. Production stuff that others will need to work on is 3 times the size, but readable.
Learning It? (Score:5, Interesting)
I mostly program in C, Java,php and C++(and several other languages that I dont use as much), and am always interested in picking up new languages to play around with. Is Fortran worth learning? And are there any things that it does a lot better than other languages?
Re:Learning It? (Score:2, Informative)
Well, I'm by no means an uber-coding guru, but I used to prgram in C, and I just finised a three-year job writing many little programs in Fortran 90. I liked it, for what it is. The modern variants of Fortran are, in general, much nicer to look at, and if you know C and/or other languages, you could probably pick it up pretty easily.
I think I found basic i/o to be much easier in Fortran than C, but then that might be because my C is so rusty I have to keep re-looking everything up. Oh well.
For a (mostl
Re:Learning It? (Score:2)
Re:Learning It? (Score:3, Informative)
It does, but it's starting to show its age. There's a new GCC Fortran 95 compiler under development ("gfortran") that will be officially released with GCC 4.
Re:Learning It? (Score:3, Informative)
and an even better, almost working one, g95 [g95.org] -- this is the code base that the gfortran people forked from. gfortran does not work, and is much further behind than g95.
GPL (Score:4, Informative)
Re:Learning It? (Score:2)
Re:Learning It? (Score:4, Insightful)
Re:Learning It? (Score:2)
Like any language Fortran had it's uses back in the 80s as a language well suited for mathematical computations, but with availability of C/C++
Re:Learning It? (Score:3, Funny)
Re:Learning It? (Score:3, Informative)
You're kidding, right? FORmula TRANslation was meant for solving problems in numerical methods. It is still one of the best languages in the world for solving those kinds of problems. No, it was never meant to write operating systems (but apparently is was used for at least one OS). It is also a highly portable language; iff you stay away from extensions. If you are looking for good numerical code, you probably end up at Netlib. And mos
Re:Learning It? (Score:2)
MANY languages have wrappers around netlib and other giant fortran numerical libraries. The reason being that 99.9% of the programmers who need access to parts of that code could never even BEGIN to re-write it in another language. That code will likely be with us well after the name FORTRAN is forgotten.
Perl's PDL (Perl Data Language) is a very nice abstraction for dealing with almost any sort of numerical data, and it uses net
Re:Learning It? (Score:3, Informative)
Re:Learning It? (Score:5, Informative)
Maybe, and absolutely. Note that the article ignorantly used FORTRAN to mean FORTRAN 66. In fact, Fortran 90 has all the features of a modern programming language. Add to that the fact that fixed-format produces far prettier looking code than C's mess of curly braces and parentheses, although you can also use free-format if you choose. Really, the article makes no sense if you look at what FORTRAN is today.
Answering your questions directly:
Fortran 90 does array, vector, and matrix processing better than any other language, and can do some parallelization of vector processing with a compiler flag. If you're doing scientific programming, Fortran 90 is really the language you should be using. On the other hand, for programs that are actually supposed used by laypeople, there's not much support for doing that with FORTRAN.
Re:Learning It? (Score:3, Interesting)
1) Array, vector, and matrix processing can not only be done better, but with FAR less work in MATLAB, and using their converter, will nicely produce C (C++?) on the other end.
2) Parallelization of vector processing can also be done with >version R11 of Matlab, again with many fewer lines of codes, using a toolkit. (see here [mathworks.com])
A couple years ago I was working on some "
Re:Speed of Fortran (Score:4, Informative)
Even more scary? (Score:3, Interesting)
These are things man
Fortran >=90 is nice and easy to learn (Score:3, Informative)
Re:Learning It? (Score:2)
My brain had a fatal error when it tried to compile your sentence.
Re:Learning It? (Score:3, Interesting)
For number-crunching applications, it is the greatest.
it has a strict but simple syntax (far fewer ways you can make unintentional errors, unlike, say C++)
it is blazingly fast (only writing in Assembly code could likely beat it in speed)
it has great compiler flags for parallel processing and optimization (just make sure you have "clean" code that doesn't jump in and out of loops)
it is easily portable (I can run code written for the CRAY X/Y-MP in the 1980s, on a G5 in 2005)
i
Re:Learning It? (Score:2)
Those are just some off the top of my head.
If you were to say that FORTRAN *was* the only language with native complex number support back when it was popular, then I would agree.
Missing something (Score:5, Funny)
Oy.. The code I've seen.. (Score:2, Interesting)
I'm more of a western coder ... lots of wide open spaces in between clauses for readability. Documentation in bits rather than 100 lines of code then a paragraph about what happened in there.
I'm sure someone somewhere would gripe about my style too.
You can write beautifully in ANY language... (Score:5, Funny)
I just figured I'd follow one pointless flame fest with another.
FORTAN programs are small right? (Score:5, Interesting)
I have had to make changes to UNIX shell scripts and PERL code before. Most of the undocumented cryptic scripts were small enough to figure out what I needed to change.
Re:FORTAN programs are small right? (Score:3, Informative)
But not always: My friend Carl was writing CGI in FORTRAN to run on the XKL TD-1
Re:FORTAN programs are small right? (Score:3, Interesting)
Yes, FORTRAN is very common for engineering calculations: I've written things like distillation column models in it. It's fast, simple and there are lots of numerical libraries for it. I wouldn't want to use it on a project I had to maintain, but for getting the job done it's pretty good.
Re:FORTAN programs are small right? (Score:3, Interesting)
SMALL?
When I did some lab as part of my CS study, one unfortunate group of four students got the assignment to write documentation for part of some FORTRAN behemoth written over 15 years by successive grad students in the math department. It was horrible.
It was worth four credits (= 4 weeks), so documenting part of that small program was supposed to take four man months.
Our group wrote a GUI in Tcl/Tk interfacing VTK to show nice 3D graphs of the output of that program. We were lucky we could look at som
Re:FORTAN programs are small right? (Score:2, Insightful)
Not OS large, but 10 to 100 megabytes of source code is not
uncommon. The typical program is hacked on by grad
students two or three at time over the progress of years.
Re:FORTAN programs are small right? (Score:2)
I definitely wouldn't call 800,000 lines of code "small".
About time someone spoke up about Fortran. (Score:5, Funny)
Every job classified ad section is filled to the brim with Fortran positions while less relevant languages like Java, C# and Visual Basic are almost completely neglected.
I for one welcome news like this if it help Fortran programmers acquire just a little humility.
FORTRAN considered useful...like SQL (Score:5, Insightful)
It reminds me of SQL in that respect. I have worked with managers who knew less about computers than their secretaries, but they were able to use SQL to write queries to get information that they wanted. SQL was written for that purpose. It ain't pretty, but it serves its target market.
I doubt that designers of armored cars and dump trucks worry about the slings and arrows of the Ferrari's designers; I think this rant is pretty much in the same vein as that. Beauty and utility are not synonymous.
Re:FORTRAN considered useful...like SQL (Score:2)
Fortran vs. SQL (Score:2)
Your description sounds more like APL/Labview... (Score:2)
Being "first" had some advantages (namely long life) but many disadvantages as different programming styles and methodologies had not yet been invented, discussed or evaluated. As far as I can tell later versions of Fortran (ie IV, V,
Re:FORTRAN considered useful...like SQL (Score:2)
HEY /. !! Look at what we wrote!! (Score:3, Insightful)
So are they using "FORTRAN" as a adjective replacing "crappy" and then whipped up an article that has been covered in about 5,000 different programming books and/or documentation regarding some largely accepted guidelines for writing clean, manageable and efficient code?
Why is this on the front page?
"Acmqueue Click-thrus ACTIVATE!! Go Go Go!"
Even better... (Score:3, Funny)
For the uninitiated, Brainfuck [wikipedia.org]'s a Turing Complete language with eight language statements, each consisting of a single character:
> increment the pointer.
+ increment the byte at the pointer.
- decrement the byte at the pointer.
. output from the byte at the pointer (ASCII).
, input to the byte at the pointer (ASCII)
[ jump forward to the statement after the corresponding ] if the byte at the pointer is zero.
] jump back to the statement after the corresponding [ if the byte at the pointer is nonzero.
I'd post actual code, but the /. filter is fucking me up.
Article format (Score:5, Insightful)
if the article weren't broken
into such small pieces.
That way I could
print it for my students.
Sort of amusing for an article that discusses using white space in a good way.
Re:Article format (Score:4, Informative)
Was introducting Bush/WMDs really necessary? (Score:4, Insightful)
Regardless of how you feel about the politics, it's just not kosher to use examples like that. Clearly this is a person with an axe to grind.
I read the fucking article. I didn't see too much very insightful, or see any specific reference to Fortran at all.
Re:Was introducting Bush/WMDs really necessary? (Score:2)
But that being said I agree with your point, and I'm not a big Bush fan myself.
Re:Was introducting Bush/WMDs really necessary? (Score:4, Insightful)
Things would be different if the statement was in any way controversial, but as things stand now everyone already knows it to be true.
Re:Was introducting Bush/WMDs really necessary? (Score:3, Insightful)
Me neither. There is a reason to avoid it, though, if it is irrelevant, stupid, and politically motivated.
Surely there are dozens of political facts other than this case that can be made into an analogy with Fortran. Surely there are hundreds of historical non-political such facts. Surely there are thousands of non-historical, computer-related facts that he could've used to draw a reasonable, on-topic analogy.
H
Re:Was introducting Bush/WMDs really necessary? (Score:2)
*College student?* I wrote this kind of stuff back in *grade school* in 1962 in FORTRAN except back then it was JFK.
_flame on_
Considering the commercial, political and generally juvenile slide slashdot has taken lately, this is about par for the
Re:Was introducting Bush/WMDs really necessary? (Score:5, Insightful)
I hope not. The world is ill with political correctness. We need to be able to talk about issues, in any manner we like, without fear of reprisal.
The new CorrectThink/PoliticalCorrectness coming from the right is even more frightening than that which came from the left
People on both the right and the left should be very politically incorrect, and if a few partisans on either side get offended, so much the better. We need straight, frank dialogue, and an ability to express opinion without fear of political, professional, and financial reprisal. That is, after all, what the founding father's meant by "freedom of speech," not the corporate muzzling we have today.
I can hear the right whining now: "We have freedom of speech, but freedom of speech has consiquences" (paraphrasing Baby Bush).
By that definition, Communist Russia had freedom of speech. You could say anything you like, but freedom of speech had consiquences
Really, the only expression that should be forbidden is one written in FORTRAN. *ducks!*
woo (Score:3, Funny)
A great programming language (Score:5, Interesting)
I prided myself in college that I could write FORTRAN in any language. I had a prof that couldn't figure out why I was doing bit manipulation in COBOL. (Yes, this can be done in COBOL through multiplication and division, but it's really ugly.)
And assembly is pretty? (Score:2, Interesting)
Kinda reminds me of "Back to the Future III" where Marty plays that shoot-em-up arcade game in front of kids, and all they can do is complain "You mean you have to use your hands. That's
Re:And assembly is pretty? (Score:5, Funny)
So you have aspirations to be in management or an end user? I'm not clear here.
Re:And assembly is pretty? (Score:2)
That pretty much works today if all you ever think of is "Silly Balls".
You would have thought... (Score:4, Interesting)
First experience with Fortran (Score:2)
Why this limitation persisted into a verion of Fortran that no longer even required line numbers - no idea.
Re:First experience with Fortran (Score:2)
The limitation of 72 characters come from this too. Line numbers or sequence numbers were often put in columns 73-80. If compiliers started paying attention to what was in those columns, lots o
Why use FORTRAN these days? (Score:5, Insightful)
Since major companies like IBM have chosen to produce compilers that perform best with FORTRAN. (absoft markets the compilers with a front end)
I like C, and a slew of other languages much better...
But my G5 dual-processor desktop machine can be optimized to run at around 35 GFLOPS. Try that on an 8086 derivative What, maybe you can get 2-4 GFLOPS per machine (if a dual-processor system)? I have a low-end supercomputer on my desk! Unfortunately, without FORTRAN, it wouldn't be so super.
FORTRAN is the only language that will easily take advantage of the HW (Altivec 'velocity engine' and parallel processing).
Each language is good for some tasks. FORTRAN happens to be good for performance in science and engineering work.
Re:Why use FORTRAN these days? (Score:3, Informative)
When I was at the university of texas, there was a parallel programming course that was conducted in fortran and c++. The professor of it quoted how much it would cost in labor and manhours to transfer all those fortran libraries to a more "modern" language - and it was many many m
Fishing for a response (Score:2)
QOTD (Score:2, Funny)
-Peter
How to program in any language. (Score:4, Funny)
2. Do not create a data layer. It is great to search through thousands of line of code to change the sql code.
3. Use one very long class instead of separating the program's functionality into small atomic units. I just love 7th or 8th level if statements that are repeated everywhere.
4. Don't comment or doccument anything. Good code should be self docummenting right?
5. Don't handle exceptions. Good programs don't make em.
6. Don't use configuration files. Because we love to recompile everything to change settings.
Forgive my rant, it has been one long week... after another... of working with other people's code.
Cheers,
Adolfo
Is it just me... (Score:3, Funny)
I could fix that for them with sed, or maybe a Perl script. Now, where did I leave all my leaning toothpicks...
FORTRAN Ugly? (Score:2, Funny)
In the good old days (Score:2)
Write it in FORTRAN, if you can't write it in asse (Score:2)
A Guide to Real Programmers. [sorehands.com]
Why FORTRAN makes people think FORTRAN-66 (or 77) (Score:4, Informative)
The p/o'd response basically sounds like "He's equating Fortran with FORTRAN-66 (or 77)".
I know that I do this too. When someone says "It's written in FORTRAN" I don't think Fortran-95, I think FORTRAN-77... and I'm usually right.
I suspect that there are two reasons for this:
A bit like Visual Basic (Score:5, Insightful)
Which is a shame really because you should be judging the quality of the application - and not what it was written in. Seriously, if it does x and it does it quickly and well with a nice user interface - does it really matter that it was written in Algol 68?
As a by no-means perfect example, check out this site [uk.net] which is, I think, a reasonably nice looking application written in Visual Basic (it acts as a GUI to the free SMS gateways out there). I don't claim to have it perfect, but the feedback I've had from people indicate that they don't think it's the usual run-of-the-mill-vb-application.
Disclaimer: I wrote it and the preference section is a little nasty, but I'm working on it. Also, I know that VB is only really for doing RAD but I don't have the time or inclination to learn Visual C++.
Blast from the Past (Score:3, Interesting)
[A two page ad. A middle-age man with a youthful, shy grin, dark horn-rimmed glasses, slicked, short hair, and the premonition of a hairy chest emerging from a blue denim(?) shirt, fills the left page; the vista of urban sprawl outside a window behind him; painted scrawls of mathematical formulas superimposed. On the right hand page is a block of sans-serif text]
Meet an elder statesman in the computer business.
IBM's Jon Backus is 43, pretty young for an elder statesman in most industries. But then, the computer business is less than 20 years old and a mathematician Bakcus has been in it since the beginning. He started workig with computers in the early 1950's. It was about the time a leading business magazine estimated that no more than 50 companies would ever have use for a comptuer. Today, it is estimated that there are well over 50,000 comptuer installations in the United States alone. Part of the reason for this astonishing growth: the progress made in programming. In this field, John Backus was a pioneer. "It bothered us, in the early days of computers, that so few people coluld use them" he says. "One reason was, programming cost as much as the machine. A small compnay just couldn't afford data processing." With a small group of associates, John Backus tackled the problem and stayed with it for three years. The result was the simplified programming system called FORTRAN (FORmula TRANslator) which made programming considerably less expensive than before. Today, FORTRAN is probably the most widely used programming system in the world. Currently, John Backus is working on a new mathematical concept which is still in the realm of pure theory. But his theories, like the work of many IBM scientists, ultimately have a way of making computers more useful.
[A red line runs across the text. A matching red 'IBM' (not the blue, CRT lines version) appears in the margin.]
From a beginning less than two decades ago, computer technology has made remarkable progress. John Backus is one of many outstanding men and women in the industry who have turned a laboratory marvel into tens of thousands of computers helping people around the world.
FORTRAN gets its bad reputation... (Score:4, Informative)
Libraries - the most bullet-proof, battle-tested numerical code is pretty much all in FORTRAN
Optimizers - if you must wring the last factor of two of performance out of big vectorizing iron, and you're not a CS guru, the FORTRAN compiler is still your best bet
Semantics - FORTRAN the language enforces some constraints that make vectorizing optimization work better than less constrained stuff like C
The problem is, for these guys FORTRAN is a means to an end - most of them have had very little formal training in good coding practice, and worse, most of the code they read was written by people with similar experience.
Maybe what we should do is require scientists and engineers to pair-program with recent CS graduates. Both sides would learn a lot from that.
white space isn' t your problem (Score:3, Insightful)
Not Brainfuck (Score:2)
http://en.wikipedia.org/wiki/Brainfuck [wikipedia.org]
Re:Not Brainfuck (Score:2)
Re:Nothing for you to see here, please move along. (Score:5, Interesting)
For example, I initially resisted C++. I viewed it as poorly designed objects on C (after experiencing the beautifully done objects of LPC), and programming examples for it made objects of things that never should have been objects - and as such I wanted nothing to do with it.
However, the other features of C++ ended up proving themselves infinitely useful, and since the value of C++ objects has shot up notably in my mind. Examples:
Templates: I can't even imagine how many pieces of code I wrote before C++ in which I wrote different versions of the same function for different variable types. Talk about a maintainance nightmare
Const correctness: I remember resisting this like crazy, because it makes initial programming harder. But not only does it offer some serious benefits to the compiler at optimization time, but it's saved me many times from errors and really helped with code cleanup and refactoring into functions. My only real problem with it, now, is programmers who don't const their libraries, thus preventing me from consting variables that I need to pass to them at each step of the way.
Destructors: I don't think I need to even get into why having your variables clean up their memory when they go out of scope is probably the best thing that ever happened concerning fighting memory leaks. You can also do garbage collection with smart pointers, but that's a topic for some other time and is less standard.
std::vector: I can't believe that I used to not only have to clean up variable size arrays before, but used to have to have each array contain three variables - the pointer, the count of elements, and the allocated size - all of which would need to be checked and adjusted at each insertion and deletion.
std::string: A lot easier to use than C's unwieldy strings, and easy to convert to and from regular C strings.
I could go on for a long time... a good language can save you many programming headaches if you're willing to learn it.
Re:One man's ugly skank... (Score:3, Interesting)
Re:One man's ugly skank... (Score:3)
Re:6502 Assembly is pretty: (Score:2)
The A, X, and Y registers on the 6502 are eight bit, so the maximum value you'd be able to load is:
LDA #$FF
The platform for that code is probably C64 as the jump table was stored right at the high end of memory. But the Apple II's also used a 6502 so it could be them too.
Re:grampy (Score:2)