CSC 217 Lab 00 - Installation

CSC 217 Lab 00 - Installation

CSC 217 Lab 00: Installation

For Lab 00 you will set up your development environment for CSC 217.

Learning Outcomes

  • Set up a development environment for CSC 216/217

Development Environment Installation

For Lab 0, you will have the opportunity to set up your development environment. Go through the Eclipse Install Tutorial. If you have any questions, please come to office hours or post to Piazza!

After setting up your development environment, you will demo your setup for the teaching staff as outlined below. Please go through the demo steps BEFORE checking in with the teaching staff or recording the video for grading.

There are several options for how you can receive credit for your Lab 00 demo:

  • Attend office hours of any CSC 216/7 PTF or instructor and run through the demo outlined below. They will grade your demo and if there are missing items they will let you know and you can revise (independently) for another review.
  • Record a video of your demo and submit to Moodle for a review by the Lab 00 deadline. We encourage you to use Open Broadcaster Software to record your demo. Submit on the lab CSC 217 Moodle.

Submissions to GitHub without an associated office hour or video demo will be graded for partial credit; however, there are parts of the Lab 00 expectations that we cannot see on GitHub alone.

Lab 00 is due by January 28th at 11:45pm.

Demo Step 1: Launch Eclipse

Launch Eclipse and show that all plug-ins are installed. You can see the icons for installed plug-ins by selecting Help > About Eclipse IDE. The icons of the required plug-ins are highlighted in red and may appear in a different order than the screenshot.

*About Eclipse IDE*

Demo: Eclipse is open

Demo Step 2: Import Demo Project

To ensure that all of the plug-ins are configured correctly, download the Demo Eclipse Project. Import the project into your workspace:

  1. Right click in the Package Explorer and select Import > General > Existing Projects into Workspace. Click Next.
  2. Select the radio button Select archive file and Browse for demo.zip.
  3. Make sure that DemoProject is selected in the Projects text area and click Finish.
  4. DemoProject should now be listed in the Package Explorer.

Wait a bit for the project to build. If your project has a big red exclamation point icon over the project folder your project was unable to build due to a path issue within Eclipse. To fix, do the following:

  1. Right click on the project and select Properties > Java Build Path > Libraries tab.
  2. Select the JRE System Library (which will be labeled unbound) and click Remove.
  3. Select Modulepath.
  4. Click Add Library….
  5. Select JRE System Library. Click Next.
  6. Select the radio button for Workspace default JRE (jdk 11 name). Click Finish. Note that the JRE 11 name will vary depending on the name of your local default JDK/JRE. If your default JRE is not version 11, go back to the Java in Eclipse section of the Install Tutorial.

Demo: Open the DemoProject and ensure that the JRE System Library is listed as [jdk-11.0.3] or some other version of Java 11.

*JRE System Library [jdk-11]*

Demo Step 3: Run CheckStyle

CheckStyle needs to be turned on for each project so that it will run with every build. To activate CheckStyle for a project, do the following:

  1. Right click on the project and select Properties > Checkstyle.
  2. Click the check box next to Checkstyle active for this project. Ensure that the CSC 216/217 configuration is selected.
  3. Click Apply and Close.

After running CheckStyle you should see 5 notifications in the Problems view. If you see more than this, you didn’t configure CheckStyle properly.

Demo: Appropriate notifications are displayed.

*SpotBugs Notifications*

Demo Step 4: Run SpotBugs

SpotBugs needs to be turned on for each project so that it will run with every build. To activate SpotBugs for a project, do the following:

  1. Right click on the project and select Properties > SpotBugs.
  2. Click the check box next to Run automatically.
  3. Click Apply and Close.

After running SpotBugs you should see 1 notification in the Problems view of type SpotBugs Problem. If you see more than this, you didn’t configure SpotBugs properly.

Demo: Appropriate notifications are displayed.

*SpotBugs Notifications*

Demo Step 5: Run PMD

PMD needs to be turned on for each project so that it will run with every build. To activate PMD for a project, do the following:

  1. Right click on the project and select Properties > PMD.
  2. Click the check box next to Enable PMD.
  3. Click Apply and Close.

To see PMD notifications, you need to add the PMD Violations Overview view to your Java Perspective by selecting Windows/Eclipse > Other > PMD > Violations Overview. There should be 9 PMD notifications across the src/ and test/ folders. If you see more than this, you didn’t configure PMD properly.

Demo: Appropriate notifications are displayed.

*PMD Notifications*

Demo Step 6: Run Unit Tests for Coverage

We will run automated unit tests on our code this semester and assess the quality of tests through code coverage. To run unit tests instrumented for coverage, do the following:

  1. Open the project. Right click on the test/ folder and select Coverage As > JUnit Test.
  2. The tests will run and results will show with a red bar. X out of Y tests are failing.
  3. A coverage report will show. In the upper right menu, select the white triangle pointing down and click on Line counters. You’ll see 58% line coverage for the Grades class; 0% line coverage for GradesUI class; and 94.8% line coverage for GradesTest class.

Demo: Appropriate test results and coverage are displayed.

*Test Results*

*Coverage Report*

Demo Step 7: Git Configuration in Eclipse

Ensure that you have configured Git in Eclipse with your name and NCSU email address. You can demonstrate the configuration by:

  1. Select
    • Windows users: Window > Preferences > Team > Git > Configuration.
    • Mac users: Eclipse > Preferences > Team > Git > Configuration.
  2. Open up the user label to show name and email address. You MUST use your NCSU email address.

Demo: Your name and NCSU email address are displayed.

*Git Configuration in Eclipse*

Demo Step 8: Push Demo Project to GitHub

You have been assigned a GitHub repository for Lab 00. Push your DemoProject to GitHub. See slides 26-29, the Git Tutorial, or the Git instructions from Guided Project 1.

When you’re done, check on NCSU’s GitHub website that the DemoProject folder is listed.

*GitHub with `DemoProject` folder*

Demo Step 9 [optional + extra credit]: Git Configuration on Command Line

If you have installed Git for your operating system and configured your global user name and email settings, show the PTF via the following command from your favorite command line tool:

$ git config --list

Your name and NCSU email address should be listed under user.name and user.email:

...
user.name=Sarah Heckman
user.email=sarah_heckman@ncsu.edu
...

Demo: Your name and NCSU email address are displayed.

Lab Deadlines

For Lab 0, you are expected to:

  • demonstrate that you have successfully set up your personal development environment either to a PTF/instructor or through a demo video submitted to the CSC 217 Moodle.

Lab 00 is due by January 28th at 11:45pm.

Lab Rubric

You will be evaluated on demonstration that you have successfully set up your personal development environment.

Grading Rubric

Development Environment Setup Rubric

Phase Grade Item Points Details
CheckStyle Notifications 10 Correct CheckStyle notifications are displayed demonstrating installation of plug-in and configuration file.
SpotBugs Notifications 10 Correct SpotBugs notifications are displayed demonstrating installation of plug-in and configuration file.
PMD Notifications 10 Correct PMD notifications are displayed demonstrating installation of plug-in and configuration file.
Java 11 15 Java 11 is the default JDK in Eclipse
Coverage Report 10 Correct coverage when running unit tests.
Eclipse Git Configuration 15 User name and email are set in Eclipse's eGit settings. This can also be assessed via the user name that shows up in GitHub.
DemoProject Committed to GitHub 15 DemoProject committed to GitHub in the correct folder structure.
Extra Credit - Command Line Git Configuration 5 Command line Git user name and email are set up
  Total Points 90