CSE 212: Programming with Data Structures

Tools and Setup

Overview

Welcome to CSE 212!

This course builds on the tools and experiences of your previous classes. It is important that you have all of the necessary tools installed and configured during the first week.

Course Setup

In this course you will write C# programs using VS Code (Visual Studio Code) and push them to a public GitHub repository. These tools are all free, open-source, and very common in industry. You likely have most of these tools already, but if not, you will need to install the following:

Install your tools

You may have many of these tools installed from a previous course. If you have already installed a tool, you may skip it and move on to the next one.

  1. Git: Download and install Git from the official website: Git Installation Instructions

    • Make sure to select your operating system and download the appropriate installer.
    • Windows users: You can select the latest version at the top of the list. (Otherwise, make sure to select a "standalone installer" rather than a "portable" one.)
    • MacOS users: You may already have Git installed because of Xcode or other tools. You can check by opening a Terminal window and typing, git --version . If the terminal displays a version number, then you already have it installed. If you see a "Command not found" error, then you should install it. You may choose any option you like, but the Binary installer is likely the most straightforward.
  2. VS Code: Download and install VS Code from the official website: VS Code Installation Instructions
  3. C# extension for VS Code: Download and install the extension from the official website: C# Extension Instructions.
  4. The .NET SDK: Download and install the .NET SDK from the official website: The .NET SDK Installation Instructions.
    • Choose the recommended version and ensure it is for your operating system. As of January 2024, this is .NET 8.0.
    • Important: For Windows, you have a choice for the SDK or the Runtime. Make sure to download the SDK.
    • For MacOS: If you have an ARM processor, you should download the ARM version. If you have an Intel chip, you should download the x64 version.
    • You may see some warnings about specific versions of Visual Studio. You don't need to worry about these warnings, because you will be using VS Code not the regular "Visual Studio."
  5. Windows: Help to find the right download:

    If your are using a windows computer, you will want to download the installer that matches your processor. There are versions for x64 (64-bit processors) and x86 (32-bit processors) as well as a different version if you have an ARM processor.

    You can check your processor type by selecting Windows > Settings (the gear icon) > System. Then, scroll down on the left sidebar and select About. This page will show you the "System Type".

    Mac Troubleshooting Help:

    If you are using MacOS and it cannot find dotnet after installing it, it may be that the location where it was installed is not listed in your path. This StackOverflow page may be helpful for you in putting a link to the dotnet executable into a location that is already in your path.

  6. Microsoft Teams: Install and Sign in to Microsoft Teams by following these instructions: Introduction to Microsoft Teams.
    • A Microsoft Teams organization has been setup for this course, and you have been added as a course wide member. To access it, you need to install Microsoft Teams and sign in your your university account.

Sign in to Microsoft Teams

Once you have installed Microsoft Teams:

  1. Sign in to Microsoft Teams using your university account.
  2. Find the Microsoft Teams organization that matches this course name ("Programming with Data Structures").
  3. Verify that you can see the general channel.

Create your own copy of the template at GitHub

There is a project template for this course that contains a starting place for all of the projects you will need this for this course. You will download this template once right now using Git, and then you can use this project for all of your work for the remainder of the course.

  1. Go to GitHub.com. Sign up for a new account if you do not already have one. Then, sign in.
  2. Go to the project template repository here: https://github.com/byui-cse/cse212-ww-student-template
    1. Select the green Use this template button. This will prompt you to create your own copy of this repository. Choose a name that is meaningful for you, for your repository such as cse212-hw or cse212-projects.
    2. Is the page missing the Use this template button?

      If you do not see the green button for Use this template, it may be because you are not signed in. If you are not signed in, you will see a green "Code" button instead of the correct "Use this template" button. Please sign in to see the correct button.

    3. Select public for your repository so that your instructor and graders can access it.
    4. There is only one branch in the template repository, so it doesn't matter if you include all branches or not.
    5. Once you have finished creating your copy of the repository at GitHub, it should take you to that page with an address such as https://github.com/your-username-here/cse212-hw with your username in the address.

Use Git to download your template to your computer

  1. Open VS Code.
  2. If your VS Code opens up to a previous project, instead of the "Get Started" page, select File -> New Window
  3. On the VS Code Get Started page select, Clone Git Repository.

    • This brings up a box for you to provide the repository URL. This URL is the web page you were on earlier (such as: https://github.com/your-username-here/cse212-hw, but of course, with your username in the URL).
    • You should copy and paste your URL into this box and press the Enter key. This will bring up a file browser for you to select a location on your computer for your local copy of this repository.
  4. In the file browser, select a location on your computer where you would like to store your homework for this course.
  5. Open the cloned repository when prompted (or alternatively, select Open... and browse to the location of this new folder.)

Because C# is designed to run larger projects rather than single files, as you work this semester, it is important that you open this folder (for example "cse212-hw"), not a single file.

Run a C# Project

  1. Once the project is open in VS Code, you can select the debug button on the left menu. (This is a play button with a little "bug" icon next to it.)
  2. In the dropdown box at the top of the debug pane, select the Sandbox Project and select the green play button next to it to run it.
  3. It should build and run your sandbox project, which displays "Hello Sandbox World!" in the terminal.
Only seeing ".Net Core Launch" in your dropdown box?

It is important to open the exact folder that you created. If you open a folder above it or below it by accident, or if you simply open a file in VS Code, instead of opening your folder, you will not see the correct options in your dropdown box.

This is because the folder that you created above contains instructions that tell VS Code how to run each of the projects.

C# Resources

As mentioned this course will use the C# language. It will not explore the depths and nuances of C# and the .Net framework, but you will need to become familiar with the language basics.

New to C#?

If you are new to C# you will find that it is very similar to other languages that you may know, such as Python, JavaScript, and Java. The CSE 210 course contains some practice assignments that can help you learn the fundamentals of C#:

You should complete the exercises for "Prove: Developer - C# Prep 1" through "Prove: Developer - C# Prep 5".

In addition, if you are feeling uncomfortable with Git, you may also want to review the "Prepare: Learning Activity - Version Control" activity.

Submission

You now have all the tools you will need for this course. If you had problems with any of the steps above, make sure to reach out for help in Microsoft Teams or by sending a message to your instructor.

There is no submission required for this setup activity. You just need to ensure that you have completed the steps above to be prepared for the upcoming activities.

Other Links: