Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Y.A.N.F: XML View of Selected, Best and Worst Nodes

by theorbtwo (Prior)
on Jun 30, 2004 at 05:05 UTC ( [id://370681]=note: print w/replies, xml ) Need Help??


in reply to Re: Y.A.N.F: XML View of Selected, Best and Worst Nodes
in thread Y.A.N.F: XML View of Selected, Best and Worst Nodes

It's not so much a bug as a difference... and a bug with the data on the homenode.

Our Best Users asks the DB to list all users by the number of nodes owned by them -- select DISTINCT author_user, count(author_user) from node group by author_user. The homenode (in both XML and normal displaytypes) simply shows the cached number of writeups. This has some interesting side-effects.

Sometimes, because of non-attomic updates, the cached number of writeups becomes incorrect. This is why, sometimes, it's possible to go to your user settings, hit "submit", and get a message that your number of writeups has been corrected.

But, more important then that is what the defintion of the number of writeups on your homenode is: it only counts the following nodetypes: 'note', 'snippet', 'sourcecode', 'perlquestion', 'perlcraft', 'perlmeditation', 'poem', 'CUFP', 'obfuscated', 'perltutorial', 'monkdiscuss', 'modulereview', 'bookreview', and 'perlnews', when authored by you, and 'categorized question' and 'categorized answer' when originally authored by you.

Well, you may ask, isn't that everything? Not quite. Every user has at least one other node authored by them: their own homenode. Additionally, there are various node types that are writeable, at least by some users, but not counted there. pmdevs can write patches and pmdevnotes (replies to patches) until they are blue in the face, but not have them counted. Even normal users can write editor requests (note: but probably shouldn't, in most cases) and get in on the uncounted action. Gods like theonetwo can write any sort of node they like (but mostly write nodes of types they don't like).

There's another problem I just barely mentioned, though it may be the most important one: Q&A. All nodes in the Q&A section are considered to be authored by the QandAEditors, no matter who originaly wrote them. (Though you can't tell unless you look at the XML.) This is mostly because at the time it was considered easier to let them edit them that way -- QandAEditors predate the more general janators (who until recently were named editors). The person who originaly wrote the nodes are "original authors". Thus the Best Users search misses those nodes completely, for the same reason that user search does (unless you hit the checkbox).

Anyway, that was probably Far More Then You Ever Wanted To Know: Number Of Writeups (FMTYEWTKNOW).


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re^3: Y.A.N.F: XML View of Selected, Best and Worst Nodes
by valdez (Monsignor) on Jun 30, 2004 at 07:40 UTC

    No, it's not FMTYEWTKNOW :) PM is really intricate, so any explanation is always welcomed!

    Ciao, Valerio

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-16 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found