- 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
I was thinking of
<spoon><spoon><spoon><spoon><spoon><spoon><spoon><spoon>Badger, bagder</spoon></spoon></spoon></spoon></spoon></spoon></spoon></spoon>
as an alternative to that one. (No badgers were harmed in the posting of this comment).
Admin
Sounds like the manufacturer of the backend system in question has plenty of such tools employed in it's development team.
Admin
If you load that into a parser and print the xml attribute at the top level tag, you probably get:
"I am the alpha and the omega, and there is no phenotype in between."
Admin
Admin
<RealWTF>XML</RealWTF>
Admin
bwahahahaha! That was very funny... I had forgotten about that Senator, or Congressman, who said that line, but if you recall please feel free to share so that I may youtube it.... TOO funny
Admin
Yeah but what happened to the spoons?
Admin
Admin
Actually, this happens a lot in newsfeeds. If a certain element can contain HTML, it must be escaped because valid HTML is not necessarily valid XML.
Admin
Actually, I don't see what's wrong with ASN.1 as an alternative to XML (obviously not as an alternative to HTML, which is a different question). ASN.1 is self-defining ("look, Ma, no schemas!" Well, practically none, anyway) and scales exceptionally well. This just might be why every single telecoms company in the world uses it. Just think how slow the intertubes would be if hardware configuration were to be done via XML messaging.
A very astute comment, but I think you give programmers a deal too much credit. An ungodly number of them seem to have a fetish for the thing. That's the problem with having different (broken) mark-up languages founded on a common (very broken) base. (They look the same, so they must be the same, right?) Also the problem with the twerpy in-band control sequences. I'm surprised it doesn't happen more often. Beautiful, purely beautiful. But I think we may all be missing a significant point here. Banks don't give a rat's ass about programmers, but they do care deeply about lawyers and regulatory compliance. This is partly because the people who run banks are technological illiterates. It's mostly because the bank can suffer limitless liability over legal issues, but only limited liability over programming fuck-ups (although I've seen one or two cases that stretch this proposition near to breaking-point).Consider: in a legal case, your pet shark is not going to be able to defend your actions based upon an XML schema. One, he won't understand it, and two, it leaves far too little wiggle room.
He will, however, be able to mine the imprecision of an Excel document for any amount of obfuscatory fruitfulness.
Particularly if said document is written in legalese, with no punctuation of any kind. (Not a charge you could level against the average XML Schema, I admit...)
Admin
There's also JSON (JavaScript Object Notation), which uses a subset of JavaScript to represent trees of strings, numbers, booleans, nulls, lists, and maps. Not only is it an easy-to-read textual format (given enough ignorable whitespace), it translates more easily than XML to most programming languages.
But I guess it's not enterprisey enough.
Admin
I believe I mentioned the Web, amateurs, and juveniles in a sentence just above. I'm sure you will find that JSON is more than up to the task of being "enterprisey enough."
Excuse me whilst I reach for a very large and accommodating bucket.
Addendum (2007-10-12 20:02): I don't normally append, but I think there's an important distinction here.
HTML, XML and the like are mark-up languages. Javascript, insofar as it escapes the impending repeal of the Wade vs Roe judgement, is a programming language.
It is not wise to mix the two.
Basically, a mark-up/messaging (HTML/XML) language should define a set of relationships, preferably in an easily-parsed way, and preferably in a way that does not involve shooting off requests to every single goddamn URL on God's green and webby earth.
Just boiling down a programming language to avoid all that nasty procedural/functional business is not the way to do this. Start from the ground up (and don't stand on a steaming pile of SGML shit while you're doing this) and build a coherent framework for the representation of the types you require. Remember: the semantics of these types differ significantly between a mark-up/messaging language (producer) and an actual programming language (consumer). You, as the creator of this language, might understand the nuances of these differences. Programmers, as the consumers, will not.
Admin
I'll bet they were trying to cut down on the bloated size of XML files due to having to repeat the tagnames for every element.
Anonymous closing tags are legal in SGML? That's VERY cool. I really wish they'd add that to the XML standard. In one fell swoop they'd eliminate 30-40% of the size of the overhead of XML boilerplate.
The "<>" construct seems dangerous and useless, but anonymous closing tags are an obvious and needed improvement. I can't think of any good reason not to add it to the XML spec. As for readability - well, we all do just fine with programming languages that lack "endif", "endwhile", "endfor", "endswitch", "endfunction", "endstruct", "endclass", etc. Don't we?
Addendum (2007-10-12 20:24): Consider:
vs.:
Admin
Admin
Admin
I have my answer. Nobody ever bothers to change the subject line. Probably nobody even read it! :^)
Admin
Admin
In those days, it was all about keeping the markup terse, because you paid offshore guys to keyboard documents that were going to be electronically processed, and they charged by the keystroke. Anything you could do to shorten it meant $$$$.
The reason HTML is based on SGML is that it's essentially stolen from a sample document format that was published in one of the appendixes of the standard, with the addition of the A (and later IMG) elements.
As for ADD A TO B, SGML is from the 80s, Cobol from the 60s.
Admin
Q for old-timers: Do most SGML implementations use < >? Now that HTML is ubiquitous new ones probably do, but I know you can use any character you like for brackets and many did.
Admin
It wouldn't do a lot for the 1 million people directly employed by vehicle manufacturers in the US, though, or for the 5 million employed in supporting industries.
On the John Stuart Mill principle, I think you're wrong here.
There are structural problems with the auto industry that have nothing at all to do with unionisation. I'm not a huge fan of unions: they work particularly poorly in areas like the software world. But I'm afraid that in production-line work, they're pretty much essential.
Admin
Feel free to read it as well, if you can spare the time.
Admin
Look, the first Beatles album was issued on March 22nd, 1963. The first Stones album was issued on May 30th, 1964. Does it really matter which came first? What sort of an argument is this?
Cobol is primitive, but had no "prior art" on which to be based. It worked pretty well for thirty years. I hate it, but I've got to be honest.
SGML is primitive, but for some reason decided to abandon entirely any "prior art" that might be lying around. That was the Unix Way. It sucked. Its spavined descendants still suck. Why anybody still thinks that having a human-readable, but machine-unparseable -- it's parseable if well-formed, but you're fucking doomed if a single character out of the millions is out-of-place -- is beyond me. That truly is a Cobol-style WTF.
Anonymous closures, or whatever </> is called, are probably an improvement on the current version. I'm not sure why they're any less dangerous that their complement, anonymous openers (<>), unless you refuse to believe that "it is better to travel hopefully than to arrive..."
However, they're still just syntactic sugar. The real problem is with the whole architecture of SGML/HTML/XML/etc.
(Thanks for the history lesson, though ... always nice to have actual information to argue with, other than loony assertions like "Check out KleenXGML -- it wipes the arse off the competition!")
Admin
Admin
Or are you just unable to read more than a couple hunnert words without your eyes crossing?
Admin
And this is still being used by Firefox and Seamonkey?
Admin
Protect yourself!
(Sorry, had to ;)
Admin
Hahahaha now everything below this line is sarcasm <sarcasm>
Admin
I tend to agree, but why not go the whole way and use s-exprs?
or better yet
Admittedly, the only real difference is a bit of syntax, but I find it makes it a lot easier to read.
Admin
<sarcasm> You are absolutely right </sarcasm> The only thing that unions do is keep the incompetent employed. Well, not the only thing, but the biggest one...
"If it is poorly made of inferior materials, outrageously
overpriced, and fails to fulfill its designed function, IT IS UNION MADE IN AMERICA!"
Admin
There are valid reasons for XML-like dialects. There just aren't many of them.
I use a pseudo-XML format looking like that: <tag="value" /> However, I'm smart enough to only use it for data entry (which requires writing lots of very simple XML by hand), don't try to actually store data in the format and, above all, never inflict the format on anyone else.
People can bastardize XML all they want, as long as they don't make anyone else use their "new and improved" version.
Admin
<bigoted cretin>You are absolutely right</bigoted cretin>
There, that feels better.
What are the other things, btw?
Admin
<>There is no quack</>
Admin
ASN.1 is not self-defining. It is defined in ISO-8824, and it is not a language in which you write data, possibly together with it's specification (like SGML and XML), but a grammar /syntax) notation that you use to define how to parse binary data, together with the associated encoding rules.
No, this can happen with pure XML as well. A colleague at a former workplace once WTFed me with his webservice, which was supposed to receive XML data. Instead of doing what I suppose would be "right", namely declaring that the data inside the call should be of some schema, he simply passed the XML as a string - naturally requiring full encoding. IMO this is extremely inefficient, as you effectively have to parse the same data twice. He was very smart, and insisted this was indeed the right way to do it with XML. Either he was wrong, or XML is broken, or most likely, both.
At least SGML has a different notation (DTD) for defining the "domain" language. I never understood why the XML people wanted so badly to get rid of DTDs and replace them by XMLSchema. XML is good, so everything must be XML right? Wrong. I haven't been interested much, but I think there have been other attempts at making a replacement for DTDs. Relax-NG etc, and I doubt this mess will ever get cleared up. That sure is a real WTF.
Oh, in case you didn't know/remember: Before WWW, we had WAIS, which was based on Z39.50 using ASN.1. It worked just great. If TBL had built from there instead of making a crude protocol and even cruder markup language, the world would have been better off.
-Sin Tax
Admin
You had a hand-crank? Sheer luuxury, mate. We had to kick-start our computers from the left side and the CDC disk drives were always leaking hydraulic fluid. Used to be a merry chase to herd them back into line Monday mornings when the oil got under the little rubber feet during a library compress. You young whippersnappers have got it sooooo easy!
Oh, and have you heard of the object-oriented Cobol compiler? It's called "Add One to COBOL" and the system clock runs backwards.
The above rant is all your fault for making me think of 80 column US Form 5081 punch cards with XML tags on them. Rat!
Admin
<boobies>My face</boobies>
Admin
<srcsm><srcsm>great</srcsm></srcsm>
Admin
Admin
Ha, you are clearly unaware of another easter egg in current versions of Microsoft Excel (besides the well known flight simulator). Press Ctrl-S, Ctrl-O, Ctrl-A and Ctrl-P at the same time on Bill Gates' birth day and Excels transforms in a enterprise ready, fully fail-over next generation, industry leading ESB/SOAP Server/DWH/BAM/BPM tool that will read all the specs that can reached from your machine, create and compile source code in any programming language ever invented and deploy it on that old 386 in the corner, serving the entire enterprise. Part of this process is the automatic binding of any Excel sheet into valid XSDs wich in turn are used to generate XML binding code.
The only thing that is missing is .Net 4.0 support, but that is being worked on. They only thing I have to figure out is Bill Gates' birth day...
Admin
Having had some indirect contact with the database engine in question (I pity those at my company that had direct contact!) nothing surprises me. I mean, would you consider fall-out from a WTF to be a WTF in itself?
Admin
#define endif } #define endwhile } #define endfor } #define endswitch } #define endfunction } #define endclass }
I mean, really, I can't write a program without it..
BTW: the 5-character tag names might have been true(ish)..consider this: Senior Developer Paula has to write some program that utilizes XML in some way. Program breaks for some reason (maybe errors related to string length?) or another until co-incidentally, Paula shortens the tags in the XML file to <5 chars, while at the same timefixes the actual error. When the programs then runs successfully, Paula decides (without checking the W3C spec of course) that all XML tag names must be less than 5 hars in length. Being the Senior Developer, this becomes company policy.
Admin
Well said, phaedrus. And don't turn around, Lot!
Admin
This reminds me of a project I was on where I needed some master data for some customers and some products, and I asked for file with test data - and I got a text-file with one-line saying: "testdata"
Admin
Sure, we did. It only took a while...
Admin
Sure, we did. It only took a while...
Admin
How long is a har?
Admin
Admin
you need to get laid.
Admin
On five letter limits: I thought that wasn't true. You still see lots of code where coders apparently think it's more scientific to leave vowls out of rndom placs in idntifers. Just like in the earlier versions of Fortran.
1957 wants its compiler limitations back.
Admin
Hookay.
I guess we don't have a lot of readers who speak 4D (a real product, BTW)
Let's say you have a RAD tool where db table names are changed on the fly, and you wanted to separate table (and column) labels out, so that what a user sees as a table label is actually pointing to something totally different. Thus, on Monday, a table can be named "foo", and on Tuesday, it can be renamed "bar", without breaking anything at all.
This might lead to a dev making a mapping table, where "foo" can be a name one day, "bar" can be the name another day, but both names will point to a table (or column) named "_xb1x". (five chars, in ASCII, is a hella lot of tables/fields, BTW... if you exhaust that, your DB design is "wrong and stupid").
A side effect of this is that when devs want a "raw dump" of the data, they get "_xb1x", rather than "foo" or "bar", but are totally ignorant of the why.
As far as the lack of phenotype, that's a simple lack of understanding abstraction in RAD tools.
Of course, the zen of programming is hard to explain to the unenlightened, which is why people, uhm, do insane things like make "very important names" for db tables and columns, and possibly why a simple abstraction layer shows up in the WTF pages.
All that being said, I do think this kind of db abstraction sucks, just because it makes life hell on newbie programmers when working on raw data with no ideas on how it all maps out.
Admin
<Badger><Badger><Badger><Snake Sing="Mushroom" /></Badger></Badger></Badger>