The problem with XML.



  • <FONT face="Times New Roman" size=3>A while back, when I worked in developer support, I got a call from another developer who </FONT><FONT face="Times New Roman" size=3>wanted to take some data from a text file and read it into his application so that </FONT><FONT face="Times New Roman" size=3>he could pass it to one of our application's APIs.  I expained to him that we don't </FONT><FONT face="Times New Roman" size=3>support development issues outside the direct use of our APIs, but I decided to hear him </FONT><FONT face="Times New Roman" size=3>out anyway.</FONT>

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3> </FONT></o:p>

    <FONT face="Times New Roman" size=3>He told me he had a background in VB, but he insisted on using fread() and C to read a text file. </FONT><FONT face="Times New Roman" size=3>"I can't figure out what to do with the void ptr," he said. </FONT>

    <o:p><FONT face="Times New Roman" size=3> </FONT></o:p>

    <FONT face="Times New Roman" size=3>I decided to try to sidestep the issue and recommended that if wasn't comfortable with the standard C library,  </FONT><FONT face="Times New Roman" size=3>he could try formatting his data in XML or a CSV text file so he could use a higher level library, like MSXML or the Excel API, </FONT><FONT face="Times New Roman" size=3>to get the data out of the file. On and on, he insisted on using fread().</FONT>

    <o:p><FONT face="Times New Roman" size=3> </FONT></o:p>

    <FONT face="Times New Roman" size=3>Frustrated, I said I'd get back to him, and I decided to re-tell this story to one of my co-workers.  As soon as I got to </FONT>

    <FONT face="Times New Roman" size=3>"format your data in XML," my co-worker interrupted--</FONT>

    <o:p><FONT face="Times New Roman" size=3> </FONT></o:p>

    <FONT size=3><FONT face="Times New Roman">"XML?  The problem with XML is that you have to use COM. [I hadn't even mentioned the MSXML COM library to him yet.]  </FONT></FONT><FONT face="Times New Roman" size=3>And then what happens when COM breaks?  Then, where are you left!?"</FONT>



  • What did you tell him?  It's a legitimate concern.  What happens if the processor breaks?  What if reality itself starts to unravel and logic no longer functions?  Are you including these test cases in your spec?  Why not?



  • @morbiuswilters said:

    What did you tell him?  It's a legitimate concern.  What happens if the processor breaks?  What if reality itself starts to unravel and logic no longer functions?  Are you including these test cases in your spec?  Why not?

    When my sister got married, she had  bridesmaid that was particularly worried about similar problems with the wedding.  Our family's running joke became, "What happens, if ninja's fall from the sky and start throwing stars?" 



  • @taylonr said:

    When my sister got married, she had  bridesmaid that was particularly worried about similar problems with the wedding.  Our family's running joke became, "What happens, if ninja's fall from the sky and start throwing stars?" 
     

    I know I would grab the nearest leprechaun and use him as a shield, but then again I'm always expecting this to happen so I'm prepared and on guard.



  • @medialint said:

    @taylonr said:

    When my sister got married, she had  bridesmaid that was particularly worried about similar problems with the wedding.  Our family's running joke became, "What happens, if ninja's fall from the sky and start throwing stars?" 
     

    I know I would grab the nearest leprechaun and use him as a shield, but then again I'm always expecting this to happen so I'm prepared and on guard.

     

    What about Dr. McNinja? He doesn't use stars, but rather frozen shamrock... can you shield yourself against frozen shamrock with a leprechaun?
    http://drmcninja.com/page.php?pageNum=40&issue=2
    Anyways - you have to set yourself on fire... ninjas can't catch you if you're on fire:



  • @viraptor said:

    Anyways - you have to set yourself on fire... ninjas can't catch you if you're on fire:
     

     Unless they are Glaswegian ninjas, obviously.



  • Why not print the file, place the printout on a wooden table, take a picture, run it through OCR and use the high-level interface of the OCR-software to get the data? 



  • @ammoQ said:

    Why not print the file, place the printout on a wooden table, take a picture, run it through OCR and use the high-level interface of the OCR-software to get the data? 

    Because that method does not introduce video artifacts (aka aliens).  Duh!


  • @viraptor said:

    @medialint said:

    @taylonr said:

    When my sister got married, she had  bridesmaid that was particularly worried about similar problems with the wedding.  Our family's running joke became, "What happens, if ninja's fall from the sky and start throwing stars?"
     

    I know I would grab the nearest leprechaun and use him as a shield, but then again I'm always expecting this to happen so I'm prepared and on guard.

     

    What about Dr. McNinja? He doesn't use stars, but rather frozen shamrock... can you shield yourself against frozen shamrock with a leprechaun?
    http://drmcninja.com/page.php?pageNum=40&issue=2
    Anyways - you have to set yourself on fire... ninjas can't catch you if you're on fire:

    Dear god do I love Dr. McNinja.



  •  I have to agree with AmmoQ. Sounds like a job for SSDS.


Log in to reply