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."
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

April 2017

9 101112131415
16 171819202122

Most Popular Tags

Style Credit

Expand Cut Tags

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