Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Will this break your program?

by Sprad (Hermit)
on Apr 28, 2001 at 00:21 UTC ( [id://76261]=note: print w/replies, xml ) Need Help??


in reply to threaded display of replies

What happens when somebody doesn't use the Re: Re: Re: Re: pattern, and perversely changes the title in their reply? (like I did)

Cases like this aside, though, it'd be a welcome addition.

---
A fair fight is a sign of poor planning.

Replies are listed 'Best First'.
Re: Will this break your program?
by mikfire (Deacon) on Apr 28, 2001 at 00:27 UTC
    Sprad, if you look at the XML stream, the parent node id is included probably to avoid exactly this issue.

    mikfire

Re: Will this break your program?
by little (Curate) on Apr 28, 2001 at 00:49 UTC
    well, each node should be represented by a node_id in a DB or whatever file U use and this should know (store) the id of its parent, so you can't mess up things. And btw, there is no need to let anode know if it has children or not. If there are children THEY WILL KNOW their parent. Keep it simple: stupid. :-)
    btw BmeCat works this way and made it to a standard.

    Have a nice day
    All decision is left to your taste

      so said little:

        And btw, there is no need to let anode [sic] know if it has children or not. If there are children THEY WILL KNOW their parent.

      Unless, of course, you want to find all the children of a particular node without doing an exhaustive search of the DB. While not strictly necessary, it can make life simpler in some cases. I think this application might qualify as one of those cases (see Masem's reply). :-)

      bbfu
      Seasons don't fear The Reaper.
      Nor do the wind, the sun, and the rain.
      We can be like they are.

        But that blows up your DB to an expensive amount, when you store the children node id's to a node. Remeber, you will never know how many children a node will have. But a child node always has only one parent.
        Have a nice day
        All decision is left to your taste

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2025-07-12 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.