-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Re-design allergies
#772
Comments
On 2024-08-18 another issue popped up: As a workaround, I Edit: After identifying the real cause, rephrased the problem statement and the solution. Issue solved in #789 |
I would go for solutions 3, |
The current exercise design has many problems:
Allergen
that has no TDD style guidanceAllergen
is used in tests, in a@dataProvider
. That gives hard to understand PHP errors in tests onlyAllergen
would not be implemented that way anymore - it is a typicalenum
classProblem specifications do not ask for a certain implementation. They define the problem statement as open as possible. Our design also should allow as many solutions as possible.
Suggestion 1: Strings and integers only
This leaves all possibilities open. Mentors can suggest
enum
or such to students. Butenum
is optimal for interfaces, internalenum
usage just complicates things.Suggestion 2: Provide
enum
stubIn addition to the tests from problem specifications we test the
enum
implementation first. When that is implemented, the actual problem is tested for. In these tests we must use theenum
type, too (likeAllergen
now).This forces students to use
enum
. It raises the bar for students not familiar with that. Butenum
would be a good choice in a real life scenario.Suggestion 3: Provide ready-made
enum
As before, this forces students to use an
enum
type. But the level of required knowledge is lower (only usage is required). But still, it makes no sense to work with other types internally then.Which way to go? Other suggestions?
The text was updated successfully, but these errors were encountered: