diff --git a/README.html b/README.html index 735e8373..d4d4480a 100644 --- a/README.html +++ b/README.html @@ -14,7 +14,7 @@

Guides for SE student projects »

Go to the main website [http://se-education.org/guides]

+

Guides for SE student projects »

Go to the main website [http://se-education.org/guides]

diff --git a/README.page-vue-render.js b/README.page-vue-render.js index 3977c9f3..307dfbd0 100644 --- a/README.page-vue-render.js +++ b/README.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('p',[_v("Go to the main website ["),_c('a',{attrs:{"href":"http://se-education.org/guides"}},[_v("http://se-education.org/guides")]),_v("]")]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/about.html b/about.html index 299120b2..e30574ce 100644 --- a/about.html +++ b/about.html @@ -16,7 +16,7 @@ Search this site

Guides for SE student projects »

About Us

This is a sub-project of the se-education.org.

Contact

Suggestions, questions, and bug reports can be posted in our issue tracker.

Alternatively, contact project mentor Damith C. Rajapakse. -

License

This work is released under the MIT OSS license.

Contributing

PRs to improve/add content are welcome.

This website uses MarkBind documentation tool. This document has some guidance on how to use it when updating contents.

Follow the Markdown style guide in your PR.

Acknowledgements

The favicon.ico is based on an icon made by Dave Gandy from www.flaticon.com

+

License

This work is released under the MIT OSS license.

Contributing

PRs to improve/add content are welcome.

This website uses MarkBind documentation tool. This document has some guidance on how to use it when updating contents.

Follow the Markdown style guide in your PR.

Acknowledgements

The favicon.ico is based on an icon made by Dave Gandy from www.flaticon.com

diff --git a/about.page-vue-render.js b/about.page-vue-render.js index 96b05b81..5c34c98b 100644 --- a/about.page-vue-render.js +++ b/about.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"about-us"}},[_v("About Us"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#about-us","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("This is a sub-project of the "),_c('a',{attrs:{"href":"https://se-education.org"}},[_v("se-education.org")]),_v(".\n"),_c('span',{attrs:{"id":"contact-info"}})]),_v(" "),_c('h2',{attrs:{"id":"contact"}},[_v("Contact"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#contact","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("Suggestions, questions, and bug reports can be posted in "),_c('a',{attrs:{"href":"https://github.com/se-edu/guides/issues"}},[_v("our issue tracker")]),_v(".")]),_v(" "),_c('p',[_v("Alternatively, contact project mentor "),_c('a',{attrs:{"href":"https://www.comp.nus.edu.sg/~damithch"}},[_v("Damith C. Rajapakse")]),_v(".\n")]),_v(" "),_c('h2',{attrs:{"id":"license"}},[_v("License"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#license","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("This work is released under the "),_c('a',{attrs:{"href":"https://opensource.org/licenses/MIT"}},[_v("MIT OSS license")]),_v(".")]),_v(" "),_c('h2',{attrs:{"id":"contributing"}},[_v("Contributing"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#contributing","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("PRs to improve/add content are welcome.")]),_v(" "),_c('p',[_v("This website uses MarkBind documentation tool. "),_c('a',{attrs:{"href":"/guides/tutorials/markbind.html"}},[_v("This document")]),_v(" has some guidance on how to use it when updating contents.")]),_v(" "),_c('p',[_v("Follow the "),_c('a',{attrs:{"href":"/guides/conventions/markdown.html"}},[_v("Markdown style guide")]),_v(" in your PR.")]),_v(" "),_c('h2',{attrs:{"id":"acknowledgements"}},[_v("Acknowledgements"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#acknowledgements","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("The "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("favicon.ico")]),_v(" is based on an icon made by "),_c('a',{attrs:{"href":"https://www.flaticon.com/authors/dave-gandy"}},[_v("Dave Gandy")]),_v(" from www.flaticon.com")]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/csharp.html b/conventions/csharp.html index 7af36678..f27828e2 100644 --- a/conventions/csharp.html +++ b/conventions/csharp.html @@ -471,7 +471,7 @@ -

References

+

References

diff --git a/conventions/csharp.page-vue-render.js b/conventions/csharp.page-vue-render.js index 696e2352..7e13289c 100644 --- a/conventions/csharp.page-vue-render.js +++ b/conventions/csharp.page-vue-render.js @@ -269,6 +269,6 @@ with(this){return _c('h2',{attrs:{"id":"references"}},[_v("References"),_c('a',{ with(this){return _c('ul',[_c('li',[_c('a',{attrs:{"href":"https://msdn.microsoft.com/en-us/library/ff926074.aspx"}},[_v("C# Coding Conventions (C# Programming Guide)")]),_v(" -- From Microsoft")]),_v(" "),_c('li',[_c('a',{attrs:{"href":"http://www.icsharpcode.net/TechNotes/SharpDevelopCodingStyle03.pdf"}},[_v("C# Coding Style Guide")]),_v(" -- By Mike Krüger")]),_v(" "),_c('li',[_c('a',{attrs:{"href":"https://github.com/dennisdoomen/CSharpGuidelines"}},[_v("CSharpGuidelines")]),_v(" -- From Aviva Solutions")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/css.html b/conventions/css.html index 67a2cc33..1c7ebce9 100644 --- a/conventions/css.html +++ b/conventions/css.html @@ -217,7 +217,7 @@ -

Attribute Formatting

General Details

Resources

+

Attribute Formatting

General Details

Resources

diff --git a/conventions/css.page-vue-render.js b/conventions/css.page-vue-render.js index 7f16a641..fb32ef4c 100644 --- a/conventions/css.page-vue-render.js +++ b/conventions/css.page-vue-render.js @@ -146,6 +146,6 @@ with(this){return _c('h2',{attrs:{"id":"resources"}},[_v("Resources"),_c('a',{st with(this){return _c('ul',[_c('li',[_c('p',[_v("Highly Recommended")]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"https://google.github.io/styleguide/htmlcssguide.xml"}},[_v("Google CSS Style Guide")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"http://learn.shayhowe.com/html-css/writing-your-best-code/#css-coding-practices"}},[_v("Writing Your Best Code - CSS Coding Practices")])])])]),_v(" "),_c('li',[_c('p',[_v("Other Readings")]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"https://code.tutsplus.com/tutorials/30-css-best-practices-for-beginners--net-6741"}},[_v("30 CSS Best Practices For Beginners")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"https://css-tricks.com/css-style-guides"}},[_v("A list of CSS style guides")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"http://isobar-idev.github.io/code-standards/"}},[_v("Isobar coding standards")])])])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/files.html b/conventions/files.html index 74c21306..1e238b7d 100644 --- a/conventions/files.html +++ b/conventions/files.html @@ -16,7 +16,7 @@ Search this site

Guides for SE student projects »

Conventions for file/folder naming

Files/Folders

+

diff --git a/conventions/files.page-vue-render.js b/conventions/files.page-vue-render.js index eacc7264..8a285890 100644 --- a/conventions/files.page-vue-render.js +++ b/conventions/files.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"conventions-for-file-folder-naming"}},[_v("Conventions for file/folder naming"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#conventions-for-file-folder-naming","onclick":"event.stopPropagation()"}})]),_v(" "),_c('h2',{attrs:{"id":"files-folders"}},[_v("Files/Folders"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#files-folders","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('strong',[_v("General rule: aim for "),_c('em',[_v("local consistency")])]),_v(" i.e., follow the conventions/patterns followed by other files/folders in the neighborhood.\n"),_c('ul',[_c('li',[_v("If the project uses a framework that has a specific file naming convention, follow that instead.")])])])]),_v(" "),_c('p'),_v(" "),_c('ul',[_c('li',[_v("If there is no existing pattern to follow:\n"),_c('ul',[_c('li',[_v("Use camelCase whenever possible. e.g. "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("formatsAndConventions.md")])]),_v(" "),_c('li',[_v("If the name has multiple phrases, use - to separate phrases. e.g. "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("codingStyle-javaBasic.html")])])])])]),_v(" "),_c('p'),_v(" "),_c('ul',[_c('li',[_c('p',[_v("Try to user common prefixes so that similar files appear together when sorted by name."),_c('br'),_v(" "),_c('span',{staticStyle:{"color":"green"}},[_c('span',[_c('strong',[_c('span',{staticClass:"fas fa-thumbs-up",attrs:{"aria-hidden":"true"}}),_v(" Good")])])]),_v(" "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("codingStyle-java.html")]),_v(", "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("codingStyle-html.html")]),_c('br'),_v(" "),_c('span',{staticStyle:{"color":"red"}},[_c('span',[_c('strong',[_c('span',{staticClass:"fas fa-thumbs-down",attrs:{"aria-hidden":"true"}}),_v(" Bad")])])]),_v(": "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("javaCodingStyle.html")]),_v(", "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("htmlCodingStyle.html")])])]),_v(" "),_c('li',[_c('p',[_v("Prefer plurals if the file/folder contains multiple items of same type e.g. "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("docs")]),_v(" instead of "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("doc")])])])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/git.html b/conventions/git.html index 3f764e6e..0d7f033e 100644 --- a/conventions/git.html +++ b/conventions/git.html @@ -128,7 +128,7 @@ -

Refer to the article How to Write a Git Commit Message for more advice on writing good commit messages.

Branch names

Follow these rules to improve consistency:

+

Refer to the article How to Write a Git Commit Message for more advice on writing good commit messages.

Branch names

Follow these rules to improve consistency:

diff --git a/conventions/git.page-vue-render.js b/conventions/git.page-vue-render.js index 2f1f4f50..1d348945 100644 --- a/conventions/git.page-vue-render.js +++ b/conventions/git.page-vue-render.js @@ -83,6 +83,6 @@ with(this){return _c('h2',{attrs:{"id":"branch-names"}},[_v("Branch names"),_c(' with(this){return _c('div',{attrs:{"id":"branch-names-format"}},[_c('p',[_v("Follow these rules to improve consistency:")]),_v(" "),_c('ul',[_c('li',[_v("Use a meaningful name consisting of some relevant keywords, in the "),_c('em',[_v("kebab case")]),_v(" format e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("refactor-ui-tests")]),_v(".")]),_v(" "),_c('li',[_v("If the branch is related to an issue, use the format "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("issueNumber-some-keywords-from-issue-title")]),_v(" e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("1234-ui-freeze-error")])])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/github.html b/conventions/github.html index c0cf5bb0..4506afd0 100644 --- a/conventions/github.html +++ b/conventions/github.html @@ -45,7 +45,7 @@

PR merge commit

When merging a PR branch to the main branch, use one of these formats for the subject line of the merge commit.

Pick one option and use it consistently in the entire code base.

Rationale: This format allows easy traceability among a merge commit, the issue it fixes, and the PR that fixed it. Having the issue name tells us what the commit is about without having to look it up in GitHub issue tracker.

Issues

+e.g. Error alert email has very long subject (#6580)

Pick one option and use it consistently in the entire code base.

Rationale: This format allows easy traceability among a merge commit, the issue it fixes, and the PR that fixed it. Having the issue name tells us what the commit is about without having to look it up in GitHub issue tracker.

Issues

diff --git a/conventions/github.page-vue-render.js b/conventions/github.page-vue-render.js index 00ef9eb0..5388d54a 100644 --- a/conventions/github.page-vue-render.js +++ b/conventions/github.page-vue-render.js @@ -71,6 +71,6 @@ with(this){return _c('h2',{attrs:{"id":"issues"}},[_v("Issues"),_c('a',{staticCl with(this){return _c('li',[_c('p',[_c('strong',[_v("Issue title should be concise yet descriptive.")]),_v(" For example, instead of "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Newbie question, please help")]),_v(", use "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("How do I set up git to ignore test files?")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/html.html b/conventions/html.html index 28673825..be780cb4 100644 --- a/conventions/html.html +++ b/conventions/html.html @@ -376,7 +376,7 @@ -

+

diff --git a/conventions/html.page-vue-render.js b/conventions/html.page-vue-render.js index 187bb7f4..e41f4ffa 100644 --- a/conventions/html.page-vue-render.js +++ b/conventions/html.page-vue-render.js @@ -191,6 +191,6 @@ with(this){return _c('div',{staticClass:"col-sm-auto"},[_c('span',{staticStyle:{ with(this){return _c('code',{pre:true,attrs:{"class":"no-line-numbers hljs html"}},[_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-tag"}},[_v("<"),_c('span',{pre:true,attrs:{"class":"hljs-name"}},[_v("a")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-attr"}},[_v("target")]),_v("="),_c('span',{pre:true,attrs:{"class":"hljs-string"}},[_v("\"_blank\"")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-attr"}},[_v("href")]),_v("="),_c('span',{pre:true,attrs:{"class":"hljs-string"}},[_v("\"https://example.com\"")]),_v(">")]),_v("Example.com"),_c('span',{pre:true,attrs:{"class":"hljs-tag"}},[_v("")]),_v("\n")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/java/basic.html b/conventions/java/basic.html index a4fcaa4d..13e4eed4 100644 --- a/conventions/java/basic.html +++ b/conventions/java/basic.html @@ -800,7 +800,7 @@ -

References

  1. Oracle's Java Style Guide https://www.oracle.com/docs/tech/java/codeconventions.pdf
  2. Google's Java Style Guide https://google.github.io/styleguide/javaguide.html

Contributors

+

References

  1. Oracle's Java Style Guide https://www.oracle.com/docs/tech/java/codeconventions.pdf
  2. Google's Java Style Guide https://google.github.io/styleguide/javaguide.html

Contributors

diff --git a/conventions/java/basic.page-vue-render.js b/conventions/java/basic.page-vue-render.js index e75ecc95..6b8c05cd 100644 --- a/conventions/java/basic.page-vue-render.js +++ b/conventions/java/basic.page-vue-render.js @@ -374,6 +374,6 @@ with(this){return _c('h2',{attrs:{"id":"contributors"}},[_v("Contributors"),_c(' with(this){return _c('ul',[_c('li',[_v("Nimantha Baranasuriya - Initial draft")]),_v(" "),_c('li',[_v("Dai Thanh - Further tweaks")]),_v(" "),_c('li',[_v("Tong Chun Kit - Further tweaks")]),_v(" "),_c('li',[_v("Barnabas Tan - Converted from Google Docs to Markdown Document")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/java/index.html b/conventions/java/index.html index b59cb8c1..006c7b4e 100644 --- a/conventions/java/index.html +++ b/conventions/java/index.html @@ -1201,7 +1201,7 @@ -

References

  1. Oracle's Java Style Guide https://www.oracle.com/docs/tech/java/codeconventions.pdf
  2. Google's Java Style Guide https://google.github.io/styleguide/javaguide.html

Contributors

+

References

  1. Oracle's Java Style Guide https://www.oracle.com/docs/tech/java/codeconventions.pdf
  2. Google's Java Style Guide https://google.github.io/styleguide/javaguide.html

Contributors

diff --git a/conventions/java/index.page-vue-render.js b/conventions/java/index.page-vue-render.js index a291e325..db2f9dc0 100644 --- a/conventions/java/index.page-vue-render.js +++ b/conventions/java/index.page-vue-render.js @@ -569,6 +569,6 @@ with(this){return _c('h2',{attrs:{"id":"contributors"}},[_v("Contributors"),_c(' with(this){return _c('ul',[_c('li',[_v("Nimantha Baranasuriya - Initial draft")]),_v(" "),_c('li',[_v("Dai Thanh - Further tweaks")]),_v(" "),_c('li',[_v("Tong Chun Kit - Further tweaks")]),_v(" "),_c('li',[_v("Barnabas Tan - Converted from Google Docs to Markdown Document")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/java/intermediate.html b/conventions/java/intermediate.html index 0b54c6a1..252323de 100644 --- a/conventions/java/intermediate.html +++ b/conventions/java/intermediate.html @@ -1106,7 +1106,7 @@ -

References

  1. Oracle's Java Style Guide https://www.oracle.com/docs/tech/java/codeconventions.pdf
  2. Google's Java Style Guide https://google.github.io/styleguide/javaguide.html

Contributors

+

References

  1. Oracle's Java Style Guide https://www.oracle.com/docs/tech/java/codeconventions.pdf
  2. Google's Java Style Guide https://google.github.io/styleguide/javaguide.html

Contributors

diff --git a/conventions/java/intermediate.page-vue-render.js b/conventions/java/intermediate.page-vue-render.js index 2624e3df..2eb0d68c 100644 --- a/conventions/java/intermediate.page-vue-render.js +++ b/conventions/java/intermediate.page-vue-render.js @@ -506,6 +506,6 @@ with(this){return _c('h2',{attrs:{"id":"contributors"}},[_v("Contributors"),_c(' with(this){return _c('ul',[_c('li',[_v("Nimantha Baranasuriya - Initial draft")]),_v(" "),_c('li',[_v("Dai Thanh - Further tweaks")]),_v(" "),_c('li',[_v("Tong Chun Kit - Further tweaks")]),_v(" "),_c('li',[_v("Barnabas Tan - Converted from Google Docs to Markdown Document")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/java/logging.html b/conventions/java/logging.html index b2b45d5b..30e9744a 100644 --- a/conventions/java/logging.html +++ b/conventions/java/logging.html @@ -14,7 +14,7 @@

Guides for SE student projects »

Java logging conventions

We recommend using java.util.logging package for logging.

Logging Levels

  • SEVERE: A critical problem detected which may cause the termination of the application.
  • WARNING: Can continue, but with caution.
  • INFO: Information showing the noteworthy actions by the App.
  • FINE: Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size.

+

Guides for SE student projects »

Java logging conventions

We recommend using java.util.logging package for logging.

Logging Levels

diff --git a/conventions/java/logging.page-vue-render.js b/conventions/java/logging.page-vue-render.js index c99a4061..2746d071 100644 --- a/conventions/java/logging.page-vue-render.js +++ b/conventions/java/logging.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"java-logging-conventions"}},[_v("Java logging conventions"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#java-logging-conventions","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("We recommend using "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("java.util.logging")]),_v(" package for logging.")]),_v(" "),_c('p',[_c('strong',[_v("Logging Levels")])]),_v(" "),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("SEVERE")]),_v(": A critical problem detected which may cause the termination of the application.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("WARNING")]),_v(": Can continue, but with caution.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("INFO")]),_v(": Information showing the noteworthy actions by the App.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("FINE")]),_v(": Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size.")])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/javascript.html b/conventions/javascript.html index 526d3670..5fadc102 100644 --- a/conventions/javascript.html +++ b/conventions/javascript.html @@ -14,7 +14,7 @@

Guides for SE student projects »

JavaScript coding standard

  • Indentation: Use 2 spaces (not tabs, not 4 spaces)
  • Maximum line length: soft limit = 110, hard limit = 120
  • For everything else, follow the Airbnb coding standard.

+

Guides for SE student projects »

JavaScript coding standard

diff --git a/conventions/javascript.page-vue-render.js b/conventions/javascript.page-vue-render.js index dcf7e703..c32e0af9 100644 --- a/conventions/javascript.page-vue-render.js +++ b/conventions/javascript.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"javascript-coding-standard"}},[_v("JavaScript coding standard"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#javascript-coding-standard","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('strong',[_v("Indentation")]),_v(": Use "),_c('mark',[_v("2 spaces")]),_v(" (not tabs, not 4 spaces)")]),_v(" "),_c('li',[_c('strong',[_v("Maximum line length")]),_v(": soft limit = 110, "),_c('mark',[_v("hard limit = 120")])]),_v(" "),_c('li',[_v("For everything else, follow the "),_c('a',{attrs:{"href":"https://github.com/airbnb/javascript/blob/master/README.md"}},[_c('strong',[_v("Airbnb coding standard")])]),_v(".")])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/conventions/markdown.html b/conventions/markdown.html index d78b26a8..b0cce707 100644 --- a/conventions/markdown.html +++ b/conventions/markdown.html @@ -277,7 +277,7 @@ -

+

diff --git a/conventions/markdown.page-vue-render.js b/conventions/markdown.page-vue-render.js index fd28e210..9a2ed364 100644 --- a/conventions/markdown.page-vue-render.js +++ b/conventions/markdown.page-vue-render.js @@ -125,6 +125,6 @@ with(this){return _c('div',{staticClass:"col-sm-auto"},[_c('span',{staticStyle:{ with(this){return _c('code',{pre:true,attrs:{"class":"hljs markdown"}},[_c('span',[_v("He "),_c('span',{pre:true,attrs:{"class":"hljs-emphasis"}},[_v("*really*")]),_v(" meant it.\n")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/guidelines/PRs-reviewing.html b/guidelines/PRs-reviewing.html index 1b4f8f9f..a79ef0b9 100644 --- a/guidelines/PRs-reviewing.html +++ b/guidelines/PRs-reviewing.html @@ -21,7 +21,7 @@ Option 1: This separation of X from Y is good (or correct or wrong or bad)
Option 2: I like how you separated X from Y (or didn't like or Not sure I like)
The second one is less judgemental and less likely to cause the author to become defensive.
  • Feel free to ask for more info from the author, to help you understand the code/design. For example, you can ask why the author chose to write the code in a specific way.
  • You can also suggest alternatives for the author to consider.
    -Combining this with the previous point, you can ask Any reason why you did it this way instead of that way?
  • Feel free to compliment the author when appropriate instead of focusing on negative things only.
    e.g., hey, I like how clean this bit of code is 👍
  • Say please, but don't say please. Beware of overusing 'please' as it can be interpreted as a condescending tone. For example, someone can interpret Please use better variable names as Please for the love of God can you use better variable names?. Instead, you can say Perhaps a more intuitive variable name here? which doesn't run any risk of misinterpretation.
  • No need to repeat the same comment many times. It's not the job of the reviewer to clean up after a sloppy author. If you notice the same problem in multiple places, after commenting an a few of them, you can simply say ... I noticed the same issue in several other places too.
  • Remember the other readers. PR comments can be read by people other than the reviewer and the author e.g., future programmers. Use regular English and avoid slang, colloquialisms, cultural references etc.
  • Further readings:

    Best practices for authors

    +Combining this with the previous point, you can ask Any reason why you did it this way instead of that way?
  • Feel free to compliment the author when appropriate instead of focusing on negative things only.
    e.g., hey, I like how clean this bit of code is 👍
  • Say please, but don't say please. Beware of overusing 'please' as it can be interpreted as a condescending tone. For example, someone can interpret Please use better variable names as Please for the love of God can you use better variable names?. Instead, you can say Perhaps a more intuitive variable name here? which doesn't run any risk of misinterpretation.
  • No need to repeat the same comment many times. It's not the job of the reviewer to clean up after a sloppy author. If you notice the same problem in multiple places, after commenting an a few of them, you can simply say ... I noticed the same issue in several other places too.
  • Remember the other readers. PR comments can be read by people other than the reviewer and the author e.g., future programmers. Use regular English and avoid slang, colloquialisms, cultural references etc.
  • Further readings:

    Best practices for authors

    diff --git a/guidelines/PRs-reviewing.page-vue-render.js b/guidelines/PRs-reviewing.page-vue-render.js index 99aa4c4a..8b383750 100644 --- a/guidelines/PRs-reviewing.page-vue-render.js +++ b/guidelines/PRs-reviewing.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"best-practices-for-reviewing-prs"}},[_v("Best practices for reviewing PRs"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#best-practices-for-reviewing-prs","onclick":"event.stopPropagation()"}})]),_v(" "),_c('div',{staticClass:"lead"},[_c('p',[_v("Reviewing PRs is not just about the code or the tools, "),_c('strong',[_v("the way you phrase your comments matters too")]),_v(", especially if you are a peer reviewer.")])]),_v(" "),_c('h2',{attrs:{"id":"best-practices-for-reviewers"}},[_v("Best practices for reviewers"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#best-practices-for-reviewers","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('strong',[_v("Add specific comments at relevant places of the code")]),_v(", rather than give one overall comment for the entire PR.\n"),_c('ul',[_c('li',[_v("It is typical for the comment to be added right below the code line it refers to."),_c('br'),_v("\nIt is possible to "),_c('a',{attrs:{"href":"https://twitter.com/natfriedman/status/1179097330097643521"}},[_v("mark multiple lines")]),_v(" as linked to the comment too.")]),_v(" "),_c('li',[_v("You can use Markdown (specifically, "),_c('a',{attrs:{"href":"https://guides.github.com/features/mastering-markdown/"}},[_v("GitHub-Flavored Markdown")]),_v(") in your comments.")])])]),_v(" "),_c('li',[_c('mark',[_c('strong',[_v("It's best to phrase comments as questions")])]),_v(", especially if you are a peer reviewer."),_c('br'),_v("\ne.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Should this be extracted out?")]),_v(" rather than "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Extract this out")]),_v(" or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("This should be extracted out")]),_v(".")]),_v(" "),_c('li',[_c('strong',[_v("Say 'I like', not 'good/bad'")]),_v(". Consider these two alternatives:"),_c('br'),_v("\nOption 1: "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("This separation of X from Y is good")]),_v(" (or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("correct")]),_v(" or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("wrong")]),_v(" or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("bad")]),_v(")"),_c('br'),_v("\nOption 2: "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("I like how you separated X from Y")]),_v(" (or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("didn't like")]),_v(" or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Not sure I like")]),_v(")"),_c('br'),_v("\nThe second one is less judgemental and less likely to cause the author to become defensive.")]),_v(" "),_c('li',[_c('strong',[_v("Feel free to ask for more info from the author")]),_v(", to help you understand the code/design. For example, you can ask why the author chose to write the code in a specific way.")]),_v(" "),_c('li',[_c('strong',[_v("You can also suggest alternatives for the author to consider.")]),_c('br'),_v("\nCombining this with the previous point, you can ask "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Any reason why you did it this way instead of that way?")])]),_v(" "),_c('li',[_c('strong',[_v("Feel free to compliment the author when appropriate")]),_v(" instead of focusing on negative things only."),_c('br'),_v(" "),_c('span',{staticClass:"dimmed"},[_v("e.g., "),_c('em',[_v("hey, I like how clean this bit of code is")]),_v(" 👍")])]),_v(" "),_c('li',[_c('strong',[_v("Say please, but don't say "),_c('em',[_v("please")])]),_v(". Beware of overusing 'please' as it can be interpreted as a condescending tone. For example, someone can interpret "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Please use better variable names")]),_v(" as "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Please for the love of God can you use better variable names?")]),_v(". Instead, you can say "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Perhaps a more intuitive variable name here?")]),_v(" which doesn't run any risk of misinterpretation.")]),_v(" "),_c('li',[_c('strong',[_v("No need to repeat the same comment "),_c('em',[_v("many")]),_v(" times")]),_v(". It's not the job of the reviewer to clean up after a sloppy author. If you notice the same problem in multiple places, after commenting an a few of them, you can simply say "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("... I noticed the same issue in several other places too")]),_v(".")]),_v(" "),_c('li',[_c('strong',[_v("Remember the "),_c('em',[_v("other")]),_v(" readers")]),_v(". PR comments can be read by people other than the reviewer and the author e.g., future programmers. Use regular English and avoid slang, colloquialisms, cultural references etc.")])]),_v(" "),_c('p',[_c('strong',[_c('strong',[_v("Further readings")])]),_v(":")]),_v(" "),_c('ul',[_c('li',[_v("Read the blog post "),_c('a',{attrs:{"href":"https://developers.redhat.com/blog/2019/07/08/10-tips-for-reviewing-code-you-dont-like/"}},[_c('strong',[_v("10 tips for reviewing code you don’t like")])]),_v(" - by David Lloyd (a Red Hat developer).")])]),_v(" "),_c('h2',{attrs:{"id":"best-practices-for-authors"}},[_v("Best practices for authors"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#best-practices-for-authors","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('strong',[_v("Don't get into arguments with reviewers.")]),_v(" If you disagree with the reviewer, you can explain your own view in a non-confrontational way without trying to prove your way is better.")]),_v(" "),_c('li',[_v("Thank reviewers for their inputs.")])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/guidelines/PRs.html b/guidelines/PRs.html index 3a3b2e7b..0814db90 100644 --- a/guidelines/PRs.html +++ b/guidelines/PRs.html @@ -17,7 +17,7 @@

    Guides for SE student projects »

    Guidelines for working with PRs

    Selecting what to work on

    Scoping a PR

    General rule: try to keep PRs as small as possible because smaller PRs get merged faster.

    A PR should contain a single, standalone, and complete change to the code base, unless in exceptional cases where the PR is part of a bigger change.

    • Single means a PR should not try to fix more than one fix, unless there are multiple things that must be done together or not at all.

      Refrain from in the neighboring code unless the line in concern is already touched by the PR (i.e., the housekeeping does not increase the line count of the PR).

      Rationale: Imagine we decide to revert the PR for some reason. If a PR contains, unrelated changes or multiple independent changes, we will not be able to revert the offending change without losing the other changes as well.

      If you notice a need for housekeeping in the neighboring code as you do your PR, create an issue for it in the issue tracker.

    • Standalone means the PR should contain a meaningful change that moves the code base from one working state to another.

    • Complete means the PR should contain everything related to the change, including the following:

      • functional code
      • code comments
      • test cases
      • user docs and developer docs

    "This PR is just the code fix. I'll update tests and documentation in a separate PR" is not acceptable!

    However, it is fine to push the functional code first to get early feedback, as long as the rest is added to the same PR later.

    Submitting a PR

    When submitting PRs, follow the forking workflow. A summary of the steps is given below.

    Step 0 Do these steps if you haven't done them already:

    0.1 Fork the upstream repo.

    0.2 Clone the fork to your computer.

    0.3 Set up the dev environment as described in the project docs. Confirm the set up is correct.

    Step 1 Create a branch from the master branch, following the naming convention given.

    Step 2 Add your code to the branch while ensuring you follow these:

    Step 3 Sync your branch with the upstream master, if the master branch advances while you work on your code (i.e., pull upstream master, merge to your branch).

    Step 4 Create a PR when the code is ready, as follows:

    1. Run code style checks (if any) to ensure the code complies with the project standards.
    2. Push the branch to your fork.
    3. Create a draft PR from your fork to the upstream repo.
    4. Check the draft PR on GitHub to confirm the following:
      • it follows the PR format conventions
      • it does not contain any unintended changes.
      • it passes checks, if any.
    5. Remove the 'draft' status of the PR. Post a ready for review comment for good measure.

    Step 5 Revise as per reviews until the PR is merged.

    Reviewing a PR

    Merging PRs

    Follow the convention for Git branch merging, as given in the panel below.

    +

    Merging PRs

    Follow the convention for Git branch merging, as given in the panel below.

    diff --git a/guidelines/PRs.page-vue-render.js b/guidelines/PRs.page-vue-render.js index 5d2c6fe6..b8b1e115 100644 --- a/guidelines/PRs.page-vue-render.js +++ b/guidelines/PRs.page-vue-render.js @@ -101,6 +101,6 @@ with(this){return _c('ul',[_c('li',[_c('strong',[_v("Before approving a PR, "),_ with(this){return _c('h2',{attrs:{"id":"merging-prs"}},[_v("Merging PRs"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#merging-prs","onclick":"event.stopPropagation()"}})])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/guidelines/codeOfConduct.html b/guidelines/codeOfConduct.html index de8e8a8d..4420feb4 100644 --- a/guidelines/codeOfConduct.html +++ b/guidelines/codeOfConduct.html @@ -41,7 +41,7 @@ obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

    Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other -members of the project's leadership.

    +members of the project's leadership.

    diff --git a/guidelines/codeOfConduct.page-vue-render.js b/guidelines/codeOfConduct.page-vue-render.js index 3e990065..279548e9 100644 --- a/guidelines/codeOfConduct.page-vue-render.js +++ b/guidelines/codeOfConduct.page-vue-render.js @@ -35,6 +35,6 @@ with(this){return _c('h2',{attrs:{"id":"enforcement"}},[_v("Enforcement"),_c('a' with(this){return _c('p',[_v("Instances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("seer[at]comp.nus.edu.sg")]),_v(". All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.")])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/guidelines/commits.html b/guidelines/commits.html index d2d0e0f7..5f444feb 100644 --- a/guidelines/commits.html +++ b/guidelines/commits.html @@ -17,7 +17,7 @@

    Guides for SE student projects »

    Working with Git

    Organizing commits

    Commits in a branch or a PR is said to be well-organized if they have the following qualities:

    • Each commit contains a single logical change, and this change must stand on its own. i.e. each commit has a single responsibility, and that responsibility must be fully carried out.
      For example, if the commit message says Move delete() from Person class to Address class, the commit cannot contain the addition of delete() to Address class only; it should also contain the deletion of delete() from the Person class for it to be a complete implementation what is stated in the commit message.

    • Each commit has a well-written commit message i.e., it follows these guidelines.

    • Commits are ordered in a bottom-up fashion, each commit building on top of the previous one towards the end goal of the PR.

      Rationale: Reviewers should be able to review one commit at a time.

    • Ideally, a commit does not modify more than 100 lines of code.

      Rationale: Bigger commits are harder to review.

      "Ask a programmer to review 10 lines of code, he'll find 10 issues. Ask him to do 500 lines and he'll say it looks good." --[source]

      Commits containing mechanical changes (e.g. automated refactorings, cut-paste type code movements, file renames, etc.),

      • should include only one mechanical change per commit e.g., rename a single variable across the code base.
      • should not contain other non-mechanical changes, unless unavoidable.
      • can exceed 100 LoC.
      • should have the description of the change in the commit message (so that the results can be reproduced).
    • Every commit pass CI. when you merge a series of commits (without squashing), every commit in your push (not just the last commit) should pass CI.

      Rationale: Build-breaking commits in the version history hinder the ability to use git bisect for locating bugs.

    Here is an example PR of commits that are organized as described above.

    Refactor commits before pushing. It is unlikely that you can produce a series of commits that meet all the above criteria in the first try. In such cases, refactor commits until they meet the criteria. This S/O post describes how to refactor commits (even easier to do with visual tools such as SourceTree -- see this video).

    Merging branches

    When merging branch, the aim is to keep the version history neat so that it is easy to do things such as the following:

    • Find which commit introduced a bug using git bisect.
    • Undo a specific change by reverting a commit in the history without breaking anything else.
    • The default strategy is to do a squash-merge. This is suitable when the branch tackles one task but multiple commits that are not well-organized (as per the definition of 'well-organized' in the panel below).

    • Use a merge commit if the commits are well-organized, and the branch tackles only one task. In this case the commit message of the merge commit should explain the full task.

    • Use a rebase-merge if the commits are well-organized and each commit is an independent task (as opposed to steps or a bigger tasks).

    • In other cases, consider reorganizing/splitting the branch to match one of the above. -

    +

    diff --git a/guidelines/commits.page-vue-render.js b/guidelines/commits.page-vue-render.js index 5a200687..887367cc 100644 --- a/guidelines/commits.page-vue-render.js +++ b/guidelines/commits.page-vue-render.js @@ -50,6 +50,6 @@ with(this){return _c('ul',[_c('li',[_c('strong',[_v("The default strategy is to with(this){return _c('ul',[_c('li',[_c('p',[_c('strong',[_v("Use a "),_c('em',[_v("merge commit")])]),_v(" if the commits are well-organized, and the branch tackles only one task. In this case the commit message of the merge commit should explain the full task.")])]),_v(" "),_c('li',[_c('p',[_c('strong',[_v("Use a "),_c('em',[_v("rebase-merge")])]),_v(" if the commits are well-organized and each commit is an independent task (as opposed to steps or a bigger tasks).")])]),_v(" "),_c('li',[_c('p',[_c('strong',[_v("In other cases")]),_v(", consider reorganizing/splitting the branch to match one of the above.\n")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/guidelines/labels.html b/guidelines/labels.html index 3bb4eeb6..299cc098 100644 --- a/guidelines/labels.html +++ b/guidelines/labels.html @@ -24,7 +24,7 @@ e.g. a request for help on setting up dev environment.

    Difficulty (d.)

    Effort (e.)

    This label can be used to indicate how much effort is expected for (or was spent on) an issue.

    e.1 is roughly equal to an hour of work, e.2 is two hours of work, and so on. Recommended values: 1,2,4,8,16,32

    Effort labels can be applied to PRs indicate effort for reviewing (by the main reviewer). Those applied for issues can indicate the effort for fixing the issue.

    Aspect (a-)

    Classifies the issues based on the non-functional aspect it tackles. Some examples:

    Label Description
    a-AccessControl Controlling access to user groups, authentication, privacy, anonymity
    a-CodeQuality Refactorings that are mainly to improve code/design quality
    a-Concurrency Things related to concurrent access, session control
    a-DevOps CI, release management, version control, dev docs
    a-Docs User docs, product website
    a-FaultTolerance Resilience to user errors, environmental problems
    a-Performance Speed of operation
    a-Persistence Saving data permanently
    a-Scalability Related to behavior at increasing loads
    a-Security Protection from security threats
    a-Testing Testing efficiency and robustness (as opposed to testing a specific feature)
    a-UIX User interface, User experience, Responsiveness

    Feature (f-)

    Classifies the issue based on the feature it involves. These labels depend on the project. e.g. f-Admin, f-Sessions, f-Delete

    Tech (t-)

    Classifies the issue based on the tool/technology it involves. Some examples given below.

    Label Description
    t-CSS CSS, Bootstrap
    t-HTML HTML, Browsers
    t-JS Javascript, JQuery
    t-JSTL JSTL, JSP, Servlets

    Special labels

    Other guidelines

    +
  • Use UpperCamelCase for label names; Keep group prefixes short and use lower case.
  • diff --git a/guidelines/labels.page-vue-render.js b/guidelines/labels.page-vue-render.js index 59e48cbf..1248464d 100644 --- a/guidelines/labels.page-vue-render.js +++ b/guidelines/labels.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"working-with-github-labels"}},[_v("Working with GitHub labels"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#working-with-github-labels","onclick":"event.stopPropagation()"}})]),_v(" "),_c('div',{staticClass:"lead"},[_c('p',[_v("As a project grows, issue/PR labels can play an increasingly important role in managing a large number of issues/PRs. This document has some guidelines that can improve consistency across projects and help make the use of labels more productive.")])]),_v(" "),_c('p',[_v("Unless mentioned otherwise, "),_c('em',[_v("labels are applied to issues only")]),_v(" (not PRs).")]),_v(" "),_c('h2',{attrs:{"id":"label-groups"}},[_v("Label groups"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#label-groups","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("While GitHub does not have the concept of label groups, we can simulate label groups using systematic label naming.\ni.e. labels having the same prefix are considered part of a label group.")]),_v(" "),_c('p',[_v("There are two types of label groups:")]),_v(" "),_c('ul',[_c('li',[_c('strong',[_v("Exclusive groups")]),_v(": No more than one label from the group can be applied to an issue")]),_v(" "),_c('li',[_c('strong',[_v("Non-exclusive groups")]),_v(": Multiple labels from a group can be applied to an issue")])]),_v(" "),_c('p',[_c('em',[_v("Common label groups")]),_v(":")]),_v(" "),_c('ul',[_c('li',[_v("exclusive: "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.")]),_v(" status, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.")]),_v(" priority, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.")]),_v(" category, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("d.")]),_v(" difficulty, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("e.")]),_v(" effort,")]),_v(" "),_c('li',[_v("non-exclusive: "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-")]),_v(" aspect, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("f-")]),_v(" feature, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("t-")]),_v(" tech,")])]),_v(" "),_c('h2',{attrs:{"id":"common-labels"}},[_v("Common labels"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#common-labels","onclick":"event.stopPropagation()"}})]),_v(" "),_c('h3',{attrs:{"id":"priority-p"}},[_v("Priority ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#priority-p","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.Critical")]),_v(": Would like to fix it ASAP and release as a hot patch.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.Urgent")]),_v(": Would like to handle in the very next release.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.High")]),_v(": Enhances user experience significantly, would like to do in the next few releases.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.Medium")]),_v(": Marginal impact on user experience.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.Low")]),_v(": Very little impact, unlikely to do in the near future.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("p.Zero")]),_v(": Unlikely to do, ever.")])]),_v(" "),_c('p',[_v("NOTE: An issue is considered as "),_c('em',[_v("accepted")]),_v(" when a priority label has been assigned.")]),_v(" "),_c('h3',{attrs:{"id":"status-s"}},[_v("Status ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#status-s","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_v("Open issues\n"),_c('ul',[_c('li',[_v("No status: New issue yet to be triaged.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.OnHold")]),_v(": The work on the issue has been put on hold pending some other event.")])])]),_v(" "),_c('li',[_v("Open PR\n"),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.ToReview")]),_v(": Waiting for the review.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.Ongoing")]),_v(": The PR is being worked on.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.ToMerge")]),_v(": Main reviewer approved the changes.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.MergeApproved")]),_v(": Both main reviewer and the code quality reviewer has approved the merge. PR can be merged.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("s.OnHold")]),_v(": The work on the PR has been put on hold pending some other event.")])])])]),_v(" "),_c('h3',{attrs:{"id":"category-c"}},[_v("Category ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#category-c","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_v("Changes to "),_c('em',[_v("functionality")]),_v(", categorized based on size\n"),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Enhancement")]),_v(": An enhancement to an existing functionality (not big enough to be considered as a user story).")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Story")]),_v(" : A user story."),_c('br'),_v("\nOR "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Feature")]),_v(": A new feature.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Epic")]),_v(" or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Theme")]),_v(": A feature that be broken down into many user-stories/features.")])])]),_v(" "),_c('li',[_v("Other work\n"),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Bug")])]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Task")]),_v(", "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Chore")]),_v(": Other work items such as updating documentation.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("c.Message")]),_v(": Issue used as a means of discussing something with the dev team."),_c('br'),_v("\ne.g. a request for help on setting up dev environment.")])])])]),_v(" "),_c('h3',{attrs:{"id":"difficulty-d"}},[_v("Difficulty ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("d.")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#difficulty-d","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("d.Easy")]),_v(": For new contributors to do as their first PR. MUST be simple enough to be contained in one commit.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("d.Moderate")]),_v(": Moderate difficulty. Small localized change.")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("d.Hard")]),_v(", "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("d.VeryHard")]),_v(": More difficult issues that are better left for committers or more senior developers.")])]),_v(" "),_c('h3',{attrs:{"id":"effort-e"}},[_v("Effort ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("e.")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#effort-e","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("This label can be used to indicate how much effort is expected for (or was spent on) an issue.")]),_v(" "),_c('p',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("e.1")]),_v(" is roughly equal to an hour of work, "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("e.2")]),_v(" is two hours of work, and so on. Recommended values: 1,2,4,8,16,32")]),_v(" "),_c('p',[_v("Effort labels can be applied to PRs indicate effort for reviewing (by the main reviewer). Those applied for issues can indicate\nthe effort for fixing the issue.")]),_v(" "),_c('h3',{attrs:{"id":"aspect-a"}},[_v("Aspect ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#aspect-a","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("Classifies the issues based on the non-functional aspect it tackles. Some examples:")]),_v(" "),_c('div',{staticClass:"table-responsive"},[_c('table',{staticClass:"markbind-table table table-bordered table-striped"},[_c('thead',[_c('tr',[_c('th',[_v("Label")]),_v(" "),_c('th',[_v("Description")])])]),_v(" "),_c('tbody',[_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-AccessControl")])]),_v(" "),_c('td',[_v("Controlling access to user groups, authentication, privacy, anonymity")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-CodeQuality")])]),_v(" "),_c('td',[_v("Refactorings that are mainly to improve code/design quality")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Concurrency")])]),_v(" "),_c('td',[_v("Things related to concurrent access, session control")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-DevOps")])]),_v(" "),_c('td',[_v("CI, release management, version control, dev docs")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Docs")])]),_v(" "),_c('td',[_v("User docs, product website")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-FaultTolerance")])]),_v(" "),_c('td',[_v("Resilience to user errors, environmental problems")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Performance")])]),_v(" "),_c('td',[_v("Speed of operation")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Persistence")])]),_v(" "),_c('td',[_v("Saving data permanently")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Scalability")])]),_v(" "),_c('td',[_v("Related to behavior at increasing loads")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Security")])]),_v(" "),_c('td',[_v("Protection from security threats")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-Testing")])]),_v(" "),_c('td',[_v("Testing efficiency and robustness (as opposed to testing a specific feature)")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("a-UIX")])]),_v(" "),_c('td',[_v("User interface, User experience, Responsiveness")])])])])]),_v(" "),_c('h3',{attrs:{"id":"feature-f"}},[_v("Feature ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("f-")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#feature-f","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("Classifies the issue based on the feature it involves. These labels depend on the project.\ne.g. "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("f-Admin")]),_v(", "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("f-Sessions")]),_v(", "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("f-Delete")])]),_v(" "),_c('h3',{attrs:{"id":"tech-t"}},[_v("Tech ("),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("t-")]),_v(")"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#tech-t","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("Classifies the issue based on the tool/technology it involves. Some examples given below.")]),_v(" "),_c('div',{staticClass:"table-responsive"},[_c('table',{staticClass:"markbind-table table table-bordered table-striped"},[_c('thead',[_c('tr',[_c('th',[_v("Label")]),_v(" "),_c('th',[_v("Description")])])]),_v(" "),_c('tbody',[_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("t-CSS")])]),_v(" "),_c('td',[_v("CSS, Bootstrap")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("t-HTML")])]),_v(" "),_c('td',[_v("HTML, Browsers")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("t-JS")])]),_v(" "),_c('td',[_v("Javascript, JQuery")])]),_v(" "),_c('tr',[_c('td',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("t-JSTL")])]),_v(" "),_c('td',[_v("JSTL, JSP, Servlets")])])])])]),_v(" "),_c('h3',{attrs:{"id":"special-labels"}},[_v("Special labels"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#special-labels","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("good first issue")]),_v(": for first time contributors (note that "),_c('a',{attrs:{"href":"https://help.github.com/en/github/building-a-strong-community/encouraging-helpful-contributions-to-your-project-with-labels"}},[_v("GitHub treats this label in a special way")]),_v(")")]),_v(" "),_c('li',[_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("kudos")]),_v(": to appreciate good work done in a PR")])]),_v(" "),_c('h2',{attrs:{"id":"other-guidelines"}},[_v("Other guidelines"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#other-guidelines","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_v("When choosing label colors:\n"),_c('ul',[_c('li',[_v("Choose bright colors for labels that should get more attention. "),_c('a',{attrs:{"href":"https://github.com/oss-generic/process/labels?sort=name-asc%5BHere%5D"}},[_v("https://github.com/oss-generic/process/labels?sort=name-asc[Here]")]),_v(" are some sample labels with suitable colors.")]),_v(" "),_c('li',[_v("Label groups that represent a scale (e.g., difficulty, effort, severity) can be given increasingly darker shades of the same color ("),_c('a',{attrs:{"href":"https://github.com/oss-generic/process/labels?q=e."}},[_v("example")]),_v(")")])])]),_v(" "),_c('li',[_v("Use UpperCamelCase for label names; Keep group prefixes short and use lower case.")])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/index.html b/index.html index 6a834a48..c3739d08 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@
  • Intellij IDEA:
  • Sourcetree
  • Testing
  • GitHub Actions
  • Gradle
  • Project documentation: -
  • Conventions

    Coding standards, format conventions, style guides, ...

    Guidelines

    Best practices, processes, workflows, ...

    +

    Conventions

    Coding standards, format conventions, style guides, ...

    Guidelines

    Best practices, processes, workflows, ...

    diff --git a/index.page-vue-render.js b/index.page-vue-render.js index 767e46e2..245a1716 100644 --- a/index.page-vue-render.js +++ b/index.page-vue-render.js @@ -20,6 +20,6 @@ with(this){return _c('ul',[_c('li',[_c('a',{attrs:{"href":"/guides/conventions/c with(this){return _c('ul',[_c('li',[_c('a',{attrs:{"href":"/guides/guidelines/codeOfConduct.html"}},[_c('strong',[_v("Code of conduct")])]),_c('br')]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/guidelines/commits.html"}},[_c('strong',[_v("Working with Git")])])]),_v(" "),_c('li',[_c('strong',[_v("GitHub:")]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"/guides/guidelines/PRs.html"}},[_v("Working with "),_c('strong',[_v("PRs")])]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"/guides/guidelines/PRs-reviewing.html"}},[_v("Best practices for "),_c('strong',[_v("reviewing PRs")])])])])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/guidelines/labels.html"}},[_v("Working with "),_c('strong',[_v("labels")])])])])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/ab3.html b/tutorials/ab3.html index 3b58e722..a013a42d 100644 --- a/tutorials/ab3.html +++ b/tutorials/ab3.html @@ -14,7 +14,7 @@

    Guides for SE student projects »

    AddressBook-Level3 (AB3) Tutorials

    AddressBook-Level3 (AB3) is a brownfield project template used by SE courses. Given below are some tutorials to help students understand how to navigate and modify the existing AB3 codebase.

    • Tracing code - A tutorial on how to use Intellij IDEA to trace execution paths in AB3 code.
    • Adding a command - A tutorial on how to introduce a new user command to the AB3 code.
    • Removing fields - A tutorial on how to safely remove a field of the Person class.

    Authors:

    +

    Guides for SE student projects »

    AddressBook-Level3 (AB3) Tutorials

    AddressBook-Level3 (AB3) is a brownfield project template used by SE courses. Given below are some tutorials to help students understand how to navigate and modify the existing AB3 codebase.


    Authors:

    diff --git a/tutorials/ab3.page-vue-render.js b/tutorials/ab3.page-vue-render.js index beb01b4a..c045953d 100644 --- a/tutorials/ab3.page-vue-render.js +++ b/tutorials/ab3.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"addressbook-level3-ab3-tutorials"}},[_v("AddressBook-Level3 (AB3) Tutorials"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#addressbook-level3-ab3-tutorials","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_c('a',{attrs:{"href":"https://se-education.org/addressbook-level3"}},[_v("AddressBook-Level3 (AB3)")]),_v(" is a brownfield project template used by SE courses. Given below are some tutorials to help students understand how to navigate and modify the existing AB3 codebase.")]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/ab3TracingCode.html"}},[_c('strong',[_v("Tracing code")])]),_v(" - A tutorial on how to use Intellij IDEA to trace execution paths in AB3 code.")]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/ab3AddRemark.html"}},[_c('strong',[_v("Adding a command")])]),_v(" - A tutorial on how to introduce a new user command to the AB3 code.")]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/ab3RemovingFields.html"}},[_c('strong',[_v("Removing fields")])]),_v(" - A tutorial on how to safely remove a field of the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Person")]),_v(" class.")])]),_v(" "),_c('hr'),_v(" "),_c('p',[_c('strong',[_v("Authors:")])]),_v(" "),_c('ul',[_c('li',[_v("Initial Version: Jeffry Lum")]),_v(" "),_c('li',[_v("Adapted to MarkBind: "),_c('a',{attrs:{"href":"https://github.com/tlylt"}},[_v("Liu Yongliang")])])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/ab3AddRemark.html b/tutorials/ab3AddRemark.html index 0328b7b5..0e539651 100644 --- a/tutorials/ab3AddRemark.html +++ b/tutorials/ab3AddRemark.html @@ -344,7 +344,7 @@

    Writing tests

    Tests are crucial to ensuring that bugs don’t slip into the codebase unnoticed. This is especially true for large code bases where a change might lead to unintended behavior.

    Let’s verify the correctness of our code by writing some tests!

    Of course you can simply add the test cases manually, like you've been doing all along this tutorial. The result would be like the test cases in here. Alternatively, you can get the help of IntelliJ to generate the skeletons of the test cases, as explained in the next section.

    Automatically generating tests

    The goal is to write effective and efficient tests to ensure that RemarkCommand#execute() behaves as expected.

    The convention for test names is methodName_testScenario_expectedResult. An example would be -execute_filteredList_success.

    Let’s create a test for RemarkCommand#execute() to test that adding a remark works. On IntelliJ IDEA you can bring up the context menu and choose to Go To > Test or use the appropriate keyboard shortcut.

    Then, create a test for the execute method.

    Following convention, let’s change the name of the generated method to execute_addRemarkUnfilteredList_success.

    Let’s use the utility functions provided in CommandTestUtil. The functions ensure that commands produce the expected CommandResult and output the correct message. In this case, CommandTestUtil#assertCommandSuccess is the best fit as we are testing that a RemarkCommand will successfully add a Remark.

    You should end up with a test that looks something like this.

    Conclusion

    This concludes the tutorial for adding a new Command to AddressBook.

    Previous | ToC | What's next? Removing Fields

    +execute_filteredList_success.

    Let’s create a test for RemarkCommand#execute() to test that adding a remark works. On IntelliJ IDEA you can bring up the context menu and choose to Go To > Test or use the appropriate keyboard shortcut.

    Then, create a test for the execute method.

    Following convention, let’s change the name of the generated method to execute_addRemarkUnfilteredList_success.

    Let’s use the utility functions provided in CommandTestUtil. The functions ensure that commands produce the expected CommandResult and output the correct message. In this case, CommandTestUtil#assertCommandSuccess is the best fit as we are testing that a RemarkCommand will successfully add a Remark.

    You should end up with a test that looks something like this.

    Conclusion

    This concludes the tutorial for adding a new Command to AddressBook.

    Previous | ToC | What's next? Removing Fields

    diff --git a/tutorials/ab3AddRemark.page-vue-render.js b/tutorials/ab3AddRemark.page-vue-render.js index eb3f6b80..84f32de3 100644 --- a/tutorials/ab3AddRemark.page-vue-render.js +++ b/tutorials/ab3AddRemark.page-vue-render.js @@ -287,6 +287,6 @@ with(this){return _c('p',[_v("This concludes the tutorial for adding a new "),_c with(this){return _c('p',[_c('a',{attrs:{"href":"/guides/tutorials/ab3TracingCode.html"}},[_c('span',{staticClass:"fas fa-arrow-left",attrs:{"aria-hidden":"true"}}),_v(" Previous")]),_v(" | "),_c('a',{attrs:{"href":"/guides/tutorials/ab3.html"}},[_c('span',{staticClass:"fas fa-arrow-up",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_v("ToC")])]),_v(" | "),_c('span',{staticClass:"badge rounded-pill bg-primary"},[_c('strong',[_c('span',{staticClass:"large"},[_v("What's next?")])])]),_v(" "),_c('a',{attrs:{"href":"/guides/tutorials/ab3RemovingFields.html"}},[_c('span',{staticClass:"fas fa-arrow-right",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_v("Removing Fields")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/ab3RemovingFields.html b/tutorials/ab3RemovingFields.html index 08211ebb..720a4246 100644 --- a/tutorials/ab3RemovingFields.html +++ b/tutorials/ab3RemovingFields.html @@ -82,7 +82,7 @@ -

    You can go through each individual json file and manually remove the address field.

    Previous | ToC

    +

    You can go through each individual json file and manually remove the address field.

    Previous | ToC

    diff --git a/tutorials/ab3RemovingFields.page-vue-render.js b/tutorials/ab3RemovingFields.page-vue-render.js index 8c79049c..e0b8c68e 100644 --- a/tutorials/ab3RemovingFields.page-vue-render.js +++ b/tutorials/ab3RemovingFields.page-vue-render.js @@ -101,6 +101,6 @@ with(this){return _c('p',[_v("You can go through each individual "),_c('code',{p with(this){return _c('p',[_c('a',{attrs:{"href":"/guides/tutorials/ab3AddRemark.html"}},[_c('span',{staticClass:"fas fa-arrow-left",attrs:{"aria-hidden":"true"}}),_v(" Previous")]),_v(" | "),_c('a',{attrs:{"href":"/guides/tutorials/ab3.html"}},[_c('span',{staticClass:"fas fa-arrow-up",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_v("ToC")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/ab3TracingCode.html b/tutorials/ab3TracingCode.html index 64b088fe..f8f5f186 100644 --- a/tutorials/ab3TracingCode.html +++ b/tutorials/ab3TracingCode.html @@ -212,7 +212,7 @@ do you think will happen if we traced the following commands instead? What exceptions do you think will be thrown (if any), where will the exceptions be thrown and where will they be handled?

    1. redit 1 n/Alice Yu

    2. edit 0 n/Alice Yu

    3. edit 1 n/Alex Yeoh

    4. edit 1

    5. edit 1 n/アリス ユー

    6. edit 1 t/one t/two t/three t/one

  • What components will you have to modify to perform the following -enhancements to the application?

    1. Make command words case-insensitive

    2. Allow delete to remove more than one index at a time

    3. Save the address book in the CSV format instead

    4. Add a new command

    5. Add a new field to Person

    6. Add a new entity to the address book

  • ToC | What's next? Adding a Command

    +enhancements to the application?

    1. Make command words case-insensitive

    2. Allow delete to remove more than one index at a time

    3. Save the address book in the CSV format instead

    4. Add a new command

    5. Add a new field to Person

    6. Add a new entity to the address book

    ToC | What's next? Adding a Command

    diff --git a/tutorials/ab3TracingCode.page-vue-render.js b/tutorials/ab3TracingCode.page-vue-render.js index e5817dc8..639a3a3c 100644 --- a/tutorials/ab3TracingCode.page-vue-render.js +++ b/tutorials/ab3TracingCode.page-vue-render.js @@ -191,6 +191,6 @@ with(this){return _c('ol',[_c('li',[_c('p',[_v("In this tutorial, we traced the with(this){return _c('p',[_c('a',{attrs:{"href":"/guides/tutorials/ab3.html"}},[_c('span',{staticClass:"fas fa-arrow-up",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_v("ToC")])]),_v(" | "),_c('span',{staticClass:"badge rounded-pill bg-primary"},[_c('strong',[_c('span',{staticClass:"large"},[_v("What's next?")])])]),_v(" "),_c('a',{attrs:{"href":"/guides/tutorials/ab3AddRemark.html"}},[_c('span',{staticClass:"fas fa-arrow-right",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_v("Adding a Command")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/checkstyle.html b/tutorials/checkstyle.html index 561c1495..2ccc461f 100644 --- a/tutorials/checkstyle.html +++ b/tutorials/checkstyle.html @@ -39,7 +39,7 @@

    Some relevant Gradle tasks added by the CheckStyle plugin.

    For example, you can run gradlew checkstyleMain checkstyleTest to verify that all your code complies with the style rules.

    Using Checkstyle-IDEA plugin

    Prerequisite: The two config files checkstyle.xml and suppressions.xml are present (see the Configuring Checkstyle section above for more details on these two files).

    Given below are the steps to install the Checkstyle-IDEA plugin so that Intellij can alert you about code style problems as you write code.

    1. Install the Checkstyle-IDEA plugin as follows:

      1. File > Settings (Windows/Linux), or IntelliJ IDEA > Settings…​ (macOS)
      2. Select Plugins (on the left slide menu in the dialog that pops up)
      3. Select Marketplace (on to top center of the same dialog box)
      4. Find the plugin.
      5. Restart the IDE to complete the installation.
    2. Click File > Settings (Windows/Linux), or IntelliJ IDEA > Settings…​ (macOS)

    3. Click Tools > Checkstyle

    4. Set Scan Scope to Only Java sources (including tests), so that the plugin will run checkstyle for our test source codes as well

    5. Ensure that the Checkstyle version is set to the one used by the project.
      If your project uses Gradle, you can check the build.gradle file to find the correct version.
      checkstyle idea scan scope

    6. Click the + sign under Configuration File

    7. Enter an arbitrary description e.g. addressbook

    8. Select Use a local Checkstyle file

    9. Use the checkstyle configuration file found at config/checkstyle/checkstyle.xml

    10. Click Next > Finish

    11. Mark Active for the newly imported check configuration
      checkstyle idea configuration

    12. Click OK

    13. To verify the plugin is set up correctly, temporarily modify the code to violate a style rule (e.g., add an extra line break before an {) and run the Checkstyle check using the plugin.

    Troubleshooting

    Problem: When importing checkstyle.xml, Checkstyle-IDEA plugin complains that The Checkstyle rules file could not be parsed. …​ The file has been blacklisted for 60s.

    Problem: After setting up checkstyle.xml, Checkstyle-IDEA plugin does not seem to highlight the errors / real-time scanning seems broken.

    Resources

    +Apply, as checkstyle.xml is written for Gradle’s checkstyle.

    Problem: After setting up checkstyle.xml, Checkstyle-IDEA plugin does not seem to highlight the errors / real-time scanning seems broken.

    Resources

    diff --git a/tutorials/checkstyle.page-vue-render.js b/tutorials/checkstyle.page-vue-render.js index bd9d505c..4a709a30 100644 --- a/tutorials/checkstyle.page-vue-render.js +++ b/tutorials/checkstyle.page-vue-render.js @@ -77,6 +77,6 @@ with(this){return _c('h2',{attrs:{"id":"resources"}},[_v("Resources"),_c('a',{st with(this){return _c('ul',[_c('li',[_c('a',{attrs:{"href":"https://checkstyle.sourceforge.io/"}},[_v("Checkstyle home page")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"https://docs.gradle.org/current/userguide/checkstyle_plugin.html"}},[_v("Gradle documentation for the Checkstyle plugin")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/codecov.html b/tutorials/codecov.html index dc3fe592..662f838d 100644 --- a/tutorials/codecov.html +++ b/tutorials/codecov.html @@ -18,7 +18,7 @@ If you don't have admin rights to the org in concern, you need to click on the button instead, and wait for an admin to approve the request.
  • Sync your repo list in Codecov: Login to Codecov using your GitHub account. Ensure your org/fork is listed in the home page. If not, use the re-syncing link to sync Codecov data with GitHub (and refresh the page afterward). Try again if it doesn't work the first time, as syncing might take some time.
    If the organization still fails to show up in the dropdown, you can also try the Add GitHub organization link at the bottom of the dropdown list. Doing so will allow you to install the Codecov integration on your GitHub organization, which is same as the next step.
  • Install the Codecov integration on GitHub: Go to this page and click on the green button. In the next steps, choose the org and the fork you want to set up Codecov for (you can also use the All repositories option instead).
  • Configure Codecov for the specific fork: Go to https://app.codecov.io/gh/{YOUR_ORG} (e.g., https://app.codecov.io/gh/my-team-org).
    Choose the Setup repo> option for your fork, and follow the instructions for GitHub Actions. You will need to set up the CODECOV_TOKEN secret as instructed but there is no need to update the workflow YAML file (as the repo you forked already has a YAML file containing the given code).
  • Check for coverage status: Go back to your Codecov home page. After the next time CI runs in your fork, you should see the code coverage percentage in front of your fork name. Here is an example: -
  • Display the Codecov badge: If your fork has a badge showing the Codecov status (e.g, codecov), get the Markdown code for the Codecov badge provided in https://app.codecov.io/gh/{YOUR_ORG}/{YOUR_FORK}/settings/badge (e.g., https://app.codecov.io/gh/se-edu/addressbook-level3/settings/badge) and update the appropriate page in your fork.
  • You can control if CI still passes even if Codecov task fails using the line
    fail_ci_if_error: true or fail_ci_if_error: false in .github/workflows/gradle.yml, under the section related to Codecov.

    +
  • Display the Codecov badge: If your fork has a badge showing the Codecov status (e.g, codecov), get the Markdown code for the Codecov badge provided in https://app.codecov.io/gh/{YOUR_ORG}/{YOUR_FORK}/settings/badge (e.g., https://app.codecov.io/gh/se-edu/addressbook-level3/settings/badge) and update the appropriate page in your fork.
  • You can control if CI still passes even if Codecov task fails using the line
    fail_ci_if_error: true or fail_ci_if_error: false in .github/workflows/gradle.yml, under the section related to Codecov.

    diff --git a/tutorials/codecov.page-vue-render.js b/tutorials/codecov.page-vue-render.js index 520dc4f2..7e628c10 100644 --- a/tutorials/codecov.page-vue-render.js +++ b/tutorials/codecov.page-vue-render.js @@ -35,6 +35,6 @@ with(this){return _c('li',[_c('strong',[_v("Configure Codecov for the specific f with(this){return _c('li',[_c('strong',[_v("Display the Codecov badge:")]),_v(" If your fork has a badge showing the Codecov status (e.g, "),_c('a',{attrs:{"href":"https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg","target":"_self"}},[_c('img',{staticClass:"img-fluid",attrs:{"src":"https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg","alt":"codecov"}})]),_v("), get the Markdown code for the Codecov badge provided in "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("https://app.codecov.io/gh/{YOUR_ORG}/{YOUR_FORK}/settings/badge")]),_v(" (e.g., "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("https://app.codecov.io/gh/se-edu/addressbook-level3/settings/badge")]),_v(") and update the appropriate page in your fork.")])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/githubActions.html b/tutorials/githubActions.html index 0ca4dae7..277b8ca1 100644 --- a/tutorials/githubActions.html +++ b/tutorials/githubActions.html @@ -14,7 +14,7 @@

    Guides for SE student projects »

    Using GitHub Actions

    GitHub Actions is CI/CD tool integrated into GitHub.

    Setting up a custom workflow

    In the simplest case, setting up is a matter of adding a .yml file into the [root]\.github\workflows folder (example).

    GitHub Actions will run the workflow (as per the .yml file) every time certain project events are triggered (e.g., when a PR is updated, or the master branch is updated).

    Resources

    +

    Guides for SE student projects »

    Using GitHub Actions

    GitHub Actions is CI/CD tool integrated into GitHub.

    Setting up a custom workflow

    In the simplest case, setting up is a matter of adding a .yml file into the [root]\.github\workflows folder (example).

    GitHub Actions will run the workflow (as per the .yml file) every time certain project events are triggered (e.g., when a PR is updated, or the master branch is updated).

    Resources

    diff --git a/tutorials/githubActions.page-vue-render.js b/tutorials/githubActions.page-vue-render.js index cc3de090..71222fcc 100644 --- a/tutorials/githubActions.page-vue-render.js +++ b/tutorials/githubActions.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"using-github-actions"}},[_v("Using GitHub Actions"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#using-github-actions","onclick":"event.stopPropagation()"}})]),_v(" "),_c('div',{staticClass:"lead"},[_c('p',[_c('a',{attrs:{"href":"https://github.com/features/actions"}},[_v("GitHub Actions")]),_v(" is CI/CD tool integrated into GitHub.")])]),_v(" "),_c('h2',{attrs:{"id":"setting-up-a-custom-workflow"}},[_v("Setting up a custom workflow"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#setting-up-a-custom-workflow","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("In the simplest case, setting up is a matter of adding a "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v(".yml")]),_v(" file into the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("[root]\\.github\\workflows")]),_v(" folder ("),_c('a',{attrs:{"href":"https://github.com/se-edu/duke/blob/full-template/.github/workflows/gradle.yml"}},[_v("example")]),_v(").")]),_v(" "),_c('p',[_v("GitHub Actions will run the workflow (as per the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v(".yml")]),_v(" file) every time certain project events are triggered (e.g., when a PR is updated, or the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("master")]),_v(" branch is updated).")]),_v(" "),_c('h2',{attrs:{"id":"resources"}},[_v("Resources"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#resources","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"https://help.github.com/en/actions"}},[_v("GitHub Actions documentation")])])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/gradle.html b/tutorials/gradle.html index 4847349f..5723a67a 100644 --- a/tutorials/gradle.html +++ b/tutorials/gradle.html @@ -124,7 +124,7 @@ -

    Resources


    Authors:

    +

    Resources


    Authors:

    diff --git a/tutorials/gradle.page-vue-render.js b/tutorials/gradle.page-vue-render.js index 136f2814..088e238d 100644 --- a/tutorials/gradle.page-vue-render.js +++ b/tutorials/gradle.page-vue-render.js @@ -35,6 +35,6 @@ with(this){return _c('p',[_v("There are several ways of integrating Gradle into with(this){return _c('p',[_c('strong',[_c('strong',[_v("Scenario 1:")])]),_v(" You are setting up a project that already has Gradle wrapper files.")])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/intellijCodeStyle.html b/tutorials/intellijCodeStyle.html index 63c980aa..79bad261 100644 --- a/tutorials/intellijCodeStyle.html +++ b/tutorials/intellijCodeStyle.html @@ -15,7 +15,7 @@

    Guides for SE student projects »

    Intellij IDEA: Configuring the code style

    IntelliJ’s default style is mostly compliant with ours but it uses a different import order from ours but some tweaks may be needed.

    Legend: basic tweak | intermediate tweak | advanced tweak

    Tweak: switch-case style

    1. Go to FileSettings…​ (Windows/Linux), or IntelliJ IDEASettings…​ (macOS).
    2. Click on EditorCode styleJava (see the screenshot below).
    3. Click on the Wrapping and Braces tab and un-tick the Indent 'case' branches option (as shown in the screenshot above).

    Tweak: import order

    1. Go to FileSettings…​ (Windows/Linux), or IntelliJ IDEASettings…​ (macOS).
    2. Select EditorCode StyleJava.
    3. Click on the Imports tab to set the import order. -
      • For Class count to use import with '*' and Names count to use static import with '*': Set to 999 to prevent IntelliJ from contracting the import statements.
      • For Import Layout: The order is:

    Tweak: Auto-remove trailing spaces

    You can configure Intellij to automatically strip trailing white space in code lines, as follows:

    1. Go to Settings.
    2. On the left side of the dialog, click on Editor -> General.
    3. On the right side, scroll to the On Save section.
    4. Change Remove trailing spaces on: to Modified lines.

    More useful settings

    The tweaks given above are specific to code style. A few more useful settings (not related to the code style) can be found here.

    +

    Tweak: Auto-remove trailing spaces

    You can configure Intellij to automatically strip trailing white space in code lines, as follows:

    1. Go to Settings.
    2. On the left side of the dialog, click on Editor -> General.
    3. On the right side, scroll to the On Save section.
    4. Change Remove trailing spaces on: to Modified lines.

    More useful settings

    The tweaks given above are specific to code style. A few more useful settings (not related to the code style) can be found here.

    diff --git a/tutorials/intellijCodeStyle.page-vue-render.js b/tutorials/intellijCodeStyle.page-vue-render.js index 61945702..d2aec822 100644 --- a/tutorials/intellijCodeStyle.page-vue-render.js +++ b/tutorials/intellijCodeStyle.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"intellij-idea-configuring-the-code-style"}},[_v("Intellij IDEA: Configuring the code style"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#intellij-idea-configuring-the-code-style","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("IntelliJ’s default style is mostly compliant with "),_c('a',{attrs:{"href":"/guides/conventions/java"}},[_v("ours")]),_v(" but it uses a different import order from ours but some tweaks may be needed.")]),_v(" "),_c('p',[_c('strong',[_v("Legend")]),_v(": "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-danger"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_v(" basic tweak | "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-warning text-white"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_v(" intermediate tweak | "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-success"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_v(" advanced tweak")]),_v(" "),_c('h2',{attrs:{"id":"tweak-switch-case-style"}},[_v("Tweak: "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("switch-case")]),_v(" style "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-danger"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#tweak-switch-case-style","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ol',[_c('li',[_v("Go to "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("File")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Settings…​")]),_v(" (Windows/Linux), or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("IntelliJ IDEA")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Settings…​")]),_v(" (macOS).")]),_v(" "),_c('li',[_v("Click on "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Editor")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Code style")]),_v("→ "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Java")]),_v(" (see the screenshot below)."),_c('br'),_v(" "),_c('a',{attrs:{"href":"/guides/tutorials/images/intellij/codeStyle-switch.png","target":"_self"}},[_c('img',{staticClass:"img-fluid",attrs:{"src":"/guides/tutorials/images/intellij/codeStyle-switch.png","alt":""}})])]),_v(" "),_c('li',[_v("Click on the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Wrapping and Braces")]),_v(" tab and un-tick the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Indent 'case' branches")]),_v(" option (as shown in the screenshot above).")])]),_v(" "),_c('h2',{attrs:{"id":"tweak-import-order"}},[_v("Tweak: "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("import")]),_v(" order "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-warning text-white"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#tweak-import-order","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ol',[_c('li',[_v("Go to "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("File")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Settings…​")]),_v(" (Windows/Linux), or "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("IntelliJ IDEA")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Settings…​")]),_v(" (macOS).")]),_v(" "),_c('li',[_v("Select "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Editor")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Code Style")]),_v(" → "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Java")]),_v(".")]),_v(" "),_c('li',[_v("Click on the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Imports")]),_v(" tab to set the import order.\n"),_c('ul',[_c('li',[_v("For "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Class count to use import with '*'")]),_v(" and "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Names count to use static import with '*'")]),_v(": Set to "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("999")]),_v(" to prevent IntelliJ from contracting the import statements.")]),_v(" "),_c('li',[_v("For "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Import Layout")]),_v(": The order is:"),_c('br'),_v(" "),_c('a',{attrs:{"href":"/guides/tutorials/images/intellij/importOrder.png","target":"_self"}},[_c('img',{staticClass:"img-fluid",attrs:{"src":"/guides/tutorials/images/intellij/importOrder.png","alt":""}})])])])])]),_v(" "),_c('h2',{attrs:{"id":"tweak-auto-remove-trailing-spaces"}},[_v("Tweak: Auto-remove trailing spaces "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-warning text-white"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#tweak-auto-remove-trailing-spaces","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("You can configure Intellij to automatically strip trailing white space in code lines, as follows:")]),_v(" "),_c('ol',[_c('li',[_v("Go to "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Settings")]),_v(".")]),_v(" "),_c('li',[_v("On the left side of the dialog, click on "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Editor")]),_v(" -> "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("General")]),_v(".")]),_v(" "),_c('li',[_v("On the right side, scroll to the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("On Save")]),_v(" section.")]),_v(" "),_c('li',[_v("Change "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Remove trailing spaces on:")]),_v(" to "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Modified lines")]),_v(".")])]),_v(" "),_c('h2',{attrs:{"id":"more-useful-settings"}},[_v("More useful settings "),_c('span',[_c('span',{staticClass:"badge rounded-pill bg-success"},[_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}}),_c('span',{staticClass:"far fa-star",attrs:{"aria-hidden":"true"}})])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#more-useful-settings","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("The tweaks given above are specific to code style. A few more useful settings (not related to the code style) can be found "),_c('a',{attrs:{"href":"/guides/tutorials/intellijUsefulSettings.html"}},[_v("here")]),_v(".")]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/intellijDebugger.html b/tutorials/intellijDebugger.html index 39e2c54a..5daaa353 100644 --- a/tutorials/intellijDebugger.html +++ b/tutorials/intellijDebugger.html @@ -15,7 +15,7 @@

    Guides for SE student projects »

    Intellij IDEA: Using the debugger

    This tutorial covers basics of the Intellij IDEA's debugging features.

    • If you are new to using an IDE-based debugger, we recommend that you watch the following video (from LaunchCode) which gives a pretty good explanation of how to use the IntelliJ IDEA debugger.

      Debugging in IntelliJ


    • To recall how to use a specific feature, you can use the sections below.

    Setting breakpoints

    Purpose: A breakpoint is a line in the code at which the debugger will pause the execution.

    How: Click on the left gutter of the editor pane, at the line where you want to breakpoint. A red dot will appear to indicate the breakpoint.


    [image credit: Intelli]

    To remove the breakpoint, click the red dot again.

    Video segment 3.09 - 3.30 :

    More info from Intellij is here.

    Running the code in 'debugger mode'

    Purpose: To get Intellij to run the code in the debugger mode, so that the debugger can direct the execution flow as needed by the debugging.

    How: There are several ways. One of them is to click the icon in the gutter near the class with the main() method and select Debug.


    [image credit: Intelli]

    Video segment 3.53 - 4.00 :

    More info from Intellij is here.

    Examining the state of the suspended program

    Purpose: To examine variable values at a specific step of the execution.

    How: Use the Debugger tool window (the bottom part of the screenshot below). Ccurrent value of each variable is listed in the panel on the bottom right.


    [image credit: LaunchCode]

    Show execution point feature can be used to jump to the line of code that the debugger has stopped at (in case the line is not currently visible in the code editor):

    ShowExecutionPoint

    Video segment 4.41 - 6.06 :

    More info from Intellij is here.

    Stepping through code

    Purpose: Executes the current statement, and move to the next statement.

    How: Click the Step Over button in the debugger toolbar, as shown below.


    [image credit: se-edu]

    Video segment 7.30 - 7.55 :

    More info from Intellij is here.

    Stepping into a method

    Purpose: Suppose the current statement calls another method, and you are interested to see how the execution goes through that method. Here, you can step into that method.

    How: Click the Step Into button in the debugger toolbar, as shown below.


    [image credit: se-edu]

    Video segment 13.05 - 13.35 :

    When trying to step into a statement such as storage.saveAddressBook(model.getAddressBook()) which contains multiple method calls, Intellij will let you choose (by clicking) which one you want to step into.

    More info from Intellij is here.

    Stepping out of a method

    Purpose: Executes the remaining lines of code in the current method and returns to the caller.
    -Used when you've stepped into a method, stepped through some of it, and now want to return to the caller method without stepping through the remainder of the current method.

    How: Click the Step Out button in the debugger toolbar, as shown below.


    [image credit: LaunchCode]

    Video segment 13.45 - 13.55 :

    More info from Intellij is here.

    Setting a conditional breakpoint

    Purpose: To pause the execution at a certain breakpoint only when a certain condition is met e.g., to stop at a breakpoint only when the 100th iteration of a loop.

    How: Right-click on a breakpoint and enter a condition (e.g., i == 5)


    [image credit: LaunchCode]

    Video segment 15.20 - 16.45 :

    Evaluate expression

    Purpose: Allows you to compute the value of an expression at a specific point during execution, enabling dynamic inspection of variables and data structures.
    e.g., while debugging, you want to find the result of expressions truncate(myVariable * 2) based on the current value myVariable

    How: Enter it in the Evaluate expression field in the Variables pane (shown below) and press Enter.


    [image credit: Tom Gregory Tech]

    More info from Intellij is here.

    Set an exception breakpoint

    Purpose: To pause execution whenever a specified exception is thrown, regardless of where it occurs in your code, making it easier to identify and diagnose issues.

    How: Choose Run > View Breakpoints from the main menu, and use the icon to add an exception breakpoint, as shown below.


    [image credit: Tom Gregory Tech]

    More info from Intellij is here.


    Authors:

    +Used when you've stepped into a method, stepped through some of it, and now want to return to the caller method without stepping through the remainder of the current method.

    How: Click the Step Out button in the debugger toolbar, as shown below.


    [image credit: LaunchCode]

    Video segment 13.45 - 13.55 :

    More info from Intellij is here.

    Setting a conditional breakpoint

    Purpose: To pause the execution at a certain breakpoint only when a certain condition is met e.g., to stop at a breakpoint only when the 100th iteration of a loop.

    How: Right-click on a breakpoint and enter a condition (e.g., i == 5)


    [image credit: LaunchCode]

    Video segment 15.20 - 16.45 :

    Evaluate expression

    Purpose: Allows you to compute the value of an expression at a specific point during execution, enabling dynamic inspection of variables and data structures.
    e.g., while debugging, you want to find the result of expressions truncate(myVariable * 2) based on the current value myVariable

    How: Enter it in the Evaluate expression field in the Variables pane (shown below) and press Enter.


    [image credit: Tom Gregory Tech]

    More info from Intellij is here.

    Set an exception breakpoint

    Purpose: To pause execution whenever a specified exception is thrown, regardless of where it occurs in your code, making it easier to identify and diagnose issues.

    How: Choose Run > View Breakpoints from the main menu, and use the icon to add an exception breakpoint, as shown below.


    [image credit: Tom Gregory Tech]

    More info from Intellij is here.


    Authors:

    diff --git a/tutorials/intellijDebugger.page-vue-render.js b/tutorials/intellijDebugger.page-vue-render.js index bc52a4e4..2fd8b3ce 100644 --- a/tutorials/intellijDebugger.page-vue-render.js +++ b/tutorials/intellijDebugger.page-vue-render.js @@ -131,6 +131,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: "),_c('a',{attrs:{"href":"https://github.com/ruishanteo"}},[_v("@ruishanteo")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/intellijImportGradleProject.html b/tutorials/intellijImportGradleProject.html index 460a2ae8..c31b0fc1 100644 --- a/tutorials/intellijImportGradleProject.html +++ b/tutorials/intellijImportGradleProject.html @@ -19,7 +19,7 @@ i. Select the project directory, and click OK.
    ii. If there are any further prompts, accept the defaults but do ensure that the selected version of Gradle JVM matches the JDK being used for the project.
  • Confirm the correct Java version is being used for Gradle, as follows:
    (a) Confirm the project JDK is set to the one you are supposed to use for the project, as explained here.
    -(b) Confirm the correct JVM is used for Gradle, as given in the panel below:
  • Intellij: Setting the JVM for Gradle

    Go to File -> Settings and ensure the Gradle JVM is set as Project SDK ..., so that Gradle will use the same JDK used by the project.

    Also take note of the Build and run using: and Run tests using: settings. They are useful if you want to control whether you want Intellij to use Gradle to build/run/test your project.


    1. After the importing of the project is complete (which could take a few minutes), you will see the Gradle Toolbar in the IDEA interface e.g., look for the elephant icon (on Windows, this appears on the right-edge of the IDE window) and click it.
      Gradle icon

    +(b) Confirm the correct JVM is used for Gradle, as given in the panel below:

    Intellij: Setting the JVM for Gradle

    Go to File -> Settings and ensure the Gradle JVM is set as Project SDK ..., so that Gradle will use the same JDK used by the project.

    Also take note of the Build and run using: and Run tests using: settings. They are useful if you want to control whether you want Intellij to use Gradle to build/run/test your project.


    1. After the importing of the project is complete (which could take a few minutes), you will see the Gradle Toolbar in the IDEA interface e.g., look for the elephant icon (on Windows, this appears on the right-edge of the IDE window) and click it.
      Gradle icon

    diff --git a/tutorials/intellijImportGradleProject.page-vue-render.js b/tutorials/intellijImportGradleProject.page-vue-render.js index bed707f3..91c7df07 100644 --- a/tutorials/intellijImportGradleProject.page-vue-render.js +++ b/tutorials/intellijImportGradleProject.page-vue-render.js @@ -17,6 +17,6 @@ with(this){return _c('ol',[_c('li',[_v("Open Intellij.")]),_v(" "),_c('li',[_v(" with(this){return _c('ol',{attrs:{"start":"4"}},[_c('li',[_v("After the importing of the project is complete (which could take a few minutes), you will see the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Gradle Toolbar")]),_v(" in the IDEA interface "),_c('span',{staticClass:"dimmed"},[_v("e.g., look for the elephant icon (on Windows, this appears on the right-edge of the IDE window) and click it")]),_v("."),_c('br'),_v(" "),_c('a',{attrs:{"href":"/guides/tutorials/images/gradle/GradleIcon.png","target":"_self"}},[_c('img',{staticClass:"img-fluid",attrs:{"src":"/guides/tutorials/images/gradle/GradleIcon.png","alt":"Gradle icon"}})])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/intellijJdk.html b/tutorials/intellijJdk.html index 58253925..a67eebf6 100644 --- a/tutorials/intellijJdk.html +++ b/tutorials/intellijJdk.html @@ -14,7 +14,7 @@

    Guides for SE student projects »

    Intellij IDEA: Configuring the JDK

    Please refer to Intellij's own documentation here.

    +

    Guides for SE student projects »

    Intellij IDEA: Configuring the JDK

    Please refer to Intellij's own documentation here.

    diff --git a/tutorials/intellijJdk.page-vue-render.js b/tutorials/intellijJdk.page-vue-render.js index f32ba434..f6eadda3 100644 --- a/tutorials/intellijJdk.page-vue-render.js +++ b/tutorials/intellijJdk.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"intellij-idea-configuring-the-jdk"}},[_v("Intellij IDEA: Configuring the JDK"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#intellij-idea-configuring-the-jdk","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p',[_v("Please refer to Intellij's own documentation "),_c('a',{attrs:{"href":"https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk"}},[_v("here")]),_v(".")]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/intellijUsefulSettings.html b/tutorials/intellijUsefulSettings.html index bd9fd061..0fa003fd 100644 --- a/tutorials/intellijUsefulSettings.html +++ b/tutorials/intellijUsefulSettings.html @@ -15,7 +15,7 @@

    Guides for SE student projects »

    Intellij IDEA: Useful settings

    Enabling assertions

    This tweak does not apply if you use Gradle to run code even within Intellij. In that case, refer to 'Enabling assertions' sections of the Gradle tutorial.

    1. Choose RunEdit Configurations....
    2. Select the run configuration of interest.
    3. Click on Modify options link and choose Add VM options
    4. Add -ea to the VM options box. -

    Enabling soft wrapping

    While it is common to enforce a maximum line length for code written in some languages (typically, for code made up of statements such as Java), it is also common not to enforce such a limit for source content that contain paragraph-like structures (e.g., Markdown, HTML). In such cases, you'll need to scroll the editor window horizontally to read the content, which can be a frustrating experience. Here's an example (notice how the text continues beyond the visible area of the editor window and you need to use the horizontal scrolling to see the hidden part):

    Luckily, you can use the 'soft wrap' feature of Intellij to get the editor window to put line breaks in the content so that horizontal scrolling is no longer required. Here is how the same code from the above example looks after enabling the soft-wraps feature (notice how the whole text is visible now, due to the soft line breaks added by the editor):

    Read this to find how to enable soft wraps.

    +

    Enabling soft wrapping

    While it is common to enforce a maximum line length for code written in some languages (typically, for code made up of statements such as Java), it is also common not to enforce such a limit for source content that contain paragraph-like structures (e.g., Markdown, HTML). In such cases, you'll need to scroll the editor window horizontally to read the content, which can be a frustrating experience. Here's an example (notice how the text continues beyond the visible area of the editor window and you need to use the horizontal scrolling to see the hidden part):

    Luckily, you can use the 'soft wrap' feature of Intellij to get the editor window to put line breaks in the content so that horizontal scrolling is no longer required. Here is how the same code from the above example looks after enabling the soft-wraps feature (notice how the whole text is visible now, due to the soft line breaks added by the editor):

    Read this to find how to enable soft wraps.

    diff --git a/tutorials/intellijUsefulSettings.page-vue-render.js b/tutorials/intellijUsefulSettings.page-vue-render.js index a3a7aecf..586dc5a2 100644 --- a/tutorials/intellijUsefulSettings.page-vue-render.js +++ b/tutorials/intellijUsefulSettings.page-vue-render.js @@ -26,6 +26,6 @@ with(this){return _c('p',[_v("While it is common to enforce a maximum line lengt with(this){return _c('p',[_v("Read "),_c('a',{attrs:{"href":"https://www.jetbrains.com/idea/guide/tips/enable-soft-wrap/"}},[_v("this")]),_v(" to find how to enable soft wraps.")])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/jar.html b/tutorials/jar.html index 08554205..864405bd 100644 --- a/tutorials/jar.html +++ b/tutorials/jar.html @@ -72,7 +72,7 @@ -

    If you are using JavaFX, see the panel below to find what else you need to add to the build.gradle to pack JavaFX libraries into the generated JAR file.


    Creating a JAR file in Intellij - A video by Artur Spirin:

    If your app uses third-party libraries, you are recommended to create a fat JAR file using Gradle instead.

    Although JUnit is a third-party library, you need not package it into a fat JAR file because JUnit is used only in the test code, not in the application code.

    But if you use JavaFX, you need to package the JavaFX libraries into a fat JAR file.


    Resources

    +

    If you are using JavaFX, see the panel below to find what else you need to add to the build.gradle to pack JavaFX libraries into the generated JAR file.


    Creating a JAR file in Intellij - A video by Artur Spirin:

    If your app uses third-party libraries, you are recommended to create a fat JAR file using Gradle instead.

    Although JUnit is a third-party library, you need not package it into a fat JAR file because JUnit is used only in the test code, not in the application code.

    But if you use JavaFX, you need to package the JavaFX libraries into a fat JAR file.


    Resources

    diff --git a/tutorials/jar.page-vue-render.js b/tutorials/jar.page-vue-render.js index 37b141fd..92939b9e 100644 --- a/tutorials/jar.page-vue-render.js +++ b/tutorials/jar.page-vue-render.js @@ -44,6 +44,6 @@ with(this){return _c('h2',{attrs:{"id":"resources"}},[_v("Resources"),_c('a',{st with(this){return _c('ul',[_c('li',[_c('a',{attrs:{"href":"https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html"}},[_v("Oracle's tutorial on JAR files")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow"}},[_v("Gradle documentation for the Shadow plugin")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"https://imperceptiblethoughts.com/shadow/introduction/"}},[_v("Shadow plugin homepage")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaFx.html b/tutorials/javaFx.html index 370df7c9..bcfbb73b 100644 --- a/tutorials/javaFx.html +++ b/tutorials/javaFx.html @@ -14,7 +14,7 @@
    +

    Guides for SE student projects »

    JavaFX tutorial

    diff --git a/tutorials/javaFx.page-vue-render.js b/tutorials/javaFx.page-vue-render.js index b22c28d2..05afde44 100644 --- a/tutorials/javaFx.page-vue-render.js +++ b/tutorials/javaFx.page-vue-render.js @@ -8,6 +8,6 @@ with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":"" with(this){return _c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('span',{staticClass:"text-dark"},[_c('strong',[_c('strong',[_v("Guides for SE student projects »")])])]),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#guides-for-se-student-projects","onclick":"event.stopPropagation()"}})]),_v(" "),_c('p'),_c('h1',{attrs:{"id":"javafx-tutorial"}},[_v("JavaFX tutorial"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#javafx-tutorial","onclick":"event.stopPropagation()"}})]),_v(" "),_c('ul',[_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/javaFxPart1.html"}},[_v("Part 1: Introduction")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/javaFxPart2.html"}},[_v("Part 2: Creating a GUI for Duke")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/javaFxPart3.html"}},[_v("Part 3: Interacting with the user")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/javaFxPart4.html"}},[_v("Part 4: Using FXML")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"/guides/tutorials/javaFxPart5.html"}},[_v("Part 5: Tweaking the GUI")])])]),_c('p')])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaFxPart1.html b/tutorials/javaFxPart1.html index 28f18fcb..358b92a8 100644 --- a/tutorials/javaFxPart1.html +++ b/tutorials/javaFxPart1.html @@ -164,10 +164,10 @@ -

    This approach enables JavaFX to create the Application instance using the newly defined no-argument constructor, while preserving the functionality of the existing constructor.

    Now, run the application (e.g., run ./gradlew run command in the terminal) and you should see something like this:

    Hello World

    The following warning issued by Java runtime can be ignored. This warning appears when you use a later JavaFX version (e.g., 17) with a JDK version that doesn't support the modules feature yet (e.g., Java 11).

    WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @...

    Similarly, the warnign about the different versions can be ignored as well

    WARNING: Loading FXML document with JavaFX API of version ___ by JavaFX runtime of version ___

    Congratulations! You have created your first GUI application!

    Exercises

    1. We mentioned that Nodes are the fundamental building blocks of JavaFX and used a Label as our root node in the HelloWorld application. +

      This approach enables JavaFX to create the Application instance using the newly defined no-argument constructor, while preserving the functionality of the existing constructor.

      Now, run the application (e.g., run ./gradlew run command in the terminal) and you should see something like this:

      Hello World

      The following warning issued by Java runtime can be ignored. This warning appears when you use a later JavaFX version (e.g., 17) with a JDK version that doesn't support the modules feature yet (e.g., Java 11).

      WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @...

      Similarly, the warning about the different versions can be ignored as well

      WARNING: Loading FXML document with JavaFX API of version ___ by JavaFX runtime of version ___

      Congratulations! You have created your first GUI application!

      Exercises

      1. We mentioned that Nodes are the fundamental building blocks of JavaFX and used a Label as our root node in the HelloWorld application.
        1. What are some of the other types of Nodes?
        2. How does JavaFX group them?
      2. Nodes can be interacted with like Plain Old Java Objects (POJO).
        1. What properties of a Label can you change programmatically?
        2. Try changing the Label to have a font of Arial at size 50.
      3. You’ve learnt that a Stage can be thought of as a window. -
        1. Can you have more than one Stage in an application?
        2. Try creating another stage and showing it! What happens?

      ToC | What's next? JavaFX tutorial part 2 - Creating a GUI for Duke


      Authors:

      +
      1. Can you have more than one Stage in an application?
      2. Try creating another stage and showing it! What happens?

    ToC | What's next? JavaFX tutorial part 2 - Creating a GUI for Duke


    Authors:

    diff --git a/tutorials/javaFxPart1.page-vue-render.js b/tutorials/javaFxPart1.page-vue-render.js index acb78691..8094ed14 100644 --- a/tutorials/javaFxPart1.page-vue-render.js +++ b/tutorials/javaFxPart1.page-vue-render.js @@ -1,7 +1,7 @@ var pageVueRenderFn = function anonymous( ) { -with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":""}},[_c('navbar',{attrs:{"type":"dark"},scopedSlots:_u([{key:"brand",fn:function(){return [_c('a',{staticClass:"navbar-brand",attrs:{"href":"https://se-education.org","title":"SE-EDU"}},[_c('span',[_c('span',{staticClass:"fas fa-chevron-circle-left",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_c('strong',[_v("SE-EDU")])])])])]},proxy:true},{key:"right",fn:function(){return [_c('li',{staticClass:"nav-link"},[_c('form',{staticClass:"navbar-form"},[_c('searchbar',{attrs:{"data":searchData,"placeholder":"Search this site","on-hit":searchCallback,"menu-align-right":""}})],1)])]},proxy:true}])},[_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"/guides/index.html"}},[_c('span',[_c('strong',[_v("Home")])])])]),_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"/guides/about.html"}},[_c('span',[_c('strong',[_v("About")])])])]),_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"https://github.com/se-edu/guides"}},[_c('span',[_c('span',{staticClass:"fab fa-github",attrs:{"aria-hidden":"true"}})])])])])],1),_v(" "),_c('div',{attrs:{"id":"flex-body"}},[_c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_m(0),_v(" "),_c('p'),_m(1),_v(" "),_m(2),_v(" "),_c('p',[_v("Imagine yourself as a director of a play. First you provision the props that you will feature in your play. These can be hand props for your actors to interact with or even set dressings just to liven up the background. You then decide where to place the props for every scene. With a proper script in hand, you can finally approach a theatre and request for a stage. Thereafter, it’s just a matter of pulling the curtains on your masterpiece.")]),_v(" "),_c('pic',{attrs:{"src":"/guides/tutorials/images/javafx/JavaFxHierarchy.png"}}),_v(" "),_m(3),_v(" "),_c('p',[_v("Well, that's a very high-level view of how JavaFX works. The actual implementation of a Java FX is a bit more (ahem...) \"involved\". This tutorial takes you through the steps of building a typical Java FX application, using a chatbot application called Duke as a running example. Given below is what the end result can look like if you follow this tutorial until the end:")]),_v(" "),_c('video',{attrs:{"oncontextmenu":"return false;","width":"700px","autoplay":"","muted":"","loop":""},domProps:{"muted":true}},[_c('source',{attrs:{"src":"videos/javafx/DynamicStyleDemo.mp4","type":"video/mp4"}})]),_v(" "),_c('p',[_v("Let's get started!")]),_v(" "),_m(4),_v(" "),_m(5),_v(" "),_c('box',{attrs:{"type":"tip","seamless":""}},[_c('p',[_v("If you are following this tutorial to learn how to add a GUI to an existing app, we suggest that you follow this tutorial using the above repo first, without mixing tutorial code with your existing project code. Once you are happy with the GUI you've built following this tutorial, you can copy over the GUI code to your existing project, and adapt it to fit that project.")])]),_v(" "),_m(6),_v(" "),_m(7),_v(" "),_c('div',{attrs:{"id":"javafx-gradle"}},[_m(8),_v(" "),_c('pre',[_m(9),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])]),_v(" "),_c('p',[_v("Also note the following:")]),_v(" "),_c('div',{staticClass:"indented-level1"},[_c('panel',{attrs:{"minimized":""},scopedSlots:_u([{key:"header",fn:function(){return [_c('p',[_c('span',[_c('span',{staticClass:"glyphicon glyphicon-log-in",attrs:{"aria-hidden":"true"}})]),_v(" Gradle Tutorial → After updating the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("build.gradle")]),_v(" file (extract)")])]},proxy:true}])},[_v(" "),_c('div',[_c('p',[_c('strong',[_v("After updating the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("build.gradle")]),_v(" file,")])]),_v(" "),_c('ul',[_c('li',[_v("if you are using an IDE: Use the IDE UI to reload dependencies based on the updated file. For example, if using Intellij IDEA, you can click the "),_c('img',{attrs:{"src":"/guides/tutorials/images/gradle/RefreshGradleIcon.png"}}),_v(" icon in the Gradle tool window to reload the file."),_c('br'),_v("\nFor good measure, you can restart the IDE too.")]),_v(" "),_c('li',[_v("if not using an IDE: Run "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v(".\\gradlew clean build")]),_v(" to rebuild everything based on the updated file.")])])])])],1),_v(" "),_c('p'),_v(" "),_m(10),_v(" "),_m(11),_v(" "),_c('div',{staticClass:"code-block"},[_m(12),_c('div',{staticClass:"code-block-content"},[_c('pre',[_m(13),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_m(14),_v(" "),_m(15),_v(" "),_m(16),_v(" "),_c('div',{staticClass:"code-block"},[_m(17),_c('div',{staticClass:"code-block-content"},[_c('pre',[_m(18),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_m(19),_v(" "),_c('div',{staticClass:"code-block"},[_m(20),_c('div',{staticClass:"code-block-content"},[_c('pre',[_m(21),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_c('box',{attrs:{"type":"tip","seamless":""}},[_c('p',[_v("JavaFX creates the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Application")]),_v(" instance by calling the no-argument constructor. If there is no other constructor in the class (such as the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Main")]),_v(" we created above), there is no need to provide such a constructor because Java automatically provides a no-argument constructor when there are no other constructors.")]),_v(" "),_c('p',[_v("But if you already have an existing constructor which takes arguments in that class (in which case Java will not provide a no-argument constructor automatically), you need to create an overloaded constructor with no arguments yourself. An example given below:")]),_v(" "),_c('div',{staticClass:"code-block"},[_c('div',{staticClass:"code-block-heading"},[_c('span',[_v("Main.java")])]),_c('div',{staticClass:"code-block-content"},[_c('pre',[_c('code',{pre:true,attrs:{"heading":"Main.java","class":"hljs java"}},[_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("//...")]),_v("\n")]),_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("private")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("static")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("final")]),_v(" String DEFAULT_FILE_PATH = "),_c('span',{pre:true,attrs:{"class":"hljs-string"}},[_v("\"duke/example.txt\"")]),_v(";\n")]),_c('span',[_v("\n")]),_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("public")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-class"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("class")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Main")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("extends")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Application")]),_v(" ")]),_v("{\n")]),_c('span',[_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// Existing constructor")]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-function"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("public")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Main")]),_c('span',{pre:true,attrs:{"class":"hljs-params"}},[_v("(String filePath)")]),_v(" ")]),_v("{\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// ...")]),_v("\n")]),_c('span',[_v(" }\n")]),_c('span',[_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// Overloaded constructor")])]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_c('span',{pre:true,attrs:{"class":"hljs-function"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("public")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Main")]),_c('span',{pre:true,attrs:{"class":"hljs-params"}},[_v("()")]),_v(" ")]),_v("{")]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("this")]),_v("(DEFAULT_FILE_PATH);")]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_v("}")]),_v("\n")]),_c('span',[_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// ...")]),_v("\n")]),_c('span',[_v("}\n")])]),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_c('p',[_v("This approach enables JavaFX to create the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Application")]),_v(" instance using the newly defined no-argument constructor, while preserving the functionality of the existing constructor.")])]),_v(" "),_m(22),_v(" "),_m(23),_v(" "),_c('box',{attrs:{"type":"info","seamless":""}},[_c('p',[_v("The following warning issued by Java runtime can be ignored. This warning appears when you use a later JavaFX version (e.g., 17) with a JDK version that doesn't support the "),_c('em',[_v("modules")]),_v(" feature yet (e.g., Java 11).")]),_v(" "),_c('blockquote',[_c('p',[_v("WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @...")])]),_v(" "),_c('p',[_v("Similarly, the warnign about the different versions can be ignored as well")]),_v(" "),_c('blockquote',[_c('p',[_v("WARNING: Loading FXML document with JavaFX API of version ___ by JavaFX runtime of version ___")])])]),_v(" "),_c('p',[_v("Congratulations! You have created your first GUI application!")]),_v(" "),_m(24),_v(" "),_m(25),_v(" "),_m(26),_v(" "),_c('hr'),_v(" "),_m(27),_v(" "),_m(28),_c('p')],1),_v(" "),_c('overlay-source',{staticClass:"fixed-header-padding",attrs:{"id":"page-nav","tag-name":"nav","to":"page-nav"}},[_c('div',{staticClass:"nav-component slim-scroll"},[_c('overlay-source',{staticClass:"nav nav-pills flex-column my-0 small no-flex-wrap",attrs:{"id":"mb-page-nav","tag-name":"nav","to":"mb-page-nav"}},[_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#javafx-tutorial-part-1-getting-started"}},[_v("JavaFX tutorial part 1 – Getting started‎")]),_v(" "),_c('nav',{staticClass:"nav nav-pills flex-column my-0 nested no-flex-wrap"},[_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#lifecycle-of-a-javafx-application"}},[_v("Lifecycle of a JavaFX application‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#setting-up-the-project"}},[_v("Setting up the project‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#setting-up-java-fx"}},[_v("Setting up Java FX‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#writing-your-first-java-fx-program"}},[_v("Writing your first Java FX program‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#exercises"}},[_v("Exercises‎")])])])],1)]),_v(" "),_c('scroll-top-button')],1),_v(" "),_m(29)])} +with(this){return _c('div',{attrs:{"id":"app"}},[_c('header',{attrs:{"sticky":""}},[_c('navbar',{attrs:{"type":"dark"},scopedSlots:_u([{key:"brand",fn:function(){return [_c('a',{staticClass:"navbar-brand",attrs:{"href":"https://se-education.org","title":"SE-EDU"}},[_c('span',[_c('span',{staticClass:"fas fa-chevron-circle-left",attrs:{"aria-hidden":"true"}}),_v(" "),_c('strong',[_c('strong',[_v("SE-EDU")])])])])]},proxy:true},{key:"right",fn:function(){return [_c('li',{staticClass:"nav-link"},[_c('form',{staticClass:"navbar-form"},[_c('searchbar',{attrs:{"data":searchData,"placeholder":"Search this site","on-hit":searchCallback,"menu-align-right":""}})],1)])]},proxy:true}])},[_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"/guides/index.html"}},[_c('span',[_c('strong',[_v("Home")])])])]),_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"/guides/about.html"}},[_c('span',[_c('strong',[_v("About")])])])]),_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"https://github.com/se-edu/guides"}},[_c('span',[_c('span',{staticClass:"fab fa-github",attrs:{"aria-hidden":"true"}})])])])])],1),_v(" "),_c('div',{attrs:{"id":"flex-body"}},[_c('div',{staticClass:"fixed-header-padding",attrs:{"id":"content-wrapper"}},[_m(0),_v(" "),_c('p'),_m(1),_v(" "),_m(2),_v(" "),_c('p',[_v("Imagine yourself as a director of a play. First you provision the props that you will feature in your play. These can be hand props for your actors to interact with or even set dressings just to liven up the background. You then decide where to place the props for every scene. With a proper script in hand, you can finally approach a theatre and request for a stage. Thereafter, it’s just a matter of pulling the curtains on your masterpiece.")]),_v(" "),_c('pic',{attrs:{"src":"/guides/tutorials/images/javafx/JavaFxHierarchy.png"}}),_v(" "),_m(3),_v(" "),_c('p',[_v("Well, that's a very high-level view of how JavaFX works. The actual implementation of a Java FX is a bit more (ahem...) \"involved\". This tutorial takes you through the steps of building a typical Java FX application, using a chatbot application called Duke as a running example. Given below is what the end result can look like if you follow this tutorial until the end:")]),_v(" "),_c('video',{attrs:{"oncontextmenu":"return false;","width":"700px","autoplay":"","muted":"","loop":""},domProps:{"muted":true}},[_c('source',{attrs:{"src":"videos/javafx/DynamicStyleDemo.mp4","type":"video/mp4"}})]),_v(" "),_c('p',[_v("Let's get started!")]),_v(" "),_m(4),_v(" "),_m(5),_v(" "),_c('box',{attrs:{"type":"tip","seamless":""}},[_c('p',[_v("If you are following this tutorial to learn how to add a GUI to an existing app, we suggest that you follow this tutorial using the above repo first, without mixing tutorial code with your existing project code. Once you are happy with the GUI you've built following this tutorial, you can copy over the GUI code to your existing project, and adapt it to fit that project.")])]),_v(" "),_m(6),_v(" "),_m(7),_v(" "),_c('div',{attrs:{"id":"javafx-gradle"}},[_m(8),_v(" "),_c('pre',[_m(9),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])]),_v(" "),_c('p',[_v("Also note the following:")]),_v(" "),_c('div',{staticClass:"indented-level1"},[_c('panel',{attrs:{"minimized":""},scopedSlots:_u([{key:"header",fn:function(){return [_c('p',[_c('span',[_c('span',{staticClass:"glyphicon glyphicon-log-in",attrs:{"aria-hidden":"true"}})]),_v(" Gradle Tutorial → After updating the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("build.gradle")]),_v(" file (extract)")])]},proxy:true}])},[_v(" "),_c('div',[_c('p',[_c('strong',[_v("After updating the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("build.gradle")]),_v(" file,")])]),_v(" "),_c('ul',[_c('li',[_v("if you are using an IDE: Use the IDE UI to reload dependencies based on the updated file. For example, if using Intellij IDEA, you can click the "),_c('img',{attrs:{"src":"/guides/tutorials/images/gradle/RefreshGradleIcon.png"}}),_v(" icon in the Gradle tool window to reload the file."),_c('br'),_v("\nFor good measure, you can restart the IDE too.")]),_v(" "),_c('li',[_v("if not using an IDE: Run "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v(".\\gradlew clean build")]),_v(" to rebuild everything based on the updated file.")])])])])],1),_v(" "),_c('p'),_v(" "),_m(10),_v(" "),_m(11),_v(" "),_c('div',{staticClass:"code-block"},[_m(12),_c('div',{staticClass:"code-block-content"},[_c('pre',[_m(13),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_m(14),_v(" "),_m(15),_v(" "),_m(16),_v(" "),_c('div',{staticClass:"code-block"},[_m(17),_c('div',{staticClass:"code-block-content"},[_c('pre',[_m(18),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_m(19),_v(" "),_c('div',{staticClass:"code-block"},[_m(20),_c('div',{staticClass:"code-block-content"},[_c('pre',[_m(21),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_c('box',{attrs:{"type":"tip","seamless":""}},[_c('p',[_v("JavaFX creates the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Application")]),_v(" instance by calling the no-argument constructor. If there is no other constructor in the class (such as the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Main")]),_v(" we created above), there is no need to provide such a constructor because Java automatically provides a no-argument constructor when there are no other constructors.")]),_v(" "),_c('p',[_v("But if you already have an existing constructor which takes arguments in that class (in which case Java will not provide a no-argument constructor automatically), you need to create an overloaded constructor with no arguments yourself. An example given below:")]),_v(" "),_c('div',{staticClass:"code-block"},[_c('div',{staticClass:"code-block-heading"},[_c('span',[_v("Main.java")])]),_c('div',{staticClass:"code-block-content"},[_c('pre',[_c('code',{pre:true,attrs:{"heading":"Main.java","class":"hljs java"}},[_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("//...")]),_v("\n")]),_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("private")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("static")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("final")]),_v(" String DEFAULT_FILE_PATH = "),_c('span',{pre:true,attrs:{"class":"hljs-string"}},[_v("\"duke/example.txt\"")]),_v(";\n")]),_c('span',[_v("\n")]),_c('span',[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("public")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-class"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("class")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Main")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("extends")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Application")]),_v(" ")]),_v("{\n")]),_c('span',[_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// Existing constructor")]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-function"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("public")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Main")]),_c('span',{pre:true,attrs:{"class":"hljs-params"}},[_v("(String filePath)")]),_v(" ")]),_v("{\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// ...")]),_v("\n")]),_c('span',[_v(" }\n")]),_c('span',[_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// Overloaded constructor")])]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_c('span',{pre:true,attrs:{"class":"hljs-function"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("public")]),_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-title"}},[_v("Main")]),_c('span',{pre:true,attrs:{"class":"hljs-params"}},[_v("()")]),_v(" ")]),_v("{")]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_c('span',{pre:true,attrs:{"class":"hljs-keyword"}},[_v("this")]),_v("(DEFAULT_FILE_PATH);")]),_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"highlighted"}},[_v("}")]),_v("\n")]),_c('span',[_v("\n")]),_c('span',[_v(" "),_c('span',{pre:true,attrs:{"class":"hljs-comment"}},[_v("// ...")]),_v("\n")]),_c('span',[_v("}\n")])]),_c('div',{staticClass:"function-btn-container"},[_c('button',{staticClass:"function-btn d-print-none",attrs:{"onclick":"copyCodeBlock(this)"}},[_v("\n "),_c('div',{staticClass:"function-btn-body"},[_v("\n \n"),_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","width":"18","height":"18","viewBox":"0 0 18 18","version":"1.1"}},[_v("\n "),_c('g',{attrs:{"id":"surface1"}},[_v("\n "),_c('path',{attrs:{"d":"M 11.273438 0 L 2.546875 0 C 1.746094 0 1.089844 0.613281 1.089844\n 1.363281 L 1.089844 10.910156 L 2.546875 10.910156 L 2.546875 1.363281 L 11.273438\n 1.363281 Z M 13.453125 2.726562 L 5.453125 2.726562 C 4.65625 2.726562 4 3.339844 4\n 4.089844 L 4 13.636719 C 4 14.386719 4.65625 15 5.453125 15 L 13.453125 15 C 14.253906\n 15 14.910156 14.386719 14.910156 13.636719 L 14.910156 4.089844 C 14.910156 3.339844\n 14.253906 2.726562 13.453125 2.726562 Z M 13.453125 13.636719 L 5.453125 13.636719 L\n 5.453125 4.089844 L 13.453125 4.089844 Z M 13.453125 13.636719 "}}),_v("\n ")]),_v("\n")]),_v("\n\n ")]),_v("\n ")])])])])]),_c('p',[_v("This approach enables JavaFX to create the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Application")]),_v(" instance using the newly defined no-argument constructor, while preserving the functionality of the existing constructor.")])]),_v(" "),_m(22),_v(" "),_m(23),_v(" "),_c('box',{attrs:{"type":"info","seamless":""}},[_c('p',[_v("The following warning issued by Java runtime can be ignored. This warning appears when you use a later JavaFX version (e.g., 17) with a JDK version that doesn't support the "),_c('em',[_v("modules")]),_v(" feature yet (e.g., Java 11).")]),_v(" "),_c('blockquote',[_c('p',[_v("WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @...")])]),_v(" "),_c('p',[_v("Similarly, the warning about the different versions can be ignored as well")]),_v(" "),_c('blockquote',[_c('p',[_v("WARNING: Loading FXML document with JavaFX API of version ___ by JavaFX runtime of version ___")])])]),_v(" "),_c('p',[_v("Congratulations! You have created your first GUI application!")]),_v(" "),_m(24),_v(" "),_m(25),_v(" "),_m(26),_v(" "),_c('hr'),_v(" "),_m(27),_v(" "),_m(28),_c('p')],1),_v(" "),_c('overlay-source',{staticClass:"fixed-header-padding",attrs:{"id":"page-nav","tag-name":"nav","to":"page-nav"}},[_c('div',{staticClass:"nav-component slim-scroll"},[_c('overlay-source',{staticClass:"nav nav-pills flex-column my-0 small no-flex-wrap",attrs:{"id":"mb-page-nav","tag-name":"nav","to":"mb-page-nav"}},[_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#javafx-tutorial-part-1-getting-started"}},[_v("JavaFX tutorial part 1 – Getting started‎")]),_v(" "),_c('nav',{staticClass:"nav nav-pills flex-column my-0 nested no-flex-wrap"},[_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#lifecycle-of-a-javafx-application"}},[_v("Lifecycle of a JavaFX application‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#setting-up-the-project"}},[_v("Setting up the project‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#setting-up-java-fx"}},[_v("Setting up Java FX‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#writing-your-first-java-fx-program"}},[_v("Writing your first Java FX program‎")]),_v(" "),_c('a',{pre:true,attrs:{"class":"nav-link py-1","href":"#exercises"}},[_v("Exercises‎")])])])],1)]),_v(" "),_c('scroll-top-button')],1),_v(" "),_m(29)])} }; var pageVueStaticRenderFns = [function anonymous( ) { @@ -92,6 +92,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: Jeffry Lum")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaFxPart2.html b/tutorials/javaFxPart2.html index 54c73f51..fa8a350d 100644 --- a/tutorials/javaFxPart2.html +++ b/tutorials/javaFxPart2.html @@ -229,7 +229,7 @@

    Run the application again. It should now look like this:

    Exercises

    1. In the tutorial, we used an AnchorPane to achieve the desired layout.
      1. Can you find other ways to obtain a similar layout?
      2. What are the advantages and disadvantages of your layout?
    2. Try interacting with the application -
      1. What happens when you press the Enter key or click the Send button?
      2. Why?

    Previous | ToC | What's next? JavaFX tutorial part 3 - Interacting with the user


    Authors:

    +
    1. What happens when you press the Enter key or click the Send button?
    2. Why?

    Previous | ToC | What's next? JavaFX tutorial part 3 - Interacting with the user


    Authors:

    diff --git a/tutorials/javaFxPart2.page-vue-render.js b/tutorials/javaFxPart2.page-vue-render.js index 54bec92a..e51d9ccf 100644 --- a/tutorials/javaFxPart2.page-vue-render.js +++ b/tutorials/javaFxPart2.page-vue-render.js @@ -110,6 +110,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: Jeffry Lum")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaFxPart3.html b/tutorials/javaFxPart3.html index bf64e486..bce41dd6 100644 --- a/tutorials/javaFxPart3.html +++ b/tutorials/javaFxPart3.html @@ -265,7 +265,7 @@

    Run the application and play around with it.

    Congratulations! You have successfully implemented a fully functional GUI for Duke! But there's more. Continue to the next section to find out.

    Exercises

    1. While the GUI looks similar to the mockup, there are still parts that need to be refined. Try your hand at some of these tasks:
    2. After attempting the changes, reflect critically on the following: -

    Previous | ToC | What's next? JavaFX tutorial part 4 - Using FXML


    Authors:

    +

    Previous | ToC | What's next? JavaFX tutorial part 4 - Using FXML


    Authors:

    diff --git a/tutorials/javaFxPart3.page-vue-render.js b/tutorials/javaFxPart3.page-vue-render.js index a296bb27..38abc389 100644 --- a/tutorials/javaFxPart3.page-vue-render.js +++ b/tutorials/javaFxPart3.page-vue-render.js @@ -116,6 +116,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: Jeffry Lum")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaFxPart4.html b/tutorials/javaFxPart4.html index 3ee57849..70fc6eac 100644 --- a/tutorials/javaFxPart4.html +++ b/tutorials/javaFxPart4.html @@ -353,7 +353,7 @@ -

    More about fx:root on the documentation Introduction to FXML | JavaFX 2.2.

    Exercises

    1. Convert MainWindow to use the fx:root construct.
    2. Extend MainWindow to have a Stage as a root Node.
    3. Customize the appearance of the application further with CSS.

    Previous | ToC | What's next? JavaFX tutorial part 5 - Tweaking the GUI


    Authors:

    +

    More about fx:root on the documentation Introduction to FXML | JavaFX 2.2.

    Exercises

    1. Convert MainWindow to use the fx:root construct.
    2. Extend MainWindow to have a Stage as a root Node.
    3. Customize the appearance of the application further with CSS.

    Previous | ToC | What's next? JavaFX tutorial part 5 - Tweaking the GUI


    Authors:

    diff --git a/tutorials/javaFxPart4.page-vue-render.js b/tutorials/javaFxPart4.page-vue-render.js index 962b1b9b..bb63fa8d 100644 --- a/tutorials/javaFxPart4.page-vue-render.js +++ b/tutorials/javaFxPart4.page-vue-render.js @@ -122,6 +122,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: Jeffry Lum")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaFxPart5.html b/tutorials/javaFxPart5.html index a36f15ee..e6e506f1 100644 --- a/tutorials/javaFxPart5.html +++ b/tutorials/javaFxPart5.html @@ -1045,7 +1045,7 @@ -

    Image Opacity Demo

    Other things to consider

    Here are other things you can do with your app to make it more personalized:

    Previous | ToC


    Authors:

    +

    Image Opacity Demo

    Other things to consider

    Here are other things you can do with your app to make it more personalized:

    Previous | ToC


    Authors:

    diff --git a/tutorials/javaFxPart5.page-vue-render.js b/tutorials/javaFxPart5.page-vue-render.js index cc0efdb6..b9baa2e7 100644 --- a/tutorials/javaFxPart5.page-vue-render.js +++ b/tutorials/javaFxPart5.page-vue-render.js @@ -548,6 +548,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: Debbie Hii (@flexibo)")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/javaInstallationMac.html b/tutorials/javaInstallationMac.html index 7f2dcc77..644d2a7e 100644 --- a/tutorials/javaInstallationMac.html +++ b/tutorials/javaInstallationMac.html @@ -185,7 +185,7 @@ -

    Authors:

    +

    Authors:

    diff --git a/tutorials/javaInstallationMac.page-vue-render.js b/tutorials/javaInstallationMac.page-vue-render.js index 05447288..d733d333 100644 --- a/tutorials/javaInstallationMac.page-vue-render.js +++ b/tutorials/javaInstallationMac.page-vue-render.js @@ -41,6 +41,6 @@ with(this){return _c('code',{pre:true,attrs:{"class":"hljs bash"}},[_c('span',[_ with(this){return _c('code',{pre:true,attrs:{"class":"hljs bash"}},[_c('span',[_v("java -version\n")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/jekyll.html b/tutorials/jekyll.html index e791641c..8ad69e28 100644 --- a/tutorials/jekyll.html +++ b/tutorials/jekyll.html @@ -17,7 +17,7 @@

    Guides for SE student projects »

    Using Jekyll for project documentation

    Jekyll is a popular tool for generating static websites from markdown-like text.

    Given below are some information useful for when you want to update documentation in a project that uses Jekyll.

    Setting up GitHub Pages for Jekyll

    As GitHub has native support for Jekyll, it can convert your documentation into HTML and deploy it on the github.io URL of your project.

    Do the following to set up the GitHub Pages website of your project:

    1. Go to your repo's settings tab.
    2. Click   Pages  on the menu on the left edge of page.
    3. Set the Source as:  Deploy from a branch branch master branch and /docs folder (assuming project documentation is in that folder) and click  Save .

    The project website will be available at https://{your_org}.github.io/{your_repo} the next time the master branch is updated. Example: https://myorg.github.io/myrepo

    Updating documents

    Jekyll uses kramdown (a superset of Markdown) for writing content. You can use Intellij (or any other text editor) to update the relevant .md files.

    Recommendation: Limit your content to Markdown and GFMD syntax only i.e., avoid kramdown-specific syntax that are not compatible with Markdown/GFMD

    Recommendation: Enable soft-wrapping in your code editor for *.md files. For example, as explained in Intellij IDEA: Useful settings guide.

    Site-wide settings

    +An example is the title property, which defines the title of your site, usually the name of your project.

  • The files in docs/_include and docs/_layouts control the template of the pages; the files in docs/_sass control the style of the pages.

    Caution: Modifying these files requires some knowledge and experience with Jekyll. You should only modify them (at your own risk) if you need greater control over the site’s layout.

  • diff --git a/tutorials/jekyll.page-vue-render.js b/tutorials/jekyll.page-vue-render.js index 0601deb5..d64d3ac2 100644 --- a/tutorials/jekyll.page-vue-render.js +++ b/tutorials/jekyll.page-vue-render.js @@ -47,6 +47,6 @@ with(this){return _c('li',[_c('p',[_v("Typically, the "),_c('code',{pre:true,att with(this){return _c('p',[_v("The files in "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("docs/_include")]),_v(" and "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("docs/_layouts")]),_v(" control the template of the pages; the files in "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("docs/_sass")]),_v(" control the style of the pages.")])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/junit.html b/tutorials/junit.html index 1b8ef32e..01a3a219 100644 --- a/tutorials/junit.html +++ b/tutorials/junit.html @@ -100,7 +100,7 @@ -

    3. Run tests, either using the Intellij UI (preferred -- this makes debugging failed test cases easier) or using Gradle itself, as explained in the section below.

    Running tests

    In Intellij IDEA:

    If the above doesn't work, you may want to go to File > Settings and change theRun tests using: setting to Intellij IDEA (instead of Gradle), as shown below:

    Expand to see screenshot ...

    change Intellij settings to not use Gradle


    Using Gradle::

    Other ways:

    Writing useful JUnit tests

    After you are able to run JUnit tests successfully using a dummy test class such as the above, you can add more tests and test classes as necessary.

    To learn how to write useful JUnit test cases, refer this section of our SE book. For a quick overview of more advance JUnit features, refer this section.

    Resources

    +

    3. Run tests, either using the Intellij UI (preferred -- this makes debugging failed test cases easier) or using Gradle itself, as explained in the section below.

    Running tests

    In Intellij IDEA:

    If the above doesn't work, you may want to go to File > Settings and change theRun tests using: setting to Intellij IDEA (instead of Gradle), as shown below:

    Expand to see screenshot ...

    change Intellij settings to not use Gradle


    Using Gradle::

    Other ways:

    Writing useful JUnit tests

    After you are able to run JUnit tests successfully using a dummy test class such as the above, you can add more tests and test classes as necessary.

    To learn how to write useful JUnit test cases, refer this section of our SE book. For a quick overview of more advance JUnit features, refer this section.

    Resources

    diff --git a/tutorials/junit.page-vue-render.js b/tutorials/junit.page-vue-render.js index 02e1e768..408ef33a 100644 --- a/tutorials/junit.page-vue-render.js +++ b/tutorials/junit.page-vue-render.js @@ -95,6 +95,6 @@ with(this){return _c('h2',{attrs:{"id":"resources"}},[_v("Resources"),_c('a',{st with(this){return _c('ul',[_c('li',[_c('a',{attrs:{"href":"https://junit.org/junit5/docs/current/user-guide/"}},[_v("JUnit 5 User Guide")])]),_v(" "),_c('li',[_c('a',{attrs:{"href":"https://docs.gradle.org/current/userguide/java_testing.html#using_junit5"}},[_v("Gradle documentation for JUnit")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/markbind-forked-sites.html b/tutorials/markbind-forked-sites.html index bc88f9be..2ee49fbf 100644 --- a/tutorials/markbind-forked-sites.html +++ b/tutorials/markbind-forked-sites.html @@ -42,7 +42,7 @@

    Updating documents

    MarkBind is a superset of Markdown. Refer the MarkBind UG: Authoring Contents for more details on the syntax. Given below is the recommended workflow for any non-trivial changes to this docs site.

    1. Install MarkBind (as described in the section above), if you haven't done so already.
    2. Open a terminal and navigate to the [project root]/docs folder.
    3. Run the npm run serve command. That will open the generated website in your default browser in a live preview mode.
    4. In the browser, navigate to the page you want to preview.
    5. Edit the source files (usually, *.md files). When you save the file, the live preview will update to reflect the new contents (after a few seconds).

    While live preview can pick up most changes, it may not be able to pick up certain changes (e.g., changes to files in the _markbind folder or changes to nunjucks macros). Furthermore, some syntax errors in your code can cause the live preview to crash. In those cases, just stop the server (e.g., Ctrl+C on Windows) and start it again.

    Recommendation: Enable soft-wrapping in your code editor for *.md files. For example, as explained in Intellij IDEA: Useful settings guide.

    Generating a Table of Content for a page: As MarkBind pages automatically generate a page navigation menu (which appears on the top right edge of the page), there is no need to manually insert a ToC into a page.
    -Furthermore, when saving the page as a PDF, you can make the page navigation menu appear as a ToC in the generated PDF, by inserting <page-nav-print /> in the page where you want the ToC to appear.

    Working with UML diagrams

    MarkBind has built-in support for PlantUML diagrams. See the this page of the MarkBind User Guide to find how to use PlantUML with MarkBind.

    Also see se-edu/guides Using PlantUML for useful info on using PlantUML in a project such as AB3.

    +Furthermore, when saving the page as a PDF, you can make the page navigation menu appear as a ToC in the generated PDF, by inserting <page-nav-print /> in the page where you want the ToC to appear.

    Working with UML diagrams

    MarkBind has built-in support for PlantUML diagrams. See the this page of the MarkBind User Guide to find how to use PlantUML with MarkBind.

    Also see se-edu/guides Using PlantUML for useful info on using PlantUML in a project such as AB3.

    diff --git a/tutorials/markbind-forked-sites.page-vue-render.js b/tutorials/markbind-forked-sites.page-vue-render.js index ed451a99..24a664ad 100644 --- a/tutorials/markbind-forked-sites.page-vue-render.js +++ b/tutorials/markbind-forked-sites.page-vue-render.js @@ -86,6 +86,6 @@ with(this){return _c('p',[_c('strong',[_v("MarkBind has built-in support for Pla with(this){return _c('p',[_v("Also see "),_c('a',{attrs:{"href":"https://se-education.org/guides/tutorials/plantUml.html"}},[_c('em',[_v("se-edu/guides "),_c('strong',[_v("Using PlantUML")])])]),_v(" for useful info on using PlantUML in a project such as AB3.")])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/markbind.html b/tutorials/markbind.html index 43001f31..992f78bb 100644 --- a/tutorials/markbind.html +++ b/tutorials/markbind.html @@ -14,7 +14,7 @@

    Guides for SE student projects »

    Using MarkBind for project documentation

    If you are working with a forked repo that is using MarkBind already, refer to this guide instead.

    MarkBind is a tool for generating static websites from markdown-like text, particularly suitable for text-heavy websites such as software project documentation.

    Given below are some information useful for when you want to update documentation in a project that uses MarkBind.

    Installation

    Updating documents

    MarkBind is a superset of Markdown. Refer the MarkBind user guide for more details.

    First, start the live preview: Unless it is a trivial change, you would want to see how your change to the documentation source files will reflect in the generated website. You can use the MarkBind live preview mode to preview the generated website as you update the source file. To start the live preview mode,

    1. Open a command prompt.
    2. Navigate to the the documentation root (in most projects, the documentation root is [project root]/docs -- if you are not sure, look for the folder containing the site.json file).
    3. Run the markbind serve command. That will open the generated website in your default browser.
    4. In the browser, navigate to the page you want to modify.

    Next, edit the files you want:

    1. Edit the source files (usually, .md files).
    2. When you save the file, the live preview will update to reflect the new contents (after a few seconds).

    While live preview can pick up most changes, it may not be able to pick up certain changes (e.g., changes to files in the _markbind folder or changes to nunjucks macros). Furthermore, some syntax errors in your code can cause the live preview to crash. In those cases, just stop the server (Ctrl+C on Windows) and start it again.

    Automating PR previews, deployments

    Project admins can,

    • set up Netlify to give a preview of how a PR can affect the generated website. More info here.
    • set up Travis to automatically generate and deploy the project website when new code is pushed. More info here

    +

    Guides for SE student projects »

    Using MarkBind for project documentation

    If you are working with a forked repo that is using MarkBind already, refer to this guide instead.

    MarkBind is a tool for generating static websites from markdown-like text, particularly suitable for text-heavy websites such as software project documentation.

    Given below are some information useful for when you want to update documentation in a project that uses MarkBind.

    Installation

    Updating documents

    MarkBind is a superset of Markdown. Refer the MarkBind user guide for more details.

    First, start the live preview: Unless it is a trivial change, you would want to see how your change to the documentation source files will reflect in the generated website. You can use the MarkBind live preview mode to preview the generated website as you update the source file. To start the live preview mode,

    1. Open a command prompt.
    2. Navigate to the the documentation root (in most projects, the documentation root is [project root]/docs -- if you are not sure, look for the folder containing the site.json file).
    3. Run the markbind serve command. That will open the generated website in your default browser.
    4. In the browser, navigate to the page you want to modify.

    Next, edit the files you want:

    1. Edit the source files (usually, .md files).
    2. When you save the file, the live preview will update to reflect the new contents (after a few seconds).

    While live preview can pick up most changes, it may not be able to pick up certain changes (e.g., changes to files in the _markbind folder or changes to nunjucks macros). Furthermore, some syntax errors in your code can cause the live preview to crash. In those cases, just stop the server (Ctrl+C on Windows) and start it again.

    Automating PR previews, deployments

    Project admins can,

    diff --git a/tutorials/markbind.page-vue-render.js b/tutorials/markbind.page-vue-render.js index 9f035020..fdf1ffc0 100644 --- a/tutorials/markbind.page-vue-render.js +++ b/tutorials/markbind.page-vue-render.js @@ -41,6 +41,6 @@ with(this){return _c('h2',{attrs:{"id":"automating-pr-previews-deployments"}},[_ with(this){return _c('ul',[_c('li',[_v("set up Netlify to give a preview of how a PR can affect the generated website. More info "),_c('a',{attrs:{"href":"https://markbind.org/userGuide/deployingTheSite.html#deploying-to-netlify"}},[_v("here")]),_v(".")]),_v(" "),_c('li',[_v("set up Travis to automatically generate and deploy the project website when new code is pushed. More info "),_c('a',{attrs:{"href":"https://markbind.org/userGuide/deployingTheSite.html#deploying-to-github-pages"}},[_v("here")])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/netlify.html b/tutorials/netlify.html index 4f2396d1..ef27a87c 100644 --- a/tutorials/netlify.html +++ b/tutorials/netlify.html @@ -16,7 +16,7 @@ Search this site

    Guides for SE student projects »

    Using Netlify

    Netlify is an automated hosting platform for deploying websites. Its deploy previews feature is particularly useful for .

    The sections below explains how to use Netlify in a project.

    Caution: Netlify allows only 300 free build minutes per month. They use an unsavory practice of letting you exceed the limit silently and then sending you an invoice for the extra use. You will not be able to use Netlify again unless you pay (or get them to cancel the charge). Therefore, we caution you to use Netlify (if at all) during times you update documentation and only if you want to use Netlify Deploy Previews to help review such PRs.

    Setting up

    1. Go to https://www.netlify.com/ and click Sign Up. Next, click GITHUB SIGN IN, enter your GitHub account details and authorize netlify.

    2. After logging in, click New site from Git.

    3. You will then be brought to the setup page. Click GitHub to link your repository to Netlify.

      • Depending on whether you are the owner of the repository, you can either grant or request access to Netlify so that it can access your repository and build your documentation.
        Grant or request access
      • After granting or requesting access to your repository, click Authorize netlify.
    4. Pick your repository from the list.

    5. Fill out the details as follows and then click Deploy site.

      • Branch to deploy: select master branch
      • If using Jekyll for project documentation:
        • Build command: cd docs && bundle install && bundle exec jekyll build
        • Publish directory: docs/_site
      • If using MarkBind for project documentation: -
        • Build Command: cd docs && npm i markbind-cli -g && markbind build --baseUrl
        • Publish directory: docs/_site

      For both Jekyll and MarkBind, omit the cd docs && and docs/ from the build command and the publish directory respectively if the documentation is in the root (i.e., not inside the docs folder).

    6. Once Netlify has completed building your project, you can now:

      • View your main branch’s deployed documentation on the site name given by Netlify (customizable as shown below).
        Temporary site name
      • Preview the updated documentation whenever a pull request is made by clicking the Details hyperlink next to the Netlify test status.
        Netlify details link

    Changing the site name

    If you don’t like the site name given by Netlify, you can change it as follows:

    1. Click on Settings.

    2. Then click Change site name and fill in your desired site name.
      Change site name

    +

    For both Jekyll and MarkBind, omit the cd docs && and docs/ from the build command and the publish directory respectively if the documentation is in the root (i.e., not inside the docs folder).

  • Once Netlify has completed building your project, you can now:

  • Changing the site name

    If you don’t like the site name given by Netlify, you can change it as follows:

    1. Click on Settings.

    2. Then click Change site name and fill in your desired site name.
      Change site name

    diff --git a/tutorials/netlify.page-vue-render.js b/tutorials/netlify.page-vue-render.js index 5b0a55cc..bf587a47 100644 --- a/tutorials/netlify.page-vue-render.js +++ b/tutorials/netlify.page-vue-render.js @@ -47,6 +47,6 @@ with(this){return _c('h2',{attrs:{"id":"changing-the-site-name"}},[_v("Changing with(this){return _c('ol',[_c('li',[_c('p',[_v("Click on "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Settings")]),_v(".")])]),_v(" "),_c('li',[_c('p',[_v("Then click "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Change site name")]),_v(" and fill in your desired site name."),_c('br'),_v(" "),_c('a',{attrs:{"href":"/guides/tutorials/images/netlify/change_site_name.png","target":"_self"}},[_c('img',{staticClass:"img-fluid",attrs:{"src":"/guides/tutorials/images/netlify/change_site_name.png","alt":"Change site name"}})])])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/plantUml.html b/tutorials/plantUml.html index df0ba752..9288dbb7 100644 --- a/tutorials/plantUml.html +++ b/tutorials/plantUml.html @@ -204,7 +204,7 @@ -

    Explicitly define all symbols to avoid any potential layout mishaps.

    +

    Explicitly define all symbols to avoid any potential layout mishaps.

    diff --git a/tutorials/plantUml.page-vue-render.js b/tutorials/plantUml.page-vue-render.js index 18499078..9a56928a 100644 --- a/tutorials/plantUml.page-vue-render.js +++ b/tutorials/plantUml.page-vue-render.js @@ -113,6 +113,6 @@ with(this){return _c('td',[_c('img',{attrs:{"src":"/guides/tutorials/images/plan with(this){return _c('td',[_c('img',{attrs:{"src":"/guides/tutorials/images/plantuml/PackagesAndConsistency.png"}})])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/savingPdf.html b/tutorials/savingPdf.html index c78b165c..a0fdf430 100644 --- a/tutorials/savingPdf.html +++ b/tutorials/savingPdf.html @@ -31,7 +31,7 @@ -

    +

    diff --git a/tutorials/savingPdf.page-vue-render.js b/tutorials/savingPdf.page-vue-render.js index 84b92b82..ffb882c0 100644 --- a/tutorials/savingPdf.page-vue-render.js +++ b/tutorials/savingPdf.page-vue-render.js @@ -17,6 +17,6 @@ with(this){return _c('p',[_c('strong',[_v("Use Chrome ("),_c('mark',[_c('span',{ with(this){return _c('ol',[_c('li',[_c('p',[_v("Go to your generated documentation site on GitHub using Chrome.")])]),_v(" "),_c('li',[_c('p',[_v("Within Chrome, click on the "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Print")]),_v(" option in Chrome’s menu.")])]),_v(" "),_c('li',[_c('p',[_v("Set the destination to "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Save as PDF")]),_v(", then click "),_c('code',{pre:true,attrs:{"class":"hljs inline no-lang"}},[_v("Save")]),_v(" to save a copy of the file in PDF format."),_c('br'),_v(" "),_c('mark',[_v("For best results, use the settings indicated in the screenshot below.")])]),_v(" "),_c('p',[_c('a',{attrs:{"href":"/guides/tutorials/images/chrome_save_as_pdf.png","target":"_self"}},[_c('img',{staticClass:"img-fluid",attrs:{"src":"/guides/tutorials/images/chrome_save_as_pdf.png","alt":"Saving documentation as PDF files in Chrome"}})])])])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/sourcetree.html b/tutorials/sourcetree.html index 47de3293..c57bb732 100644 --- a/tutorials/sourcetree.html +++ b/tutorials/sourcetree.html @@ -22,7 +22,7 @@
  • Click on the Refresh Personal Access Token button. When prompted, enter your usual GitHub username but give the PAT (the one you created in step 1) instead of the regular password.
  • Now, your Sourcetree should be able to push code to a GitHub repo that you have write permission to.
  • Option 3:

    1. Open the Windows Credential Manager.
    2. For each credential related to GitHub (if the name mentions GitHub) in Web Credentials or Windows Credentials categories,
      (a) edit it and replace the password field with a GitHub PAT.
      (b) If the above didn't work, delete those credential altogether and try Option 1 or 2 again.

    On a Mac

    Caching GitHub credentials

    If you are prompted to enter GitHub credentials everytime you connect to GitHub using Sourcetree, you can cache GitHub credentials by following the guide given here (recommended: use the Git Credentials Manager option, not the GitHub CLI option).

    +It gives two methods. Recommended to try method 2 first.

    Caching GitHub credentials

    If you are prompted to enter GitHub credentials everytime you connect to GitHub using Sourcetree, you can cache GitHub credentials by following the guide given here (recommended: use the Git Credentials Manager option, not the GitHub CLI option).

    diff --git a/tutorials/sourcetree.page-vue-render.js b/tutorials/sourcetree.page-vue-render.js index b9fa3bca..44f2755e 100644 --- a/tutorials/sourcetree.page-vue-render.js +++ b/tutorials/sourcetree.page-vue-render.js @@ -62,6 +62,6 @@ with(this){return _c('ul',[_c('li',[_c('p',[_c('strong',[_v("Option 1:")]),_v(" with(this){return _c('ul',[_c('li',[_c('strong',[_v("Option 2:")]),_v(" If the above doesn't work, try this guide (from Medium): "),_c('a',{attrs:{"href":"https://medium.com/geekculture/using-personal-access-token-in-sourcetree-to-connect-to-github-3702a29554d3"}},[_v("Using Sourcetree to connect to GitHub without password")]),_v("."),_c('br'),_v("\nIt gives two methods. Recommended to try method 2 first.")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/textUiTesting.html b/tutorials/textUiTesting.html index 810f8ade..e3a8ccf2 100644 --- a/tutorials/textUiTesting.html +++ b/tutorials/textUiTesting.html @@ -102,7 +102,7 @@

  • Update the javac and java commands in the script to match the name/location of your main class.
    -If you are using packages, the two commands need to take the packages into account too.

  • Add an input.txt containing the input commands.

  • Add an EXPECTED.txt to the same folder, containing the expected output.

  • Run the .bat/.sh file to execute the test.

  • Updating tests as the program evolves

    The purpose of testing as explained in the previous section is to confirm there are no . However, we often update the behavior of the program intentionally e.g., enhance an existing feature. Let's look at how to update our test set up in those cases.

    Option 1: This is the ideal but more tedious approach.

    1. Determine how the expected behavior should change due to your update to the code.
    2. Update the EXPECTED.TXT file accordingly.
    3. Run the test to confirm the actual behavior is same as the updated expected behavior.

    Option 2: This is a more practical shortcut.

    1. Run the test as per normal after updating the code. The test will fail because the new program behavior is different from the one given in the EXPECTED.TXT.
    2. Use a diff tool to compare the ACTUAL.TXT against the EXPECTED.TXT.
      Intellij IDEA can compare two files. There are stand-alone tools for comparing files too e.g., WinDiff, WinMerge
    3. Confirm the differences indicate the behavior has changed as you intended. If the differences are not as intended, your code is buggy; fix the code and repeat from step 1.
    4. Copy over the content of the ACTUAL.TXT to EXPECTED.TXT i.e., we accept that the current actual behavior should be the new expected behavior. Rerun the test to confirm that it passes this time.

    Troubleshooting


    Authors:

    +If you are using packages, the two commands need to take the packages into account too.

  • Add an input.txt containing the input commands.

  • Add an EXPECTED.txt to the same folder, containing the expected output.

  • Run the .bat/.sh file to execute the test.

  • Updating tests as the program evolves

    The purpose of testing as explained in the previous section is to confirm there are no . However, we often update the behavior of the program intentionally e.g., enhance an existing feature. Let's look at how to update our test set up in those cases.

    Option 1: This is the ideal but more tedious approach.

    1. Determine how the expected behavior should change due to your update to the code.
    2. Update the EXPECTED.TXT file accordingly.
    3. Run the test to confirm the actual behavior is same as the updated expected behavior.

    Option 2: This is a more practical shortcut.

    1. Run the test as per normal after updating the code. The test will fail because the new program behavior is different from the one given in the EXPECTED.TXT.
    2. Use a diff tool to compare the ACTUAL.TXT against the EXPECTED.TXT.
      Intellij IDEA can compare two files. There are stand-alone tools for comparing files too e.g., WinDiff, WinMerge
    3. Confirm the differences indicate the behavior has changed as you intended. If the differences are not as intended, your code is buggy; fix the code and repeat from step 1.
    4. Copy over the content of the ACTUAL.TXT to EXPECTED.TXT i.e., we accept that the current actual behavior should be the new expected behavior. Rerun the test to confirm that it passes this time.

    Troubleshooting


    Authors:

    diff --git a/tutorials/textUiTesting.page-vue-render.js b/tutorials/textUiTesting.page-vue-render.js index 1dc469c9..7083d5b5 100644 --- a/tutorials/textUiTesting.page-vue-render.js +++ b/tutorials/textUiTesting.page-vue-render.js @@ -62,6 +62,6 @@ with(this){return _c('p',[_c('strong',[_v("Authors:")])])} with(this){return _c('ul',[_c('li',[_v("Initial Version: based on se-edu/addressbook-level2, adapted by Jeffry Lum")])])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file diff --git a/tutorials/vscode.html b/tutorials/vscode.html index ed618234..5305f286 100644 --- a/tutorials/vscode.html +++ b/tutorials/vscode.html @@ -14,7 +14,7 @@

    Guides for SE student projects »

    VS Code - Community Resources

    This page contains 'community resources' contributed by students.

    Coming soon ...

    +

    Guides for SE student projects »

    VS Code - Community Resources

    This page contains 'community resources' contributed by students.

    Coming soon ...

    diff --git a/tutorials/vscode.page-vue-render.js b/tutorials/vscode.page-vue-render.js index 28c70b4d..917e72f7 100644 --- a/tutorials/vscode.page-vue-render.js +++ b/tutorials/vscode.page-vue-render.js @@ -11,6 +11,6 @@ with(this){return _c('h1',{attrs:{"id":"guides-for-se-student-projects"}},[_c('s with(this){return _c('h1',{attrs:{"id":"vs-code-community-resources"}},[_v("VS Code - Community Resources"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#vs-code-community-resources","onclick":"event.stopPropagation()"}})])} },function anonymous( ) { -with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Fri, 30 Aug 2024, 19:36:54 GMT+8]")])])])} +with(this){return _c('footer',[_c('div',{staticClass:"text-center"},[_c('small',[_v("[Powered by "),_c('img',{attrs:{"src":"https://markbind.org/favicon.ico","width":"30"}}),_v(" "),_c('a',{attrs:{"href":"https://markbind.org/"}},[_v("MarkBind 5.5.2")]),_v(" on Sat, 31 Aug 2024, 18:02:27 GMT+8]")])])])} }]; \ No newline at end of file