Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
User Journal

Journal johndiii's Journal: Assumptions... 13

Suppose that you have a collection of items, each containing a collection of subitems (which may be empty, but in practice almost never is). Something like this XML representation:

        <Items>
                <Item ID="1">
                        <Subitem ID="S1" T="13"/>
                        <Subitem ID="S2" T="18"/>
                        <Subitem ID="S3" T="10"/>
                        <Subitem ID="S2" T="12"/>
                </Item>
                <Item ID="2">
                        <Subitem ID="S3" T="14"/>
                        <Subitem ID="S4" T="16"/>
                        <Subitem ID="S5" T="12"/>
                        <Subitem ID="S2" T="12"/>
                </Item> ...
        </Items>

The subitem IDs are assigned by some other system. It has a vague notion of the Item/Subitem structure, but assigns the IDs based on its own rules and processes. Would you assume that the subitem IDs are unique across multiple items? Or even within a single item?

And how late would you be prepared to stay at work to fix the result of a mistaken assumption (in this case, on someone else's part :-) )?

This discussion was created by johndiii (229824) for no Foes, but now has been archived. No new comments can be posted.

Assumptions...

Comments Filter:
  • I'm not all that bright - I'd definitely assume they would not be across multiple items, and ask about within a single item.
     
    How late I would stay would involve a rather complicated calculation involving a number of factors boiling down mostly to how necessary it was to keeping my job and how badly I wanted the job kept.
  • and try going to the documentation. If that's not present/possible, the assumption would have to be based on what exactly is being represented.

    Even if you are talking about products, there is still a case where subitems could be shared among items. Case in point is the local home improvement store. Both the plumbing department and the gardening department carry items for drip irrigation.

    If the specification was designed by a C programmer, I would assume that subitems could be shared among items (multiple
  • I usually write as generic of code as possible, especially when it comes to data objects. In java for example, unless the data set requires a specific contract, use the most generic collection available. Use a Collection, not a List or Set unless there is a compelling reason to use one or another.

    As far as how late would I stay, it really depends. But to give an idea, of the 6 years I have been at my current place of employment I have likely worked less than 5 hours of overtime.
  • but assigns the IDs based on its own rules and processes.

    Without direct control of the assignment process or a well-written spec that describes the assignment process, it is dangerous to make any kind of assumption.

    Would you assume that the subitem IDs are unique across multiple items?

    No.

    Or even within a single item?

    No. Even in your example you show in Item 1 that there are 2 S2's. They have unique values but not identifiers. There is no guarantee that the values shall remain unique, either,

  • If they duplicate in any scope you look at them from, I seriously question the usefulness of them. They definitely don't match the function stated on the label, that is, they don't serve to identify anything if there are clones randomly sprinkled about everywhere.
  • I work in research ... what is this "late" you refer to?

    I leave early at 6 to 7 pm every night ...
  • It doesn't matter who created the problem. The only thing that matters is how urgent a solution is needed. Is this bug stopping a thousand minimum wage workers from receiving their paychecks? Is it taking a web service offline that is costing a customer $30k a minute? If someone needs the fix as soon as possible then I work as long as I am productive.

    If this is a bug in a release three months from now then it goes into the schedule bucket and it is fixed when it is fixed.
    • The question was somewhat facetious; our application involves patient care in hospitals - so we stay until it is fixed, unless it has no impact on patient care. Of course, the fix also has to go through QA before it can be delivered.

      Last night was not too bad, though; I was home by 11pm.
  • We're asuming that ID really means what it says. If, on the other hand, instead of calling it "ID", the original author had written something like "Sample Weight", then we wouldn't expect uniqueness - they'd be like detail records in a master/detail table relationship.

    This just proves 2 things - (1) contrary to Shakespeare*, names are important, and (2) people who think xml is the be-all and end-all should be shot :-)

    People who believe "A rose by any other name would smell as sweet" should check out t

    • XML has its uses, but it's another example of the "if all you have is a hammer, every problem looks like a nail" principle. And if your hammer is fully buzzword-compliant....

      I suspect that the people who designed our product would be some of those that you would have up against the wall. :-) We use... a bit much of it. On the other hand, I've gotten pretty good at writing XSLTs. That was where last night's problem turned up: the server to client transform was dropping a lot of data due to duplicate IDs
      • What I've found is that people who *should* know better check their "brainz" at the door when it comes to xml - "all we have to do is use xml" ... as if that magically solves all problems.

        Maybe xml 3.0 will have some magic pixie dust ...

        Good catch on finding the problem in the original app, btw :-)

  • by turg ( 19864 ) *

    And how late would you be prepared to stay at work to fix the result of a mistaken assumption (in this case, on someone else's part :-) )?

    Does the answer to this question actually make any difference in whether one actually stays late?

    If so, I suppose it depends on the environment and the person. e.g. where everyone is helpful and supports each other (and , on the other hand, they understand if you can't help out this time), vs. you're getting screwed by having to fix someone else's mess (in which case "w

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (8) I'm on the committee and I *still* don't know what the hell #pragma is for.

Working...