Template talk:Convert/Archive April 2016

Single maintenance category
Per observation here, I propose/support the improvement to have a single maintenance category for the module. See. -DePiep (talk) 21:11, 30 March 2016 (UTC)
 * We currently use categories "Convert invalid options" and "Convert invalid units", and as previously mentioned I like simple names, so how about one category to replace them called "Convert errors"? Some people may like "Pages with errors in the convert template", but omitting redundant words and having the category name start with "Convert" seems better to me. Johnuniq (talk) 03:44, 31 March 2016 (UTC)
 * "Category:Convert errors" looks great, and for these reasons. But an other name could be fine too. No big issue imo. -DePiep (talk) 07:37, 5 April 2016 (UTC)
 * OK, I've added a note to do that when the next release occurs. Johnuniq (talk) 11:36, 5 April 2016 (UTC)

Perhaps re-add option adj=split
Now that Module:Convert is being updated again, perhaps it is time to re-add option "adj=split" from September 2013, as in:
 * &rarr;
 * &rarr;

Back in September 2013, I ran Google Searches and found slightly more split "3- and 4-foot" examples, more frequent than "3-and-4-foot" format, although both styles were used in many webpages, almost 50-50% usage. -Wikid77 (talk) 23:49, 15 March 2016 (UTC)
 * I don't recall adj=split but will have a look. The following table shows fixed output from Special:ExpandTemplates for three examples. The second column is all convert can currently do (adj=on), while if adj=split were available, the resulting output would be as shown in the third column.


 * Any thoughts? I would want to see a few examples in articles and maybe ask for opinions at WP:MOS talk. Johnuniq (talk) 01:33, 16 March 2016 (UTC)
 * During the prior years, someone maybe removed all uses of "adj=split" but the user who requested this split style of hyphens, back in 2013, is still active,, and I had replied how both forms (with prior "8-to-10") are widely used in other webpages. -Wikid77 (talk) 08:19, 16 March 2016 (UTC)
 * Well, I'm not going to touch the script of a template this complex myself but of course you should have the functionality for it. — Llywelyn II   15:30, 16 March 2016 (UTC)


 * I'd call this a very bad idea. Sorry Wikid.  We don't need such a thing as  .  Either "3- and 4-foot" or "3-and-4-foot" is grammatically correct.  Which one is it?  That is, unless they mean subtly different thing or it's a dialect issue, but i doubt that either are the case.  So, probably I got it wrong and it should be "3- and 4-foot" not "3-and-4-foot"; I think LlywelynII is correct here; sorry about that.  Just fix it.  If need be, sure, bring it up at WT:MOS, but I don't see why we'd need both. Jimp 12:08, 22 March 2016 (UTC)
 * As I understand it: Jimp says both versions are grammatically correct; there is no need to supply both options; if the spaced version is considered better then change the single=default template behaviour for on into that one; but no need to add an other option. Sounds complete to me. -DePiep (talk) 13:28, 5 April 2016 (UTC)

Area
Are there preferred pairings of units? The examples given are hectares to acres e.g.: 1 ha and square miles to square kilometres e.g.: 1 sqmi, etc. No examples are given of 2500 ha or 2500 acre, etc. Does this suggest that the preferred pairings are the former? Converting acres to square kilometres (or hectares to square miles), and vice versa, seems odd to me. But I can find no advice at WP:MOSNUM. Thanks. Martinevans123 (talk) 20:16, 4 April 2016 (UTC)
 * Convert has a default output unit for each input unit, so unless there is a specific requirement, the best procedure is to omit the output unit and let convert deal with it. Examples:
 * → 1 ha
 * → 1 sqmi
 * → 2500 ha
 * → 2500 acre
 * However, if  is used, it is necessary to include an empty output unit:
 * A  → A 120 ft bridge
 * A  → A 120 ft bridge
 * The error in the first of those is because "-long" is passed to convert as if it were the output unit, which can be seen by holding the mouse above the error message to see the pop-up. Johnuniq (talk) 22:39, 4 April 2016 (UTC)
 * Many thanks for the refresher. I think years of seeing "the default" in these cases has suggested to me that these are indeed to be usually "preferred". I just don't see any advice as to when the non-defaults would be better? Martinevans123 (talk) 22:43, 4 April 2016 (UTC)
 * You'd have to take that to the talk at WP:MOS. The convert macro does something that is probably useful in many cases, but it's not a style guideline, which is what you're talking about.GliderMaven (talk) 23:01, 4 April 2016 (UTC)
 * re Martinevans123 "advice as to when the non-defaults would be better?" -- well, that option is in there to cover exceptions of sorts. Would be hard to list them. Situations where one could consider using non-default output units: to quote the source more literal; to follow article style (use same unit system throughout), to control swapped order (output units in first position), follow style that is common in the topic domain (e.g., "in topic X pressure is commonly expressed by unit Y"). All this is for the editor's (your) freedom to refine article style. -DePiep (talk) 07:34, 5 April 2016 (UTC)
 * Thanks. I have, in any case, opened a thread at WP:MOSNUM. Martinevans123 (talk) 13:38, 5 April 2016 (UTC)

The idea of letting a template select the output unit by default is so foreign to me that I never tried it and didn't know it was possible. I would always have an output unit in mind and would always put my choice in the template explicitly. Jc3s5h (talk) 18:34, 5 April 2016 (UTC)
 * That's fine, but for the record there are a couple of reasons why it is useful to recommend that people use the default. First, someone might not be sure what output unit "should" be used, but they can see that a conversion would be desirable—why require them to look up the recommended output when convert can do it? Second, taking the default applies a consistent style for articles. Third, I have often corrected broken converts simply by omitting the output unit because someone added a convert and did not notice that it gave an error—they got the output unit wrong and omitting it fixed the problem. There is a theoretical fourth benefit, namely that it is conceivable that we could decide a default should be changed, and doing that in convert would automatically apply the result to all articles using the default. Johnuniq (talk) 02:10, 6 April 2016 (UTC)


 * Cases to override default units: There are cases where the rest of an article or paragraph could focus on specific unit-codes, such as noting 2 buildings have area in square feet on a small lot measured in acres, and all could be shown as square metres to indicate how much of the lot was covered by the buildings. A common issue is high rainfall in mm converted to inches, but display in feet would make more sense above 5 feet, or 60 in. In general, conversions of large amounts should consider a larger output unit than the default. -Wikid77 (talk) 00:29, 8 April 2016 (UTC)

Display incorrect

 * 10.30 ±
 * Displays "10.30 ± 0.74 AU (1.541×109 ± 111,000,000 km; 957,000,000 ± 69,000,000 mi)"
 * It should display "10.30 ± 0.74 AU (1.541×109 ± 1.11×108 km; 9.570×108 ± 6.90×107 mi)"
 * Or at the very least "10.30 ± 0.74 AU (1.541×109 ± 1.11×108 km; 957,000,000 ± 69,000,000 mi)"

-- 70.51.45.100 (talk) 08:09, 9 April 2016 (UTC)
 * Why would the error term not use the same format as the main term?
 * I'm afraid convert is not that clever. The ± is more for human-scaled rough measurements and is not intended as an uncertainty. val can display uncertainties in various ways, but it cannot do conversions.
 * I don't think convert could be used with this example. If the numbers were kinder it would be possible, although very ugly, to use convert to generate numbers which could be plugged into val. However, with the example above, the output produced by convert is not a simple number than val would recognize. If it were converting miles to km, you would use several converts like the following to generate each number, and put them into a val. Very ugly!
 * → 10.30 mi
 * Sorry, but I think this will have to be done with wikitext and no convert. Johnuniq (talk) 09:51, 9 April 2016 (UTC)
 * Sorry, but I think this will have to be done with wikitext and no convert. Johnuniq (talk) 09:51, 9 April 2016 (UTC)

Is there a way to force convert to use scientific notation in its output terms? -- 70.51.45.100 (talk) 02:52, 10 April 2016 (UTC)
 * You can't force the output to use scientific notation, but you can strongly encourage it by using e-notation for the input value. In the following, convert thinks 100 is too small for scientific notation, but 1000 is ok.
 * → 1e2 m
 * → 1e3 m
 * Johnuniq (talk) 03:58, 10 April 2016 (UTC)


 * Would there be any support to add such a feature to CONVERT (forcing scientific notation) ? -- 70.51.45.100 (talk) 03:12, 11 April 2016 (UTC)
 * Anything is possible but the best motivation for change is to see some examples where the proposal would be used in articles. Convert is a generic tool, and I'm not sure it should display 100 in a different way from above. In articles on scientific topics there should rarely be a need for conversions and val will do whatever is wanted. The original issue raised above arises because people want to display astronomical distances in familiar units—perhaps something specific for that purpose could be developed. Johnuniq (talk) 03:44, 11 April 2016 (UTC)
 * It would be all astronomical values, since astronomical values are astronomical in everyday units (even in astronomical units, some would need scientific notation to not have 9, 12 or 15 digits); distances, masses, luminance, power, etc. -- 70.51.45.100 (talk) 05:30, 11 April 2016 (UTC)
 * I think it's asking a bit much of convert to cover those cases. It's mostly meant to facilitate conversions between common quantities, when precision is not super critical. In scientific context, just convert things manually and format them with val, to the appropriate precision (usually 1 or 2 sig figs on error, rounding the primary value accordingly. $10.3 AU$ [$10.3 AU$; $10.3 AU$] &rarr; $1.541 km$ [$9.57 mi$; $10.3 AU$]. Headbomb {talk / contribs / physics / books} 14:47, 11 April 2016 (UTC)

"Extreme Example" of template misuse
I recognize that someone endured considerable agony and invested significant effort  attempting to get this template to bend to his or her will. This editor then "perfected" and meticulously documented a three-stage technique of using and then removing from the end-result.

Now, I'm sure there are more elegant ways to do this, but I might have simply coded something like this:



resulting in:
 * The American defenders had 18-, 24-, and 32-pound (18 ,) cannons.

I have therefore removed from the documentation the following section, in its entirety. It is preserved below.

— groll tech  ( talk ) 11:00, 14 March 2016 (UTC)


 * Thank you. Now I won't have to endure the obnoxious plural "cannons" any longer. Kendall-K1 (talk) 12:45, 14 March 2016 (UTC)


 * For completeness, it is also possible to have a mixture like this:
 * → 18 ,
 * → 18 ,
 * → 18 ,
 * Johnuniq (talk) 22:43, 14 March 2016 (UTC)
 * and this took you three two years to solve? Anyway, this was not "bending to their will" of the template, but usage. And could you prove the 'misuse' you seem to see? -DePiep (talk) 18:40, 29 March 2016 (UTC)
 * The "misuse" here seems to be a sin of omission. Not using the template makes it harder to come back later and change the numbers. If a re-inspection of the source, or appearance of a new source, makes it necessary to change "18" to "19", or add a 48-pounder to the list, then someone must re-do the three step process. I would rather have the template do the work, even if I must enter the new number twice. Anyway you can still use the three-step process, but I don't think we should recommend it. Kendall-K1 (talk) 18:57, 29 March 2016 (UTC)
 * In the original situation, the result it could not be reached without {subst:} (which is a correct -- not 'misusing' -- feature). Furthermore, the OP attitude is one I rarely if ever met after someone makes an improvement to wikipedia. -DePiep (talk) 06:12, 30 March 2016 (UTC).


 * I'm not sure what you mean by "and this took you two years to solve?" I assume from your defensive stance that you are the author, and I apologize that I have offended you.  But in all honesty, I wish I had seen (and removed) that section two years ago.  Once I noticed it, it only took a few minutes to come up with an example solution to your problem.  It took me longer than that to figure out what you were trying to teach us, how you were trying to do so, and why you even wanted to create such grammatically-incorrect "grammatical features" as "32-pound cannons".  [Note: One shouldn't use a n agent noun (see pounder) to describe a noun (cf. "That 32-pound cannon is in good shape"  vs. "That cannon is a 32-pounder").]


 * Yet all of that is besides the main point. I'm sorry to say this, but the main point is that this section was not an improvement to Wikipedia.  The purpose of the template's documentation page is to provide instruction for the proper usage of that template within Wikicode.  The  template is intended to be transcluded.  (Yes, I know that this is now an Lua module that can be substituted – but that doesn't mean that it should.)  When editors are trying to learn how to use  properly, it's counterproductive and confusing – and therefore improper – to instruct them to delete it through substitution. — groll tech   ( talk ) 20:28, 3 April 2016 (UTC)
 * It was. (And btw: I am not defensive, I am attacking your pedantic dismissive black judgemental attitude. Clearly you don't know what you "apologise" for, because right away you are adding more to your stack of self-serving incomprehension and negative judgements. Really, editing to improve wikipedia has been done 822,283,242 times so far, but I never met an editor who was so self-glorifying degrading after a single edit.) -DePiep (talk) 20:39, 3 April 2016 (UTC)


 * File:Graham's Hierarchy of Disagreement-en.svg
 * Ok, it looks like I touched a nerve. So far, we've got the bottom four rungs of Graham's hierarchy of disagreement pretty well covered. Can we please dispense with the attacks and stick to the main point?  I've been WP:BOLD so as to improve Wikipedia, and deleted the above – in which you feel pride of WP:OWNERSHIP, and an opposing belief that it improved Wikipedia.  I've provided my reasons for considering that section unhelpful.  Perhaps you'd care to enlighten my "incomprehension" with a reason to feel otherwise?  Please try to stay within the top three rungs of the hierarchy.  Thanks. — groll tech   ( talk ) 22:11, 3 April 2016 (UTC)

Let's stick to discussing convert. Johnuniq (talk) 01:55, 4 April 2016 (UTC)
 * Can we please dispense with the attacks and stick to the main point? -- can't stop what you started yourself, can you? Even blaming someone else for your OP. -DePiep (talk) 22:07, 9 April 2016 (UTC)

DePiep, it was not my intent of my OP to "attack" you, or to offend you in any way. It is clear, however, that I personally offended you deeply, and for that, I really am sorry. When first I apologized, I should have left it at that. Instead, I was compelled to defend myself from the first of several attacks on my intelligence – and that offended you further. A couple of posts ago, I struck out that which I thought was most offensive in my OP, and today, I have struck more still. But I am not, as you say, "blaming someone else" for my OP, for they are my words and I take responsibility for them. And yet, I think that your indignation has you so focused on my initial offense that you don't realize how offensive your responses have been to me as well. So, time becomes a loop, escalate and repeat.

The main point of my OP was that is intended to be transcluded. It is not helpful to instruct editors to delete it through substitution. I have given my reasons for feeling that way, and on that point, there appears to be consensus. You disagree, and would probably say that the main point, actually, is that I am a prick. There's probably consensus on that as well, but I think your anger is keeping you from engaging objectively on the merits of substituting. Therefore, if we can't move past the ad hominem attacks, and if we respond only to the tone of the message rather than its content, then I think this discussion has run its course, and might recommend to a non-involved party that they close and archive this discussion.

Meanwhile, in the interest of transparency: I did notice the other day that this section also appears verbatim in Help:Convert. Since the same arguments about substitution apply there as here, I think it should – after giving sufficient and hopefully-less-offensive notice – be removed from there as well. — groll tech  ( talk ) 15:49, 29 April 2016 (UTC)