Skip to content

two-fer: clarifying specification#1374

Merged
rpottsoh merged 1 commit intoexercism:masterfrom
uzilan:twofer
Oct 21, 2018
Merged

two-fer: clarifying specification#1374
rpottsoh merged 1 commit intoexercism:masterfrom
uzilan:twofer

Conversation

@uzilan
Copy link
Copy Markdown
Contributor

@uzilan uzilan commented Oct 17, 2018

As a mentor, I often see solutions of two-fer where the mentee simply didn't understand the exercise. Sometimes they just check for the names Alice and Bob and return a string with these names. If the given name is neither, they return the string with you instead. See for example here: https://exercism.io/mentor/solutions/93be9a7ec7014a38920063a683963ffa

I believe this problem stem from the fact that the description is unclear. This PR contains my suggestion for making it a bit clearer by being more thorough and by giving some examples.

@rpottsoh rpottsoh changed the title Trying to simplify the Twofer exercise specification two-fer: simplify specification Oct 17, 2018
@rpottsoh
Copy link
Copy Markdown
Member

rpottsoh commented Oct 17, 2018

Only mentors for the track you are considering will be able to view the link you have posted. Please consider posting the code into a comment so we all can see it.

@rpottsoh rpottsoh changed the title two-fer: simplify specification two-fer: clarifying specification Oct 17, 2018
@rpottsoh
Copy link
Copy Markdown
Member

I would say that this change clarifies the specification, but doesn't simplify the explanation. It was pretty simple already. 😄

@uzilan
Copy link
Copy Markdown
Contributor Author

uzilan commented Oct 17, 2018

Here's the example solution I was referring to:

class Twofer {
    String twofer(String name) {
        if (name == "Alice") {
    	    name = "Alice";
        } else if (name == "Bob") {
    	    name = "Bob";
        } else {
    	    name = "you";
        }
    	return "One for " + name + ", one for me.";
    }   
}

Copy link
Copy Markdown
Member

@rpottsoh rpottsoh left a comment

Choose a reason for hiding this comment

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

I like the nod to Douglas Adams. 👍

@uzilan
Copy link
Copy Markdown
Contributor Author

uzilan commented Oct 18, 2018

I was consodering Slartibartfast but it was slightly too long :)

Copy link
Copy Markdown
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

I have mentored this exercise lots of times and have never seen anyone do this, but it sure can't be bad to add this :)

@rpottsoh
Copy link
Copy Markdown
Member

I am going to go ahead and merge this. Thanks @uzilan for making these improvements to the README.

@rpottsoh rpottsoh merged commit 730f0c5 into exercism:master Oct 21, 2018
@uzilan
Copy link
Copy Markdown
Contributor Author

uzilan commented Oct 22, 2018

Thank you too. So, how do the different tracks get the updated version? Do we need a PR in every track?

@rpottsoh
Copy link
Copy Markdown
Member

It is up to each track to update their README for this exercise. Hopefully the track maintainers are monitoring this REPO and have noticed this PR merging. The tracks applying the changes you have submitted is completely voluntary. The tracks are not required to follow what happens in this repo to the letter, but most do. Others may add their own twists to the exercises that work well with their particular language.

If there is a particular track where you would like to see you changes incorporated I suggest creating an issue in that track's repo and site this PR in your comment.

@uzilan uzilan deleted the twofer branch October 23, 2018 22:34
uzilan added a commit to uzilan/exercism-java that referenced this pull request Oct 23, 2018
uzilan added a commit to uzilan/exercism-kotlin that referenced this pull request Oct 24, 2018
uzilan added a commit to uzilan/exercism-kotlin that referenced this pull request Oct 24, 2018
mikegehard pushed a commit to exercism/kotlin that referenced this pull request Mar 3, 2019
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.

3 participants