Have had many hats on in my life: Developer, Team Lead, Scrum Master, Architect and Product Owner. Now back to developer \o/ Interested in product discovery, quality assurance and language design.
Great question! And a question that you should ask yourself and your teammates every time you are not sure.
Here is a fictional example:
publicvoidPrint(Pointposition,stringtext){…}
What would be obvious and what would not be obvious about this function?
It obviously prints text at position.
What is not obvious: Is there a maximum length for text? What happens when position is outside of the canvas? Will an exception be thrown? What happens when position is inside the canvas, but text will flow outside? Will it be wrapped?
What color is text printed in? What font face, font size, etc.?
And, since C# and Java are one of the stupid languages that mostly-always allow null for everything even when it makes no sense at all, you should state what happens when either of the argument is null. (Incidentally, System.Windows.Point is a struct in C# and therefore does not allow null, yay!)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great question! And a question that you should ask yourself and your teammates every time you are not sure.
Here is a fictional example:
What would be obvious and what would not be obvious about this function?
It obviously prints
text
atposition
.What is not obvious: Is there a maximum length for
text
? What happens when position is outside of the canvas? Will an exception be thrown? What happens when position is inside the canvas, but text will flow outside? Will it be wrapped?What color is
text
printed in? What font face, font size, etc.?And, since C# and Java are one of the stupid languages that mostly-always allow null for everything even when it makes no sense at all, you should state what happens when either of the argument is null. (Incidentally,
System.Windows.Point
is a struct in C# and therefore does not allow null, yay!)