File format WTF



  • I've just been playing with one of our internal tools. When I went to save the file, it automatically included an extension of XML. Considering the type of data the application handles, I was curious why it would use such a format. 

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data>
    ZnSit4BvCAs5lkKNMgxcLLS+gY7Q/oe7KHk1lqBsL9dWMccUFU9HMh9m8uN2fHqLl/Slaa+4DEkd
    WIA5Gp8JACjIupcS8nDPBQ5aTlWW0jkCYleNXLxnHvgamAW2NboVWNtWc0byzDMlsrFvX8EAbcaK
    C0aKZJ4tbPIDRh7LqwGgCHrop5I5g4Q9RIirWQJWBuLjpKSsCxm0VmNHr18FehdSROkGvR8tjwJo
    /0Xd4TkZXhSPP8RyPma+3cSAvrqZNae48d5BQSCGghAAFaRuNUFM5/0FPeNqoHO+lkfu7rYeCUdy
    eSnGY9cdArXisTXLUGaqtoxhJ4us4k0EtI0uRaApNQGl5SiUD8zwdgqrfitgyrTda2qlYNkq46A8
    [...snip thousands more lines exactly like that one...]
    </Data>

    Now everything makes sense (including why it takes so long to load and save files), apart from why they decided to use an XML file format. 



  • This is standard practice for an embedded device with no filesystem.



  • This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.



  • @Heron said:

    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.

    I read that like 20 times and I just cannot make sense of it.  Using violence is.. wrong?

     

    I'm sorry, I just don't understand.



  • @Heron said:

    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.



  • @Xyro said:

    @Heron said:
    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    Just like violence, LSD and anal lube.



  • @morbiuswilters said:

    This is standard practice for an embedded device with no filesystem.

    Really? We're still doing that?



  • @Xyro said:

    @Heron said:
    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    XML is like a Nerf ball: completely pointless.


  • @morbiuswilters said:

    This is standard practice for an embedded device with no filesystem.
    The standard practice for embedded devices with no file system is to save files in 7-bit XML with a header that says UTF-8 encoded?

    Sorry, I must have missed that lesson. When I save data in embedded devices, I normally just write the binary data to NAND directly (with ECC of course), as I've never seen 7-bit NAND chips. 



  • @SQLDave said:

    @morbiuswilters said:

    This is standard practice for an embedded device with no filesystem.

    Really? We're still doing that?

    It wouldn't be a front-page meme if wasn't painfully unfunny to begin with and then run into the ground.



  • @bstorer said:

    @Xyro said:

    @Heron said:
    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    XML is like a Nerf ball: completely pointless.

    XML is like BTK's basement "rec room": lots of deeply-nested children.



  • @morbiuswilters said:

    @bstorer said:

    @Xyro said:

    @Heron said:
    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    XML is like a Nerf ball: completely pointless.
    XML is like BTK's basement "rec room": lots of deeply-nested children.
    XML is like political speeches: it requires a pointless prologue, establishes no dialog; by attempting to represent everything it ends up representing nothing; it rambles on about namespace and territory, uses a completely different language to define it; the precious little information it contains is buried in verbose noise; no matter what proponents say, it's still up to the listeners to parse the meaning themselves... oh god, I could keep on and on...


  • @Xyro said:

    @morbiuswilters said:

    @bstorer said:

    @Xyro said:

    @Heron said:
    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    XML is like a Nerf ball: completely pointless.
    XML is like BTK's basement "rec room": lots of deeply-nested children.
    XML is like political speeches: it requires a pointless prologue, establishes no dialog; by attempting to represent everything it ends up representing nothing; it rambles on about namespace and territory, uses a completely different language to define it; the precious little information it contains is buried in verbose noise; no matter what proponents say, it's still up to the listeners to parse the meaning themselves... oh god, I could keep on and on...

    XML is like Canada: dumb, tedious, and unsuitable to parsing with regex.


  • @morbiuswilters said:

    @SQLDave said:

    @morbiuswilters said:

    This is standard practice for an embedded device with no filesystem.

    Really? We're still doing that?

    It wouldn't be a front-page meme if wasn't painfully unfunny to begin with and then run into the ground.

    Shit, people still dust off the old wooden table line now and then.  Let's pick our battles.


  •  Meh. I didn't view it as a "battle". I asked because *I* thought about using it and I'm normally on the very tail end of "hip" references (e.g., I just recently stopped saying "whazzzuuuuuuup!"). So I figured it must be passe. Color me wrong. Also, I assumed the wooden table reference was granted some sort of immunity from "expiration" due to a sort of "founders' status". Clearly, I am in need of mental help. 

    I'm going to go post something on IHateLotusNotes.com now. 

    Peace out, y'all!



  • @Mole said:

    The standard practice for embedded devices with no file system is to save files in 7-bit XML with a header that says UTF-8 encoded?
     

    That's not 7-bit.  It's UTF-8, just like the header says -- each character uses 8 bits of storage.

    The Base64 encoding is probably to avoid null bytes, which are not permitted in XML under any circumstances and cannot even be escaped at the XML level.



  • @Iago said:

    The Base64 encoding is probably to avoid null bytes, which are not permitted in XML under any circumstances and cannot even be escaped at the XML level.

    Well, that's easy, just use <null />. After all, what's the point of using XML if you don't have tags for everything?



  • @moog said:

    better yet <byte value="0x00" /><input name="ctl00$ctl00$bcr$bcr$ctl00$PostList$ctl18$ctl23$ctl01" id="ctl00_ctl00_bcr_bcr_ctl00_PostList_ctl18_ctl23_ctl01_State" value="value:Filed%20under%3A%20%3Ca%20href%3D%22%2Ftags%2Fbetter%2Byet%2B_2600_lt_3B00_byte%2Bvalue_3D002600_quot_3B00_0x00_2600_quot_3B00_%2B_2F002600_gt_3B00_%2Fdefault.aspx%22%20rel%3D%22tag%22%3Ebetter%20yet%20%26lt%3Bbyte%20value%3D%220x00%22%20%2F%26gt%3B%3C%2Fa%3E" type="hidden">
     

    Do it properly.

    <node type="datapoint">
    <datatype content="byte" />
    <value content="0x00" />
    </node>

     



  • @Heron said:

    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
     

    I thought it was "if a little bit of it isn't working, trying using more"



  • @Zemm said:

    I thought it was "if a little bit of it isn't working, trying using more"
     

    No, that's "herbs and violence"



  •  I prefer

    <hexdata type="byte">0xFF</hexdata>

     



  • Better make it generic:

    <byte><cexpression>0x53+'e'</cexpression></byte>
    <byte><asciichar>LATIN CAPITAL LETTER Q</asciichar></byte>
    <byte><bit>0</bit><bit>1</bit><bit>0</bit><bit>0</bit><bit>0</bit><bit>1</bit><bit>1</bit><bit>1</bit></byte>


  • @morbiuswilters said:

    @SQLDave said:

    @morbiuswilters said:

    This is standard practice for an embedded device with no filesystem.

    Really? We're still doing that?

    It wouldn't be a front-page meme if wasn't painfully unfunny to begin with and then run into the ground.

     

    I can't even read the front page anymore. The first 10 posts are always painfully unfunny and uncreative riffs on whatever the story is. If the punchline of the story is about a guy on the phone saying, "I can't! The cord's unplugged!" you already can predict there will be three replies that use the same "joke": "I was going to get first post but the cord is unplugged!"

    The whole point of humor is that it's unpredictable. If I can predict in advance exactly what he joke is, it's not a joke and it's not anything approaching funny.

    I don't know how to communicate to these people that they're *so* unfunny, they're actually making Slashdot "+5 Funny" memes look hilarious. After reading the crap in the front page posts, I'd actually *relish* a "in Soviet Russia" joke.



  • @SQLDave said:

     Meh. I didn't view it as a "battle". I asked because *I* thought about using it and I'm normally on the very tail end of "hip" references (e.g., I just recently stopped saying "whazzzuuuuuuup!"). So I figured it must be passe. Color me wrong. Also, I assumed the wooden table reference was granted some sort of immunity from "expiration" due to a sort of "founders' status". Clearly, I am in need of mental help. 

    I'm going to go post something on IHateLotusNotes.com now. 

    Peace out, y'all!

     

    Man, you got me all excited that it was getting updates again... bait and switch!

    Edit: Or more likely, proof I didn't get your own joke. Doh!



  • @blakeyrat said:

    The whole point of humor is that it's unpredictable.
     

    That is incorrect.



  • @blakeyrat said:

    @morbiuswilters said:

    @SQLDave said:

    @morbiuswilters said:

    This is standard practice for an embedded device with no filesystem.

    Really? We're still doing that?

    It wouldn't be a front-page meme if wasn't painfully unfunny to begin with and then run into the ground.

     

    I can't even read the front page anymore. The first 10 posts are always painfully unfunny and uncreative riffs on whatever the story is. If the punchline of the story is about a guy on the phone saying, "I can't! The cord's unplugged!" you already can predict there will be three replies that use the same "joke": "I was going to get first post but the cord is unplugged!"

    The whole point of humor is that it's unpredictable. If I can predict in advance exactly what he joke is, it's not a joke and it's not anything approaching funny.

    I don't know how to communicate to these people that they're *so* unfunny, they're actually making Slashdot "+5 Funny" memes look hilarious. After reading the crap in the front page posts, I'd actually *relish* a "in Soviet Russia" joke.

     

    In Soviet Russia, painfully unfunny joke relishes you!



  • @Mason Wheeler said:

    In Soviet Russia, painfully unfunny joke relishes you!
     

    In the west, blakeyrat kills you. 

    In Soviet Russia, blakeyrat kills you.



  • @morbiuswilters said:

    @Xyro said:

    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    Just like violence, LSD and anal lube.

     

     

    It is sacrilege to include the middle item in the same category as the other two.



  • @tharpa said:

    @morbiuswilters said:

    Just like violence, LSD and anal lube.

    It is sacrilege to include the middle item in the same category as the other two.

    Maybe you prefer being fully conscious for it, but some of us like being high when we're getting violently pounded in the ass.



  • @morbiuswilters said:

    Maybe you prefer being fully conscious for it, but some of us like being high when we're getting violently pounded in the ass.
     

    * with two fists.



  • @blakeyrat said:

    After reading the crap in the front page posts, I'd actually *relish* a "in Soviet Russia" joke.
     

    Did you hear the one about the Communist hot dog?



  • @Heron said:

    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.

    My personal rule is that if you are using xml without a schema, you are doing it wrong. That rule covers such idiocies as this, but allows for practical use.



  • @cconroy said:

    @blakeyrat said:

    After reading the crap in the front page posts, I'd actually *relish* a "in Soviet Russia" joke.
     

    Did you hear the one about the Communist hot dog?

    In Soviet Russia hot dog make you out of hog anus and cow tongue.



  • @morbiuswilters said:

    @cconroy said:

    @blakeyrat said:

    After reading the crap in the front page posts, I'd actually *relish* a "in Soviet Russia" joke.
     

    Did you hear the one about the Communist hot dog?

    In Soviet Russia hot dog make you out of hog anus and cow tongue.

     

    ah there is an XKCD comic on that, but sadly i cannot post XKCD 


  • Trolleybus Mechanic

    @bstorer said:

    @Xyro said:

    @morbiuswilters said:

    @bstorer said:

    @Xyro said:

    @Heron said:
    This is a perfect example of why I think XML is like violence - if you find yourself using it, you're probably doing it wrong.
    I do not understand either. Is this an intentional corruption of the joke?

    XML is like base 64 encoding. If it's not working, you're not using enough.

    XML is like a Nerf ball: completely pointless.
    XML is like BTK's basement "rec room": lots of deeply-nested children.
    XML is like political speeches: it requires a pointless prologue, establishes no dialog; by attempting to represent everything it ends up representing nothing; it rambles on about namespace and territory, uses a completely different language to define it; the precious little information it contains is buried in verbose noise; no matter what proponents say, it's still up to the listeners to parse the meaning themselves... oh god, I could keep on and on...

    XML is like Canada: dumb, tedious, and unsuitable to parsing with regex.
     

    XML is like an analogy wtihout an explaination



  • @Lorne Kates said:

    XML is like an analogy.
     

    DYPHFY.

     

     


  • Trolleybus Mechanic

    @dhromed said:

    @Lorne Kates said:

    XML is like an analogy.
     

    DYPHFY.

    drove your point home for you

     

    XML is like dhromed's post-- it adds nothing to the overall conversation, and the actual content is presented in such an incomprensible manner that supplimentary information has to be provided for it to be understand.

    Bravo.



  •  Monkey like you.

     Monkey like you a lot.



  • Phase space has been using XML for over a century. It's only you computer geeks having trouble...



  • XML is like sex.

     

    You aren't very good at either one.

     


Log in to reply