Re-design `allergies`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- php
- Ambito
- testing-qa
Direzione di ricerca
Inizia esaminando l'esercizio allergies corrente, la sua classe helper Allergen e i test che usano Allergen in un dataProvider. Confronta i tre suggerimenti su enum e tipi primitivi, quindi considera completati l'esercizio scelto e la progettazione dei test quando l'implementazione non richiederà più l'approccio problematico basato sulla classe helper.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The current exercise design has many problems:
- Students must implement a helper class
Allergenthat has no TDD style guidance Allergenis used in tests, in a@dataProvider. That gives hard to understand PHP errors in tests onlyAllergenwould not be implemented that way anymore - it is a typicalenumclass
Problem 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. But enum is optimal for interfaces, internal enum usage just complicates things.
Suggestion 2: Provide enum stub
In 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 the enum type, too (like Allergen now).
This forces students to use enum. It raises the bar for students not familiar with that. But enum 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?
- Lingua principale
- PHP
- Stelle
- 167
- Fork
- 150
- Merge medio
- 1g 18h
- PR unite (30g)
- 7
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di exercism/php
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Discussion: Test generator designForse di nuovo libera @mk-mxp l’ha presa 372 giorni fa e non c’è nessuna pull request aperta. Aperta
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
Tracking: Test generator MVPForse di nuovo libera @mk-mxp l’ha presa 962 giorni fa e non c’è nessuna pull request aperta. Aperta
exercism/php#631 · 2 commenti · 1 reazione · 1 assegnatario ·
Tutte le issue di exercism/php
Issue simili
-
Translation TwigBridge
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
symfony/symfony-docs#23308 ·
I maintainer di solito rispondono entro 3 giorni
-
sync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
WordPress/hosting-handbook#506 ·
I maintainer di solito rispondono entro 2 giorni
-
在主页右上角的头像菜单栏中增加说说写作快捷入口Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
mirai-mamori/Sakurairo#1435 · 1 commento ·