- 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 OP is totally right...I gave up on XML long ago. Its much easier to use standard formats for specific datas, and custom formats for everything else.
Although, for some silly reason I don't mind XHTML too much, except when I run into the well known nobodys-browser-works-right bug.
Admin
Most of the time from engineers I'm afraid. That's the kind of people who learn a lot of different things (chemics, fysics, electronics, ..., informatics) but only a select base. And who also learn that they know best ... always I have a masters degree in informatics only, that makes me a developer... I learn(ed) a lot after (and in) working hours and I check every technology myself before shooting it down. (I can't test everything, there are only 24 hours in a day, so I have to select what could be interesting) That makes I have a much larger base in IT... But these 'engineers' I worked with are so good in informatics that they write above WTF's theirself and tell you the direction to go. No matter how good your arguments are because they are engineers and know...NOT They can't even keep up with the basics (and your arguments)...and so I don't work there anymore
Summary:
A technology isn't bad because someone uses it badly. Or the same could be said about SQL for just giving another example of a good technology that's been used badly on a regular base.
Judge people on what they do, not on what they say or on their grades.
Admin
It would be very interesting to see how opinions about XML correlates with the used development platform. I use .NET, VB6 and vbScript but I have never used Java. In my humble opinion XML is the easiest and fastest way to store and transform structured data. Due to existing, ready solutions such as xsd, dom, xpath and xslt I am able to process data without wasting my time on developing my own text parser. IMO xml is very readable, unless you use goofy abbreviated element names. However, who cares if the file is not human readable, it is the parser's job to read files, huh?
Is it true that DOM and XPath implementations are just so crappy in Java that they are unusable? Or do I just have bad sense of humour and sarcasm?
Admin
Sort of. The whole point of the WTF was that the programmer used SAX (which is rarely the right choice of XML parser, but popular because it was available first) to manually implement the functionality of an XML binding framework (of which there are several perfectly usable ones available).
It's really just a typical and particularly bad case of reinventing the wheel because someone would rather spend an absurd amount of time using the wrong tool for the job than learn a new, slightly more complex tool.
Admin
Thats right. I'm even proud of you; youre showing us correct and proper usage of apostrophe's.
Oops, forgot to use orange text...
Admin
And I should have hit quote instead of reply. Oops.
Admin
Very Funny. I think many a real Engineer (TM) would disagree with you regarding their job as primarily prototyping/designing and sometimes having the know how to make something.
Why being an Engineer is important, when you're doing things like building bridges, is that real Engineers can sign off approval and they become liable for that thing not falling over and killing people. They are intended to oversee construction to make sure the low-end builders do the job correctly. Hey, everyone likes to sue, and you gotta know who to blame.
In the UK anyone can call themselves an engineer, thus the Engineer accreditation obtained by professional organisations in North America are redundant.
Back to Software Industry - we have the same problem that anyone can call themselves anything.
It's really time to lose the corollary with the building / manufacturing / fabrication industry. Sure there are similarities, but they're just similarities. The problem is because all of these make real world, physical things, and we monkeys have been making these kinds of things for a very, very long time.
So many people try to replicate the process of manufacturing / fabrication when software is in reality a different beast altogether. Don't do it, and don't use MS project because it warps the way you see software. The waterfall is evil. Trying to pigeonhole people with titles and enforce hierarchies is also just a waste of time IMNSHO.
Architects/Software Engineers/whatever who don't code are just wankers, and if I had a nickel for every self proclaimed 'architect' 'systems architect' 'application architect' 'software engineer' whatever who was full of crap I'd at least have a buck fifty.
So lose the titles you self important losers and start being serious about being the best you can be rather than worrying what somebody else thinks about you. There will be better people, and you will better other people. Hopefully you can learn from the former and mentor the latter.
Anything to improve the abysmal '5 in 6' utter failure rate for software projects.
Admin
The problem with XML in Java is there are too many options. You could uses Sax, Stax, DOM, JDOM, XOM, Castor, XStream, JAXB etc. Plus Xerces and Xalan (the 'standard' parser and XSLT transformer) are horribly written and buggy, do things like write on stderr, and the developers won't fix obvious bugs. I personally like XOM, but it depends on a parser and transformer, and bugs in those can cause a lot of pain.
That said, if you use a decent library, XML is very easy to use. But there are always idiots who will do the parsing themselves and make a mess.
Admin
In fact, XPath IS way too complicated for anyone who doesn't want to bother looking into it (virtually everyone) so I comletely understand why HashMaps are so much better :)
Admin
All that, in fact, is exactly what a chef does. The Chef, as well as organising the rest of the team, designs the menus, and keeps all of his kit clean. Which is why he's the chef de cuisine, not just a 'cook'.
While cleaning the rest of the kitchen is, of course, delegated, everyone cleans his own equipment.
Admin
Using SAX and related implementations in an enterprise environment is a pure WTF by itself.
Admin
Software Engineer? Developer? Designer?
I will have none of it. I shall be known as a technomage.
Admin
Software Engineer? Developer? Designer?
I will have none of it. I shall be known as a technomage.
Admin
they were afraid of xpath ... so they can't really make use of xslt now can they ? :p
Admin
I evaluated reporting engines for my company a few years back. One requirement was that the engine should be able to emit reports in XML format for consumption by external systems. At least two of the leading reporting engines out there would take a printed report like this:
and produce XML similar to this:
USELESS!!!!!! How about something like this, instead:
and perhaps even a nice embedded or sidecar schema?
Admin
Looks like a job for ... Commons Digester. This is one of those great WTFs when you try and imagine what they were thinking of - "hmmm, XML is ubiquitous these days, so I guess everyone is just writing gobs of hideous Java like this to parse it all, eh?"
Admin
You know that many of the b-29s built in Wichita during ww2 were built by former short-order cooks and one of Boeings leading engineers was in fact a historian.
Admin
Is there a single coder who understands at least most of "The Art of Computer Programming" who takes XML seriously? I've always figured XML is for the guys who can't understand real parsing and failed out of CS 201. When Knuth can prove (using that mathematical stuff that gets ignored by the amateurs in CS) why xml type parsing is pure evil, why is it still considered?
Admin
Whew.....
As a WTF submitter of lunacy I had experienced at a previous company, I was starting to get worried that I had found myself sitting in the middle of another WTF-y company after reading this story. However, judging from the differences in domain vocabulary, I can almost be certain that this isn't MY Fortune 500 railroad. It must be one of the other 3.
Admin
The same way that if you cook food, you are a chef. Oops they are some chef, baker, head of pastry, saucier (responsible of the sauce), ... By the way, a head chef very rarely writes the menu (its is printed) and absolutely never clean his own equipment (that's the job of the junior employee).
Let's take another analogy. If you work in the building trade, you are a break layer.
What you are an architect not a brick layer. What do you mean that carpenter, plumber, electrician, roofer are not brick layer. Back to the drawing board.
The real WTF is the comment.
Admin
Do you mean the kind who sign your paycheque?
Admin
Actually, now that I think of it this is sort of done with PHP's phpinfo() function, isn't it? If not directly, than indirectly.
Conveniently, data can be defined and brought into Web pages using databases, which gives you control of data that tends to be lacking in an ASCII text file.
You've heard of databases, right? The right way to use data?
Admin
Admin
XHTML is how a web page is defined. XHTML, if you didn't realise, is XML.
Write me even a simple web page using a configuration file, then come back and post it.
Admin
Admin
Admin
Admin
The fact that, fifteen years later, you're better off using shitty little tools like SAX, DOM, XSLT or indeed anything developed by the Apache crowd doesn't mean that you have a good reason to criticise somebody who bemoans the lack of a (simple) alternative.
Admin
and of course catch(Exception e){} is always good
Admin
XML cannot be suspicious, it can be something that you are suspicious of.
Admin
XHTML is XML, but XML is not XHTML; so to say that you're creating Web pages with XML is like saying you're creating Web pages with SGML.
It's true, to a point, but SGML is more broad than Web pages. If you had an SGML parser/renderer and used it to parse an HTML document I'm guessing you wouldn't see your pretty little Web page, unless it supported HTML. At the same time, a purely XML parser would not render an XHTML document as a Web page.
For the same reason, XML documents are usually rendered as raw data in a Web browser, or sometimes are formatted to be collapsable, etc.
XML was designed to define data and nothing else. As a result, it does not mark-up Web pages. Some derived langauges, such as XHTML, do (although again it's just meaningless data without a parser/renderer).
At the same time, HTML is used to mark-up Web pages, which is not a derivative of XML at all. Therefore, you do not need XML to render Web pages and I still fail to see it's usefulness.
A database stores data, which can be pulled into a Web page. So arguing that it is used to define data, which it is, is again a failed argument in my mind. It does so in a poor way.
I don't even like SGML syntax, so every language based on it is stupid. HTML has it's use (mostly for evil), but I still dislike it (as many developers do).
Even if I wrote a parsing engine to parse and render a configuration file I wouldn't be writing a Web page using a configuration file, regardless of how you see it. I would be writing a configuration file, or at least using the same syntax to define data, and my parsing engine would be generating a "Web page" with it.To humour you, here you have a simple Web page:
I'm not suggesting we do that. I'm suggesting we stick with using databases to store and fetch data to embed in applications of any type, regardless if it is a Web application or a Desktop application.Also, XML is not a Web language, rather is used to define data. As a result, many other applications use it to define data, such as their configuration data. Something I believe to be unnecessary since configuration file syntax does the same thing with fewer characters and is just as, or more, user-friendly.
Admin
Wow, quoting the dictionary! but hardly useful here. These terms/titles were hijacked from the construction industry. to make it even more confusing, at my company - architects are engineers, engineers are really developers and engineers have their own lackys called web technologists
Admin
All your sarcasm detectors are belong to us!
Admin
Admin
Anyway I don't know why you'd bemoan alternatives: JSON, YAML are both popular. But in the end they're really not that different (http://www.megginson.com/blogs/quoderat/2007/01/03/all-markup-ends-up-looking-like-xml/), and not as well supported.
Admin
Bravo, several times over.
Admin
Thanks for the "crap" comment. I agree. Unix configuration files are crap, and always have been. Period. (For further reference, feel free to check out the various Python attempts to build a generic "Unix configuration file" parser. Cute, but doomed. Made even worse by trying to incorporate MS ini files ... Python is great, but it can only do so much.)
Personally, I like Stratus VOS configuration files. They all adhere to the same easily parsed microlanguage (I know it's easily parsed, because I've built a parser myself. And I'm "crap" at this sort of thing). They all sit in the same directory -- none of this init.d rubbish. Generally speaking, they don't need tweaking between VOS 6 (1987 or so) and VOS 13 (1999 or so). They're human-readable, they're computer-readable, and they're consistent.
I have no idea what JSON might be, and I'm not going to look it up. I've been forced to work with XML, and I hate it. YAML appears to be a pile of shite.
AFAICS, the only good reason to use XML is as an interoperability tool. It's thoroughly useless on its own, and (like many badly-designed tools) attracts a whole bunch of enthusiastic incompetents who will defend its inadequacies to their dying breath. And it just goes on, and on, and on ... like the Energizer Bunny. Makefiles are horrible, but after twenty years, I've got used to them. Ant is just obscene. Are you really suggesting that it's easy to fix a problem that sits three files down an include chain, and is dependent on every single thing above that chain?
XML is a necesary evil. Mostly it's necessary for marketing purposes. Let's not kid ourselves that it has anything to do with good practice in software.
Thankyou and good night,
Admin
I think part of the issue also is that at this point, those of us with little or no exposure to XML don't have a clear idea of where to start. Knowing about the existence of JAX-B, or XPath, etc, and (more importantly) what the differences are takes more than a little research.
When there are a bunch of people out there saying "Use My technology-flavor-of-the-month!", it's hard to sort the cruft from those that have a clue if you don't have any domain knowledge. It'd be great to have a "Technology X is better to use than Technology Y for small problems, whereas Z is better for complex problems" from someone who can give a good explanation of them. Kindof like the sort of things Martin Fowler gives us in his Patterns of EAA book.
Admin
Admin
That's true.
At least Java's JAX* API's have improved & grown over time. Although I guess the w3c DOM API will forever suck.
SQL integration in Java faced the same problems though - a ton of different libraries, and ton of ways to achieve the same thing. Over time some best practices settle out: the same thing should occur with XML, and with the advantage that XML and the related technologies (XPath, XQuery) are much better specified & interoperable than SQL ever was.
Admin
After reading these comments I have concluded, that I should give up useing XML & XSLT for processing data since it is crap. Instead I should begin using UNIX configuration files.
Could someone (not to mention any names) give me an example of unix configuration file containing structured & nested data, and how that data can be transformed into various other formats? Perhaps by writing an unix configuration file describing the transformation to be done? Is there an unix configuration file which could be used to describe the data structure so I could validate my data so I can find errors easily? Are there any ready-to-use components available so that I don't need to write my own?
Admin
People haven't heard of Schemas? With all the XML-related garbage being spewed out from vendors, w3c and people like yourself, most people I talk to think Schemas are a pre-requisite for XML.
The people who really understand what XML is about avoid schemas like the plague. Ever heard of EDIFACT and UNSM:s? Well, schemas are making the same mistake again, forcing XML into the same constrictive path.
Admin
Can we please keep sarcasm to a minimum on the posts. Either it doesn't translate or you suck at writing it. Let's save everyone the trouble of parsing it by dropping it.
Admin
One word: XStream (http://xstream.codehaus.org/)
Saved my bacon when I had to deal with XML monstrosities in Java.
Captcha: atari
Admin
Arghhh...
Clearly the real WTF here is the idea of using the same sarcasm detector at home and work. I find the required settings to be COMPLETELY different.
Admin
the fact that the whole thing is also wrapped in an empty try block...amazing!!!
if any of those threw an exception, then what? hahaha...
Admin
NYAGH! MY EYES!
NINJAS! THOUSANDS OF THEM!
Admin
Admin
Admin
Engineers don't work in IT. No, a software engineer is not an engineer... It's a misnomer. Read Alistair Cockburn on the subject.