CS2103JAN2017-W10-B1 / main

Dueue
MIT License
1 stars 0 forks source link

Coding standard review #112

Open wangzexin opened 7 years ago

wangzexin commented 7 years ago

Single-column stacking of parameters or exceptions is discouraged in most cases, unless the column is wide enough. While such stacking improves the list of parameters/exceptions, it may not outweigh the cost of increased height of the code.

May be this needs to be changed? return new Event( new Name(name), new TaskDate(date), new TaskTime (startTime), new TaskTime(time), new Description(description), new Tag(tag), new Venue(venue), new Priority(priority), isFavourite );

wangzexin commented 7 years ago

Header comments

Note that we need to have well-written header comments for all non-trivial classes, methods, and variables.

This may be still lacking in many of the commands / parsers / formatters

wangzexin commented 7 years ago

boolean methods / variables names should be starting with is/has/can/should

Found this interface:

interface Expression {
    boolean satisfies(ReadOnlyTask task);
    boolean satisfies(Tag list);
    String toString();
}
wangzexin commented 7 years ago

Plural form should be used on names representing a collection of objects.

wangzexin commented 7 years ago

SLAP: required method length is around 10-15 lines

Will need to refactor (extract methods)

wangzexin commented 7 years ago

Javadoc comments

Javadoc comments should have the following form:

/**

The opening /* on a separate line Write the first sentence as a short summary of the method, as Javadoc automatically places it in the method summary table (and index). See here (from [5]) for more info. Subsequent is aligned with the first one Space after each * Empty line between description and parameter section Alignment of parameter descriptiotns Punctuation behind each parameter description -No blank line between the documentation block and the method/class

This comment pattern has not been enforced well

wangzexin commented 7 years ago

Specific if statement / whitespace standards should have already been checked by Codacy/Checkstyle