Well-defined input and output requirements in exercises

I’m not sure if it’s just because I’m new and can’t interpret things correctly, but it seems to me that the exercises lack a clear indication of how the inputs are structured, what kind of output is expected, and how the function is supposed to be named or called. I have to check the test cases every time to figure out this information on my own.
Marco

For practice exercises, that is deliberate. The instructions provide some context, but the tests are the detailed specification and you need to read them carefully. This is test-driven development in practice.

For tracks with a learning syllabus, I should note that the concept exercises are very different: simpler, with clearer specifications, and code samples that are similar to the tests.

1 Like

How the functions are named or called is given with the starter code, isn’t it?

That depends on the track and the exercise :slight_smile:

1 Like

for example, Conway’s Game of Life in Dart.
The only hint is the name of the class, the tests call a method, tick, and maybe another one, matrix. But matrix seems to be the input too.
I’m learning the language (otherwise i won’t do those exercises) and to figure out the forced structure the class has to have looking the test page or going for trials and errors seems to add an unecessary new layer of complexity

1 Like

Ah, I wrote that test suite. It seems a small readability tweak here would be to rename the matrix passed into the GameOfLife constructor. Would something like input or cells be helpful?

for sure. Then i have to change the way i approach exercism :)

1 Like