Homenode List Generator
or
How to generate obtusely coy lists for your homenode

Part 2 of The "Wick Has Too Much Time On His Hands" Files1

Current source version: 1.1. Please download the new source code if yours is an earlier version.

A clientdev document intended for mass-consumption.

See also clientdev: How to predict your position in the Other Users nodelet (Part 1) for more sloppy perl hackery and irregular/excessive diction.


(r) haze says Using it seems to get attention to old nodes. Way cool


What It Does:

This client automates the task of generating obtusely coy lists that concisely summarize your "best" and "worst" writeups.

"Whoa! Just a moment there cowboy... 'Best' and 'worst' according to whom and in what sense?" you probe, momentarily clenching and unclenching your fists.

Well, I am glad you inquire, since my intention in having these obtusely coy lists on my homenode (and in releasing the source code to this script) is to prompt you to ask these very questions and think about them very hard.

The short answer is "best" and "worst" in the eyes of other users of E2, according to several metrics: number of votes, reputation, and goodness. (This last metric is explained in the FAQs at the end of this writeup.) You will have to figure out the long answer yourself.

Specifically, the script will generate six lists for your home node, each containing five elements in descending order. The lists are:

  • 5 Most Voted-Upon Writeups
  • 5 Least Voted-Upon Writeups
  • 5 Highest Goodness Writeups
  • 5 Lowest Goodness Writeups
  • 5 Most Reputable Writeups
  • 5 Least Reputable Writeups

For an example of what these obtusely coy lists look like, visit my homenode. Please look at the lists now, as the rest of this node will make more sense that way.

The following users have /msg'ed me to tell me that they have lists on their homenodes:


Requirements:

You will need Perl and curl to run the script.

You will need to change the username and password at the head of the script so that the script can log in and download your vote data.

If you have a lot of writeups, please do not run this script too frequently (more than once a day), as generating the list of all your nodes incurs server-side load proportional to your writeup list length.


FAQ's:

What is "Goodness"?

"Goodness" is an alternate evaluation metric that you may find more meaningful than reputation. It is the percentage of votes cast for a writeup that are upvotes. It ranges between 0.0 (no upvotes) and 1.0 (all upvotes), inclusive.

For example, a writeup with 16 upvotes and 9 downvotes has a goodness of 16 / (16 + 9) = 0.64.

I have generated the list and put it on my homenode. Now what?

/msg me and, if you do not mind, and I will add you to this writeup in a list of users with lists on their homenode. Then, sit back and wait for the XP to come in droves.

Facetiousness aside, since adding lists to my homenode I have noticed that voting on my nodes has not increased, rather stayed relatively constant but more evenly spread across my nodes.

I do not have Perl or curl on my computer and I am too lazy/intransigient to figure out how to run the script on my system. How can I too generate obtusely coy lists for my homenode?

You will have to wait for integration of the list generator with the E2 Node Trackers.2 conform has agreed that I could submit a patch for his node tracker. Apatrix and accipiter do not want to extend their node trackers, but I am sure they could be sweet-talked.

Keep your eyes peeled, like little grapes.

I like to keep my skeletons in my closet. How do I remove the "Least Reputable Writeups" or "Lowest Goodness Writeups" list?

The hard way: Comment the line out of the source code.

The easy way: Delete those lines from the output.

I do not want my lists to have 5 writeups each. How do I increase or decrease the list length?

Change the $list_length variable at the head of the source code. I would be interested in seeing whether M-noders with long lists have a lot of cross-fertilization across their lists, or there is little duplication of writeups across the lists.

I am not obscenely and shamelessly self-promoting nor do I like to be obtusely coy. Why would I want these obtusely coy lists on my homenode?

Because they are interesting statistics?

You must have some prurient fascination with voting or else you would have not read this far. The list will make it easier to understand how your nodes are received by the public and tailor your writing in the future.

Specifically, it will answer three questions:

  • (Votes) What sort of writeups are heavily read and cause reader response?
  • (Reputation) What sort of writeups will garner the most XP?
  • (Goodness) What sort of writeups are well-received, despite perhaps being relatively unknown and unvisited?

High goodness nodes will probably be those with no downvotes. The respective writeups will probably be very solid content nodes onnon-controversial topics.

The low goodness nodes may surprise you. Some of the most high-rep nodes on E2 are controversial and may have low goodness.

Ultimately, it comes down to fascination with statistics. If you still do not understand why one would want such lists on one's homepage, then you never will. I will go so far to explain that some of us are preoccupied by numbers, lists, and statistics. If you are not one of them, you will never understand.

Why "Highest Goodness" and "Lowest Goodness" and not just "Best" and "Worst"?

You haven't been paying attention, Buckwheat. Go back and read the What It Does section.

Good point. What about "Most Good" and "Least Good" so that you maintain consistency with of the usage of "Most" and "Least"?

This concept belongs in the noder lexicon. It is a relevant and informative measurement that someone should have thought of a while ago.

If you speak of how "good" a writeup is, it is ambiguous whether you are referring to this specific goodness metric or just an abstract sense. "Goodness" as an unambiguous term .

Another good point. What about "Most Goodness" and "Least Goodness" so that you maintain consistency with of the usage of "Most" and "Least"?

No. That does not parse and it too is inconsistent. "Goodness" is a noun, whereas "reputable" and "voted-upon" are adjectives.

And stop saying "good point", you incessant, unrelenting sycophant! You have the source, what more do you need from me?

Back off, Poindexter! I'm supposed to be asking the questions!

If you must know, I need you to integrate the source with the E2 Node Tracker. I was not really planning on running the script on my system anyway, I don't have Perl installed. I just like reading frivolous prose that leads me around by the nose and puts words in my mouth.

Good point.

I found a bug! What should I do?

Horrors! /msg me and tell no one else.


Code:
#!/usr/bin/perl
# Homenode List Generator
# by Wick
# Version 1.1
# This code falls under the GNU General Public License

$user = "wick";
$passwd = "me and E2, sitting in a tree";
$list_length = 5;

# Hardcode the URL of the User Search XML Ticker II
$url = "https://www.everything2.com/index.pl?node_id=1291794"
        . "&op=login&user=$user&passwd=$passwd&nolimit=1&nosort=1";
$txt = `curl -s '$url'`;

sub print_list {
        ($l, $d, $v, $txt, $n) = @_;

        $lst = "null";
        @newl = ();
        @curl = ();
        for ($i = 0; $i < scalar @$l and scalar @newl < $n; $i++) {
                if ($lst != $$l[$i]{$v}) {
                        push @newl, sort { $b->{votes} <=> $a->{votes} } @curl;
                        @curl = ();
                }
                push @curl, ($$l[$i]);
                $lst = $$l[$i]{$v};
        }
        print "<p align=\"$d\">\n";
        print "<b>$n $txt</b><br>\n";
        for ($i = 0; $i < scalar @newl; $i++) {
                if ($i != 0 and $newl[$i]{$v} == $newl[$i-1]{$v}) {
                        $tied = " (tied) ";
                } elsif ($i != scalar @newl - 1 and $newl[$i]{$v} == $newl[$i+1]{$v}) {
                        $j = $i + 1;
                        $tied = " (tied) ";
                } else {
                        $j = $i + 1;
                        $tied = " ";
                }
                $c = $newl[$i]{"cools"};
                $ctxt = "";
                $ctxt = " <b>$c" . "C!</b> " if $c != 0;

                print "$j$tied\[$newl[$i]{name}\]$ctxt<br>\n" if $d eq "left";
                print "$ctxt\[$newl[$i]{name}\]$tied$j<br>\n" if $d eq "right";
        }
        print "</p>\n\n";
}

@wutxt = split(m|\</wu\>|s, $txt);
@wus = ();
@wus_votes = ();

foreach $w (@wutxt) {
        $cools  = 0; 
        $up     = 0;
        $down   = 0;
        $name   = "";

        $cools  = $1 if $w =~ m/cools="([0-9]+)"/;
        $up     = $1 if $w =~ m/up="([0-9]+)"/;
        $down   = $1 if $w =~ m/down="([0-9]+)"/;
        $name   = $1 if $w =~ m/>([^(<>]+) \([^\)]*\)</;
        next if $name eq "";
        $votes  = $up + $down;

        if ($votes == 0) {
                $goodness = "undefined"; 
        } else {
                $goodness = $up / $votes;

                push @wus_votes, ({cools => $cools, ups => $up, downs => $down,
                                rep => $up - $down, votes => $votes,
                                goodness => $goodness, name => $name});
        }
        push @wus, ({cools => $cools, ups => $up, downs => $down,
                        rep => $up - $down, votes => $votes,
                        goodness => $goodness, name => $name});
}

$gmt = gmtime();

print "(List generated $gmt GMT ";
print "by the [clientdev: Homenode List Generator|Homenode List Generator].\n";
print "Goodness is the percentage of votes that are upvotes.)\n";
@sorted = sort { $b->{votes} <=> $a->{votes} } @wus;
print_list(\@sorted, "right", "votes", "Most Voted-Upon Writeups", $list_length);
@sorted = sort { $a->{votes} <=> $b->{votes} } @wus;
print_list(\@sorted, "left", "votes", "Least Voted-Upon Writeups", $list_length);
@sorted = sort { $b->{goodness} <=> $a->{goodness} } @wus_votes;
print_list(\@sorted, "right", "goodness", "Highest Goodness Writeups", $list_length);
@sorted = sort { $a->{goodness} <=> $b->{goodness} } @wus_votes;
print_list(\@sorted, "left", "goodness", "Lowest Goodness Writeups", $list_length);
@sorted = sort { $b->{rep} <=> $a->{rep} } @wus;
print_list(\@sorted, "right", "rep", "Most Reputable Writeups", $list_length);
@sorted = sort { $a->{rep} <=> $b->{rep} } @wus;
print_list(\@sorted, "left", "rep", "Least Reputable Writeups", $list_length);


1 The title suggested by an insulting softlink ("You have far too much time on your hands") of clientdev: How to predict your position in the Other Users nodelet. A message to this Wildean rapier wit: I spent thirty minutes writing the code that later became one of my most well-received writeups. You spent ten minutes hitting reload. Who really has far too much time on their hands, you silly twat?

2 If you are really dying to get list output now, then change your password to a temporary one, /msg me with this password and what list length you want, and I will run the script for you and post the results in my scratchpad. I have done this for TheBooBooKitty.

Log in or register to write something here or to contact authors.