Open drustanyjt opened 5 months ago
Hello, thank you for raising this. However we think that the issue is not as as severe as stated, since the omission of the return value doesn't the affect central idea of the diagram (i.e., not knowing what StarCommand returns does not greatly affect the understanding of the overall command execution sequence.)
Hence we are considering this to be a cosmetic issue instead.
Team chose [severity.VeryLow
]
Originally [severity.Medium
]
Reason for disagreement: I don't agree that this is purely cosmetic, because the omission of what is being returned, combined with the fact that CommandResult
was left in the diagram, makes the diagram as a whole less clear, which affects the reader's ability to understand what's important in the diagram.
First take a look at this code snippet of StarCommand
:
On line 69 we see that the CommandResult
object that was created is being returned. So it is true that a CommandResult
is being returned. This by itself is not a problem, because return values for sequence diagrams are optional. However looking at the diagram:
Notice that the instantiated CommandResult
in the diagram is never used, nor referenced again at all in the whole diagram, or the text. Because it was not mentioned that CommandResult
is being returned, it looks like it serves no purpose in this diagram, which would cause a developer to wonder why it was left in the diagram in the first place.
Would it be better to then have left the whole CommandResult
entirely? That is debatable.
The developers mentioned that the omission does not affect the central idea of the diagram, which is to understand the overall command execution sequence. But a key feature of Sequence Diagrams is that it also allows the developers to show how the execution interacts with other entities in the sequence, not just the sequence itself. This comes from the textbook:
And CommandResult
is very much an important entity in the whole execution. Not only is it meant to be returned by StarCommand#execution
, it is actually also returned from the LogicManager#execution
call:
So it is not entirely a trivial entity either.
I would also ask that considering the diagram as a whole, there are many parts that are not "essential" to understanding the sequence of the execution (for example the saving to hard disk in the Storage component). Arguably, there are things that are missing (for example, a call to model.setStudent()
is what changes the count of stars in the first place. From the code snippet of the StarCommand
above, updateFilteredPersonList()
on line 68 isn't even part of the Star changing logic, it merely resets the UI).
Hence, I feel that mentioning what is being returned is at least as important as other aspects of the diagram that have been left in. In particular, it explains why CommandResult
even needs to be left in the diagram. Since this omission has an affect on the understanding of the diagram, I don't believe it can be chalked up to a cosmetic issue, and should not be VeryLow. It should minimally be a Low severity bug.
Documentation Bug Description
This is the StarCommand section Seq Diagram:
Notice it does not mention what is returned from StarCommand:
Expected
Say that it is the command result or the command that is being returned.
Severity
Not a purely cosmetic issue in docs or UI, so cannot be VeryLow. Medium because all Devs would need to go into the code to figure out what exactly is going on, quite inconvenient and undermines the convenience of having diagrams.