• Disappointed (unregistered)

    Damn, a chance to get first post, and I don't even understand the wtf :).

  • (cs)

    Hornsless XML !

    Brillant !

  • BootBlock (unregistered)

    At least the Society is, er, living up to its name. Go team, go!

  • Dave (unregistered) in reply to Disappointed

    The WTF is that "doing XML" requires that you break down the information into logical data elements that can be looked up individually, similarly to a field in a database.

    You might understand better if you replace the word "XML" with "database". Their solution is akin to moving from a flat file to database by inserting the flat file, in its entirety, into a single text field in the database.

  • (cs) in reply to Dave

    Anonymous:
    The WTF is that "doing XML" requires that you break down the information into logical data elements that can be looked up individually, similarly to a field in a database.

    You might understand better if you replace the word "XML" with "database". Their solution is akin to moving from a flat file to database by inserting the flat file, in its entirety, into a single text field in the database.

    Nice analogy, Dave. 

    Hey Masklinn, I've always wondered...what is that a picture of?  A female pixie having sex with a planet?

  • deets (unregistered)

    Well, the first part certainly is a WTF. But I applaud them to withstand the temptation to enter their control logic in a xml notation. That clearly is handwritten code, and if there is one lesson that people should have learned from atrocities like ant: don't use XML to do what programming languages are for!

  • Dave (unregistered)

    Do I see code...   In XML??  WOW.     I think that is the real wtf.  Since any can edit an xml file.


    It would be fun to see what would happen if you instered a couple delete statements and maybe a drop table command or two.  hehehe

  • Dave (unregistered) in reply to deets

    Of course, the immediate follow up is: "WTF is control logic doing in a data file?"

  • TheOtherDave (unregistered) in reply to Dave

    Hah! Then of course there's the sub-wtf of two people posting with the same nickname! :-)

  • Mike (unregistered) in reply to deets

    ANT is an atrocity?

  • DaveE (unregistered) in reply to TheOtherDave

    cooincidence - not sub wtf.

    The sub wtf is code in xml!?

  • (cs) in reply to Dave
    Anonymous:
    Their solution is akin to moving from a flat file to database by inserting the flat file, in its entirety, into a single text field in the database.


    Does it surprise you, then, that this is exactly what they did in the original Flat File Society post?

    -ds
  • TheOtherDave (unregistered) in reply to DisturbedSaint

    Wow. Just... wow.

  • (cs) in reply to Dave
    Anonymous:
    Of course, the immediate follow up is: "WTF is control logic doing in a data file?"

    You obviously don't get this whole new object-orientation paradigm. That XML is of course athe XML representation of the Order class: Data and operations nicely bundled together.

    No WTF here.

    (just in case: </sarcasm>)
  • (cs) in reply to Mike
    Anonymous:
    ANT is an atrocity?

    Yes.
  • NoName (unregistered)

    God! XML is such an overhyphed POS. That application is maybe the only tolerable way to deal with the XML-uber-alles idiots.

  • TheOtherDave (unregistered) in reply to NoName
    Anonymous:
    God! XML is such an overhyphed POS. That application is maybe the only tolerable way to deal with the XML-uber-alles idiots.


    Which is also interesting. Why on earth are they trying to do this? My guess is that some other system needs a feed from this one, and they're insisting on getting it in XML.

    What I'm noticing, though, is that the language embedded in the XML is pretty COBOL-esque. I'm no COBOL programmer, but I don't think XML is exactly one of its strenghts.
  • (cs) in reply to NoName

    There's nothing wrong with XML.  In fact, it sounds like XML is the correct way to go in that case, since sending data to other systems is what XML was originally intended for.  The alternative would be for either company to have to rewrite their system (or perhaps code an add-on) to support compatible formats.  Using XML negates that, as long as one app understand's the other's schema - a hell of a lot easier than writing a whole new parser every time you need to communicate with someone who uses a different format.

    The WTF is that they (a) completely misunderstood the purpose of XML (as explained by Dave earlier) by just dumping the whole text (unstructured as far as the destination system is concerned) into an XML tag, (b) did so in such a way as to invite errors because their data may have invalid xml in it, and (c) did it in a way which may be vulnerable for security reasons and probably isn't anything the destination can use anyway - what is it supposed to do with a chunk of code?

  • XML hater!!!! (unregistered)

    Hey! Think of all the space they saved by not labeling every freaking piece of data with the stupid XML tags.  <name>foo</name>  that would be the (dataDescLen*2)+5!!!  I applaude them.

    Doh!!!! Nevermind, the file is still huge because they included the code to decode.  WTF

  • oh boy (unregistered) in reply to Disappointed

    that is exactly why this type of thing happens!

  • (cs) in reply to Edgardo Portal
    Edgardo Portal:
    Anonymous:
    ANT is an atrocity?

    Yes.


    And why do you say that ANT is an atrocity?
  • (cs) in reply to Disappointed
    Anonymous:
    Damn, a chance to get first post, and I don't even understand the wtf :).


    Heh, it's the worst XML ever. The guy who wrote it clearly just didn't understand the point of XML. The hilarious thing is, there are even good subnodes like [Header] and [Line], that they chose not to use.

    It would have been just as "valid" (which is to say equally poorly formed) if they'd just enclosed their whole block in an <XML></XML> tag.
  • (cs) in reply to Edgardo Portal

    Edgardo Portal:
    Anonymous:
    ANT is an atrocity?

    Yes.

    Why?

  • (cs)

    My boss has been bugging me for ages to replace my nice, efficient, binary protocol with SOAP.  I think I just came up with a method to give him exactly what he asked for!

  • (cs) in reply to NoName
    Anonymous:
    God! XML is such an overhyphed POS. That application is maybe the only tolerable way to deal with the XML-uber-alles idiots.


    XML is great for what it's meant to be used for: pure data portability. You can look at a well-formed XML document, and understand how everything relates to everything else, and fit it into whatever data structure you're using without having to rework the whole structure.

    On the other hand, people use it everywhere, and XML is just like every other good tool...Limited in its uses. If all you've got is a hammer, then you're going to have a hell of a time fixing your computer. In the same way, XML is a poor substitute for a solid relational database. I had a guy try to get me to put his data into a database in XML format. It took me hours to explain to him why this was a bad idea.

  • (cs) in reply to JohnO
    JohnO:

    Hey Masklinn, I've always wondered...what is that a picture of?  A female pixie having sex with a planet?

    Nope, it's a rendering of the "Firefox Lady" by Toybox

    [image]

    Link to Toybox' post if the image doesn't work

    I thought that this rendition was awesome (while his rendition of the Xbox 360 is much less artistic) and started using it pretty much everywhere (i'm also using it as my desktop image).

  • (cs)

    <sarcasm>
        I'll start using xml for everything ! After all, it's easy to convert anything to it, and change its structure on the fly !
        Wohooo !
    </sarcasm>


    Personally I think xml has become a buzzword that is used to impress managers more often than it is used for the benifits xml has.

  • (cs) in reply to masklinn

    s/toybox/toy/ gosh why did i write toybox...

  • (cs) in reply to masklinn
    masklinn:
    JohnO:

    Hey Masklinn, I've always wondered...what is that a picture of?  A female pixie having sex with a planet?

    Nope, it's a rendering of the "Firefox Lady" by Toybox

    [image]

    Link to Toybox' post if the image doesn't work

    I thought that this rendition was awesome (while his rendition of the Xbox 360 is much less artistic) and started using it pretty much everywhere (i'm also using it as my desktop image).



    Sorry about the double post, but I just have to say this:

    That image rules !
  • (cs) in reply to JohnO
    JohnO:

    Hey Masklinn, I've always wondered...what is that a picture of?  A female pixie having sex with a planet?

    It looks like a variation of the FireFox logo http://www.mozilla.com/firefox/ to me....actually I like it better [:D]

  • (cs) in reply to masklinn

    Well, I just got stopped from going to a website at work for the first time.  Nice. :)  You might want to wait until you are home to try that link.

    Nice image though.

  • (cs) in reply to JohnO
    JohnO:

    Well, I just got stopped from going to a website at work for the first time.  Nice. :)  You might want to wait until you are home to try that link.

    Nice image though.

    Ah yeah, maybe I should have mentioned that Toy used to do a lot of hentai (= X-rated) work and that you shouldn't click around his site as most of his artworks are definitely not work-safe.

  • YT (unregistered)

    Yeesh.  You people act like this sort of thing is rare...

    One of the suppliers whose data files we have to import recently got in touch to let us know that they were changing their outmoded old fixed-length data files to a brand new XML format.  Being the closest person to hand with XML experience, my manager called me in to take a look.

    The shiny new XML format was pretty much as follows:

    <stockorder>
    <![CDATA[
    FIXEDLENGTHRECORD0001
    FIXEDLENGTHRECORD0002
    ...
    ... (for a few thousand lines)
    ...
    ]]>
    </stockorder><stockorder></stockorder>

  • Scott (unregistered) in reply to Edgardo Portal
    Edgardo Portal:
    Anonymous:
    ANT is an atrocity?

    Yes.

    No it's not.
  • mthamil (unregistered) in reply to DiamondDave
    DiamondDave:
    Edgardo Portal:
    Anonymous:
    ANT is an atrocity?

    Yes.


    And why do you say that ANT is an atrocity?


    I actually use Ant, and I don't think it's an atrocity.  However, I only use it to build Java applications that are simple to compile (no weird dependencies).  The problem is, Ant uses XML notation for things like conditional statements, and it gets messy and is somewhat contrary to the purpose of XML as a data markup tool.
  • NaNa (unregistered) in reply to Satanicpuppy
    Satanicpuppy:
    Heh, it's the worst XML ever.


    Nop.Every usage of XML is the worst.

    Satanicpuppy:
    The guy who wrote it clearly just didn't understand the point of XML.


    There is no point. XML deserves to die, expelled  from the civilised universe. And XML fanboys who force perfectly sane programmers to change file formats to XML should all get the clap. That fscking consultat who first forced the programmers to change their application and then sends in the result as a "WTF" should consider another career. He is definitely not fit to work as a programmer. Maybe used car sales, but not programming consultancy.
  • (cs) in reply to NaNa
    Anonymous:

    There is no point. XML deserves to die, expelled  from the civilised universe. And XML fanboys who force perfectly sane programmers to change file formats to XML should all get the clap. That fscking consultat who first forced the programmers to change their application and then sends in the result as a "WTF" should consider another career. He is definitely not fit to work as a programmer. Maybe used car sales, but not programming consultancy.


    XML handling code doesn't have to be messy and badly written.  It has its uses.  You sound bitter.
  • Axel (unregistered) in reply to NaNa
    Nop.Every usage of XML is the worst.

    There is no point. XML deserves to die, expelled  from the civilised universe. And XML fanboys who force perfectly sane programmers to change file formats to XML should all get the clap. That fscking consultat who first forced the programmers to change their application and then sends in the result as a "WTF" should consider another career. He is definitely not fit to work as a programmer. Maybe used car sales, but not programming consultancy.
    Perhaps you don't quite get the benefits of XML.

    First of all, you can even understand it if the application that once read it died, if the programmer made its structure logical to understand. Second why should one reinvent a parser for every damn fucking file format? Just get the data structure in memory by a DOM-compliant XML-parser and there you go.

    Yes there are many missused of XML, because the people don't understand what its purpose is, but that doesn't make it a bad thing.
  • (cs) in reply to mthamil

    So, why do people keep bashing XML and not giving a good reason why they think it sucks?

    The only reason I think xml gets a bad rap is because of people who misuse it, like the author of today's wtf.  Don't bash something if you can't back up your opinion...

  • (cs)

    Newt: My mommy always said there were no monsters - no real ones - but there are, aren't there? Ripley: Yes, there are. Newt: Why do they tell little kids that? Ripley: Most of the time it's true.


    Hudson: Is this going to be a standup fight, sir, or another bughunt? Gorman: All we know is that there is still is no contact with the colony, and that a xenomorph may be involved. Frost: Excuse me sir, a what? Gorman: A xenomorph. Hicks: It's a bughunt.


    Some how, both quotes seem appropriate today... Maybe it's the whimsical mood I am in, maybe its the way seeing this makes me feel like something is trying to burst out of my chest, or maybe it is just that those quotes lead to this one:

    Hudson: Let's just bug out and call it even, OK? What are we talking about this for? Ripley: I say we take off and nuke the site from orbit. It's the only way to be sure. Hudson: Fuckin' A... Burke: Ho-ho-hold on one second. This installation has a substantial dollar value attached to it. Ripley: They can bill me.

    Who says programming can't include the use of heavy munitions??

  • (cs) in reply to DiamondDave
    DiamondDave:
    So, why do people keep bashing XML and not giving a good reason why they think it sucks?

    The only reason I think xml gets a bad rap is because of people who misuse it, like the author of today's wtf.  Don't bash something if you can't back up your opinion...

    Tell me, based on the XML "standard", how exactly do you missuse XML? Even this abortion qualifies as a VALID XML file.

    XML itself barely describes syntax for how to use < > / and yet it is hyped as the best thing to ever happen to programming, the solution to all our interoperability problems, and yet there are NO standards for how an XML file should appear.

    Yes, you can define a schema for an XML file, and that schema should adhear to another schema which adhears to itself and anothe schema, but there is no actual requirement to do so.

    Even when you write a schema, you can EASILY write a schema that defines this XML file as legal.

    Calling XML a standard is an insult to every standard ever written before during and after the inception of XML. It is the ultimate "unstandard" standard, and it is impossible misuse, because outside of how you put the < > / characters, everything else is UP TO YOU.

    Rather that the tool that will save us from our interoperability and data exchange problems of the past, it is merely creating a whole new class of problems for the future.

    THAT is what is wrong with XML. It is the standard that wasn't and lends stupid things like this a veil of credibility that it just does not merit.

    Before you ask what is wrong with XML, perhaps you should ask what is right with it!

    Yes, XML can be a powerful tool, but it isn't a hammer and not everything is a nail.

  • (cs) in reply to Xepol

    Sheesh. Looks like similar to a problem I'm dealing with at work. We have been parsing some fixed-width text files from a vendor that looked like:

    <FONT face="Courier New">Johnson   Dallas    TX    4291.3020051205
    </FONT><FONT face="Courier New"><FONT face="Courier New">Smith     Seattle   WA     900.0020051201
    </FONT><FONT face="Courier New">WashingtonNY        NY    1200.5020051215</FONT>

    </FONT>

    Not too bad, but just for consistency with some of our other vendors we asked if they could send CSV file instead. Here is what we got:

    <FONT face="Courier New">"NAME, CITY, STATE, AMOUNT, DATE"
    </FONT><FONT face="Courier New">"""Johnson   "",""Dallas    "",""TX  "",""  4291.30"",""20051205"""
    </FONT><FONT face="Courier New"><FONT face="Courier New">"""Smith     "",""Seattle   "",""WA  "",""   900.00"",""20051201"""
    </FONT><FONT face="Courier New">"""Washington"",""NY        "",""NY  "",""  1200.50"",""20051215"""</FONT>

    <FONT face="Times New Roman">We stuck with the original format :)</FONT>

    <FONT face="Times New Roman">(Crossing my fingers that this post shows up correctly...)</FONT>

    </FONT>
  • (cs) in reply to mthamil
    Anonymous:
    I actually use Ant, and I don't think it's an atrocity.  However, I only use it to build Java applications that are simple to compile (no weird dependencies).  The problem is, Ant uses XML notation for things like conditional statements, and it gets messy and is somewhat contrary to the purpose of XML as a data markup tool.

    I've not used Ant much at all because I really despise Java for a number of different reasons. But, I don't think I'd like it. XML is only barely human readable. Doing a Makefile in it is a really awful idea.

    My favorite candidates for make replacements are ones that add a whole bunch of convenience stuff for doing dependencies and launching commands to an existing scripting language.

  • (cs) in reply to DiamondDave
    DiamondDave:
    So, why do people keep bashing XML and not giving a good reason why they think it sucks?

    The only reason I think xml gets a bad rap is because of people who misuse it, like the author of today's wtf.  Don't bash something if you can't back up your opinion...



    XML sucks because it is a very poor implementation of a good idea.  The ONLY thing xml provides which is of any value is a common file format so that parsers can be shared.  I find it hard to believe that anyone "designed" this monstrosity, but rather it looks like something a committee threw together when tasked to come up with something... anything.


    It bloats data horribly.  All those end tags are just stupid.   Naming a tag again after it has already been declared is just stupid.  These stem from the unneccissary requirement that the file be "human readable".  Let me give you a clue.  There is no such thing as a human readable file format.  ASCII is NOT human readable, and XML isn't even neccissarily ASCII.  XML requires an additional tag to say what the encoding of the file is in the first place in fact.  The idea behind the ASCII format of XML was that it is easy to edit and parse.... but wait. The whole idea behind XML is that the format itself is easy to parse.  So why the requirement that it is easy to parse "by notepad.exe"???  If you are supplying a standard, along with a simple parser, it takes about 2 hours to slap together an editor of the format given the prewritten parser.  In addition to this, it requires a whole other file format with a whole other language construct to define the rules (the DTD) of the XML document.  These rules are not embedable.  Let me attempt, in a few short minutes to define a decent PML (Procyon's Markup Language) that would kick XML's ass:


    The first 16 bits of the file is either 0, meaning that the tag definition is defined inline, or the length of the URL where the tag definition is to be found.


    The tag definition consists of a 32 bit length of tag definition field followed by repeating sequences of:

    Length of tag name: 8 bits

    ID of tag: 32 bits

    Tag name in utf-16

    Data type of tag: 32 bits.  Refers to the reserved (0-255) datatypes of primatives, or a user defined data type.


    After this you have:

    Tag ID: 32 bits

    Length of data: 32 bits

    Data Element 1 type: 32 bits

    Data Element 1 Length: 32 bits

    [Data 1]

    Data Element 1 type: 32 bits

    Data Element 2 Length: 32 bits

    [Data 2]

    ...


    The data can of course be nested, with one element containing another determined by whether the datatype of the field allows it.   I could go forward, describing an object oriented datatype definition, but I think this is enough to make my point.  This format is unbloated and very quick to parse.  The field lengths being given give the parser the ability to directly skip over tags it isn't interested in instead of walking the entire structure.  The length attributes also eliminate the need to escape any characters.  The data types allow for basic validation of the data, rather than XML's "everything is a string, but the encoding of that string varies, cast or call atoi at your own peril" mentality.  The file is easier to edit than ascii because a validating parser is supplied and an editor written from that that allows you to edit freely and safely and guarantees that your document is always well formed.


    The OTHER big problem with XML is the DOM.  We are traversing a tree here.  We need preorder, postorder, etc traversals.  We need get parent, get children functions.  We need a get root function.... Yea, that's about it.  That's a couple K of code... not the multi-megabyte monstrosity that is DOM, that still, in all it's glory, fails to offer all of the standard tree traversal methods!  What were the DOM people smoking???


    Oh, and XSL should NOT be written in  the data storage language itself.  I mean really..

  • boa13 (unregistered) in reply to DiamondDave
    DiamondDave:
    So, why do people keep bashing XML and not giving a good reason why they think it sucks?

    The only reason I think xml gets a bad rap is because of people who misuse it, like the author of today's wtf.  Don't bash something if you can't back up your opinion...


    XML is like violence: if it doesn't work, use more.
  • (cs) in reply to Omnifarious
    Omnifarious:
    Anonymous:
    I actually use Ant, and I don't think it's an atrocity.  However, I only use it to build Java applications that are simple to compile (no weird dependencies).  The problem is, Ant uses XML notation for things like conditional statements, and it gets messy and is somewhat contrary to the purpose of XML as a data markup tool.

    I've not used Ant much at all because I really despise Java for a number of different reasons. But, I don't think I'd like it. XML is only barely human readable. Doing a Makefile in it is a really awful idea.

    My favorite candidates for make replacements are ones that add a whole bunch of convenience stuff for doing dependencies and launching commands to an existing scripting language.



    And I haven't seen any good ones of those.  I've stuck to automake through it all as the most powerful, easiest to use, and most standard of all the make systems out there.  I'd LOVE to see it replaced with something better, but everyone else still has a ways to go.

    ANT is just a castrated make with an XML format.  I wouldn't really call it an atrocity on it's own, as really the entire make concept is an atrocity :)  It really doesn't bring anything new to the table though.  The reason most ANT scripts are more concise than make scripts is simply because ANT is building Java and make most often builds C++.  A standard make file building only Java would be very concise also.
  • (cs) in reply to Dave

    Anonymous:
    You might understand better if you replace the word "XML" with "database". Their solution is akin to moving from a flat file to database by inserting the flat file, in its entirety, into a single text field in the database.

    Haha, we gest, but I've actually seen that in major production code. It was in another vendor's system that I had to read and parse in order to generate reports from. Basically they were told that they had to use an Oracle database to hold the data from a data gathering system. The result? One database, one table, two columns: RowNum and DataString. And RowNum was autoincrementing.

    After I stopped screaming, I wrote a program that periodically read the latest rows, parsed the string, and put the result into a real relational database from which I could generate reports. No choice, I had no access to their source to make it work properly.

     

  • (cs)

    Two levels of tags?
    They should contact IniTech immediately ;)

  • (cs) in reply to procyon112
    procyon112:
    And I haven't seen any good ones of those.  I've stuck to automake through it all as the most powerful, easiest to use, and most standard of all the make systems out there.  I'd LOVE to see it replaced with something better, but everyone else still has a ways to go.

    ANT is just a castrated make with an XML format.  I wouldn't really call it an atrocity on it's own, as really the entire make concept is an atrocity :)  It really doesn't bring anything new to the table though.  The reason most ANT scripts are more concise than make scripts is simply because ANT is building Java and make most often builds C++.  A standard make file building only Java would be very concise also.


    You're wrong about that. I've seen ANT files that do a lot more than just compile Java, yet are concise and readable. I've yet to see a makefile that does a lot that's in any way readable.

    I think part of the reason lies in the fundamentally different approach.
    Make is defined in terms of targets. "I want this result file, do what's necessary to create it. If you don't know, here's what to do." Written in a platform-specific, not very structured way.
    ANT is defined in terms of tasks. "I want to compile Java files. Grab all the files in this directory, feed them to the compiler, then put them here."
    This is extremely important in terms of readability. I don't care that you're creating main.o, io.o, interface.o and logic.o. I don't care that you create superapp. There's very little information there. I already KNOW that the end result of your build file must be the application. As someone examining your makefile, I'm more interested in what steps you take to get there. Of course, I have the linking step already there, just below the application name, but where do the objects come from? If I want to know, I have to look up their rules by name - only, the name might not be there. Perhaps you have a variable filled with your source names, along with some pattern replacing to create the rules. Or your have a pattern rule. How do I know?
    With ANT, I see the "jar" target. It's easy to see that it takes the build directory and packs it up in a single file. If I want to know where that data comes from, I merely need to look at the dependencies: "compile,docs". So I can already guess that it has to compile some files and create documentation. If I can't guess that, then I still have the target name, which I KNOW is in the same file (unless it's some atrocity that imports build files from who knows where - you can misuse everything) by the very same name, so I can just look it up.

    That the underlying format of ANT is XML actually has nothing to do with all that. I'm not joining THAT flamewar; it doesn't lead anywhere.
  • (cs) in reply to Otto
    Otto:

    After I stopped screaming, I wrote a program that periodically read the latest rows, parsed the string, and put the result into a real relational database from which I could generate reports. No choice, I had no access to their source to make it work properly.

     


    You could've replaced the database table they're using by a view of a dummy database with an INSTEAD-OF insert trigger that does the parsing. Gets rid of the delays until the periodical task runs again.

Leave a comment on “The Flat-File Society Does XML”

Log In or post as a guest

Replying to comment #:

« Return to Article