What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 140 Stack Exchange communities.

Self-edits and retags don't count toward S&W. The former are easy to filter, but what about the latter?

#! /usr/bin/perl

use warnings;
use strict;

sub num_last_editor {
  my($id) = @_;
  open my $fh, "<", "posts.xml" or die "$0: open: $!";

  my $n;
  while (<$fh>) {
    ++$n if /\bPostTypeId="1"/         &&
            /\bLastEditorUserId="$id"/ &&


die "Usage: $0 id-num\n" unless @ARGV == 1;

my $n = num_last_editor qr/\Q$ARGV[0]/;
print "$0: last editor on $n\n";
share|improve this question
Surely this'll take longer than just editing 100 posts would? –  Dominic Rodger Feb 12 '10 at 14:43
If you click on Users > Editors > All and search for your own name, does this not show your total number of edits that do count towards S&W? –  Yuck Aug 25 '11 at 17:50
@Yuck No, for example balpha is listed as 552 edits at the moment but you can see he doesn't have Copy Editor (for 500 edits). –  Matthew Read Sep 13 '11 at 15:25

3 Answers 3

up vote 40 down vote accepted

The community review system shows progress towards badges like Strunk & White, Copy Editor, the Reviewer badges, and Civic Duty. From any review queue, mouse over the progress bar at the top-right corner of the view page and you'll see the badge progress overview:

Badge Progress

Strunk & White is not explicitly listed, but uses the same criteria as Copy Editor. When the Copy Editor counter reaches 80, you should earn Strunk & White.

Since badge progress is tied to the review system, you will need enough reputation to access one of the review queues. Currently, 125 rep on a non-beta site will grant access to the First Posts and Late Posts queues.

share|improve this answer
I must be blind, but "You have edited a total" does not appear on the page (or html source) of stackoverflow.com/review . Did I forget a click? –  phs Jul 21 '12 at 20:50
@phs Pick any queue from the review page, say Close Votes. Hover with your mouse pointer over the progress bar on the right just to the left of the stats, history, and review tabs to display Badge Progress. –  Greg Bacon Jan 28 at 18:07
There will be an even easier way once the new profile changes roll out, but waiting for them to get out of beta before I update. –  Troyen Feb 26 at 22:27

I have added a translation to the live data using the Stack Exchange Data Explorer (SEDE):

How Many Edits Until Strunk & White

The code is:

DECLARE @UserId int = ##UserId##

SELECT 80 - COUNT(*) AS 'Edits To Strunk & White' FROM Posts
WHERE PostTypeId = 1
AND   LastEditorUserId = @UserId
AND   OwnerUserId != @UserId?
share|improve this answer
I get -4266. LOL –  Jon Seigel Jun 24 '10 at 17:51
And that's accurate! You're -4266 edits away from when you got it. :-) –  artlung Jun 24 '10 at 18:17
Yeah, I know, that's why I'm laughing about it. :) I had no idea how many edits I'd actually made. Turns out it's quite a lot. –  Jon Seigel Jun 24 '10 at 20:35
@Jon: According to a rough count, you're second in edits with a ways until first. –  Gnome Oct 20 '10 at 23:18
Why filter on PostTypeId 1 (Question)? Don't edits to answers count toward the badges? –  Don Kirkby Jan 15 '11 at 0:25
@Don, I don't know, great question –  artlung Jan 15 '11 at 16:01
I posted a separate question on answer edits vs. question edits: meta.stackexchange.com/q/75271/131335 –  Don Kirkby Jan 17 '11 at 22:54
This doesn't work since it only counts posts where you're the last editor. Any edit counts. –  Matthew Read Sep 12 '11 at 20:36
@Matthew, if you have a fix please feel free to add! Thanks. –  artlung Sep 12 '11 at 21:31
This query doesn't work. As Matthew noted in comments to his post, you erroneously take retags into account, but they don't count towards the badge - see Matthew's comment for more detail. –  Tomas Sep 22 '11 at 17:57
If my answer is no good, the OP needs to choose what appears to be the working answer as best. Alternately, someone with time on his or her hands can edit my query to improve it. –  artlung Sep 22 '11 at 22:30
SEDE queries are run against an data dump from the DB that's anywhere from a few hours to a few months out of date, not the production system, so any SEDE-based approach is doomed to be less accurate than just looking at the pretty JS graph in Troyen's answer. (Yes, I realize that this answer was written before the site UI included badge progress info.) –  Pops Oct 18 '12 at 19:28

Disclaimer: The Data Explorer contains outdated data! Go to http://<your SE site>/review to see live info about the badge.

I've created a query loosely based on waffles' query here. It works by checking all the revisions you've made to titles and posts, grouping by the ID of the post. Multiple edits to a single post don't count. Note I've made it for Copy Editor rather than Strunk & White, but you can modify it easily.

Problems it avoids:

  • Counting only the edits you've made that are also the last edit made (artlung's suffers from this)
  • Counting title and post edits separately (which simply summing your changes in the PostHistory table would do even with grouping by the timestamp, since they can be off by milliseconds)
  • Counting edits to your own posts
  • Counting multiple edits to the same post

I'm rusty and this isn't my day job, note the crappy outer select :P. Code below if anyone wants to take a crack at improving it.

-- Copy Editor Progress
-- This query returns the number of edits you still need to
-- get the Copy Editor badge.

DECLARE @userid int = ##UserId##

SELECT 500 - COUNT(*) AS EditsLeft
    SELECT   PostID
    FROM     PostHistory ph
    WHERE    PostHistoryTypeId IN (4,5)
        AND  PostId NOT IN (
            SELECT p.Id
            FROM   Posts p
            WHERE  p.OwnerUserId = ph.UserId
        AND UserID = @userid
) AS bar
share|improve this answer
that's strange - with your query I get bigger count (i.e. less edits counted!!!) than with the artlung's solution! Very strange, I'd expect quite the oposite! –  Tomas Sep 21 '11 at 23:35
@Tomas It's because you've had lots of retags and/or rollbacks. Those are counted by artlung's but not by mine, since they don't count towards the badge (actually I'm only assuming rollbacks don't, searching for clarification...). –  Matthew Read Sep 22 '11 at 17:53
good note, thanks! So your query is the best :-) –  Tomas Sep 22 '11 at 17:56
Matthew, looks like short edits (few chars) are not counted? But I don't see how you handle this in your query. Or is it because all the new edits I'm missing are too young (from today)? –  Tomas Oct 13 '11 at 21:09
@Tomas The Data Explorer is always out of date. Data dumps are made every month or two, I believe. (Sorry for the delay in replying, I didn't get notified of your comment!) –  Matthew Read Nov 21 '11 at 20:06
so I get 500, but I've already received the Strunk & White badge.. whattt? –  Ason Jul 13 '12 at 20:34
@Ason I think they made some changes recently, so I may be discluding things that they now include. What does http://stackoverflow.com/review show for you? –  Matthew Read Jul 13 '12 at 21:20
82 edits, so barely making the Strunk & White, but not 500 from Copy Editor. –  Ason Jul 13 '12 at 21:22
@Ason Oh I see, you haven't been a member long enough! The Data Explorer does not have live data in it, it's usually 1-2 months behind the live site. –  Matthew Read Jul 13 '12 at 21:24
makes perfect sense! sorry to bother, just wanted to check my edits (before I was guided to the review page) –  Ason Jul 13 '12 at 21:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .