A struct is a struct



  • We are not allowed to put version-extensions on our db packages (nobody will admit why). As such, the folks working on a specific db must all agree to use the same version of the stored procedures, as there are no individual copies of schemas, and no suffixes on the procs.

    We pass oracle structs that wrap numerous rows to the db (to save lots of round trips). Every now and again I need to add another field to one of the structs in the hierarchy. Since we're not allowed to have different versions of the procs, this means that whomever uses the db where I do my work must also grab my code from svn so that the structs being passed from the application match up with the definition in the db. Annoying, but simple. No big deal.

    Last week, someone discovered a problem which I had to fix, so I made the change and put the matching code and procs in the preprod db. QA tested and blessed it. 

    The guy who manages putting stuff onto the preprod server/db decided to roll back the procs to the preprod version (before my fix)  so that they could test some unrelated stuff using another system (that had the code that matched the previous procs). He did not bother telling the guy who DEPLOYS things from preprod to prod.

    The guy who manages the deployments went to deploy last night, fired up the newly deployed application and got all sorts of mismatched-struct errors from the prod db. He had to roll back.

    This morning, when everyone tried to compare notes, we figured out what happened, and told the (preprod) guy to be more careful going forward.

    He responded: what's the difference? A struct is a struct!

    And yes, he does have a programming background.

     



  • @snoofle said:

    And yes, he does have a programming background.

    From the sounds of it, that's debatable...


  • @snoofle said:

    And yes, he does have a programming background crreaatd  a PHP page onnce.

    FTFY.

    My keyboard freaked out and I left it in for the lulz.



  • @snoofle said:

    He responded: what's the difference? A struct is a struct!
     

    Well, hey, for structs of the same size, he's not entirely wrong.

    I mean, sure, you're going to introduce an ungodly number of defects, but it's not like you're going to segfault or something.

    Edit: Actually, from your description, it would seem that Oracle structs can't be casted by accident. So never mind.



  • @snoofle said:

    He responded: what's the difference? A struct is a struct!

    And yes, he does have a programming background.

     

    VBA one, I suppose? Oh, why do I even ask, a programming background is a programming background!

     



  • @snoofle said:

    He responded: what's the difference? A struct is a struct!

    Isn't that exactly what all weak typed programming languages say?!



  •  @All: this guy spent 20 years hacking "C" code - he should know what happens when youpass mismatched structures across a wire.



  • @snoofle said:

    He responded: what's the difference? A struct is a struct!

    Strictly speaking he is right: a struct is a struct. It's just a struct. It's so true, it's a tautology. Then you can point it out to him that a guy who deploys stuff is also just a guy who deploys stuff. Perhaps he'll get the hint.



  • @snoofle said:

    And yes, he does have a programming background.

    You mean like a screenshot of Eclipse on his desktop? 'Cause I'm pretty sure that doesn't count...

     


Log in to reply