You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to do some tests, but the Instruction (or Introduction) part of some exercises are not clear what the result it expects the function returns.
It just says "report", but doesn't clearly specify what data the function should return. For example, an ideal introduction should be:
Given a year, return atom `true` if it's a leap year, otherwise return atom `false`.
If this is easy to guess what it should return, let's take another exercise for example, sublist:
Introduction
Given two lists determine if the first list is contained within the
second list, if the second list is contained within the first list, if
both lists are contained within each other or if none of these are
true.
Specifically, a list A is a sublist of list B if by dropping 0 or more
elements from the front of B and 0 or more elements from the
back of B you get a list that's completely equal to A.
I don't think students can understand what the functions should return.
After checked file test/sublist_tests.erl, i realize it expects function sublist:relation() returns atoms like equal, unequal, sublist, superlist. Can you understand this by just reading the Introduction part of the exercise? Asking an unclear question won't get you precise answer.
The text was updated successfully, but these errors were encountered:
iredmail
changed the title
It's unclear what result the unittest expects
It's unclear what result the functions should return
Oct 5, 2019
Yeah, I can understand what you mean. Though I also think its obvious in the case of leap:leap_year/1 that it should return boolean().
Providing typespecs for the required functions across all exercises is definitely a goal for the track, though I have to put it somewhere mid- to long-term for the moment.
I appreciate some PRs for the manually implemented exercises though (same rules as for the version PRs apply, see #414)
I also have to add, that its hard to be more explicit in the README, as the same text is used across all tracks (currently ~50), so we try to write them in a way that suites all of the languages.
Dear all,
I'm trying to do some tests, but the
Instruction
(orIntroduction
) part of some exercises are not clear what the result it expects the function returns.For example, exercise
Leap
:It just says "report", but doesn't clearly specify what data the function should return. For example, an ideal introduction should be:
If this is easy to guess what it should return, let's take another exercise for example,
sublist
:I don't think students can understand what the functions should return.
After checked file
test/sublist_tests.erl
, i realize it expects functionsublist:relation()
returns atoms likeequal
,unequal
,sublist
,superlist
. Can you understand this by just reading theIntroduction
part of the exercise? Asking an unclear question won't get you precise answer.The text was updated successfully, but these errors were encountered: