Skip to content

Clarify palindrome product exercise requirements#723

Closed
dkinzer wants to merge 1 commit intoexercism:masterfrom
dkinzer:patch-1
Closed

Clarify palindrome product exercise requirements#723
dkinzer wants to merge 1 commit intoexercism:masterfrom
dkinzer:patch-1

Conversation

@dkinzer
Copy link
Copy Markdown
Contributor

@dkinzer dkinzer commented Sep 11, 2017

REF #305

It's not clear from the current examples what the requirements of this exercise are. In fact, a furtive glance is more likely to cause confusion than give clarity.

In my opinion, this is because for the first example the solution lies within the range of the list of factors, giving on a first impression that we are looking for products that lie within this range.

I think that by listing out the entire list of products (which is small in the case of the range of 1..9) we make it more clear that we are considering all the results.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Breaking change (fix or enhancement that would cause existing functionality to change)
  • Gardening (code and/or documentation cleanup)

References and Closures

Checklist:

  • I have read the CONTRIBUTING document.
  • My change relies on a pending issue/pull request
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

REF exercism#305

It's not clear from the current examples what the requirements of this exercise are.  In fact, a furtive glance is more likely to cause confusion than give clarity.

In my opinion, this is because for the first example the solution lies within the range of the list of factors, giving on a first impression that we are looking for products that lie within this range.

I think that by listing out the entire list of products (which is small in the case of the range of 1..9) we make it more clear that we are considering all the results.
@Insti
Copy link
Copy Markdown
Contributor

Insti commented Sep 11, 2017

I like this. 👍

Would you be willing to make a PR against the common problem definition:

https://github.com/exercism/problem-specifications/blob/master/exercises/palindrome-products/description.md

From which this README is generated.

Thanks.

@Insti
Copy link
Copy Markdown
Contributor

Insti commented Sep 11, 2017

They've also fixed the It's there so we need to regenerate the readme anyway.
(we don't yet have an automated process for this.)

The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`.
And given the list of all possible products within this range:
`[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 15, 21, 24, 27, 20, 28, 32, 36, 25, 30, 35, 40, 45, 42, 48, 54, 49, 56, 63, 64, 72, 81]`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might also be handy to add a line identifying the palindromic products and noting explicitly there are no 2 digit palindromes.

@dkinzer
Copy link
Copy Markdown
Contributor Author

dkinzer commented Sep 11, 2017

Closing in favor of exercism/problem-specifications#897

@Insti
Copy link
Copy Markdown
Contributor

Insti commented Sep 11, 2017

Great, thanks. ❤️

@Insti
Copy link
Copy Markdown
Contributor

Insti commented Sep 11, 2017

There are some more clues about regenerating READMEs here: #722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants