Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctor-data task 4 "get_older_bob" is confusing #878

Open
Peaj opened this issue May 17, 2024 · 3 comments
Open

doctor-data task 4 "get_older_bob" is confusing #878

Peaj opened this issue May 17, 2024 · 3 comments

Comments

@Peaj
Copy link

Peaj commented May 17, 2024

I think in this case either the test case is to simple or the function name is misleading.
The test only checks if the function returns the string "Bob".
Out of two Vessels it seems to return the name of the one called "Bob".

The function name suggests that in the case of two Bob Vessels it would return the older one.
As it only returns the name there is no way to check though.

Also what happens when none of the inputs is a Vessel called "Bob"?

With all accessible information the most sensible solution to the task here might be to ignore the inputs and always return "Bob".

I think this function needs more test cases and/or should be ranamed.

Copy link
Contributor

Hello. Thanks for opening an issue on Exercism 🙂

At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.

This issue will be automatically closed. Please use this link to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!

If you're interested in learning more about this auto-responder, please read this blog post.

@vaeng vaeng reopened this May 28, 2024
@heijp06
Copy link
Contributor

heijp06 commented Oct 5, 2024

I could pick this up.

The only solution I see is that the heaven::get_older_bob() function is renamed to heaven::get_older_vessel(). Both in the test file and in the instructions of the exercise. The function compares the age of 2 objects of type Vessel. Apart from in the name of this function, "bob" only appears in the test file. Doing this change would invalidate previous solutions to this exercise. I see no way around that.

With this exercise there is also this issue. I could do that as well or should that be done in a separate PR?

@vaeng
Copy link
Contributor

vaeng commented Oct 8, 2024

@heijp06

Thanks for the initiative. You are very welcome to combine the issues into a single PR. Make sure to correct the errors in all the places, where the information might be doubled.

For code it can be examples in the instructions.md, help.md, the example files and the tests.

I like the change to older_vessel. We should add another test case, so it is clearer for the users. I might have been too close to the source material, where the vessels are all bob and the original vessel, and thus oldest is also called bob.

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

No branches or pull requests

3 participants