Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Slashdot.org

red5's Journal: Six Degrees of CmdrTaco 41

Journal by red5
Tonight the guys from work went out partying at the strip club. I opted to stay home for reasons I've already shared in a previous JE. In my massive amount of free time I decided to make a script to breakdown the six degrees of separation between CmdrTaco and the users of this blog. Code is here. The Results are here.

The code well not the greatest I've made can easily be modified to break down the N degrees of separation for any user. Enjoy. :)

Update Friday Sept 6th
This morning I went to read /. and my IP was banned. I didn't realize that my script would cause that much trouble. Don't run it or you will be banned too. You have been warned.
This discussion has been archived. No new comments can be posted.

Six Degrees of CmdrTaco

Comments Filter:
  • I'm level 4. Pretty good, but I've got to get to work on decreasing that. I mean, it is a measure of my worth, isn't it? :)
    • by turg (19864)
      I'm level 4 too. But I don't remember playing the first three levels.
      • I'm level 4 too. But I don't remember playing the first three levels.

        I'm level 4, but I remember the first two.

        Level 1 was being here in September of 1997, before it actually became live.

        Level 2 was being one of the first 100 to have a user account (How many people remember /. pre-User account?), and contributing quite a bit.

        Level 3 I think has something to do with the Troll Investigation thread. I finally got my $rtbl lifted (or at least I can meta-mod again)
        • by red5 (51324)
          Level 2 was being one of the first 100 to have a user account (How many people remember /. pre-User account?), and contributing quite a bit.

          If you were among the first 100 then why is your UID 13482. Thats a little > 100 doncha think?
          • If I recall correctly, from the "old-timers" talking, the user accounts were wiped out once upon a time, long, long ago.
            • by red5 (51324)
              That splains it. They probably just reimported in alphabetical order and his username starts with an X...

              What ever happened with those ... err "pictures" I sent you. ;)
              • Nah - I was just lazy. I don't think I created my user account till mid 1998, but I don't remember. It was around the time that moderation started happening, so that I could save filtered settings. Before then I had no desire to maintain an account because I didn't post all that often.

                This comment is #1432 :)
              • What ever happened with those ... err "pictures" I sent you. ;)

                After 6 hours of downloading, there was an error in decompressing. :( I'll try again when I get home tonight. You know, it would take awfully high resolution pictures to actually consume that much of my poor little hard drive. :)
            • Yes -- they were. That was still in 1997 in the very beginning of the user accounts. I was just too lazy to create one. I didn't start posting for a while after. Slashdot turns 5 soon. I didn't really start reading Slashdot until January of 1998, when I had a job that warranted me sitting in front of a computer with network access all day though :)
  • ...so what spells will that let me cast? :-)
    • I'm also a level 3. Here are some spells that I've been working on:

      Summon Troll

      Flame of Flamer

      Wave of Irrelevency

      I've heard from a level 1 mage that when you hit level 2 you can get Karma Gain. I have also seen some people cast Spirit of Cowboy Neil so I know that must be coming in a near level.

    • Apparently once you hit level 0 you get "powers. Secret powers." :)
    • ...so what spells will that let me cast?
      More than that, if you defeat a level'er above you in combat, then you should get to swap with his/hers/its place!

      Think of the implications!
      Think of the contests!
      Think of the glory!!!

      Any robots make the list? What if you were a lower level than a robot? Would it be better to just start posting randomly?!

  • Kudos for the idea and setting it up. I'm thinking of setting that up to nightly capture everyone on my fans list and allowing a db search, but I Think that may piss off Taco :)
    • Grabbing the first 4 levels isn't all that bad since you only had to download about 200 friends lists. The difference between 4 and 6 is huge compared to the difference between 2 and 4.

      If you wan't to make a 6 degrees of Xerithane script. You can capture the first 4 levels. Then when a user puts in his name you can grab upto two levels in reverse and try to match it up. :)
      • Maybe we could just ask Taco and crew to release a database dump of the friend/foe lists, and the user_id => login map. Make life a lot easier :)
        • Maybe we could just ask Taco and crew to release a database dump of the friend/foe lists, and the user_id => login map. Make life a lot easier.

          I fail to see how getting laughed at will help anything. :)
          • I fail to see how getting laughed at will help anything. :)

            Give us the list, or we'll get it ourselves with wget scripts! *Bwahahahaha*
    • I'm thinking of setting that up to nightly capture everyone on my fans list and allowing a db search, but I Think that may piss off Taco :)


      I would just be happy if the lists (fans / freaks) could periodically be checked and have compares done on them to detect any changes. ^_^

      (or alternatively if /. just sent a message when ever somebody changed their status in regards to you)
      • (or alternatively if /. just sent a message when ever somebody changed their status in regards to you)
        This has already been suggested many times :)
  • Few! I'm almost a lowly maggot, but not quite!
    • by Dthoma (593797)
      And I can't believe I spelt "phew" phonetically, either ;-)
    • At least you have cool number. Five is the cooliest number known to man. As for you sig and my most moderated comment... I've had a few but this the first that comes to mind [slashdot.org]

      Oh and don't run the script. It put's a lot of load on /.
      You posted right before I added the disclamer to my JE I thought I aught to warn you.
  • Please put a "sleep 10" or something before the request() call, so you don't flood Slashdot. Not to sleep at all is really rude.

    Nice use of tail recursion but wouldn't it be just as easy to do a for loop? :)

    • Please put a "sleep 10" or something before the request() call, so you don't flood Slashdot. Not to sleep at all is really rude.

      Done. Sorry about the flood.

      Nice use of tail recursion but wouldn't it be just as easy to do a for loop? :)

      I suppose I should, but where's the fun in that. I had it doing a left most branch search at first (till I realized thats not what I wanted). When I restructured it to do one level at a time I forgot to switch.
      • Cool. Thanks!
        "I had it doing a left most branch search at first (till I realized thats not what I wanted). When I restructured it to do one level at a time I forgot to switch."

        The really clever thing would be to scan backward from /~destuser/fans/, interleaved with your scanning forward from /~srcuser/friends/. I believe it's more DB-intensive for us to generate the /fans/ list (correct me if I'm wrong, Brian :) but unless I miss my guess, this should find the connections roughly twice as fast.

        Also, if the destination user has never been marked as anyone's friend, you will know to terminate the search. :)

        • The really clever thing would be to scan backward from /~destuser/fans/, interleaved with your scanning forward from /~srcuser/friends/. I believe it's more DB-intensive for us to generate the /fans/ list (correct me if I'm wrong, Brian :) but unless I miss my guess, this should find the connections roughly twice as fast.

          Yes I mentioned something like that in the thread with Xerithane. The thing is this was never meant to be an iteractive script going from user a to user b. It's more of a batch going from user a to the all of /.

          I'd imagine it would be a little more than twice as fast on average as you deal with half the recursion and recursion adds users exponential.

          Also, if the destination user has never been marked as anyone's friend, you will know to terminate the search. :)

          If I ever make an interactive script it's so going to do that. If for nothing else It would be fun to display an error like "You're a loser and nobody likes you." Okay maybe thats just mean. :)

          I downloaded the CVS for slash. If I were to clean up the code and apply the same conventions would you guy consider adding it to slash?

          On second thought that sounds like a bad idea. I figure way too many people would sit there trying to connect Micheal to FortKnox or Seth. All the while thinking how funny and original they are. Though it would be fun to post in the middle of a flame thread something like: "User a is friends with User x Who is friends With User y Who in turn is friends with User b. So shake and make up you guys are practicaly brothers."
  • by krow (129804)
    If you used XML::RSS you could get the data out of the page a little bit easier (aka simplify this task a bit). I would also just mine the entire thing to a public DB if you want to make people's lives a little safer for mining the data.

    A nice little GD graph would be pretty cool too.

    • If you used XML::RSS you could get the data out of the page a little bit easier (aka simplify this task a bit). I would also just mine the entire thing to a public DB if you want to make people's lives a little safer for mining the data.

      Thanks. I tried XML::Parser at first but It looked way to complicated. Granted it was 4:30 in the morning and I was a bit tired. I kept looking for an XML module that would just give me a structure. I didn't know about XML::RSS. Though in hiensight I should have searched for RSS.

      A nice little GD graph would be pretty cool too.

      I was thinking of making a table breakdown with nested <UL> that way people could easliy find thier path.
    • This is completely OT but since this is my journal I can do this with out fear of moderation. Mo Ha Ha!

      I just noticed the changes to zoo.pl. Very nice. I like them a lot.

      Well that's it. Thanks.
      • Its your journal you can do whatever you want, that was the point :)

        Thanks, there are a couple of more features I am going to add over the next couple of weeks. Like I have the code done to let you compare yourself to someone else (aka see how many of you friends and such match). Not sure what else I will add to it.
        • Thanks, there are a couple of more features I am going to add over the next couple of weeks. Like I have the code done to let you compare yourself to someone else (aka see how many of you friends and such match).

          Your Welcome. I'll look forward to them.

          Not sure what else I will add to it.

          Well now that you mention it. :)
          I'm not sure if this counts as a bug or not. I noticed that in coments.pl the blue and green dots get clobbered by the pills. Like when I look at a comment by freaq(friend|fan) I get the two dot's but when I look at a comment by Xerethane(friend|fan|fof) I get the green pill. Shouldn't that be the other way around? Shouldn't first level relationships (friends/fans foes/freaks) take precedence over second level ones(fof/eof)?

          Anyhow thats probably a comments.pl thing and thus not your code and not your problem. :)
          • Turns out that the comments one was an older bug (just found it). It will probably get patched this evening.

            The one thing I may do is the "how many steps does it take till I am connected to another person". Just need to come up with a way to do it that doesn't kill the database in the process (or kill one other then the main DB like the search one). The code for just comparing your to another user is done, I have just yet to decide where it will go.
            • Turns out that the comments one was an older bug (just found it). It will probably get patched this evening.

              Now was that because of little old me or the bugreport FortKnox submitted this morning?

              The one thing I may do is the "how many steps does it take till I am connected to another person". Just need to come up with a way to do it that doesn't kill the database in the process (or kill one other then the main DB like the search one). The code for just comparing your to another user is done, I have just yet to decide where it will go.

              That'll be way rad. Well if I were you I'd put it on it's own server called bacon.slashdot.org as a nod to the oracle of bacon [virginia.edu].

              Also if you still looking for ideas. Wouldn't it be cool if when you clicked the pills it showed the users that link you. For example if I were to click on the green pill next to mekkab I'd get Em Emalb and forged. It just seems logical as the first thing I think of when I see the pills is "cool how do I know this guy?". You probably thought of that already though.

              Anyhow the friends/foes system just rocks in general. I think slashdot wouldn't be nearly as much fun without it. So mad props to you sir!
            • Ref: Dijksta's algorithm

              Singe Source Shortest Path [rochester.edu]. You're dealing with a directed graph in this case, and it's segmented, so you're not assured to find a solution. That said if a solution exists it can be found at best in less that N^2 but no better than O(|E| log N), but I'm sure you already knew that.

              -s.
              • Dijkstra's algorithm is useful when edges have differing weights, does not work well when accessing the list of edges attached to each node has significant cost, and as you note is designed to find a solution known to exist. That makes it completely unhelpful for this problem.
  • Okay, I'm level 4, that's pretty cool. But how do I find out what my path is, like you did?
    • Look at your fans list and see who on there is a level 3. Look at their fans list and see who's level 2 and so on.
      • Ah, got it, very cool. (friend/foe/fan/freak could really use more obvious buttons, like maybe when one is editing one's preferences)


        Anyway, looks like I'm CmdrTaco - Robogoatgruff - caferace - Hadlock - Galvatron

        • Ah, got it, very cool. (friend/foe/fan/freak could really use more obvious buttons, like maybe when one is editing one's preferences)

          Yeah there's no way to get there without typing in the location bar. A link somewhere would be nice.

          Well anyway. I'm glad you liked my script and thanks for posting. :)

I am not now, nor have I ever been, a member of the demigodic party. -- Dennis Ritchie

Working...