Wikipedia:Bots/Requests for approval/KevinBot
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Withdrawn by operator.
Operator: Kevin Rector (talk)
Automatic or Manually Assisted: Automatic
Programming Language(s): C#
Function Overview: Maintenance jobs
Edit period(s): From time to time as needed.
Already has a bot flag (Y/N): Y
Function Details:
KevinBot is my bot that I used way back in the day (a few years ago). It has about 30,000 edits (give or take).
The job that I've conceived for it is to run through pages that use the convert template and process the conversions and hard code the conversion text into the page. This will eliminate the server having to process these thousands of conversions each time a page with a conversion is requested.
This bot is smooth like butter. I've tested it pretty substantially on a subpage of my user page.
The bot does not know how to handle all the conversions of the convert template yet, if it doesn't know how to handle it, it will simply ignore that instance of the convert tag and leave it be. Eventually I will be adding all the functionality of the convert tag.
Here's an example of a sample run: before the edit and after the edit.
Discussion
[edit]A couple questions/notes:
- The convert template takes a number of parameters that modify the output formatting. Have\will these been taken into account (the example page were all in exactly the same format)?
- Editors are generally told to ignore "performance issues" and I don't really see doing a few math problems on page load as much of a performance issue anyway. Do you have reason why you feel we should ignore this guideline?
- Finally, there is a potentially benefit of the template in that one can correct a # without having to re-figure the conversion. Cases of a wrong number being converted are probably exceedingly rare, but still something to consider.
--ThaddeusB (talk) 23:48, 23 April 2009 (UTC)[reply]
Great questions.
- No, if the template is using parameters at this point it will simply be skipped. It will only process the most basic format at this time (which in my experience is really how the template is generally used anyway).
- Well, I suppose it's not really something that HAS to be done, but even if it gives a negligible savings on the server that seems to merit the even more negligible cost of running it.
- This is not apt to happen too often and if it does the editor who wants to change the number they can simply use the convert template.
Kevin Rector (talk) 00:10, 24 April 2009 (UTC)[reply]
- Is there a discussion about doing this somewhere? If it does only mainspace, this will be over 186,000 edits; not exactly the kind of numbers one should just "be bold" with.
- Are these templates actually that expensive? Even on your example subpage, action=purge on the version with 24 convert templates on it, the page only takes 1.5-2.5 seconds to render, much slower than the plain text version, but not hugely, and I would guess that most pages don't use it more than once or twice.
- Rather than parsing the template and doing the conversion yourself, why not just use the template expander in the API.
- The bot is also replacing the non-breaking spaces the template uses with normal spaces. There's probably something in the MoS about this, at the least you'll have a bunch of FA reviewers yelling at you.
-- (e/c'd w/ThaddeusB) Mr.Z-man 23:56, 23 April 2009 (UTC)[reply]
Hey thanks for the comments
- No, I just thought it up... I think a change this small is definitely a be bold sort of thing even if it's on a lot of pages.
- They aren't that expensive but see number 2 above.
- Hmmm.. good idea, didn't know about that.
- That can be changed I'm sure.
Kevin Rector (talk) 00:10, 24 April 2009 (UTC)[reply]
Ok, so I took a look at the template expander and it returns the HTML, I'm looking to input plain text (wiki text) as putting the HTML in there would not be user friendly for the average editor. Kevin Rector (talk) 00:51, 24 April 2009 (UTC)[reply]
- Is there a way to use non-breaking spaces (per WP:NBSP) other than ? (I don't know of one at least.) --ThaddeusB (talk) 02:08, 24 April 2009 (UTC)[reply]
Ok, so I was thinking about how expensive these template are... probably not very expensive in the singular, but multiplied over the +- 6 billion page views that will be served up in April for the English wiki, it might actually add up a little. But even if it's just a little it's still a decent bot to run because it's cost will be pretty small too and only costs once (assuming someone doesn't re-insert the convert with different numbers). Kevin Rector (talk) 01:01, 24 April 2009 (UTC)[reply]
- No, what it returns is the wikitext. There's no way in wikitext to use <sup> or without HTML, technically you can use a literal non-breaking space, but some browsers will automatically convert these to normal spaces and using ² versus 2 is discouraged by the MoS. Note that the template expansion cost is only incurred when the page has to be parsed, which doesn't happen on most requests. If there's already a parsed version in the cache, the server usage would be the same for both versions. I can't find any recent information on Wikimedia's caching efficiency, but I believe about 60% of non-logged in pageviews are served entirely by the Squid servers and never even reach the MediaWiki backend. I have no idea how effective the MediaWiki parser cache is on top of that, but it provides additional caching and caching for logged-in users. Mr.Z-man 03:35, 24 April 2009 (UTC)[reply]
- Ok, I see what you're saying. I could totally use the expander-o-matic in the api. Kevin Rector (talk) 04:57, 24 April 2009 (UTC)[reply]
Needs wider discussion. This is a huge task for little real gain, and it is quite possible people more familiar with the template will have reasonable objections. I suggest posting on the talk page of the template in question, WP:VPR, WP:VPT, and perhaps Template:Cent to solicit wider community input. Anomie⚔ 02:13, 24 April 2009 (UTC)[reply]
- I remember back in the day when like 5 of us had bots and people just asked us to do stuff and we did it and it was good. I've been gone a few years from active Wikipedia editing and I'm rather astounded at the incredible proliferation of bureaucracy to get anything accomplished. Ah that is the fate of stuff done by people I guess. What I find amazing is the arguments against making the 'pedia more efficient... sheesh can't have that now can we. There's an old saying, save a penny here and save a penny there and before long you have some real money. Kevin Rector (talk) 04:57, 24 April 2009 (UTC)[reply]
- Anomie, the above was not directed at you or anyone in particular. I've been gone a few years and there's a heckuva lot more that has to be done to get stuff done. For the record, people keep saying there is very little gain and yet there are a gazillion edits being made to twiddle some categories or modify templates on talk pages, none of which actually achieves much. What I'm proposing is a little bot that will run from time to time to make stuff just a little tiny bit faster to load. It's not really a huge job, rather is a whole bunch of tiny jobs. I am also in no way deprecating the template it will still be used by human editors a LOT. Kevin Rector (talk) 05:05, 24 April 2009 (UTC)[reply]
- I'm adding a notice where Anomie said to. Kevin Rector (talk) 05:07, 24 April 2009 (UTC)[reply]
- Thanks. I suppose the bureaucratic side of Wikipedia has grown in 5 years, but that may be an inevitable side effect of the massive growth of Wikipedia. We now have 6,915,487 compared to under 500,000 at the end of 2004 (according to History of Wikipedia#2004), and judging by various comments regarding Featured Articles and such the quality standards have also increased dramatically.
- The difference between this and "twiddl[ing] some categories" or "modify[ing] template on talk pages" is that the former helps organize Wikipedia and the latter helps coordinate the activities of people interested in particular topics. Your proposal removes flexibility in the interest of theoretical (and admittedly minor) gains in rendering speed. Anomie⚔ 11:32, 24 April 2009 (UTC)[reply]
Seems to me that the less server load and the faster the pages load, the better. I recommend that the substitute bot add a comment tag at the end of replaced text to say what did it, as I for one trust the template more than hard-coded text. - Denimadept (talk) 05:37, 24 April 2009 (UTC)[reply]
- Oppose any attempt (this bot or any other) to hard-code results on the grounds it provides an opportunity for errors and/or subtle vandalism to creep into conversions. There is no need—performance or otherwise—for this type of de facto deprecation of
{{convert}}
— Bellhalla (talk) 07:01, 24 April 2009 (UTC)[reply] - Oppose. Build the web—not set it in stone.
{{convert}}
gives great power and flexibility for dealing with the rendering of conversions particularly as changes evolve at wp:mosnum. Ripping out transclusions would remove that flexibility for no discernible payoff. A solution in search of a problem.{{convert}}
also quickly confirms to an editor that conversions have been done accurately (usually) and is in conformance with wp:mosnum. Please don't do this. Bleakcomb (talk) 09:26, 24 April 2009 (UTC)[reply] - Oppose this is not only completely pointless, but IMO actively counterproductive. The day after this bot finished would be a really really really bad time to discover a typo in
{{convert}}
that caused an error in 1% of cases. If such a bug were discovered now, it would be trivial to fix; after a run like this, it would require another bot to go round reading 180,000 pages and editing 1,800. This is why we have templates. Happy‑melon 10:45, 24 April 2009 (UTC)[reply]
Withdrawn by operator. Alrighty, no one wants it, so I'm certainly not going to waste my time on something people don't want. Kevin Rector (talk) 15:07, 24 April 2009 (UTC) Withdrawn by operator.[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.