From a7a3a1cdc7bd823f4967ad909cd49b8e83040fdd Mon Sep 17 00:00:00 2001 From: Daya Adianto <dayaadianto@cs.ui.ac.id> Date: Sun, 7 Mar 2021 14:59:00 +0700 Subject: [PATCH] Update .gitignore and project documentation --- .gitignore | 178 ++++++++++++++++++++++++++++++++++++++++++++++++----- LICENSE | 29 +++++++++ README.md | 90 ++++++++++++++++----------- 3 files changed, 245 insertions(+), 52 deletions(-) create mode 100644 LICENSE diff --git a/.gitignore b/.gitignore index 5d07a95..a2341df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,110 @@ -# Created by .ignore support plugin (hsz.mobi) -### Gradle template -.gradle -**/build/ -!src/**/build/ +# Created by https://www.toptal.com/developers/gitignore/api/gradle,intellij,visualstudiocode,java,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,intellij,visualstudiocode,java,macos -# Ignore Gradle GUI config -gradle-app.setting +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 -# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) -!gradle-wrapper.jar +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf -# Cache of project -.gradletasknamecache +# Generated files +.idea/**/contentModel.xml -# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 -# gradle/wrapper/gradle-wrapper.properties +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +.idea/artifacts +.idea/compiler.xml +.idea/jarRepositories.xml +.idea/modules.xml +.idea/*.iml +.idea/modules +*.iml +*.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ -### Java template +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +### Java ### # Compiled class file *.class @@ -41,5 +129,63 @@ gradle-app.setting # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -# Idea -.idea/ +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### VisualStudioCode ### +.vscode/* +!.vscode/tasks.json +!.vscode/launch.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Gradle ### +.gradle +build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +### Gradle Patch ### +**/build/ + +# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij,visualstudiocode,java,macos diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6fc64c5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Faculty of Computer Science Universitas Indonesia +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 8d42142..ddfce62 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,79 @@ # Practice Problem Sets -CSCM602023 Advanced Programming @ Faculty of Computer Science Universitas -Indonesia, Term 2 2020/2021 +> CSCM602023 Advanced Programming @ Faculty of Computer Science Universitas +> Indonesia, Term 2 2020/2021 ## Table of Contents -1. [Practice 1: Unit Testing and Input Space Partitioning](practice-1/readme.md) +1. [Practice 1: Unit Testing and Input Space Partitioning](./practice-1/README.md) ## **TL;DR** -Initial Setup: - -1. Create a new project on [GitLab CS Student Subgroup](https://gitlab.cs.ui.ac.id/AdvProg/kki-2021/students) to store all practice work, e.g. - advprog-practice-2021. - Create new repository on subgroup of your student number, e.g https://gitlab.cs.ui.ac.id/AdvProg/kki-2021/students/1606877585/advprog-practice-2021 - **This GitLab project and its repository will be - used to store all practice work starting from `practice-1` next week.** - Open the project page and copy the HTTPS clone URL into clipboard. -3. Clone the repository into your local machine. Use Git command: - `git clone https://gitlab.cs.ui.ac.id/AdvProg/KKI-2021/students/<Your NPM subgroup>/advprog-practice-2021 .git ` -4. Go to the directory where the cloned repository is located in your +Initial setup: + +1. Open the GitLab subgroup at GitLab CS named after your student ID (NPM). For + example, if your student ID is `1906000001`, then the URL to your own GitLab + subgroup is: `https://gitlab.cs.ui.ac.id/AdvProg/KKI-2021/1906000001`. The + subgroup will be used to store your individual works in this course for the + whole semester. To access the GitLab subgroup, make sure you have registered + at GitLab CS and informed your username to the teaching team. +2. Create a new project repository to store your practical works in your own + GitLab subgroup at Advanced Programming KKI 2021 GitLab group. Give your + project a descriptive name such as "AdvProg Practice 2021" or "Advanced + Programming Practicals 2021". **The project repository will be used to store + all practical exercises starting from `practice-1` next week.** +3. Open the project repository page and copy the clone URL into the clipboard. + You may use the HTTPS (simpler; not recommended if using 2FA) or SSH (more + secure; recommended) clone URL. +4. Clone the repository into your local machine. For example, if you are using + HTTPS clone URL, then the Git command would be (assuming your project name + is `advprog-practice-2021`): + + ```shell + git clone https://gitlab.cs.ui.ac.id/AdvProg/KKI-2021/<Your NPM subgroup>/advprog-practice-2021.git + ``` + + Similarly, if you are using SSH clone url: + + ```shell + git clone git@gitlab.cs.ui.ac.id:AdvProg/KKI-2021/<Your NPM subgroup>/advprog-practice-2021.git + ``` +5. Go to the directory where the cloned repository is located in your local machine. -5. Add new remote called **upstream** that points to this (problem set) +6. Add new remote called **upstream** that points to this (problem set) repository. Use Git command: `git remote add upstream https://gitlab.cs.ui.ac.id/AdvProg/KKI-2021/practical.git ` -6. Pull initial problem sets from `upstream` to your local's `master`: +7. Pull initial problem sets from `upstream` to your local's `master`: `git pull upstream master` -7. Push initial commits in your local's `master` to your online GitLab +8. Push initial commits in your local's `master` to your online GitLab repository: `git push -u origin master` -> If your Git produced an error about 'unrelated histories', try adding ---allow-unrelated-histories option in git pull invocation +> Note: If your Git produced an error about 'unrelated histories', try adding +> `--allow-unrelated-histories` option in `git pull` invocation +If there are updates from the upstream: -If there are updates from upstream: - -1. git pull upstream master +1. `git pull upstream master` 2. Fix any merge conflict(s) that might arise (hopefully none) - - - Always choose latest commit from upstream when fixing merge - conflict(s) + - Always prefer the latest commit(s) from upstream when fixing merge + conflict(s) 3. Do not forget to commit your merged master branch and push it to your own master branch at your GitLab project's repository - Use Git command: git push origin master. - Working on a practice problem set: 1. Pull any updates from `upstream` 2. `cd practice-n` where **n** is week number folder ID. E.g. **practice-2** 3. `git checkout -b practice-n master` -4. Do the exercises as instructed in its README.md file -5. Commit your work frequently -6. Write good commit message(s) +4. Do the exercises as instructed in the corresponding `README.md` file. +5. Commit your work frequently. +6. Write good commit message(s). 7. If your work is ready for grading: `git push -u origin practice-n` -8. Make Merge Request (MR) to merge your work branch to `master` and - assign your TA as the assignee +8. Make Merge Request (MR) to merge your work branch to `master` branch at your + own project repository (i.e., the online Git repository where `origin` remote + is located) and assign your TA as the assignee. -If you want to know the detailed explanation about each instructions above, +If you want to know the detailed explanation about each instruction above, please read the following sections. ## Doing the Practice @@ -85,7 +102,7 @@ please read the following sections. `git push -u origin practice-1` 9. If you are ready to be graded by TA, make a Merge Request (MR) via Merge Request menu on GitLab. Set your practice branch as source and - `master` as the target branch for for merging. After that, assign your TA + `master` as the target branch for merging. After that, assign your TA as the assignee of the MR. ## Pulling Updates From Upstream @@ -124,8 +141,9 @@ Copyright (c) 2021, Faculty of Computer Science Universitas Indonesia Permission to copy, modify, and share the works in this project are governed under two licenses: [BSD 3-Clause][1] and [Creative Commons Attribution-ShareAlike 4.0 (CC BY-SA 4.0)][2] -Unless noted otherwise, BSD 3-Clause applies to source code (e.g. Java, YML, -configuration files), while CC BY-SA 4.0 applies to text documents in this project. +Unless noted otherwise, BSD 3-Clause applies to the source code artifact (e.g. +Java, configuration files), while CC BY-SA 4.0 applies to text documents in this +project. -[1]: LICENSE +[1]: ./LICENSE [2]: https://creativecommons.org/licenses/by-sa/4.0/ -- GitLab