CompSci 307 Fall 2021 |
Software Design and Implementation |
This exercise is intended to ensure you have correctly installed the course software, can use it to develop Java programs with OpenJFX, and can submit your code to the course's Gitlab group. It will not be explicitly graded but, instead, ensure that you can participate in the course.
You will be using features from the latest version of Java in this course and I recommend using IntelliJ as your development environment since it has a wide variety of features to help you improve your program's design.
Here is a video of the process (since there are some specific notes I wanted to show in choosing what to download)
And here is another video showing the steps below with some explanations along the way.
Note, we recommend using the command-line when interacting with GIT, at least for the first half of the course, to make sure you have a firm understanding of the foundational principles.
View → Tool Windows → Terminal
)git config --global user.name "YOUR NAME" git config --global user.email "NETID@duke.edu"
Shibboleth
button to log in using your Duke NetIDPreferences → SSH Keys
to set it up if you have never used this Gitlab sitessh-keygen -t rsa -C "NETID@duke.edu" -b 4096
coursework
): Preferences → SSH Keys → Key Text Area
)id_rsa
, and press Add key
Fork
(the button is in the right upper corner) to create a version of the project in your own account with the same name (e.g., NetID/example_animation
)lab_
or example_
repositories.project_
or portfolio_
repositories (so using fork is not the general practice)git@coursework.cs.duke.edu:NetID/example_animation.git
)Clone
button on the right side of the page WORKSPACE_FOLDER
can be any directory you want on your computer as long as there are no spaces anywhere in the path)cd WORKSPACE_FOLDER
git clone git@coursework.cs.duke.edu:NetID/example_animation.git
example_animation
within your workspace folder that contains configuration information for GIT (e.g., a folder named .git — note that it starts with a period)ls -a example_animation
File → Open
(or the Open
button if the File
menu is not available)example_animation
, and press Open
src → animation
to find the Java class ExampleAnimation
Run ExampleAnimation.main()
Completing this step verifies your Java and IntelliJ installations are correct and working together.
Within Terminal, your example_animation
folder should now have the configuration folders for both GIT (e.g., .git
) and IntelliJ (e.g., .idea
)
ls -a example_animation
README.md
by double clicking on it git status
git add README.md
git commit -m "Included my name in the README"
git push -u origin master
Completing this step verifies you can correctly access the course Gitlab group to submit your work for the semester.
Knowing how to use a source control system will be an invaluable tool for you going forward, perhaps personally or even potentially for changes in laws, but especially in a team setting. At its heart, version control is just a way to manage the many changes that occur to your files over time, but that simple idea changes everything! It allows you to revisit previous versions of your code, work with different versions at the same time, and work in teams and track who made which changes. At its best, version control is like a journal that you use to track major, and minor, events in your project. At its most practical, it is like a backup system that prevents you from losing significant work if something happens to your machine. At its worst, it is simply a submit system where you only track your work when told to.
Version control systems have been around for over forty years and GIT is currently the cool tool to use (partly because it was created by Linus Torvalds, the creator of Linux, and partly because of the popularity of GitHub, the largest public repository of code). Using source control well is not difficult, but it does take some practice and a little bit of command-line savvy (we do not suggest using visual GIT tools, even the one built into IntelliJ, until you are confident in your version control skills).