> Out of all of the posts detected on SO with a code block, none were true positives. There was only one true positive over the whole network, that was on Apple.SE.
You've found some code that looks superfluous, and the compiler doesn't notice that. What do you do to be sure (or as close to sure as you can) that deleting this code won't cause regression.
Two ideas spring to mind.
"Simply" use deduction based on whether or not the code looks like it should...
Title - Repeated character: *bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb* Title - Position 1-51: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb Post - Contains 2 unique characters
@quartata Nope, only batches of 100 and one API hit per site. If we wanted to check all new comments across the network, that's a minimum of 166 API calls (1 per site) plus any extras for additional pages on busy sites (ie. SO)
@Pops Originally, we made the request just because quota is tight. Extra quota might help us do what @quartata is proposing right now though - fetching comments as well as the post
@quartata You are not a privileged user. Please see the privileges wiki page for information on what privileges are and what is expected of privileged users.
(also a minor adaptation of the flagging system to reserve more flags for Charcoal people rather than the world at large, but that hasn't affected accuracy or anything)
@ThomasWard Hm. I'm pretty sure I hit that when I converted the first test last night, but I don't see anything in the code that is obviously correcting that issue. Maybe something just wasn't converted right when I did the first tests
@Andy yep i don't think i'll be making any changes yet today, since the Post object is already 'there'. My guess is maybe something isn't struct'd right or being passed right, which could definitely happen, and that's why it's failing tests.
@ArtOfCode I misunderstood you then, I thought you meant that you raised it to 2 on the sites where the threshold is 3. Could you rephrase that last thing you said?
@Pops So (in general) we cast 3 spam flags on a post. The original system randomised which accounts it used to cast those flags. The modified system uses accounts of Charcoal people to cast the first 2, and the account of a non-Charcoal person to cast the remaining 1.
@ArtOfCode Apparently I still don't know enough about how the system works. What does it even mean to be a "Charcoal person" if the system has access to non-Charcoal-people's flags?
@Andy the only thing I can think of is that I had to make everything unicode() strings/returns instead of standard str() returns. That may have something to do with it. But without that we had a few TypeErrors with username checks, etc. so I kinda pushed Unicode strings everywhere.
@Pops Our meta post was featured for a week, about three weeks ago. In that meta post, we had a link that let anyone sign up for their account to be used for autoflagging; we got a lot of people out of that. We jumped from around 30 accounts signed up to around 160. If the original 30 were all people who have been involved here for a while (i.e. "Charcoal people"), then we gained 130 "non-Charcoal" people.
It sort of made sense to us that people who have put something in to this operation should get something more out; our original system didn't take that into account because it allocated flags entirely randomly.
I would have counted all those new people as "Charcoal people," not because I was equating their contributions to those of you/others who contributed in the past but by definition because their accounts were being used by the system; so you could see the confusion.
"Naming is hard" is kind of a meme around here for a reason, I guess.
But I can't do that, because there wasn't much fighting to do. You guys do good work and people recognize that. When I brought it up it was more of a "well, yeah... everyone else is good with that, right?" So you should have a doubled quota soon.
@Andy Yeah, that's why I'm scratching my head. Until I fixed some of the Post() init stuff for api_response parses (Error: Nonexistent Key in api_response) only those 8 failed. Prior to that, all tests exploded.
I'm not concerned about any of you (or else I wouldn't have requested the increase on your behalf in the first place), but I still feel obligated to say for procedure's sake: all the other rules about using the API still apply, if anything weird/bad is noted coming from the key in the future it might get restricted.
@Andy You're welcome, but kinda the point of that story was that it's not about me!
Actually it's probably just that I tend to come in here the same time always. It's not on purpose, it just kinda... happens. And if you always have the same schedule then it's not surprising you always end up being here (or missing out) when I'm around.
I'd like to start collecting some information about the over/under on how long a post tends to sit in the queue. Would be useful for tuning API site thresholds.
@quartata If there was code in the post, there was a better chance it was a non-answer than that it was spam/offensive. Could've just stripped code blocks, but think about e.g. "(Chinese characters) <code>something</code>" Still will be caught by stripping code blocks, but still no point in catching it.