Talk:Box the compass: Difference between revisions

m
→‎Renaming of a programming language: elided the use of «code» to use highlighting.
(→‎Why C needs fixing: Help clarify?)
m (→‎Renaming of a programming language: elided the use of «code» to use highlighting.)
 
(11 intermediate revisions by 5 users not shown)
Line 68:
 
::::Any thoughts on a task clarification to help future implementers not get into the same issue that you have? --[[User:Paddy3118|Paddy3118]] 10:17, 28 November 2011 (UTC)
:::::I don't know--I'm very confused by the task, and I doubt you are any less so. Let's see the facts:
:::::# There is an established mapping from degrees to 32 direction names (stuff like 5.625 notwithstanding);
:::::# We are to provide a method to implement said mapping; it's not to break the convention used by generations of pirates;
:::::# A list of 33 values are provided, and we are expected to generate a table of some kind that uses a value on each row; the values are not the same as the defining values for the cardinal directions (centers or edges)
:::::# The table is to look like the table in the WP article.
:::::Disregarding 4, then the only sensible interpretation is that the table is a list of the values and their corresponding direction names. If so, there's not much reason to mandate the table rows be numbered, much less that the last index should wrap around. And the meaning of 4 is clear as mud: the WP table provides 33 rows containing 32 definitions of the direction names, while table here contains 33 rows with 33 test values, they are not the same thing at all, why do you want any superficial resemblance between them? If you want the task desc to be clear, getting rid of either 3 or 4 would be a start.
:::::Now for something completely different. Instead of looking up names in a simple 32-list, most solutions strive to be clever and generate names from shorter strings. To me this feels like wasted brain activity, which generates heat and contribute to global warming without a just cause. That, and the fact that the program becomes more complicated without saving much, if any, space. Plus, it will only work in English: you can concatenate "north" and "east" and tell an English pirate to sail northeast, but try telling a self-respecting French pirate to sail "le nordl'est" and he'll report you to L'Académie française. Similarly, a CJK pirate sails "東北", that is, "East North". A dumber method requires straightforward string translation, while the clever ones would have to have the logic rewritten for different languages, totally not worth the effort. --[[User:Ledrug|Ledrug]] 12:45, 28 November 2011 (UTC)
::::::The non-English language argument seems like a good reason to keep the indices. The table in WP defines 32 ranges which just happen to have names like "North" and "Southwest" in English. The names will change between spoken languages but the index (1 to 32) will be the same in all of them. So the index would be the important part and the direction name would just be the human-readable form. --[[User:Mwn3d|Mwn3d]] 13:19, 28 November 2011 (UTC)
 
::::::You extract four 'facts' from the task decription then immediately disregard one before continuing?
 
::::::You seem to have given the column marked '#' a meaning of 'index' then say that that meaning does not make sense. What if the '#' column where a shaft encoding, one turn encoded as digits 1 to 32? What if ...? The meaning of that column is not given. --[[User:Paddy3118|Paddy3118]] 20:04, 28 November 2011 (UTC)
::::::: I disregarded 4 because with it there would be no clear interpretation for the task (what does "instead use these values" even mean? Redefine what "North" is?), that's not my wrongdoing. Like I said, before worrying about what the column is, why don't you clarify what the ''table'' is, and why are we given a list of 33 strange numbers? Also, if the meaning is "not given", on what basis can you claim the values are incorrect to begin with? --[[User:Ledrug|Ledrug]] 20:30, 28 November 2011 (UTC)
::::::::"The table" is a list of 32 ranges of degrees ("arcs"?) on a compass (for some reason they chose to split "North" into two rows with the same number) and their names. The "number" column (also called "index" in other parts of this discussion) corresponds to the numbers on the compass picture on that article ("1" being "North"). The "strange numbers" are test values we can use to make sure that the algorithm properly maps values to the given named ranges. Since there is no range #33 on the compass (which should probably be mentioned or maybe even duplicated in the task), no given value can correspond to #33. The last value falls within range #1, "North". --[[User:Mwn3d|Mwn3d]] 20:39, 28 November 2011 (UTC)
::::::::: In that case perhaps the index should be tied to the result rather than being taken mod 32. [[User:CRGreathouse|CRGreathouse]] 21:43, 28 November 2011 (UTC)
::: Yes, it's a pretty silly task in that respect. I found it easier to change the code than to argue for the obvious numbering. [[User:CRGreathouse|CRGreathouse]] 19:01, 28 November 2011 (UTC)
:::: It indeed takes a few keystrokes to make the output compliant--but compliant to ''what''? In any event, I'm done arguing, I've said more than enough already. --[[User:Ledrug|Ledrug]] 20:30, 28 November 2011 (UTC)
 
===Direction, index, and angle===
When comparing angles and directions as the wp table does, then you have to deal with the issue of ranges. Angles can go beyond representing one turn - directions are merely headings: turn 720 degrees and you end up at the same heading. If the names of the points of the compass in order are enumerated from 1 you end up with an index that has no 33. It makes sense to index the compass points in such a way as they are difficult to remember - hence their recollection in order being a test. Having thirty three and one as indices would be implying that North and North are different headings/bearings/directions which is an absurdity.
 
In creating the wp table, the author chose to show a mapping between ranges of angles and compass points that goes (just) beyond one turn of angle. They show a second occurrence of North. They show a second occurrence of Norths index too which is 1.
 
If the tables index were of ranges of angle rather than compass point then we would indeed have a different range and so a different index would be appropriate, ''but that is not the case''.
 
I must admit that I did not have this argument in full to handuntil now. I must also say though that I did note that the index wrapped and that it seemed right and proper to do so. (Wrapping angles so they end up in 0-360 degree range is commonplace for me, almost like a "normallization for angles", so seeing an index wrap when the direction wrapped rang no bells in my case). --[[User:Paddy3118|Paddy3118]] 04:57, 29 November 2011 (UTC)
 
==Renaming of a programming language==
 
I hope I didn't break the rules.   The (old) entry under   '''REXX'''   was instead,   '''ooRexx'''.
 
 
This would be similar to someone entering a   '''C++'''   entry under   '''C'''.
 
 
If this isn't acceptable, I would like the know what the procedure is, and should the original poster be told of this?
 
I didn't like to move an entire (big) programming entry like that, too many things could've gone wrong with my fat fingers and not-so-good eyesight.   -- [[User:Gerard Schildberger|Gerard Schildberger]] 18:21, 13 May 2012 (UTC)