1. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!
  2. Welcome to Smogon Forums! Please take a minute to read the rules.

Programming Peer editors: How to get lazier

Discussion in 'Technical Projects' started by Sarenji, Jun 8, 2010.

  1. Sarenji

    Sarenji leaf-faced
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnusis a Researcher Alumnusis a Contributor Alumnus

    Joined:
    May 16, 2005
    Messages:
    362
    What annoyed me greatly when peer editing analyses or articles was the time it took. I hated how I had to write out little dumb BBCode when fixing small stuff. I don't care about writing little dumb BBCode, and I'm sure you don't either.

    So I found a diff script by Google and wrote a wrapper around it to turn the diff tool's output into BBCode. In English: This marks every change you made in a peer edit, for you. ♥

    http://shaym.in/apps/diff/

    How to use:

    • The original analysis/article goes in the Original textbox. Your edited version goes in the New textbox.
    • Press "Diff!"
    • Copy the BBCode. Post it.
    • Cry tears of happiness for lazy programmers.
  2. Ray Jay

    Ray Jay "The sky's the limit, okey-dokey!"
    is a Site Staff Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnus
    Mentor

    Joined:
    May 20, 2010
    Messages:
    1,692
    Works great from what I can tell, and wow, what a pun in that website name.
  3. Snorlaxe

    Snorlaxe 2 kawaii 4 u
    is a Contributor Alumnus

    Joined:
    Jun 21, 2009
    Messages:
    2,230
    Eh, I'll still probably edit traditionally, but this still looks quite cool, thanks! :)
  4. Zystral

    Zystral めんどくさい、な~
    is a Contributor Alumnusis a Smogon Media Contributor Alumnus

    Joined:
    Apr 16, 2009
    Messages:
    1,610
    whistle and myself, along with one or two other users have had a few problems with this thingymajig, so I'll say now
    it doesn't always work in firefox, and sometimes doesn't work in chrome
    you need to click "Diff!" and hold the button for a while. if that doesn't work try repasting one of the analyses.
    It should work with patience and perseverence.
  5. whistle

    whistle
    is a Forum Moderator Alumnusis a Smogon IRC SOp Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnusis a Past SPL Winner

    Joined:
    Jan 18, 2009
    Messages:
    1,690
    i love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenjii love sarenji

    this makes checking stuff ridiculously easy. i even had word macros for bolding + coloring selected text and just formatting the check would take ages even with those shortcuts. excellent app...

    about the "doesn't work sometime" thing... zystral swears that you can hold it down but either my firefox is worse than his or i just have a lot less patience so it still doesn't work. but i tried it with chrome and it worked. so if you're a primary firefox user and his method doesn't work you could try to see if it works in chrome (or ie i guess or opera or whatever)
  6. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,438
    Hello~ Bumping this with permission from Sarenji~ I went ahead and made some changes with help from Google to the diff app. I'm currently putting it on the public folder of my dropbox. It can be accessed here:

    http://dl.dropbox.com/u/72762463/diffnew.html

    Okay let me take a minute to explain the changes. I've changed it to an Efficiency Cleanup instead of a Semantic Cleanup that was used. ie it should screw up less than Semantic Cleanup. You can try the difference between Efficiency and Semantic Cleanup here. I also added a changable Edit Cost and set it to 3 as a default which I found was the ideal edit cost. Feel free to change it though. Anyway what edit cost means is "Increase computational efficiency by factoring out short commonalities which are not worth the overhead. The larger the edit cost, the more agressive the cleanup." tyvm Google!! LOL.

    I also added the Timeout option which you should pay attention to. It just means how long is taken to diff the thing in seconds. 1sec is the default. You can set it to 0 if whatever you're diffing is very long and 0 Timeout means that unlimited time can be taken to diff it. Warning: During the Timeout, your browser might freeze temporarily till the diffing is complete. I'd suggest using Chrome to diff something if it's super long and you're using 0 Timeout. As a guage or something, I used about 30s for Timeout for this. Can't remember it exactly. Maybe it was more :O

    Anyway the most noticeable change is that I've added color options!!! Blue and Red are the default colors. I can add more options if anyone finds a need for it~! Feel free to suggest more colors. :)

    Anyway as for future plans, I'm going to make the diff app look nicer / style it up. If possible, I'd like to optimize the diffing process ie diff it part by part which might be faster for longer diffs. But my JavaScript knowledge is pretty limited now idk if I can do that >.> Still thinking of a way to escape and allow comments into the diff though! :O!!

    Do post feedbacks/suggestions here or if there's any bug to it (I don't think so??) tl;dr just remember that your browser might freeze for a while if you increase timeout or set it to 0!! Have fun GPing! I hope this is a greater incentive to GP too, haha. :P

Users Viewing Thread (Users: 0, Guests: 0)