<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Userscripts.org Blog</title>
    <description>What's going on at Userscripts.org</description>
    <link>http://userscripts.org/articles</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Progress</title>
      <description>&lt;p&gt;Implemented several requests and am planning several other features/fixes thanks to your input.&lt;/p&gt;&lt;p&gt;I think the new feedback tab has worked out pretty good.  I dislike that it requires a new user account with uservoice (the service that I'm using), but it was much quicker than implementing the service myself, allowing me to focus on fixing the site.&lt;/p&gt;&lt;p&gt;So far the fixed list includes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;unmonitoring of topics in the forum works&lt;/li&gt;&lt;li&gt;don't allow flash embeds in comments/forums&lt;/li&gt;&lt;li&gt;show the time a userscript was uploaded as well as the last update time&lt;/li&gt;&lt;li&gt;fixed logged exceptions rails plugin so admins can see when issues occur&lt;/li&gt;&lt;li&gt;comments are editable&lt;/li&gt;&lt;li&gt;users can delete their own comments&lt;/li&gt;&lt;li&gt;comment creation/editing uses forum bottom box style&lt;/li&gt;&lt;li&gt;a link to add a comment at the top of the userscript's comment list&lt;/li&gt;&lt;li&gt;updated links to beast (forum software) and famfamfam (icons)&lt;/li&gt;&lt;li&gt;remove users who haven't verified their email (unactivated) after 3 days&lt;/li&gt;&lt;li&gt;expose comment feed on userscripts page&lt;/li&gt;&lt;li&gt;expose feeds of updates to your favorite scripts and comments on all your scripts (see /users/me after you login)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I plan to keep fixing things as fast as possible, so keep telling me what needs fixed.&lt;/p&gt;</description>
      <pubDate>Sun, 25 May 2008 07:00:35 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:11</guid>
      <link>http://userscripts.org/articles/11-progress</link>
    </item>
    <item>
      <title>Feedback Redux</title>
      <description>&lt;p&gt;The site has been stable for a while, now lets start improving it.&lt;/p&gt;&lt;p&gt;Hi guys.  My name is Jesse, and I apologize.  I haven't been as responsive as I should with dealing with issues on the site.  To that end I've integrated a service called &lt;a href="http://uservoice.com"&gt;uservoice&lt;/a&gt; that will help me build what you say is missing from userscripts.org!&lt;/p&gt;&lt;p&gt;Our &lt;a href="http://userscripts.uservoice.com/"&gt;feedback page&lt;/a&gt; at uservoice allows you to add issues and vote on which are the most important.&lt;/p&gt;</description>
      <pubDate>Mon, 12 May 2008 06:34:37 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:10</guid>
      <link>http://userscripts.org/articles/10-feedback-redux</link>
    </item>
    <item>
      <title>Hotlinking of Unlisted Scripts Disabled</title>
      <description>&lt;p&gt;Disabling hotlinking for unlisted scripts means they cannot be used in bookmarklets.&lt;/p&gt;&lt;p&gt;Scripts that are marked as unlisted are no longer hotlinkable.  &lt;/p&gt;

&lt;p&gt;To install them you MUST visit the script's userscipts.org page, where a unique link to the script is generated for each visitor.  If you try to get the source of an unlisted script using a URL like &lt;a href="http://userscripts.org/scripts/source/20989.user.js"&gt;http://userscripts.org/scripts/source/20989.user.js&lt;/a&gt;, you are given a &lt;b&gt; 403 Forbidden&lt;/b&gt; page.&lt;/p&gt;

&lt;p&gt;I've also posted a page &lt;a href="http://userscripts.org/about/unlisted"&gt;about unlisted scripts&lt;/a&gt;.  As we move forward this page will be updated (as will other pages about userscripts.org as we allow other users to edit them.)&lt;/p&gt;

&lt;p&gt;Britt has implemented a badwords filter that will automatically unlist scripts that contain certain words (orkut or scrap for example).  It will be activated Sunday.  If you have a valid script that is unlisted due to the filter, contact us and we will relist it.  This is an interim solution until we have the karma system in place.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;UPDATE&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The "dirty word" filter is in place.  and it has been a day without having to review scrap all scripts!  Instead I'm dealing with lots of emails from those users and having to explain disabling hotlinking doesn't break a Greasemonkey script - it breaks using it as a bookmarklet.  So you script still works...&lt;/p&gt;</description>
      <pubDate>Sun, 27 Jan 2008 13:10:34 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:9</guid>
      <link>http://userscripts.org/articles/9-hotlinking-of-unlisted-scripts-disabled</link>
    </item>
    <item>
      <title>Script Reviews</title>
      <description>&lt;p&gt;The last straw happened this evening.  Reviews are coming this weekend!  Help plan them here.&lt;/p&gt;&lt;p&gt;The basics: unreviewed scripts CAN be installed by logged in users only...  On the rails side I'll catch the request and send a 403 FORBIDDEN if the user isn't logged in.&lt;/p&gt;

&lt;p&gt;Why?  Because people are uploading scripts *cough* scrap all *cough* whose only purpose on the site appears to be a hosting service for them.  They then use the userscripts as a component of a bookmarklet.&lt;/p&gt;

&lt;p&gt;So - what does this mean?&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Every&lt;/b&gt; script needs reviewed before it is public.  If you are logged in you can see/install everything...  &lt;/p&gt;

&lt;p&gt;So, why has it taken this long?  Well, the question I have is: Who determines if a script is acceptable?  I neither can nor want to review hundreds of scripts a week.  Obviously when a script is updated the changes will need to be accepted before they are public.&lt;/p&gt;

&lt;p&gt;Are the reviewers a selection of a bunch of trustworthy users?  &lt;/p&gt;

&lt;p&gt;Do we make it so anyone can, but certain users have more weight (eg, the more karma you have the more your vote counts)?  And add a delay between upload and acceptance if only "weak" users have rated it...  giving time (a day?) for other users to see it and vote to reject?&lt;/p&gt;

&lt;p&gt;&lt;b&gt;UPDATE&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I wrote this in utter frustration.  After you comments and emails we implemented hiding of scripts with "dirty words" - see &lt;a href="http://userscripts.org/articles/9-hotlinking-of-unlisted-scripts-disabled"&gt;Hotlinking of Unlisted Scripts&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Jan 2008 10:52:33 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:8</guid>
      <link>http://userscripts.org/articles/8-script-reviews</link>
    </item>
    <item>
      <title>Communities Idea</title>
      <description>&lt;p&gt;Communities are what happens when tags grow up ;)  Here is the current idea and some questions.&lt;/p&gt;&lt;p&gt;First, the "news" section of the site is now the "userscripts blog", and technorati is making me register it as a blog by doing this: &lt;a href="http://technorati.com/claim/2s83jq9xxk"&gt;Technorati Profile&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Ok, now that is out of the way, lets talk about Communities, with a capital C.  &lt;/p&gt;

&lt;p&gt;First, what do we hope to accomplish with communities?  &lt;/p&gt;

&lt;p&gt;I think the site is divided into two groups, developers and users.  Right now there are ways to comment on individual scripts, and to have discussions in a global forum.  This micro and macro discussions miss the sweet spot, which I think is discussions between users and authors of scripts in a general area.  &lt;/p&gt;

&lt;p&gt;I hope to add areas where communities can talk about how they are using scripts, ideas for scripts, and also developers talking shop about developing script.  &lt;/p&gt;

&lt;p&gt;To that end, a community is centered around a tag.  This means the community might be about a specific site (twitter, gmail, facebook, ...), or around a general area (video, ads, books), or even a group of people who decide to use the same tag.  &lt;/p&gt;

&lt;p&gt;When viewing a tag page, logged in users will be able to click "create a community around this" which will allow them to fill in a description about the community. The community is then created, with two forums (users and developers), scripts list, and membership list. Anyone can join the group (all groups are going to be public at first, if we need to create private groups we can cross that bridge when we get there), and anyone can add their scripts to the group by tagging it with the communities' tag (all scripts tagged with the communities tag in the script list)&lt;/p&gt;

&lt;p&gt;The description will be a wiki, where members can edit it (with history being maintained).  &lt;/p&gt;

&lt;p&gt;The major open questions to be determined before it is released that I have are:&lt;/p&gt;

&lt;p&gt;1) how does a community add scripts that others wrote, since only the authors can currently tag scripts?&lt;/p&gt;

&lt;p&gt;2) how does a community rank scripts?  (so they can highlight the useful ones)&lt;/p&gt;

&lt;p&gt;3) this is related to #2, but how can a community remove scripts they don't want that are tagged with their name?&lt;/p&gt;

&lt;p&gt;I want to build these so the community members are in control, as the last thing I want is to moderate and judge hundreds of communities!&lt;/p&gt;

&lt;p&gt;What questions / ideas do you have?&lt;/p&gt;</description>
      <pubDate>Sat, 29 Dec 2007 04:09:22 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:7</guid>
      <link>http://userscripts.org/articles/7-communities</link>
    </item>
    <item>
      <title>Vague Scripts</title>
      <description>&lt;p&gt;I've added the required code to the database, search engine, and user interface to support hiding of scripts, 1632 scripts so far.  Also, you can flag a script as vague...&lt;/p&gt;&lt;p&gt;The 1632 scripts were mostly &lt;em&gt;scrap all&lt;/em&gt; scripts.  I've not gotten them all, but a good start. &lt;/p&gt;

&lt;p&gt;Instead of deleting the scripts, since their are people using them (ugh), I've added a unlisted flag (like flickr's "NSIPA" - not shown in public areas), which removes the scripts from browsing, search, and other public areas.  If you go to the script by url, or by visiting the owner's page and then view a list of their scripts, it will still be there.&lt;/p&gt;

&lt;p&gt;I've also added an option to flag a script as &lt;b&gt;vague&lt;/b&gt;.  If the summary, description or title aren't useful to understand what the script is, then flagging it as vague will put it in a list for admins to determine if the script should be unlisted.&lt;/p&gt;

&lt;p&gt;Features such as searching including unlisted scripts, and only showing unlisted scripts is still to come, but I wanted to make the site semi-useful again.&lt;/p&gt;

&lt;p&gt;As always, ideas for how to make the site better are welcome :)&lt;/p&gt;</description>
      <pubDate>Tue, 25 Dec 2007 02:10:51 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:6</guid>
      <link>http://userscripts.org/articles/6-vague-scripts</link>
    </item>
    <item>
      <title>"Scrap All" Defense Plan</title>
      <description>&lt;p&gt;Now that the site has been upgraded to the current version of rails, I can move forward with making it so the "Scrap all" plague doesn't kill the site.

This involves: 

1) adding non-public flags to scripts so they don't get shown in public areas 

2) adding a "group/community" feature&lt;/p&gt;&lt;p&gt;The &lt;em&gt;Scrap All&lt;/em&gt; "attack" is relentless; the result being a denial of service attack against the regular users of userscripts.  &lt;/p&gt;

&lt;p&gt;I see 2 issues:&lt;/p&gt;

&lt;p&gt;1) Making it so new/unwanted scripts don't flood the common area&lt;/p&gt;

&lt;p&gt;The front page, and browsing of scripts has always sucked, but when you get a flood of unwanted scripts, the design flaws cause hte site to be non-functional.  People have always uploaded personal/testing scripts, causing frustration, but the velocity at which &lt;em&gt;scrap all&lt;/em&gt;&lt;em&gt; keeps coming has pushed it over the top and requires a new design.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One part of my proposed solution would be the ability to mark scripts as "non-public."  Those scripts would not be shown in: script search, the home page, browsing through the scripts page, or browsing by tags.  They would still be visible at their url, and linked from the authors page.  (and there will be the ability to choose "show all" which will include non-public scripts as well)&lt;/p&gt;

&lt;p&gt;Phase 1 of this part of the solution would be taking flagged scripts and then admins using their judgement on if they should be hidden (eg, we don't want to hide a good script just because a single user voted to hide it).  The purpose will be to hide all the scrap all, and other test scripts.&lt;/p&gt;

&lt;p&gt;Phase 2 will be voting by the community.  So when a script is down voted enough it will disappear from the public.  I'm not sure the exact mechanics/rules of this yet.  Discussion is welcome!&lt;/p&gt;

&lt;p&gt;2) Making it easier to find scripts you want.&lt;/p&gt;

&lt;p&gt;Even if we fix the problem of unwanted scripts appearing on the homepage, the site still is not very navigable.  &lt;/p&gt;

&lt;p&gt;To fix this I think creating "groups/communities", where scripts and discussions about the scripts can occur.  These communities might be around a site (flickr, gmail, google, twitter, livejournal, orkut, ...), or they might be around a topic (better search, libraries, books, pictures).&lt;/p&gt;

&lt;p&gt;Scripts can be added by members of the group.  The group can choose what scripts they want, and what ones are hidden.  &lt;/p&gt;

&lt;p&gt;Discussion boards for both users, as well as about script development for the site.&lt;/p&gt;

&lt;p&gt;&lt;hr /&gt;&lt;/p&gt;

&lt;p&gt;Please discuss if you have opinions/ideas on how improving the experience!&lt;/p&gt;</description>
      <pubDate>Sun, 23 Dec 2007 07:00:55 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:5</guid>
      <link>http://userscripts.org/articles/5-scrap-all-defense-plan</link>
    </item>
    <item>
      <title>Flagging spam / bad scripts</title>
      <description>&lt;p&gt;Userscripts.org has long needed a way to mark content (scripts/comments/...) as spam/malware/...  Today the feature has been deployed!&lt;/p&gt;&lt;p&gt;The final push to deploy the &lt;b&gt;&lt;img src="http://userscripts.org/images/flag_red.png" /&gt;Flag this as spam/malware&lt;/b&gt; is done.&lt;/p&gt;&lt;p&gt;It isn't perfect, not everything can be flagged yet (&lt;a href="http://userscripts.org/forums/3/topics/1362"&gt;forum discussion for improvements&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;Currently you can flag a script or comment as spam or malware.&lt;/p&gt;</description>
      <pubDate>Wed, 28 Nov 2007 07:37:52 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:4</guid>
      <link>http://userscripts.org/articles/4-flagging-bad-scripts</link>
    </item>
    <item>
      <title>Superior Searching </title>
      <description>&lt;p&gt;Searching for userscripts used to be slow and only search the descriptions.  Now searching uses SOLR and searches names, summary, descriptions and source.&lt;/p&gt;&lt;p&gt;Searching on this site always sucked, for you and me...  Every day I get a report of the the performance of the site (rails performance analyzer).  I always see:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
Slowest Request Times:
	ScriptsController#search took 69.622s
	ScriptsController#search took 64.092s
	ScriptsController#search took 55.131s
	ScriptsController#search took 49.324s
	ScriptsController#search took 48.399s
	ScriptsController#search took 47.859s
	ScriptsController#search took 45.436s
	ScriptsController#search took 44.657s
	ScriptsController#search took 43.686s
	ScriptsController#search took 42.745s
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;70 seconds for a search!!!  That is bad for everyone - who wants to wait for over a minute for results, and I have to make it scale.  Luckily the average search time is less than a second (here are the stats for the last day):&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
                                         	Count	Avg	Std Dev	Min	Max
ScriptsController#search:                   	12366	0.728	2.256	0.128	69.622
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;I had been hoping Henrik would have time to add acts_as_solr to the site since he is doing lots of cool stuff with it on other rails projects, but alas, he is busy.  So I rolled up my sleeves, and released solr based search.  &lt;/p&gt;

&lt;p&gt;The search order is currently only ranked on the prevalence of the search in the document (ignoring number of favoritings, installs, comments, ...) but it is a start.  Once this is stabilized adding better sorting shouldn't be too hard.&lt;/p&gt;

&lt;p&gt;Now if only the front page didn't suck so bad...  ;)&lt;/p&gt;</description>
      <pubDate>Sat, 20 Oct 2007 07:46:13 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:3</guid>
      <link>http://userscripts.org/articles/3-searching-userscripts-solr</link>
    </item>
    <item>
      <title>Happy Mongrels</title>
      <description>&lt;p&gt;Scaling userscripts.org has been a fun journey.  Thanks to monit, it has become a much easier journey.&lt;/p&gt;&lt;p&gt;&lt;img src="http://userscripts.org/images/articles/memory-week.png" alt="memory usage for last week" /&gt;&lt;/p&gt;

&lt;p&gt;You may notice on the 16th, memory usage decreased dramatically.  Userscripts.org had a problem, the code that generates those nice colorized views of the scripts leaks memory.  Massive amounts of memory.  I'm not sure if it is the fault of coderay, hpricot, something I'm doing or ...  but trying to colorize 20KB userscripts makes mongrels (application servers for rails) grow by hundreds of megabytes.&lt;/p&gt;

&lt;p&gt;For a long time I would log in periodically and restart everything so that the mongrels  didn't grow to consume more memory than we have.  I messed up a few times in the last couple months and the server would start swapping and the site go down.&lt;/p&gt;

&lt;p&gt;Not any more.  Thanks to &lt;a href="http://www.tildeslash.com/monit/"&gt;monit&lt;/a&gt;, I've got some simple rules that will keep the dogs at bay.&lt;/p&gt;

&lt;p&gt;I have 10 rules like this in my /etc/monit/monitrc:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
check process uso_mongrel_4000 with pidfile /home/deploy/app/shared/log/mongrel.4000.pid
   group uso_mongrel
   start program = "/usr/bin/mongrel_rails cluster::start -C /home/deploy/app/current/config/mongrel_cluster.yml --clean --only 4000"
   stop program = "/usr/bin/mongrel_rails cluster::stop -C /home/deploy/app/current/config/mongrel_cluster.yml --only 4000"
   if failed port 4000 protocol http
     with timeout 10 seconds
     for 2 cycles
     then restart
   if totalmem &gt; 100 Mb then restart
   if cpu is greater than 60% for 2 cycles then alert
   if cpu &gt; 80% for 3 cycles then restart
   if loadavg(5min) greater than 10 for 8 cycles then restart
   if 3 restarts within 5 cycles then timeout
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The result is that every few hours, someone renders a page that causes mongrels to leak massive amounts of memory, but monit restarts them within a minute.  Right now we are running 10 mongrels, so even if one is down, site performance isn't effected.&lt;/p&gt;

&lt;p&gt;Deploying a new copy of the code is still easy:&lt;/p&gt;

&lt;p&gt;&lt;ol&gt;&lt;li&gt;Check new code to my local git repository&lt;/li&gt;&lt;li&gt;Push my changes to my git server&lt;/li&gt;&lt;li&gt;cap deploy&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;

&lt;p&gt;To keep capistrano and monit from fighting I needed to switch from palmtree using mongrel_cluster to restart to using monit.  I updated my deploy.rb file removing palmtree and adding:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
set :monit_group, 'uso_mongrels'

namespace :deploy do
  desc "Restart the Mongrel processes on the app server by calling restart_mongrel_cluster."
  task :restart, :roles =&gt; :app do
    sudo "/usr/sbin/monit restart all -g #{monit_group}"
  end
end
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Now those are some happy dogs!&lt;/p&gt;</description>
      <pubDate>Fri, 19 Oct 2007 01:41:04 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:2</guid>
      <link>http://userscripts.org/articles/2-scaling-a-rails-site</link>
    </item>
    <item>
      <title>Server Upgrades</title>
      <description>&lt;p&gt;There have been a few hiccups in the last week userscripts.org as it has been moved to a new server, new http server, feeds have been deployed and a power outage.&lt;/p&gt;&lt;p&gt;There's been a lot of activity on userscripts.org lately (a lot of it behind the scenes).  &lt;/p&gt;

&lt;p&gt;&lt;b&gt;New Server&lt;/b&gt;: Userscripts.org is hosted at &lt;a href="http://serverbeach.com"&gt;serverbeach&lt;/a&gt;.  The recent changes (new parsing and code highlighting specifically) substantially increased memory usage.  Unfortunately the only choice was to upgrade to a new server (since the ram wasn't available for our current server).  So, we are now on a faster box, with 3GB ram.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;New HTTP Server&lt;/b&gt;: We've been using lighttpd for a while now.  It has done a good job, but not perfect.  The rules for being a reverse proxy, checking filesystem based cache, and serving static content were getting convoluted.  Luckily Nginx (pronounced engine-x) is a great replacement.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Feeds&lt;/b&gt;: Fixing the above issues meant we could start rolling out features that might have caused scalability issues.  There are 2 feeds per user (comments on scripts you've written and updates to your favorite scripts), and 1 feed per script (comments), which means we went from having a handful of feeds to tens of thousands of them.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Power Outage&lt;/b&gt;: There was a power outage sometime last night.  :(&lt;/p&gt;</description>
      <pubDate>Tue, 03 Jul 2007 01:29:14 -0000</pubDate>
      <guid isPermaLink="false">userscripts.org:article:1</guid>
      <link>http://userscripts.org/articles/1-server-upgrades</link>
    </item>
  </channel>
</rss>
