Misplaced Pages

User talk:Lightmouse: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 16:56, 8 September 2007 editChris the speller (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers868,748 edits Show Preview button and edit summaries: point out the edits← Previous edit Revision as of 19:43, 8 September 2007 edit undoSacxpert (talk | contribs)Extended confirmed users1,667 editsNo edit summaryNext edit →
Line 94: Line 94:


::16:38, September 7, 2007 to 16:54, September 7, 2007 (UTC). Surely you can understand that adding an edit summary such as "fix my typo" or "reword for clarity" will allow other editors to decide whether they need to examine that edit. ] 16:56, 8 September 2007 (UTC) ::16:38, September 7, 2007 to 16:54, September 7, 2007 (UTC). Surely you can understand that adding an edit summary such as "fix my typo" or "reword for clarity" will allow other editors to decide whether they need to examine that edit. ] 16:56, 8 September 2007 (UTC)

==Two Things==

One, don't strip wiki-dates from articles wholesale. For example, in the article on the ], you stripped out the wikilink to ]. Watergate is important enough that it has its own entry in the 1972 article, so it should remain. Per ], wikilinks are generally better unless they somehow detract from the article.

Second, please stop metricating when you don't know the units. In the article on the ], you swapped in two conversions to kilometres. First instance: "flew undetected the 600 miles to their target," and second: "a strong Japanese force was sighted some 200 miles north of Guadalcanal." Do you know which miles these were? You seem to assume statute miles, because that's what you converted, ''but do you know''? It's more likely that these were nautical miles, because, as has been discussed on the MOS page, nautical miles are an international standard for both shipping and aviation. Furthermore, if you are going to metricate with a low degree of accuracy (200 miles = 300 kilometres), at least consider not using your converter tool, and just write 200 miles (''circa'' 300 km) or (~300 km) or something to indicate that you are making an approximation with, in this case, a 21 km error, even assuming that your units were right in the first place (if you were wrong, you're actually off by 70 km). I appreciate that you are trying to quickly metricate all of Misplaced Pages, but in the process you are introducing errors, unneeded replication, conversion mistakes, and labeling units as "mi" when they are probably nothing of the sort. Please, please, please, take the time to slow down, examine the ''sources'' of articles, and try to metricate appropriately based on statute/nautical miles, or leave it alone if you can't make the determination. Do ''not'' insert autoconverters into articles that display "mi" units if you don't know what kind of miles about which you are talking. Thank you. ] 19:43, 8 September 2007 (UTC)

Revision as of 19:43, 8 September 2007


Monobook

Thanks, re this, I added your script to my user space. Now, as I said that I don't have training, could you direct me to a resource that I can use to get to know how to use scripts like this in WP? Thanks again. Michael Patrick 22:59, 28 August 2007 (UTC)

Aha. That's really cool and really convenient. I think I'll go metricate up a storm. Thank you. Michael Patrick 17:24, 29 August 2007 (UTC)
Yes, I'm checking each edit. I get a few redundant edits (already metricated), some incorrect precision (like when "100 miles" means "exactly 100 miles"), etc., but I catch them. Thanks again. Michael Patrick 20:00, 29 August 2007 (UTC)
Try the script on Oakland, California. It appears that non-breaking spaces confuse the script. Michael Patrick 14:45, 30 August 2007 (UTC)
Aha. It was not the non-breaking space. It was the position of the open parenthesis character '('. The code looks within two characters of 'ft' so it will handle 'x ft (y m)', I forgot that it also needs to handle a period as in 'x ft. (y m)'
I have fixed that. Thanks for letting me know. Lightmouse 17:16, 30 August 2007 (UTC)

Monobook part deux

So your script will only convert imperial to metric and not metric to imperial? —MJCdetroit 12:39, 5 September 2007 (UTC)

Correct. You are welcome to copy it and modify it to do that. Lightmouse 12:40, 5 September 2007 (UTC)
Holy smokes that was quick response. I may tinker with it a little as I think it would be beneficial to go both ways, but I am not familiar with the monobook script code. After all I am a chemist and not a computer programmer. So it may take a little trial and error. Regards, —MJCdetroit 12:46, 5 September 2007 (UTC)
Good luck. I am not a programmer either. I got it through blatent theft of code from others plus trial and error.
As you probably noticed, I am pro-metric. I sometimes edit non-metric units for consistency (you will see some of those in the code) because I am 'unit aware' (as you seem to be). I would prefer us all to work towards metrication rather than the other direction. However, I will share my limited knowledge of script if you want to produce your own bidirectional code. Lightmouse 13:55, 5 September 2007 (UTC)
Sorry, I prefer U.S. customary and I'm a scientist (shocking--I know), but am I not anti-metric. I very often add metric values when not present. I just think everyone should be given all the information available to help them. I don't think someone in Europe should read: 30 miles long and think, now what is 30 miles. Likewise, I don't think that someone in the U.S. or U.K. should be reading an article where they have to stop and think about what 48 kilometres are. I'll play with the code when I have time and let you know if I have any problems.—MJCdetroit 14:31, 5 September 2007 (UTC)

How to do arithmetic conversions

Lightmouse,

Sure, I could give you a few hints about all that #if: stuff, that one, for example, checks the presence or absence of stuff so, e.g., when you transclude {{#if:{{{1|}}}|something|nothing}} this will give you something if parameter {{{1}}} is given but will give nothing otherwise ... of course before that makes any sense you've got to look closely at the {{{1|}}} bit and note the pipe character. Whatever appears to the right of the pipe (still within the triple curlies) is the default value, e.g., {{{1|a}}} will give you a if no parameter {{{1}}} is given otherwise it will take the value provided. Note then how there's nothing to the right of the pipe in the above #if: example. {{{1|}}} just vanishes when no {{{1|}}} is given. Let's try this then ...

  • {{#if:anything|something|nothing}} gives something
  • {{#if:|something|nothing}} gives nothing

Well, that's the basics of #if: but of course there's also #expr:, #ifexpr:, #ifeq:, #switch:, etc. All great fun, but a good place to read up on them would be m:Help:Calculations. Don't hesitate to ask for another hint or two, though.

Good luck Regards Jɪmp 16:22, 5 September 2007 (UTC)

Thanks. Could I ask you to help me with a real example from my monobook. For example, it metricates torpedo diameter using:
  • txt.value=txt.value.replace(/\s(\d\d)(?:\s|-| )inch(?:\s|-| )torpedo/gi, ' {{convert|$1|in|mm|0|sing=on}} torpedo');
Thus '21 inch torpedo' becomes '21 inch (533 mm) torpedo'. However, it puts the convert template into the article. How might I do the arithmetic in my monobook so that the article is free of the convert template? Lightmouse 17:31, 5 September 2007 (UTC)
I'm afraid I'm no expert on monobook use. No ideas spring to mind but if do think of a solution, I'll keep you posted. Jɪmp 02:55, 6 September 2007 (UTC)

unlinking ft

Hey Lightmouse! I think you're doing good work, but I wanted to ask for details on one thing. I noticed (for example, on USS Tunny (SS-282)), that where I've linked the first use of "ft" to Foot (unit of length), you're removing those links. However, you're leaving "in" linked, which may be an oversight. I feel that in addition to providing conversions for U.S. units, it's a good idea to link their first use so that people who may be unfamiliar with a foot can learn about what it is instead of just looking at the meter conversion. Could we discuss this? TomTheHand 18:24, 6 September 2007 (UTC)

Sure we can discuss it. I think that common units are just like plain english. So thousands of links across Misplaced Pages seems weird to me. It isn't a big thing. As you point out with inches, I am not consistent. Lightmouse 18:38, 6 September 2007 (UTC)
I posted about this on the WP:SHIPS talk page here if you'd like to participate. I'm not sure what consensus will wind up being, but if it's decided that linking ft is excessive, could you please remove linked inches as well? It looks odd to unlink ft and leave in linked. TomTheHand 21:08, 6 September 2007 (UTC)
I take your point about the natural pairing of feet with inches. As you can probably see, I have moved the discussion to wp:mosnum. I hope you don't mind. Lightmouse 17:02, 7 September 2007 (UTC)

Convert template in ref titles

Thanks for your fixes etc to Somerset Levels. Did you mean to use the convert template in the title of a web page being referenced ie "title= 40 ft (12 m) sculpture unveiled in Somerset" in the section about the Willow Sculpture? I didn't think this is appropriate as the web page linked to 40ft sculpture unveiled in Somerset doesn't have any unit conversion in it.— Rod 15:35, 7 September 2007 (UTC)

Oops. I have gone back and fixed it. Thanks. Lightmouse 15:41, 7 September 2007 (UTC)

acreage

Hi, Lightmouse. In the oil industry we refer to a company's landholdings as its acreage. To be technically correct, I am afraid I will have to change it back. However, I can make it more clear by changing other words slightly. Thanks. 00:35, 8 September 2007 (UTC)

Who are you and what page are you talking about? Lightmouse 09:46, 8 September 2007 (UTC)

hi

Delinking units is fine by me; I'd tend not to advertise the fact, though, coz a lot of folks may object. :-) Tony 12:42, 8 September 2007 (UTC)

Thanks. Lightmouse 12:42, 8 September 2007 (UTC)

Barnstar

The Working Man's Barnstar
I award you this barnstar for your consistent and tireless work in cleaning up units of measure in various articles. Acdixon 13:35, 8 September 2007 (UTC)

Thank you very much! Lightmouse 13:36, 8 September 2007 (UTC)

Show Preview button and edit summaries

May I suggest that you learn to use the Show Preview button, and include some edit summary on talk pages? For example, making seven consecutive edits without summaries on "Misplaced Pages talk:Manual of Style (dates and numbers)" just to complete a two-line comment makes it difficult for other editors to use the edit history effectively when they want to follow the flow. Please make it less tedious and time-consuming. Happy editing! Chris the speller 15:46, 8 September 2007 (UTC)

I do not understand. I looked back at my edits on that page and they all seem to have an edit summary. Can you tell me which edits you mean? Lightmouse 16:29, 8 September 2007 (UTC)
16:38, September 7, 2007 to 16:54, September 7, 2007 (UTC). Surely you can understand that adding an edit summary such as "fix my typo" or "reword for clarity" will allow other editors to decide whether they need to examine that edit. Chris the speller 16:56, 8 September 2007 (UTC)

Two Things

One, don't strip wiki-dates from articles wholesale. For example, in the article on the Watergate scandal, you stripped out the wikilink to 1972. Watergate is important enough that it has its own entry in the 1972 article, so it should remain. Per WP:MOSLINKS, wikilinks are generally better unless they somehow detract from the article.

Second, please stop metricating when you don't know the units. In the article on the first aircraft carrier Enterprise, you swapped in two conversions to kilometres. First instance: "flew undetected the 600 miles to their target," and second: "a strong Japanese force was sighted some 200 miles north of Guadalcanal." Do you know which miles these were? You seem to assume statute miles, because that's what you converted, but do you know? It's more likely that these were nautical miles, because, as has been discussed on the MOS page, nautical miles are an international standard for both shipping and aviation. Furthermore, if you are going to metricate with a low degree of accuracy (200 miles = 300 kilometres), at least consider not using your converter tool, and just write 200 miles (circa 300 km) or (~300 km) or something to indicate that you are making an approximation with, in this case, a 21 km error, even assuming that your units were right in the first place (if you were wrong, you're actually off by 70 km). I appreciate that you are trying to quickly metricate all of Misplaced Pages, but in the process you are introducing errors, unneeded replication, conversion mistakes, and labeling units as "mi" when they are probably nothing of the sort. Please, please, please, take the time to slow down, examine the sources of articles, and try to metricate appropriately based on statute/nautical miles, or leave it alone if you can't make the determination. Do not insert autoconverters into articles that display "mi" units if you don't know what kind of miles about which you are talking. Thank you. Sacxpert 19:43, 8 September 2007 (UTC)

User talk:Lightmouse: Difference between revisions Add topic