[oma-loty] Re: The Pragmatic Programmers vs XML

  • From: Dave Burchell <burchell@xxxxxxxxxxxxx>
  • To: oma-loty@xxxxxxxxxxxxx
  • Date: Tue, 27 May 2003 11:55:55 -0500 (CDT)

Hello all,

Sorry to be so silent of late!  (Usually the trouble is just the
opposite.) By way of explanation, my lovely wife, who has developed
the admirable habit of standing by me through thick and thin, has
wandered into a gooey patch of social and work obligations, and has no
free time until about June 9 (last day of school at LPS).  I noticed
about two weeks ago that she was standing on the brink of going totally
bonkers from stress and lack of sleep, so I stepped up and started
doing my share (or hopefully even a little more) of the household
chores and child management.  (One of my goals is that she never feel
the need to wash a dirty dish until after our June 14 wedding
anniversary.)  This has made my wife significantly more relaxed and
myself significantly less vocal in forums like this one.  (I am pretty
sure no women are subscribed to this list, but just to be on the safe
side, yes, I should have been doing my part all along!  And with the
number of smiles rather than scowls I'm getting at home, I may well
continue my househusband habits into the summer.  It has been said it
takes 21 days to "set" a habit, so I may be powerless to stop.)

thehaas@xxxxxxxxxx says:
> 
> We've been silent for awhile.  Here's something to get the juices
> flowing:
> 
> http://www.artima.com/intv/plain.html
> 
> My thoughts -- I've used XML for what Dave and Andy consider the real
> purpose (document preparation) and have used it in the wrong ways
> (client-server communication.  Think SOAP, only not as nice).  I would
> rather use something like Python's ConfigParser for configuration files
> -- low overhead, yet incrediably easy to understand.  In XML, you're
> data is only as good as your tags.

Mike, thanks for contributing this link and your ideas about
"ConfigParser".  The signal to noise ratio here is outstanding, and your
well-considered posts are largely why.

I took a look at the ConfigParser page, and this is the thing you were
telling us (me) about at lunch a few weeks back, right?

I don't like it.

Why on earth would anyone building a new system choose this ad-hoc,
non-standard, non-human-understandable language to store a config
file?  XML is the same concept (a structured text file), but clearly
better.  Why better?  (1) standard structuring, (2) thousands of
standard parsers available, (3) easier to read (for a human), (4) more
programmers have experience with it.

Q: How is ConfigParser easier to understand than XML?

Q: How is ConfigParser lower overhead than XML?

Q: Isn't your ConfigParser file going to be more or less readable based
on your tag choices, just like XML?  The "tags" are simply formatted in
a different way, inside square brackets, right?

Dave and Andy have it right that plain text is the way to store data,
but XML is a better application of plain text than whatever format J.
Random Hacker might invent for his particular application.  Look at the
madness of Unix config files, where you don't know what field you are
on with /etc/passwd, /etc/shadow, or a cron file.

In the link you provided, Bill V. says:

        I like what you have said about self-describing data, but I'm
        concerned about the leap that some XML enthusiasts seem to make
        that because the data is self-describing, the way in which a
        particular schema can evolve doesn't have to be clearly
        specified or followed, because they assume clients will just
        ignore anything they don't understand.

I agree with Bill, in that getting sloppy with schemas or XML datafiles
is a bad habit, just as bad as if you were working with an ad hoc
data format.  But I don't think many XML boosters think they have a
license to get sloppy.

From "http://www.artima.com/intv/plain4.html":

        Dave Thomas: XML sucks because it's being used wrongly.

Wrong!  Thank you for playing, Dave.  XML is a wonderful tool because
it can be used correctly with ease.  The fact that some programmers
abuse it does not make XML bad.  This is just sloppy thinking on Dave's
part.

Dave, Bill, and Andy then proceed to get more and more confused and
contradictory as they go on.  I don't have time to point out their
cloudy thinking point-by-point, but they show they clearly don't grok
XML or The XML Way.  I'm saddened to think how many ugly little ad hoc
config file languages will be spawned by these guys' loyal followers.

-- 
Dave Burchell                                          40.49'N, 96.41'W
Free your mind and your software will follow.              402-467-1619
http://incolor.inetnebr.com/burchell/                  burchell@xxxxxxx     

Other related posts: