Allo again,
This following on from my previous post. In doing the recent Moderation stuff, I've also fallen into the trap of 'lets make a "newXXX" version of an htmlcode', so as not to disturb the status quo while fiddling with things. However, I intend to replace current versions of things, once testing is done. (ie newcachedlistapproved will disappear, and its code will replace cachedlistapproved), except of course it won't disappear, it'll just lie around being unused..

Hmm, some way of 'recycling' node_ids would be useful, but that sounds like a huge project.

Anyway, Any thoughts, objections, notes on this?

C.

Replies are listed 'Best First'.
Re: Patches vs. 'new*' code (only temporary recycling)
by tye (Sage) on Oct 07, 2004 at 16:49 UTC

    Mark dead code as dead. When you want to create some new thing to fiddle with, use one of the many dead code nodes. When you roll it into production, mark the node as dead again.

    We shouldn't reuse node IDs. There are places that assume that node creation age is monotonic with node ID. It isn't like we've got so many defunct node IDs (even with the huge number of bogus scratchpads snafu) that reusing them will make much difference as to when node IDs won't fit in 4 bytes any more (and the DB can support larger node IDs than that).

    If there are too many dead code nodes marked as dead (I tend to rename them and empty them so they are very obviously dead and also don't do anything), then nuke them (they aren't public nodes so nuking them *eventually* isn't a big problem for me).

    - tye        

      That sounds sensible.. I wonder if we could fudge the 'create node' link (Admin Nodelet), into picking a node of the requested type, that has a title of 'recycle', or something.. At least for code nodes, this shouldnt cause too much trouble. (Probably a more unique and unlikely-to-be-used name would need to be chosen).

      Also, to ease the usage, a button in the Admin nodelet (or pmdev nodelet?) could be provided to empty and 'recycle' a node, in the case of a pmdev button, it would just suggest the node for recycling, maybe. This should probably (somehow) check that the node isnt in use..

      Ideas, ideas..

      C.