Re-design `allergies`
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- php
- 领域
- testing-qa
调研方向
首先审查当前的 allergies exercise、其 Allergen helper class,以及在 dataProvider 中使用 Allergen 的测试。比较三种 enum 和 primitive-type 建议,然后在实现不再需要有问题的 helper-class 方法后,将选定的 exercise 和测试设计定义为完成。
由索引模型根据 Issue 内容生成。
描述
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?
- 主要语言
- PHP
- 星标
- 167
- 派生
- 150
- 平均合并
- 22 小时 18 分钟
- 30 天内合并 PR
- 7
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
exercism/php 的其他 Issue
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
Discussion: Test generator design可能重新可做 @mk-mxp 于 376 天前认领,目前没有进行中的 PR。 未关闭
-
难度 5/5 一周以上 新手友好度 20/100
-
Tracking: Test generator MVP可能重新可做 @mk-mxp 于 966 天前认领,目前没有进行中的 PR。 未关闭
相似的 Issue
-
major-release
难度 1/5 1 小时以内 新手友好度 67/100
Intervention/image#1553 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
omegaup/omegaup#10353 · 1 条评论 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 61/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
effort: low graphiql ide impact: low scope: code quality type: chore
难度 2/5 1-3 小时 新手友好度 82/100
wp-graphql/wp-graphql#4486 ·
维护者通常 1 天内回复