Talk:Determine if a string is collapsible: Difference between revisions

→‎What does determine mean?: posted several comments.
(→‎What does determine mean?: posted several comments.)
Line 31:
==What does determine mean?==
As the task is titled 'Determine if a string is collapsible' should there not be a non-collapsible example?--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:07, 8 June 2020 (UTC)
 
: There is a non-collapsible example,   the very first example is NOT collapsible.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:01, 8 June 2020 (UTC)
 
Good question, and that "determine if" thematic framing of the task inevitably produces clear expectations of a String -> Bool predicate, returning True or False for a given string.
 
: No, that is not what the task's requirement said;   ''determine if ...''   --- and then the very next sentence states:   ''And if so, ...''.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:01, 8 June 2020 (UTC)
 
That expectation is then lead completely astray into open fields, where no mention of any kind of test or predicate can actually be found in the detail of the sub-tasks. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 14:39, 8 June 2020 (UTC)
 
: You can use any kind or manner of test(s) to determine collapsibility that you think is effective or deterministic,   and if the string can be collapsed,   then change (collapse) the character string to meet the task's requirements.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:01, 8 June 2020 (UTC)
 
To put it another way, the title suggests writing and testing something like this:
Line 46 ⟶ 52:
 
which defines a new string but 'determines' nothing. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 14:48, 8 June 2020 (UTC)
 
: In order to define a new string, one has to (or should) determine if it is collapsible,   and then modify the string.   And if not collapsible,   then don't modify the string.   No mention was made or inferred that one should/must return a boolean value.   Task requirements shouldn't necessarily be inferred from the task's title, but from the task's requirements themselves.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:01, 8 June 2020 (UTC)