- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The frist WTF was using C++.
Admin
Alex, as an old COBOL programmer, thank you for knowing that COBOL is all caps.
Admin
Frist! tristique
Admin
The real WTF is the USA amirite?
No wait, it's the USA thinking that they are the best at anything good.
Admin
So is this the story of how Mr. McGee made his first entry into TDWTF? Because the description of the system he setup to process the records certainly sounds like an unmaintainable mess.
I suppose that, at times, one must make such things to get the job done, but still, it must grate.
Admin
While I may be brain damaged to reply to a frist, C++ is not a WTF. And a powerful one at that. It can shoot you in the foot and launch you into space at the same time. But it isn't a WTF. Like Voldemort said, There is only power and those too weak to wield it.
Admin
Admin
checkem
Admin
"... five decades later, COBOL programmers are still paying for that arrogance today."
No, that should read: "... five decades later, COBOL programmers are still being paid (mightily) for that arrogance today."
Admin
Little known fact: COBOL is case-insensitive.
Little known fact 2: it looks even worse in lowercase.
Admin
Actually, I'd think that the single well written C++ program that was written after Pat's departure was probably more maintainable than the SED/LEX/YACC/C/C++ cobbled together mess that Pat wrote. Pat's solution was probably more of a WTF than he realizes.
And yes, I have written similar programs.
Admin
Pat certainly does bear a high burden of guilt for the WTFs in this one. He wrote a module to compile COBOL data declarations into C(++) declarations and translator code. This in and of itself isn't a major WTF.
No, the major WTF (and it belongs 100% to Pat) is that he appears to have written this based on the current state of the data declarations actually found in the source code rather than starting at the beginning, with the language definition.
Of course that isn't as easy as it sounds, because you need access to the definition of the COBOL dialect used by the client, but they should have been able to furnish enough information for Pat to be able to proceed.
Sorry, Pat, but that's the way I see it.
Admin
Admin
So this year 4th of July is a friday; normally thedailywtf.com publishes "Error'd" on friday.
So the 4th of July is the day the thedailywtf.com-readers attempt to forget they ever pretended to try commenting on discurse and celebrate a day without discurse through wild displays of patriotism and fireworks.
Admin
But seriously, is there a better compiled language or is nerd4sale just trolling?
Admin
Admin
Today is the 4th of July, or 4/7/2014. But that's April 7th in the US! Therefore TRWTF is the rest of the world, USA #1!
Admin
USA #1! ?? Then why did we kick your ass in Brazil?
Someone from Belgium.
Admin
It seems to me that all the changes to the COBOL program would have required numerous changes to the Oracle DB schema, if that was in any sensible NF. Yet everything in the story is related to his tools only writing new C++ programs to process the input.
That implies that he was using some kind of really bogus artificial key/name/value structure in the tables. In fact, it implies such a bogus structure so strongly I'm willing to bet that is TRWTF.
Admin
Was it really too difficult to just use a COBOL compiler to parse COBOL? Just add a little glue code and you have a little translation library that can reformat the data any way you like, or expose the variables directly for your SQL-interfacing side to modify the schema as necessary and upload.
Brownie points if you can get the SQL working directly in COBOL.
I love that he's willing to own up to the fact that he created a bigger problem trying to solve a small problem, though. A refreshing bit of humility. (Cue Raymond Chen's aphorism about regular expressions.)
Admin
TRWTF is not using Excel. It'll happily read any COBOL formats you care to give it, with minimal tweaking, and spit the results into an Access DB. OK, you then have to convert that to something useful, but that's a solved problem.
As horrible as it is to admit, the first thing any programmer should ask is 'can I do this in Excel?'.
Admin
Maybe modern COBOL was case-insensitive, but in 1976 it certainly was case-sensitive. IBM's compiler only recognized the upper-case EBCDIC letters.
I found that out when I typed a COBOL program into an IBM 2741 terminal (a souped-up IBM Selectric typewriter). For reasons known only to the operating system's designers, upper-case letters (C1 through C9, D1 through D9 and E2 through E9) were printed as lower-case, and lower-case as upper-case. SO MY COBOL PROGRAM FAILED TO COMPILE. until i retyped the whole thing in e e cummings mode.
Admin
Well, I can do better than that. Sure, context free grammars are a big help in writing compilers, but they don't handle semantics. Some people, faced with a problem that can't be solved by context free grammars, say "I know what, I'll use a context sensitive grammar." Or they put some C sections in their yacc code for each parsed section.
Don't forget Turing's contribution. Some people, faced with a problem that can't be solved by context sensitive grammars, say "I know what, I'll use a type 0 grammar." Then they have two problems, because they have to solve a CAPTCHA in order to post it. Actually I'm not sure how many problems they have because no one knows if some of them are solvable.
Admin
IBM 3270 terminals had weirdness in hardware unless you paid extra. If you typed lower case you would get lower case, and if you typed upper case you would get upper case, but you didn't know which you had unless you had a good memory, because the SCREEN DISPLAYED IT ALL IN UPPER CASE. The ability to display lower case was an optional extra, and if you bought it you'd see the text exactly as you typed it.
Admin
TRWTF is calling football soccer. What is wrong with you?
Admin
You had a terminal that good?
The one I had displayed upper and lower case both in upper case; and not only that, but it would actually allow you to type lower case, which it displayed as upper case.
Talk about TRWTF.
Admin
No, no no... The real WTF is that anyone would use the name "football" to refer to games played mostly with the hands. Without that WTF, we wouldn't even have needed the word "soccer" because football would be football.
Admin
Admin
Admin
Lisp has had a compiler (written in Lisp, no less) since 1962, a mere 4 years after the language was created.
I have a feeling I just fed a troll.
Admin
OK, shutting up now :(
Admin
If they had access to the correct COBOL compiler, that would probably have been ideal.
With the right compilation options, the compiler would emit a data division map and/or a variable name xref.
Those together would be a more structured starting point than the raw source code for a parser.
Admin
You know soccer is was coined by English people, right? It's a shortening of Association Football, with 'er' stuck on the end.
What you don't seem to realize is that there are like 5 different kinds of football, even in England and greater Britain. Association Football is what you commoners commonly, but wrongly, call "football".
TL;DR: It's "Association Football" or "Soccer". "Football" is just ambiguous.
Addendum (2014-07-06 14:10): Also, "The word "soccer" was in fact the most common way of referring to association football in the UK until around the 1970s, when it began to be perceived incorrectly as an Americanism."
Admin
There's code in the GNAT (Open Source/GNU) Ada compiler suite to parse COBOL PIC statements. That code could have been adopted and linked to C/C++, or at least used to understand and 'steal' the algorithms/design.
And it's really not true that COBOL doesn't handle change well, it does provide 'abstractions' by its named data elements. What's significant is the COBOL PIC clauses define a specific physical representation. without this, it would have been damn hard to understand exactly what's on those tape blocks for tightly packed data.
Admin
Admin
No, it was attempting to combine COBOL and C++
I worked briefly with some COBOL programmers and they wre actually really productive, despite the horribly verbose language they had to program in. The performance of the compiled code is seriously good too. But I'd rather eat my own shoes than actually write it for a living myself.
Admin
Admin
You can look at it in two ways.
1: It's a game with a ball, that you play with your feet. Therefore, foot-ball. Following that line of thought, the most popular American sport should rightly be called "hand-egg".
2: EVERYBODY in the world (outside North America and probably Australia) means the same thing when they say "football". Even the French, well known for translating every single foreign word into French, call it "football" and "jouer au foot". Germans call it "Fußball", the Dutch "voetbal" and in Spanish speaking countries they call it "futbol". One notable exception is Italian where they call it "calcio", but that's the name of a similar game from the middle ages.
Football is by a very wide margin the most popular sport in the world. The KNVB (Dutch FA) has 1.2 million members on a population of 16.5 million; the DFB (German FA) has 6.8 million members on a population of 80 million and is the largest sport organisation in the world.
When you refer to the World Cup or the world champions, you don't need to ask for what sport it is. It's football.
Sure, in certain countries it's not the most popular sport (like American football, ice hockey, cricket or Aussie rules football), but outside those countries nobody really gives a damn about those sports, or what name you give to Association football.
And even though football might not be the most popular sport in those countries, still many of them (USA, Australia) take part in the World Cup, and put in a great fight. Belgium against the USA was probably the best match of the tournament.
However, unless these countries develop the same love for the Beautiful Game as is the case in Europe, Latin America and Africa, they have no chance of ever becoming world champions. It's not enough to train hard and be very talented: you need to have viewing audiences of more than 50% of the entire population, and countless children dreaming of lifting that cup one day, wearing the colours of their country.
Admin
The word "soccer" is occasionally used in the UK. The word derives from "association football" which is the version of the football rules used by the Football Association (the sweet FA) of Britain (? I believe: same used for the Scottish League as well).
As far as I was aware it is still acceptable to use the word "soccer" in the UK so as to strictly distinguish it from the game which Americans call "football" which is a misnomer, as applying the foot to the ball is not part of that particular game.
Also don't forget Rugby football, which was invented in Rugby School by William Webb Ellis in the 19th Century (google for details). It is now known as "rugby" or "rugger" and has (at least) two versions in the UK: Rugby League and Rugby Union, and is traditionally followed in Wales. Rugby is the direct ancestor of its softer padded version American Football and also Australian Rules football, which is a harder version.
Soccer is in fact a girls' game, and American football a game for children. Real men play rugby or Aussie Rules.
Admin
Admin
As soon as there is some OCCURS or REDEFINES in the definition you run into problems.
Admin
Many Americans who paid even partial attention to the World Cup (me, not even that) had the same reaction: "Oh, we lost. So that's it, then. What? We're not eliminated? WTF?!"
One more thing: Why doesn't FIFA have an 'S'? It is soccer we are talking about, right?
Admin
Assumptions. Check them.
Transcript from my current Lisp session, for your consideration:
The function has been riddled with optimization and type declarations to keep the assembly short. Lisp by default keeps things safe by checking types, using real integers instead of a fixed number of bits, etc, which tends to be verbose in assembly.
Admin
Because you weren't REALLY playing football. Y'all were just toe-poking a round ball into a couple of nets. REAL football involves bodily contact by large, corn-fed American's practicing Newton's Laws of Motion on each other!
Admin
Also, the correct pronunciation of real (American) football is "fuhball".
Admin
Yes, you can tell that a civilization has reached dizzying heights when millions of people devote their lives to the goal of dressing in a funny costume and kicking a round rubber object around a big empty field.
Personally, I am absolutely baffled why people take sports so seriously. So a group of people who live within a 1000 miles of me played a game with a group of people who live farther away. And I'm supposed to get all excited about which group won? Why?
Admin
If it makes you feel better about the meager achievements of your own pitiful country to make hollow jabs at the truly great, well, go ahead.
Admin
Unlike Brits, we don't change the name of a game when we feel like it.
Admin
If he was writing a product to be marketed commercially, then sure, he should consult the spec and handle every possible case.
But as he's just developing a product to be used internally, and indeed to just be run by himself, what's the point of writing code for a whole bunch of cases that may never occur? It seems to me that it makes good sense to just code for the cases that you know will actually happen, and as additional cases arise, update the code to handle them.
Sorry Steve, but that's the way I see it.
Admin
And this classic:
[image]