Description
Hi @ErikSchierboom,
In the Binary Search Tree PR, we discussed the consistency of messages in the `NotImplementedException' and the benefits the changed wording has, especially for the web editor. See comment 1, comment 2 for reference.
I'd be happy to standardise the messages between concept and practice exercises, but I wanted to discuss options more.
- Function - while technically could be correct, it is not helpful and so not right in the context.
- The messages are useful to guide people doing the exercises through the web interface.
- The examples of current messages (with a little bit of context) are below.
The current concept message examples are:
public static Permission Default(AccountType accountType)
{
throw new NotImplementedException("Please implement the (static) Permissions.Default() method");
}
public static int[] LastWeek()
{
throw new NotImplementedException("Please implement the (static) BirdCount.LastWeek() method");
}
public int CountForFirstDays(int numberOfDays)
{
throw new NotImplementedException("Please implement the BirdCount.CountForFirstDays() method");
}
protected Character(string characterType)
{
throw new NotImplementedException("Please implement the Character() constructor");
}
public static string Describe(Destination destination)
{
throw new NotImplementedException("Please implement the (static) GameMaster.Describe(Destination) method");
}
There are some potential inconsistencies or issues above.
- Methods signatures usually don't include parameters, but sometimes they do. It does make sense, as in the last example the method Descibe is overloaded.
- When the method is not static the notation . suggests it anyway.
- Static in the parenthesis looks a bit confusing. The keyword is
static
not(static)
and so is the word. However, since we can only have the message in a situation where the method is defined and implemented with theNotImplementedException
, that might be redundant information. The signature will be there. - I'm really missing full stops at the end of a sentence in the message.
Could we do the following:
- for static methods
"Please implement the Permissions.Default(AccountType) method."
- for class instance methods
"Please implement the CountForFirstDays(int) method in the BirdCount class."
- for constructors
"Please implement the Character class constructor."
- for read/write properties
"Please implement the Name property in the Actor class."
- for a property with a getter only
"Please implement the getter of the Age property in the Actor class."
What do you think about the above proposal? Whichever way we agree to go, I'm happy to implement it.
I'm starting the discussion here on an issue, as it relates to PRs and comments already here, and the scope is relevant only to the track; however, if you think it would be better, I'll post it on the forum, too.