Bill Roper (billroper) wrote,
Bill Roper

XML Hell

I came to one of our projects here at work rather late in the game, as I'd been off working on something else (a complete rewrite of our Server locking) for a long time. The new project required extensive writing and parsing of XML.

Now, I am a lazy programmer. My first thought when I saw all the decoration that had to be done in order to get standard XML written out was "This is a good job for a simple set of methods that will handle all the silly formatting." That way, you only have to get the formatting right once and the method will do it for you in the future. It not only makes it easier to write the code, but it makes it more maintainable.

When I introduced my little function library, one of the other fellows in the group allowed as to how he thought that was a silly idea, because it was easier to just write all those little opening and closing tags by hand.


Well, we had a bug come in last week and it got punted to me.

It turns out that someone (I don't know which of the guys) had some fine hand-coded XML for sending a formula string down the pipe. In fact, we send that XML in three different places in the code, all coded completely de novo, because why would we want to write a method instead of retyping all this damned string concatenation?

It also turns out that only one of the three places correctly encoded the formula string so that it would be passed correctly if it contained annoying things like quotation marks. Oops.

Well, that would explain the bug...

*thud* *thud* *thud*
Tags: computers, musings, work

  • Time for Rebuilding

    Well, there's nothing like research. Having determined that DDR5 is going to carry a substantial price premium over DDR4 memory for at least a year…

  • Driven Wild

    The studio computer continues to misbehave in various ways. When I fired up Cubase today, I got a lot of nasty, blocky video, despite having cleaned…

  • Some Old Doggerel

    I recall having mangled a CSN tune many years ago on the way to Contraption. Like that convention, the particular co-worker whose code I was digging…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment