Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: reordering a stack with little effort

by Zaxo (Archbishop)
on Mar 11, 2005 at 00:44 UTC ( #438479=note: print w/replies, xml ) Need Help??

in reply to reordering a stack with little effort

Leave out the question number as a property of the question. In OO terms, it is not related to the question, but to a collection of questions. Call that a questionaire or a quiz, I guess.

After Compline,

  • Comment on Re: reordering a stack with little effort

Replies are listed 'Best First'.
Re^2: reordering a stack with little effort
by Anonymous Monk on Mar 11, 2005 at 15:09 UTC
    That just depends on ones point of view. If you think it's important to have "global" information, use a "collection" and define the other there. But there's no need for global information - the entire sequence of questions can be retrieved by looking at the data locally: as long as each question knows its neighbour(s), the entire collection and its order can be retrieved as well.

    Of course, if you want to create multiple collections, you can't store the information locally as easily, as a question can belong to more than one collection.

    Having said that, even with collections, you haven't solved, or even side-stepped the problem. You will still have a sequence of numbers somewhere in a table that indicates the order in your collection - and you know have to insert a question.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://438479]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2022-05-25 04:16 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.