Add missing stubs to exercises
See original GitHub issueThe problem
Right now for some exercises, a student is required to read the tests to know which functions they should implement. This is annoying, time consuming and might discourage people from doing the exercise entirely. We should provide stubs for all exercises. Stubs should provide the signature of functions and classes, just so the student is immediately ready to start writing the custom logic. This is an example of a stub, from the Raindrops exercise:
class RaindropConverter {
String convert(int number) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}
}
All stubs must follow this format.
Contributing to this issue
This is a big issue that will require changes to a lot of exercises. The good news is that you don’t need to fix this is all exercises to contribute to this issue! PRs fixing this in just one exercise at a time or a couple of exercises at a time are more than welcome.
Issue Analytics
- State:
- Created a year ago
- Comments:21 (19 by maintainers)
@PakkuDon I think they are all pretty much open 😃
It seems here in the Java track, all “medium” difficulty exercises or above don’t include stubs, so probably those are a good start, but there might be more. A quick
jq
query for exercises that are medium difficulty or above gives me this:jq query
There might be other exercises marked as easy that might not have stubs, so it might be worth to also double-check those.
About other tracks…I don’t know the state of stubs in other tracks other than the Go track, which has them. Also note the inclusion of stubs is something that each track can decide independently, some tracks might decide to not include them on purpose. If you are thinking on contributing a similar change to other tracks, please confirm the stance of each track on including stubs before proceeding.