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
The first question is regarding the git commit message subject
I want to follow the commit message subject styling Here, in addition to those mentioned in the SE-Education.
In it I add a commit type to each commit, and then capitalising the first letter of the description that follows.
Which essentially transform commit messages from
Add input handling Update installation guide Shift processing to Processing class
to
feat: Add input handling docs: Update installation guide refactor: Shift processing to Processing class
I would like to ask if this is allowed or is it not advised.
The second question is regarding Java styling conventions.
Should there be a space before the left brace of the array initializer, i.e
int[] X = new int[] {1, 3, 5, 6, 7, 87, 1213, 2};
int[] empty = new int[] {};
instead of
int[] X = new int[]{1, 3, 5, 6, 7, 87, 1213, 2};
int[] empty = new int[]{};
The text was updated successfully, but these errors were encountered:
int[] X = new int[] {1, 3, 5, 6, 7, 87, 1213, 2};
int[] empty = new int[] {};
Sorry I just wanted to tag along with your question as I have a closely related one.
Java seems to allow a shorter syntax for array initialization: int[] X = {1, 2, 3};, which I feel is more readable than the one with new int[]. I wonder which one is preferred in this course?
Git convention: you are allowed to use prefixes in the commit message as per the example stated.
Java: Should there be a space before the left brace of the array initializer ...
Yes. For things not explicitly mentioned in the coding standards, we will follow the Google style guide. Though not explicitly mentioned, you can see the spacing is the same as what is asked.
For array initialization, you can use either method. There are no restrictions.
The first question is regarding the git commit message subject
I want to follow the commit message subject styling Here, in addition to those mentioned in the SE-Education.
In it I add a commit type to each commit, and then capitalising the first letter of the description that follows.
Which essentially transform commit messages from
Add input handling
Update installation guide
Shift processing to Processing class
to
feat: Add input handling
docs: Update installation guide
refactor: Shift processing to Processing class
I would like to ask if this is allowed or is it not advised.
The second question is regarding Java styling conventions.
Should there be a space before the left brace of the array initializer, i.e
instead of
The text was updated successfully, but these errors were encountered: