The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Denied.

Operator: Philroc (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 00:42, Friday, October 23, 2015 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): C#

Source code available: http://www.mediafire.com/view/rtytufd3ymum45e/Redirectbot.cs (no bot password)

Function overview: Redirects to lists, from the things they are lists of

Links to relevant discussions (where appropriate): WP:Bot requests#Redirects to lists, from the things they are lists of

Edit period(s): Continuous

Estimated number of pages affected: ~13000

Exclusion compliant (Yes/No): No

Already has a bot flag (Yes/No): No

Function details: This is a retry of a failed BRFA for this bot. You can see it here. Breakdown of this bot's task: 1. The bot will look through Special:AllPages for articles titled "List of *" 2. When it finds an article, it will check to see if an article which is named what is in the wildcard exists 3a. If it does exist, the bot will do nothing. 3b. If it doesn't exist, the bot will create it with the text "#REDIRECT [[(name of list)]]" 4. Repeat

And you don't need exclusion compliance when you're just making redirects.

Discussion[edit]

Just commenting here to link to a discussion on my talk page and to say that I do not feel my concerns have been adequately addressed. I would like another BAG member to handle this. — Earwig talk 01:34, 23 October 2015 (UTC)Reply[reply]

@The Earwig: Uhm, but you're the only BAG member that's really active... PhilrocMy contribs 12:30, 24 October 2015 (UTC)Reply[reply]

Have you tried running the code in a testing environment? I can't imagine it actually works:

I think you're probably new to programming and C#, so why not look at what people have done before you? ;-) Alakzi (talk) 16:40, 24 October 2015 (UTC)Reply[reply]

While loop: because it needs to update in case new "list of" articles come up.
Lines 19 to 21: I can't pre-filter because new "list of" pages can come up beyond the end of the filter.
Line 23: But I don't have to use it.
Line 25: It's so it can make a redirect out of the stuff after "List of". And this isn't C, it's C#, the [] in arrays comes after the type, not the name.
Lines 26 to 28: a: Mistake, fixed it. b: Don't know what that means. c: Mistake, fixed it. d. OOOOHHHH, ok. Fixed that. e. Yeah, which is why I used the .ToUpper method.
Line 29: Mistake, fixed that.
Line 33: I know what escaping means, but how to do that in things beside regexes?
Line 35: Bot policy says that bots doing non-urgent tasks (like creating redirects) run at a slower rate. Mistake in my regex, fixed.
And I actually hit "Play" on my IDE, and it gave me errors. PhilrocMy contribs 23:29, 24 October 2015 (UTC)Reply[reply]
Thanks for making the changes! Regarding the while loop - well, it won't actually "update" anything, will it? It'll simply fetch a new list the next time it runs; it's really no better than relaunching the program. As for (b), imagine there's an extra pair of parentheses around "pagetemp" and "1": if ((pagetemp[0] != 1) | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0) .... The way to check if the first character is a digit is - quite simply - Char.IsDigit(pagetemp[0]). With regard to line 25, my point was that you cannot assign a string to an array variable; you'd first have to split the string by character. I know what escaping means, but how to do that in things beside regexes? Double up the braces.
I've not got the .NET suite on my machine (no Windows), but I could try it all out in Mono if you're having trouble. Could you reupload the code? Alakzi (talk) 00:33, 25 October 2015 (UTC)Reply[reply]
"Double up"? WTH are you talking about? And about the while loop, it does fetch a new list each time - each new list might have new "list of" articles. And I reuploaded the source, check the "source code" section again. PhilrocMy contribs 00:45, 25 October 2015 (UTC)Reply[reply]
Double up. Line 25 still isn't gonna work: title.Substring(8) is a string; pagetemp is an array of strings. With the exception of some number types, C# will not implicitly convert from one type to another. There's several ways to approach this, but if we're to stay faithful to your thing, replace lines 25 and 26 with the following:
char[] pagetemp = title.Substring(8).ToCharArray();
pagetemp[0] = Char.ToUpper(pagetemp[0]);
Assuming the code actually runs now, you're gonna have to wait for a BAGer to review your request. Alakzi (talk) 01:17, 25 October 2015 (UTC)Reply[reply]
But there are two curly braces on the line you talked about, which one do I double up? PhilrocMy contribs 01:25, 25 October 2015 (UTC)Reply[reply]
Replace "((R from list topic))" with "((((R from list topic))))". Alakzi (talk) 01:28, 25 October 2015 (UTC)Reply[reply]
Did that, kthxbai. PhilrocMy contribs 01:36, 25 October 2015 (UTC)Reply[reply]

Where did the "~13000" estimate come from? I think creating some of these redirects is a neat idea, but it probably requires human (editorial) judgment. Some redirects don't make much sense; doing this programmatically is likely a poor idea due to the edge cases. --MZMcBride (talk) 04:03, 25 October 2015 (UTC)Reply[reply]

From this list. PhilrocMy contribs 12:03, 25 October 2015 (UTC)Reply[reply]
And I've fine-tuned my regexes enough so edge cases won't mess it up. PhilrocMy contribs 12:04, 25 October 2015 (UTC)Reply[reply]
The linked list is obviously truncated. Or are you saying that this bot approval will only be for 0 through 9 and A through Cities? If not, it'd probably be nice to have a more accurate estimate.
What do you think about redirects such as Allied military operations of the Vietnam War (1964) and American Civil War Medal of Honor recipients: A–F? I'm not sure these types of redirects are really helping readers/searchers. --MZMcBride (talk) 03:40, 26 October 2015 (UTC)Reply[reply]
I like the first, but not the second. PhilrocMy contribs 11:35, 26 October 2015 (UTC)Reply[reply]

It is said above that Redirects like "Athletes from Maryland A – M" were "previously thought... undesirable behaviour". I disagree, such a redirect enables a reader - say, one who is returning but mis-remembering the list page title - to find the relevant list using our auto-complete function. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:44, 27 October 2015 (UTC)Reply[reply]

This is really iffy, I think. Creating redirects for people who mis-remembered page titles would justify a lot of improbable redirects we don't generally create*, and they could still find the title by going through Athletes from Maryland, which the bot would create**, or by using search.
* Like the same title but A–L, A–K, etc.
** It wouldn't, actually, since List of athletes from Maryland is a redirect. But that seems like a bad example; in my understanding we don't usually structure split-lists that way.
— Earwig talk 05:15, 28 October 2015 (UTC)Reply[reply]
@MZMcBride: Actually, the bot wouldn't even create the redirects you listed because of my regex. PhilrocMy contribs 12:52, 28 October 2015 (UTC)Reply[reply]

1. Has any community discussion of this taken place? This is something that would affect most lists ever made. Some discussion at MOS:LIST would likely be in order. 2. Furthermore, the concerns about WP:CONTEXTBOT are valid. Even as I'm looking on MOS:LIST, there's an incidental reference to one instance where, e.g., List of vegetable oils shouldn't translate to Vegetable oils. Yes, a redirect to Vegetable oil, singular, already exists and could be checked for, but that's not the point: someone looking at Vegetable oils isn't necessarily looking for the list. --slakrtalk / 03:04, 1 November 2015 (UTC)Reply[reply]

The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.