Dealing with Platform Bugs Versus Writing Your Own Code
Software development is really, really funny today. We work with smaller code fragments than ever before (at least for web development) but those fragments do more than you'd expect. Here were my two coding tasks this morning:
- Get NetCrucible's XSLT Opml Viewing Working
- Write a DB cleansing tool for my opml application. I didn't do a very good job on the initial opml parser so I needed a clean up tool.
The results were _interesting_. Here I was trying to just a) display data in the first task and b) write a network aware data cleanser and parser that also updated a database. Here is the length of each script:
a) display - 31 lines of code w/o the really pretty error page. Basically this script does the following:
- Grabs the data
- Does some basic error handling
- Sets a mime type
- Adds an XSLT reference
- Outputs the data
b) cleanse - 164 lines. This script does the following:
- Select only the unique urls from my opml table
- Loop over the urls
- Fetch the Instant Outline data
- Parse the Instant Outline data to extract the head elements like ownerEmail, title, etc
- Update each database record with the cleansed elements
- Add new meta elements for status and size so that InstantOutline "meta metrics" are captured
- Generate output to the screen so I know that it's still processing (the full run handles over 400 Instant Outline urls so this is important).
b) is a lot more complex than a). b) has to get input from an RDBMS (MySQL), do network IO, parse data, calculate metrics and update the database.
Guess which took longer?
a) Just displaying the data! - approx 2 hours versus b) 35 minutes
And why you ask? Fighting with XSLT bugs in Internet Explorer 5.5. It turns out that Microsoft has mucked up the XML engine at least once and even if you download IE 5.5 then you also have to separately download the XML engine update and then some wacky little registry modification tool. Something's really, really wrong when dealing with platform bugs takes a lot longer than writing your own code. I should rant, I should vent, but, you know what, I wasn't even surprised and that's the saddest part of this tale.
10:01:35 AM
|