doctor-data task 4 "get_older_bob" is confusing

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.

I think more test cases might be the best way. The “special” thing about that exercise, is that I don’t want to clutter the description too much and thus have only a limited number of test cases. I think I have to abbreviate the results somehow.

I have been looking at some of the solutions and it seems like most of the solutions ignore the “Bob” part and only compare generations.
I would suggest to just rename it to “get_older_vessel” and just have it return the older of the two vessels.
Unless the “check if its is a bob part” is really important.

It is aimed at comparing the generations. My wording might be bad, as the vessels are all “Bob” in the source material. That might have made the exercise harder to understand for people who have not read (or heard) the books.

You are right. I did not know the source material. Thanks for the link.
It does not help though that only one of the vessels is actually called “bob1” :sweat_smile:
Should I open a pull request to rename the function to “get_older_vessel” or will you handle it?
I am new to exercism so I am unsure whats the best way to contribute but I would like to help if I can.