jameydee: (Default)
[personal profile] jameydee
So, I'm working on a module that exports output created by my company's webapp and creates a SCORM package that can be imported by a customer's proprietary desktop application.  Basically, this involves querying our database and creating XML trees and then saving out the trees.

So, we've basically done it.  Every on-line lesson created in our webapp is exported as an XML file compatible with the customer's app.  The last thing we need to tie it all together is the all important SCORM manifest file, which is an XML file that contains a list of the organization of the course and all the graphics and other media used by each course.

To me, the most logical thing to do is to create two XML objects.  On is for the overarching manifest file, the other is for the lesson we are processing at the moment.  All of the resources we are writing to the lesson XML file are going into the manifest file, so why not gather them while you read them.  Read once, write many, right?  Sure, we won't have all the info at the same time, but we can backfill as we get the info.

But my programming partner cannot accept this.  His first approach was to create an array to gather all this data.  He also rejected my idea of filling the XML object while we were reading the info for the other XML object.  Why?  Because it wasn't linear....but... HONEST TO GAWD! WHY USE AN ARRAY?  YOU'VE GOT THE MANIFEST OBJECT!!!  IT'S BETTER THAN AN ARRAY!  IT'S THE THING ITSELF.  There's ZERO reason to use an array in place of the XML object!

So he's waiting until all the files are created.  Then he's ***RE-opening the lesson XML files we just created***, traversing the XML lesson object in order to fill the manifest XML object,  and then writing the manifest.

On the modular side, I can see this.  On the efficiency side, WTF? 

I threw up my hands and said, "Okay.  Whatevah.  As long it works. Knock yourself out.  But you write it."

Date: 2011-05-15 06:32 am (UTC)
From: [identity profile] ghostwolf.livejournal.com
On the modular side, I can see this. On the efficiency side, WTF?

Some people are stuck in their ruts because they've done what they do the way they do it for so long, they can't see any other way.
It's not as though something else "new, different, fantastic" etc., blah, blah, blah won't come along, and everyone will jump onto that band-wagon and praise it to the heavens ... again ... and again.

April 2017

9 101112131415
16 171819202122

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 25th, 2017 08:40 pm
Powered by Dreamwidth Studios