http://www.perlmonks.org?node_id=325953

At my university, I'm an undergraduate TA teaching an intro programming class. We got a bit ahead of schedule, so I decided we could have an optional-purely-for-your-own-benefit-no-this-won't-be-on-the-midterm perl lecture, which pretty much everyone seemed to like.

At the end of the lecture, I showed them a few cool perl obfus like Camel Code, Spiraling Quine, Find-A-Func, and Fish Dinner. They wanted to see more, but I honestly couldn't think of any other classics off of the top of my head.

So, I was wondering if it were possible to add a "sort by" field to super-search that would allow a user to sort by reputation instead of by date. Then, someone could enter a query that would amount to sql like "SELECT nodes FROM obfuscations LIKE '' SORT BY reputation LIMIT 100" and see the top 100 obfuscations.

I would dig it, at least.

Replies are listed 'Best First'.
Re: Sort by Reputation in Super-Search?
by jacques (Priest) on Feb 02, 2004 at 19:48 UTC
    I honestly couldn't think of any other classics

    You know, I remember a few nodes that I saw once: There's the music note, Betsy Boop, the Aliens, and, of course, the Larry Wall one (where the code resembled Larry's face). Maybe PerlMonks should make a special section for such jewels.

      Maybe that would be a good solution for future nodes, but how would we deal with the 325k nodes already here?

Re: Sort by Reputation in Super-Search?
by revdiablo (Prior) on Feb 02, 2004 at 22:00 UTC

    Perhaps you can just create your own "obfu" scripts in various humorous shapes with the help of Acme::EyeDrops. Maybe you consider it cheating, but I have a feeling anybody who gets a kick out of obfu will generally also enjoy the module.

      Well, you're missing the point. The point of this post isn't that I want to view more pretty obfus, but more about wanting an easy way to browse them. For instance, I'd be equally interested in viewing the top 100 meditations as I would in viewing the top 100 obfuscations.

        Well, you're missing the point.

        I have been known to miss the point on occasion. 8^) In this case, I thought I was adding something to your quest for Something Interesting To Show The Class... maybe I should have marked my post offtopic, or maybe I just shouldn't have posted at all. I aplogize for the inconvenience.

Re: Sort by Reputation in Super-Search?
by athomason (Curate) on Feb 03, 2004 at 02:37 UTC
    Something very close to this is Best Nodes, which lists the top-rated posts for various time periods. Many of the all-timers are obfus, though AFAIK you can't filter on section.

      You could filter on section, provided you like LWP.

      Grab the best nodes list, and use HTML::TokeParser to filter out the list of links. Then, grab each of those best nodes and do an if($_ =~ /Node Type\: obfuscation/ ) to see if it's an obfu. Of course, the code will return false findings if that pattern is in the body of the searched page (or if this node becomes a best node (unlikely)).

      It's quick, horribly dirty, but it's a perlish, screen scraping solution to the problem. There's probably a million and one ways to do this (most accurate and quickest-to-write/run would be on the back end), but sometimes going about the long way can be worth it. Your perlish and other intellectual skills are often best honed on projects that are more "fun" than they are "work."

      John J Reiser
      newrisedesigns.com

Re: Sort by Reputation in Super-Search?
by Anonymous Monk on Feb 03, 2004 at 08:48 UTC