Template talk:BCGNIS

=Handy=
 * thanks for this. It's handy. Just used it to help with AfD for Lost Lake (Abbotsford). I also added the template to your example lake: Skaha Lake. :) Canuckle 21:30, 4 July 2007 (UTC)
 * Oh yeah ... I forgot to actually use the example, thanks! + m t  23:04, 4 July 2007 (UTC)

Acronym
Should BC Geographical Names Information System be spelled out in the final result, rather than abbreviated as BCGNIS? Canuckle 18:55, 20 July 2007 (UTC)
 * Considering that the output of the template is short, I think it would be appropriate to expand this, since it will still only use one line. Done. + m t  20:03, 20 July 2007 (UTC)

Coor d or Coord?
I have been using °N, °W (see Template:Coord for coordinates. Isn't it likely to be the preferred method?  Should it be referred to in the example? -- KenWalker | Talk 00:22, 6 August 2007 (UTC)
 * Good point (also, I wasn't aware that coord was so flexible). I've updated the examples. + m t  20:10, 6 August 2007 (UTC)

Change to URL
I changed the URL that the BCGNIS template uses thinking that the old URL was causing incorrect information to be displayed. As it turns out it was a typoed numeric ID in an article that was bringing up the wrong page, but I've left the URL as changed since it appears to be the preferred one. Tweek (talk) 02:51, 18 December 2009 (UTC)

Optional name?
After editing about 75 articles that use this template, I estimate that the BCGNIS feature name was not the same as the page name and needed correction in about 80% for the cases. This, I believe, should lead us to the conclusion that including the feature name in the template is the best practice and should not be considered as optional.&ensp;– droll  &#91;chat&#93;  18:24, 14 May 2010 (UTC)

CGNDB
I thought some page watchers might be interested in a discussion for changing CGNDB into a redirect here. Thanks! Plastikspork ―Œ (talk)

cite bcgnis
I think this template is deprecated in favor or. Can we mark this one for deletion? Cander0000 (talk) 03:15, 20 June 2010 (UTC)
 * Oh, please don't. At least make into a redirect to, if that it possible. Now that Skookum1 is gone I won't argue against changes. Make it conform to  if it must (ie, get rid of PAGENAME and so on), if required--I won't resist. If nothing else though, make  auto-expend into  format, if that is possible. I suppose I could rewire my brain to use , but I'm so so used to , having used it many hundreds of times. If it must be, deprecate it (I didn't realize it was), make it redirect or reform itself into , but please don't just delete it outright--at least not for a few years? Thanks. Pfly (talk) 08:45, 20 June 2010 (UTC)
 * I have no objection to making this a redirect. Autoexpand is a bit more tricky since it may be used within a , in which case substitution doesn't work so well. Plastikspork ―Œ (talk)  16:55, 23 June 2010 (UTC)

Code changes break the wiki
It's hard to read the playbook here, but it seems as though the changes made here in May are/were breaking at least one article, List of peaks on the British Columbia – Alberta border. I don't necessarily want to link the present discussion, since it has a very angry editor crossing a few lines. It seems the changes added two levels of substitution, first to cite bcgnis which then invokes cite web. This expansion appears to be causing breakage, the post-include size in the preprocessor is exceeding the 2048000 limit. It's fine to go ahead and change things, and standardization is often good, but when we do thimgs here that break stuff, the normal action is to undo that "stuff".

Please evaluate the changes here and comment. It looks to me like the weblink has changed, but other than that, I'm not seeing any reason not to revert this to the simpler format. There are indeed limits to the "don't worry about the servers" mantra and this may be one of them. Franamax (talk) 23:04, 14 September 2010 (UTC)


 * These are the stats I see:

NewPP limit report Preprocessor node count: 106017/1000000 Post-expand include size: 1054603/2048000 bytes Template argument size: 415967/2048000 bytes Expensive parser function count: 0/500


 * Could you be more specific about how List of peaks on the British Columbia – Alberta border is broken. I have something I have to get ready for just now but I will do what ever is necessary to make it right. I'm aware that nested transclusions can cause problems. I don't think the solution is to prohibit the use of templates such as cite web as has been advocated in the past. I'll check back latter tonight. – droll  &#91;chat&#93;  00:16, 15 September 2010 (UTC)


 * The article has since been edited. You would have to recreate the instantaneous conditions (check every template and sub-sub-template to see if it has been modified since) but rest assured, the preprocessor limit was exceeded. Switching to a double-nested implementation willl dramatically increase the post-expand size, every parameter gets repeated twice more for instance. Can you sandbox some variations of the trasclusion depth and check the numbers on the limit report? Franamax (talk) 01:02, 15 September 2010 (UTC)

I can do that. If I get the time, I'll work on it tomorrow. I remember this issue being discussed some years back. It, too, involved a list article with multiple citations. I'll see if I can find out what others have done. – droll  &#91;chat&#93;  06:51, 15 September 2010 (UTC)
 * If you can, thanks. Here is a breaky version: . The parser takes forever to spit it out, but that's only a problem for us editors, for actual readers the parser and squid caches handle that pretty well. However, that page version is definitely broken, which may cause reader inconvenience ;) so we need to conjure up a fix. CBW edited it later and took out a whole bunch of cites to get it under the limit - but that's not a fix, that's a hack. I think I see where you were going, stream BCGNIS into cite bcgnis into cite web into Citation/core - but I also think the devs set the PP limits at the furthest edge of insanity they could think of, and even in the revised version we are already halfway there. Maybe just BCGNIS->cite web would cut the expand size down enough.


 * There is another number of interest in the limit report, "Template argument size". This is directly related to my point above about how nesting templates doubles the argument size each time. From what I remember of reading the MediaWiki source code, template and magicword expansion is a pretty dumb process, the subroutine evaluates and strips one level of braces and substitutes in the expanded text, checks whether another brace is present in the entire page, then calls itself again using the entire page content. It's not pretty.


 * If you're sandboxing it and can come up with any general principles or an idea for an evaluation tool, that would be especially good. People use templates 'cause they're so darn convenient, then explode when they hit the limits and it's quite difficult to explain to them where, how and why the servers are spitting up. In this case, when a change in the underlying code is causing it, I can kind of understand the resentment. (Though I don't excuse the method of expressing it, but leave that with me for now please :) If we can come out of this with a better description of how the template processor works for the editors of the future, then all the better. Franamax (talk) 08:06, 15 September 2010 (UTC)


 * I've done some tests and reached the conclusion that the nested templates are certainly causing the problem. This is nothing new. I can fix it by using Citation/core instead of Cite web in Cite bcgnis and replacing BCGNIS with cite bcgnis. I will not finish this today but perhaps by tomorrow night I can have it done.


 * I don't have the skill to develop an evaluation tool but clearly the solution is to write templates that are as conservative as possible. I intend to stay out of the broader discussion. Thanks. – droll  &#91;chat&#93;  20:59, 16 September 2010 (UTC)


 * I think nesting transclusions is only a problem when a template is likely to be used many times in a single article as is the case with citation templates. The Coord template used to have this problem. There was talk of improving that template but I don't know if anything was actually done.


 * I have a new version ready at Cite bcgnis/sandbox but I want to test it some more. I added a modification that makes BCGNIS redundant. In the past there has been debate about the name of the template. Franamax, what do you think about making BCGNIS a redirect to cite bcgnis after the new version goes active. It would eliminate one level of transclusion. – droll  &#91;chat&#93;  22:34, 16 September 2010 (UTC)
 * So long as BCGNIS can be used exactly the same way, i.e. just the two parameters, I think a redirect would be fine. Maintenance of the template becomes more diffcult for the layperson, since all your error-checking makes things pretty hairy - but 'tis better to fail gracefully than to just explode, so I generally agree with it.
 * I also thought about creating a BCGNIS2 template that would just pop in a bare link. In a way that makes more sense for a large list article such as this one. We don't really need a list of formal references when the utility of the link is just to go to the BCGNIS entry. But...we're not supposed to link off-site within the article body itself, so I guess not.
 * BTW, looking through some of the history on this, I also feel that the accessdate parameter is unnecessary. accessdate is useful for sources which could be transient, say a weblink to a newspaper site that only keeps a 30-day archive or a site's "front page" that changes regularly. If the link is broken than accessdate gives you a clue about how to track down an archived version. It also is the formal statement that "I, the editor, did personally verify this source" - but that is implied anyway when you commit the edit. Government records like this are basically permanent though, so knowing the precise date that someone checked is much less useful. In theory, the information is and always will be verifiable by anyone, like a Library of Congress accession record. As long as accessdate is not a mandatory field though, no biggie I suppose...
 * Thanks for looking into this! Franamax (talk) 22:56, 16 September 2010 (UTC)

Some interesting analysis of post-expand include size:
 * Stating: 2048000/2048000
 * Without Coord: 1348777
 * Without BCGNIS and refs: 1041527
 * With new cite bcgnis: 1756537

The first example excluded only the Coord templates. The second example excluded the BCGNIS templates and the &lt;ref> tags. This shows that, while BCGNIS was a big problem, Coord contributes considerably. The re-written cite bcgnis will make the list functional but in the end long lists of geographic features are just a problem. – droll  &#91;chat&#93;  23:33, 16 September 2010 (UTC)


 * Your point is well taken about the accessdate and I don't use it mush when using this type of template. I don't think it contributes much to the problem at hand and many editors have used the field in the past. I think its better to write for the general case. The modification should give some wiggle room. Take a look at Mountain peaks of California. NGS is a simple version of cite ngs and pid is a simple version of cite peakbagger. The simple versions are older and have old style output. – droll  &#91;chat&#93;  23:51, 16 September 2010 (UTC)
 * Yeah, coord looks like a bit of a bear too. This is a systemic problem, templates get rewritten to handle the "general case" and have all sorts of error-handling built in, then they start nesting to bring commonality to the end results. That works fine when each one is used once per article, like locator maps, coords, etc. almost always are. It just explodes when the same thing is used a whole bunch of times in one list article. But if you provide a custom template for multiple-usage though, people will start using it in single places, no matter how bold you write the docs.
 * I like the CaliPeaks article, that is a good use of bare hyperlinks (though there should be a legend for what the various acronyms mean). Maybe a BCGNIS2 template to launch a direct link isn't such a bad idea after all? Franamax (talk) 00:52, 17 September 2010 (UTC)


 * The new code is now active. Here you will find a copy of the September 12 version of List of peaks on the British Columbia – Alberta border that uses cite bcgnis directly. You could paste it into the article if you think that would be a good idea. Now would be a good time to make BCGNIS into a redirect.


 * If I could do anything I wanted I would replace every instance of BCGNIS with cite bcgnis (which I could do using WP:AWB) and then re-purpose BCGNIS as a simple link version. However, I doubt that a consensus could be reached. Tomorrow I'll do a test to see if a simple link version would actually reduce the post-expand include size significantly. – droll  &#91;chat&#93;  04:20, 17 September 2010 (UTC)
 * Well you know what? Why not just create BCGNISLINK then? Note in the docs that normally bare links are discouraged, but use this for specific purposes. Changing 250-some instances in one article should be even easier using AWB. Looking at the article again, the immense reflist looks really dumb. It's "correct" but it's not "right", know what I mean? Or code in a "bare=yes" parameter, then have a big debate about wha6 the default should be later. ;) For list articles, I'm thinking now that it makes more sense to have a plain link. The CaliPeaks page has got me thinking, if it had a proper legend it would be pretty good. For one off usage in general articles, it makes more sense to observe the standard method of citation to keep things uniform. So I'm thinking splitting the usage somehow. What say you? Franamax (talk) 06:37, 17 September 2010 (UTC)

Thanks to both of you for your willingness to figure out what works and to make it work. Keep up the good, um, work! (and yes, the reflist on that page is immense, I agree) Pfly (talk) 08:16, 17 September 2010 (UTC)

Possible simple link template
Here you can see an example of the list using a very basic link templates. This example will be valid for about 2 days. I used cme because it is an existing template that creates links to "Bivouac.com - Canadian Mountain Encyclopedia". This reduces the post-expand include size to about 986746 bytes but appearance should be a major consideration. Other options I see are: These are off the top of my head and just suggestions. – droll  &#91;chat&#93;  19:22, 17 September 2010 (UTC)
 * 1) use a smaller font for BCGNIS and CME as is done with Coord.
 * 2) consolidate the table columns as the source is identifiable. A legend would be needed.
 * 3) use a simple external link arrow without identification.
 * That looks good. I'll be semi-AFK for a few days but will try to look more at it. I think one column called "Links" with legend is the way to go. Maybe the link could just say "BCG" since there will be a legend? Changing the font size, possibly, but then we're expanding the HTML size. :) And you can never be entirely sure how the target browser will render a font variant. Good work though, thanks!


 * I'm still thinking about turning BCGNIS into a redirect, not sure how well the docs will play out if that's done. Franamax (talk) 19:41, 17 September 2010 (UTC)