The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
I wouldn't call that fame so much as infamy. I think that you would get some notoriety for it. You may get some public ridicule as well though even if you list that you did it on a lark. I don't know what mobile platform that actually has a compiler for Fortran though unless you roll your own for the NDK for Android. I guess someone has got that working:
I just wish all Version Control Systems would allow us to chose the brace formatting, as well as other formatting, and check the code out into the format we like and check it back in as the company standard. Then this battle could end.
K&R C was developed in the days when the Teletype ASR 33 was the standard keyboard/printer/paper tape reader/punch. The ASR 33 read and printed AT 10 CHARACTERS PER SECOND. Since it could take hours to compile and print a program listing, brevity was paramount. Spaces were important since each space took a 1/10 of a second to process; tabs were not usually used because tab settings were not consistent; and the program author was the maintainer, so understanding and style consistency were already learned.
I have spent countless unnecessary hours chasing non-obvious programming errors. In one case, I spent over 6 months chasing an "=" vs "==" in an if statement in a C program that was buried in an error recovery routine.
Programs should be written, first for communications to yourself; second, to other programmers; and finally to the equipment. And part of communications is consistency in style.
At last count, I have written programs and systems in over 40 languages, some of which where proprietary to equipment or application. They all have room for improvement!
I normally put the opening brace on the introductory statement line, but there are a number of functions I've written that do not follow this rule: those auto-generated by tools, and those that have too many arguments to put on one line. In the latter case, the main problem is that auto-formatting would not indent follow-up code correctly if I placed the opening brace on the last line of the argument list. But formatting works fine if I put it on a separate line.
Life is compromise
(yes, it's totally possible there are formatting tools better than the built-in VS editor, but I'm not going to clutter my toolbox just for this!)
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
Yes - we have flowers blooming as well. "Crocuses" apparently - I only recognize two forms of plant: "Grass" and "Tree". Everything else is a complication I leave to Herself.
I will (under duress) mow the grass, but I draw the line at anything else.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)