diff --git a/docs/setup_caen.md b/docs/setup_caen.md index 3cf155c6..b8222d7e 100644 --- a/docs/setup_caen.md +++ b/docs/setup_caen.md @@ -94,9 +94,9 @@ $ make clean Next, copy files using `rsync`. Remember to change `awdeorio` to your username. ```console -$ rsync -rtv --exclude '.git*' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/ +$ rsync -rtv --exclude '.git*' ../p1-stats/ awdeorio@login-course.engin.umich.edu:p1-stats-copy/ building file list ... done -created directory stats-copy +created directory p1-stats-copy ./ Makefile main.cpp @@ -133,12 +133,12 @@ caen-vnc-vm16.engin.umich.edu Notice that the folder copied earlier. ```console $ ls -stats-copy +p1-stats-copy ``` Change directory into the copied folder and double-check that all binary files are cleaned up. ```console -$ cd stats-copy +$ cd p1-stats-copy $ make clean ``` @@ -202,7 +202,7 @@ $ Open a second terminal and run an `rsync` command, which uses the new configuration. No authentication is required! ```console -$ rsync -rtv --exclude '.git*' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/ +$ rsync -rtv --exclude '.git*' ../p1-stats/ awdeorio@login-course.engin.umich.edu:p1-stats-copy/ building file list ... done sent 273 bytes received 20 bytes 586.00 bytes/sec @@ -229,12 +229,12 @@ SSH to a CAEN Linux machine and see the copy we made earlier using `rsync`. ```console $ ssh awdeorio@login-course.engin.umich.edu $ ls -stats-copy # this is from our rsync'ed copy earlier +p1-stats-copy # this is from our rsync'ed copy earlier ``` Notice that the copy is *not* under version control. ```console -$ cd stats-copy +$ cd p1-stats-copy $ git status fatal: Not a git repository (or any of the parent directories): .git ``` @@ -242,9 +242,9 @@ fatal: Not a git repository (or any of the parent directories): .git Change directory and `git clone` your repo. ```console $ cd ~ # This will move to your home directory -$ git clone https://github.com/awdeorio/stats.git +$ git clone https://github.com/awdeorio/p1-stats.git $ ls -stats stats-copy +p1-stats p1-stats-copy ``` ## Pro-tips @@ -252,14 +252,14 @@ stats stats-copy ### Synchronizing deleted files Tell `rsync` to synchronize deleted files. In other words, if it's gone on your laptop, delete it on CAEN. ```console -$ rsync -rtv --delete --exclude '.git*' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/ +$ rsync -rtv --delete --exclude '.git*' ../p1-stats/ awdeorio@login-course.engin.umich.edu:p1-stats-copy/ ``` {: data-variant="no-line-numbers" } ### Don't synchronize Git-ignored files Tell `rsync` not to synchronize files ignored by Git. You can also combine this option with `--delete`. ```console -$ rsync -rtv --exclude '.git*' --filter=':- .gitignore' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/ +$ rsync -rtv --exclude '.git*' --filter=':- .gitignore' ../p1-stats/ awdeorio@login-course.engin.umich.edu:p1-stats-copy/ ``` {: data-variant="no-line-numbers" } @@ -273,8 +273,8 @@ sync : --delete \ --exclude '.git*' \ --filter=':- .gitignore' \ - ../stats/ \ - awdeorio@login-course.engin.umich.edu:stats-copy/ + ../p1-stats/ \ + awdeorio@login-course.engin.umich.edu:p1-stats-copy/ ``` Now you can type `make sync` as a short cut. @@ -285,8 +285,8 @@ rsync \ --delete \ --exclude '.git*' \ --filter=':- .gitignore' \ - ../stats/ \ - awdeorio@login-course.engin.umich.edu:stats-copy/ + ../p1-stats/ \ + awdeorio@login-course.engin.umich.edu:p1-stats-copy/ building file list ... done ./ Makefile diff --git a/docs/setup_eecs281.md b/docs/setup_eecs281.md index 077c66c9..e75b577e 100644 --- a/docs/setup_eecs281.md +++ b/docs/setup_eecs281.md @@ -12,14 +12,14 @@ This tutorial walks through EECS 281 project setup using EECS 280 tutorials. VS Code works great for EECS 281 projects. Just ask one of the IAs or GSIs who use VS Code if you need help. ## Visual debugger -Set up your project in your visual debugger. We'll use the project name `stats` in this example, but your project name may be different. If your project has starter files, you'll need the link from the project spec. +Set up your project in your visual debugger. We'll use the project name `p1-stats` in this example, but your project name may be different. If your project has starter files, you'll need the link from the project spec. | [VS Code Tutorial](https://eecs280staff.github.io/tutorials/setup_vscode.html)| [Visual Studio Tutorial](https://eecs280staff.github.io/tutorials/setup_visualstudio.html) | [Xcode Tutorial](https://eecs280staff.github.io/tutorials/setup_xcode.html) | After you're done, you should have a folder with a main file. Your files may be different. ```console -$ tree stats/ -stats/ +$ tree p1-stats/ +p1-stats/ ├── main.cpp ... ``` @@ -185,8 +185,8 @@ Your branch is up-to-date with 'origin/main'. nothing to commit, working tree clean $ git remote -v -origin https://github.com/awdeorio/stats.git (fetch) -origin https://github.com/awdeorio/stats.git (push) +origin https://github.com/awdeorio/p1-stats.git (fetch) +origin https://github.com/awdeorio/p1-stats.git (push) ``` You should have a `.gitignore` file ([instructions](https://eecs280staff.github.io/tutorials/setup_git.html#create-a-local-repository)). diff --git a/docs/setup_emacs.md b/docs/setup_emacs.md index 103bfc7f..55e354ca 100644 --- a/docs/setup_emacs.md +++ b/docs/setup_emacs.md @@ -281,8 +281,8 @@ Emacs doesn't require any special setup for a project. Create a new directory, then move into the new directory. Your folder location might be different. ```console -$ mkdir ~/eecs280/stats -$ cd ~/eecs280/stats +$ mkdir ~/eecs280/p1-stats +$ cd ~/eecs280/p1-stats ``` ### Add new files @@ -504,7 +504,7 @@ Alice connects to a remote server containing her code. She starts a tmux sessio $ ssh login-course.engin.umich.edu $ hostname caen-vnc-vm05.engin.umich.edu -$ cd stats +$ cd p1-stats $ tmux new -s shared $ emacs -nw main.cpp ``` diff --git a/docs/setup_git.md b/docs/setup_git.md index 875cd4df..bebae4d7 100644 --- a/docs/setup_git.md +++ b/docs/setup_git.md @@ -19,10 +19,10 @@ If you've used version control before on your computer, skip to the [Create a lo ## Prerequisites -We're assuming that you already have a folder, e.g., `seam-carving/` or `stats/`. Your folder name may be different. It's OK if there aren't any files in it yet. +We're assuming that you already have a folder, e.g., `p2-image-processing/` or `p1-stats/`. Your folder name may be different. It's OK if there aren't any files in it yet. ```console $ pwd -/Users/awdeorio/Developer/eecs280/seam-carving +/Users/awdeorio/Developer/eecs280/p2-image-processing ``` You have installed `git`. Your version might be different. @@ -147,7 +147,7 @@ Only one team member creates the first local repository. Navigate to your project directory. Your directory might be different. ```console $ pwd -/Users/awdeorio/Developer/eecs280/seam-carving +/Users/awdeorio/Developer/eecs280/p2-image-processing ``` ### Add a `.gitignore` file @@ -157,7 +157,7 @@ Add a `.gitignore` file. This will prevent Git from controlling files like comp This sample is pre-configured to work with most C++ projects, so use the same sample file for all EECS 280/281 projects. ```console $ pwd -/Users/awdeorio/src/eecs280/seam-carving +/Users/awdeorio/src/eecs280/p2-image-processing $ wget https://eecs280staff.github.io/tutorials/dot_gitignore_sample -O .gitignore $ ls -A .gitignore ... @@ -167,7 +167,7 @@ $ ls -A Initialize the repo. You may have more untracked files. ```console $ git init -Initialized empty Git repository in /Users/awdeorio/Developer/eecs280/seam-carving/.git/ +Initialized empty Git repository in /Users/awdeorio/Developer/eecs280/p2-image-processing/.git/ $ git status On branch main @@ -268,7 +268,7 @@ Create a new project. -Call the new project `seam-carving`, mark it as "private". Click "Create repository". +Call the new project `p2-image-processing`, mark it as "private". Click "Create repository".
**Double check that you have selected "private".** Making your project code or test cases publicly available online is a violation of the honor code. @@ -280,7 +280,7 @@ Triple-check that your new repository is private. If you made a mistake, you ca -You now have a project page for your remote repo. In this example, awdeorio's project page is [https://github.com/awdeorio/seam-carving](https://github.com/awdeorio/seam-carving). You won't have access to it because it's private, but your page should look similar. +You now have a project page for your remote repo. In this example, awdeorio's project page is [https://github.com/awdeorio/p2-image-processing](https://github.com/awdeorio/p2-image-processing). You won't have access to it because it's private, but your page should look similar. @@ -295,8 +295,8 @@ Browse to your repository's project page from [https://github.com/](https://gith Connect your local repo to your remote repo. ```console $ pwd -/Users/awdeorio/Developer/eecs280/seam-carving -$ git remote add origin https://github.com/awdeorio/seam-carving.git # use your URL +/Users/awdeorio/Developer/eecs280/p2-image-processing +$ git remote add origin https://github.com/awdeorio/p2-image-processing.git # use your URL ```
@@ -305,15 +305,15 @@ $ git remote add origin https://github.com/awdeorio/seam-carving.git # use your If you're using [SSH Keys](#ssh-keys), you'll see `git@github.com`. ```console $ git remote -v -origin git@github.com:awdeorio/seam-carving.git (fetch) -origin git@github.com:awdeorio/seam-carving.git (push) +origin git@github.com:awdeorio/p2-image-processing.git (fetch) +origin git@github.com:awdeorio/p2-image-processing.git (push) ``` If you're using GitHub [Personal Access Tokens](#personal-access-token), you'll see `https://`. ```console $ git remote -v -origin https://github.com/awdeorio/seam-carving.git (fetch) -origin https://github.com/awdeorio/seam-carving.git (push) +origin https://github.com/awdeorio/p2-image-processing.git (fetch) +origin https://github.com/awdeorio/p2-image-processing.git (push) ```
@@ -327,7 +327,7 @@ Delta compression using up to 4 threads. Compressing objects: 100% (12/12), done. Writing objects: 100% (14/14), 6.97 KiB | 3.48 MiB/s, done. Total 14 (delta 0), reused 0 (delta 0) -To https://github.com/awdeorio/seam-carving.git +To https://github.com/awdeorio/p2-image-processing.git * [new branch] main -> main Branch 'main' set up to track remote branch 'main' from 'origin'. ``` @@ -342,7 +342,7 @@ Branch 'main' set up to track remote branch 'main' from 'origin'. ```console $ git push -u origin main error: src refspec main does not match any -error: failed to push some refs to 'github.com:awdeorio/seam-carving.git' +error: failed to push some refs to 'github.com:awdeorio/p2-image-processing.git' ``` You can rename your local branch to `main` to resolve this. @@ -497,7 +497,7 @@ Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 361 bytes | 361.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0) -To https://github.com/awdeorio/seam-carving.git +To https://github.com/awdeorio/p2-image-processing.git 350f38e..7fa8093 main -> main $ git status On branch main @@ -600,7 +600,7 @@ Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 348 bytes | 348.00 KiB/s, done. Total 3 (delta 2), reused 0 (delta 0) -To https://github.com/awdeorio/seam-carving.git +To https://github.com/awdeorio/p2-image-processing.git a80db0b..2fac8d1 main -> main ``` @@ -655,8 +655,8 @@ $ whoami awdeorio $ pwd /Users/awdeorio/src/eecs280/ -$ git clone https://github.com/awdeorio/seam-carving.git -Cloning into 'seam-carving... +$ git clone https://github.com/awdeorio/p2-image-processing.git +Cloning into 'p2-image-processing... ``` Remember, other team members don't need to download the starter files again because those files were already added by the first team member. @@ -687,9 +687,9 @@ To fix the conflict, follow [this how-to]( https://help.github.com/articles/reso If you get a `rejected` error when using `git push`, this probably means you (or your partner) changed your repo using another computer (or the GitHub web interface). ```console $ git push -To https://github.com/awdeorio/seam-carving.git +To https://github.com/awdeorio/p2-image-processing.git ! [rejected] main -> main (fetch first) -error: failed to push some refs to 'https://github.com/awdeorio/seam-carving.git' +error: failed to push some refs to 'https://github.com/awdeorio/p2-image-processing.git' ``` Fetch changes from the remote repo. @@ -699,7 +699,7 @@ remote: Counting objects: 3, done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 2), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. -From https://github.com/awdeorio/seam-carving +From https://github.com/awdeorio/p2-image-processing 4d375b4..2b9bea7 main -> origin/main ``` @@ -735,7 +735,7 @@ Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 318 bytes | 318.00 KiB/s, done. Total 3 (delta 2), reused 0 (delta 0) -To https://github.com/awdeorio/seam-carving.git +To https://github.com/awdeorio/p2-image-processing.git 2b9bea7..63a5d0b main -> main $ git status On branch main @@ -758,7 +758,7 @@ First, remove your GitHub repository. Browse to your repository's project page Next, remove the hidden files created by `git`. Remember, hidden files start with a dot (`.`). ```console $ pwd -/Users/awdeorio/Developer/eecs280/seam-carving +/Users/awdeorio/Developer/eecs280/p2-image-processing $ rm -rf .git/ .gitignore $ ls -A ``` diff --git a/docs/setup_lldb.md b/docs/setup_lldb.md index 2aef784a..c8d1b231 100644 --- a/docs/setup_lldb.md +++ b/docs/setup_lldb.md @@ -70,7 +70,7 @@ Run with LLDB. You now see the LLDB prompt. LLDB's interface is similar to you ``` $ lldb main.exe (lldb) target create "./main.exe" -Current executable set to '/Users/awdeorio/src/eecs280/stats/main.exe' (arm64). +Current executable set to '/Users/awdeorio/src/eecs280/p1-stats/main.exe' (arm64). ``` The `r` command runs the program. @@ -176,7 +176,7 @@ Start LLDB. ```console $ lldb main.exe (lldb) target create "main.exe" -Current executable set to '/Users/awdeorio/src/eecs280/stats/main.exe' (arm64). +Current executable set to '/Users/awdeorio/src/eecs280/p1-stats/main.exe' (arm64). ``` ### Breakpoint @@ -202,7 +202,7 @@ Run the program being debugged. The program pauses at the breakpoint. ``` (lldb) r -Process 72957 launched: '/Users/awdeorio/src/eecs280/stats/main.exe' (arm64) +Process 72957 launched: '/Users/awdeorio/src/eecs280/p1-stats/main.exe' (arm64) Process 72957 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x0000000100003e48 main.exe`main at main.cpp:14:18 diff --git a/docs/setup_macos.md b/docs/setup_macos.md index 412e234a..e621a5c9 100644 --- a/docs/setup_macos.md +++ b/docs/setup_macos.md @@ -86,7 +86,7 @@ We highly recommend you store all coding work for EECS 280 projects and labs her | Bad Example | Good Example | |-----------------|----------------| | `EECS 280/` | `eecs280/` | -| `EECS 280 Stats Project/` | `stats/` | +| `Project 1 Stats/` | `p1-stats/` |
diff --git a/docs/setup_style.md b/docs/setup_style.md index 5531590d..16775bfa 100644 --- a/docs/setup_style.md +++ b/docs/setup_style.md @@ -135,7 +135,7 @@ Clean up (from your laptop). $ hostname manzana.local $ pwd -/Users/awdeorio/src/eecs280/stats +/Users/awdeorio/src/eecs280/p1-stats $ make clean ``` @@ -144,9 +144,9 @@ Copy (from your laptop). $ hostname manzana.local $ pwd -/Users/awdeorio/src/eecs280/stats +/Users/awdeorio/src/eecs280/p1-stats $ make sync -rsync -rtv --delete --exclude '.git*' --filter=':- .gitignore' ./ awdeorio@login-course.engin.umich.edu:stats-copy/ +rsync -rtv --delete --exclude '.git*' --filter=':- .gitignore' ./ awdeorio@login-course.engin.umich.edu:p1-stats-copy/ ``` ### Connect to CAEN Linux @@ -161,15 +161,15 @@ $ hostname caen-vnc-vm16.engin.umich.edu ``` -Change directory to the folder containing your source code. In this tutorial, we're going to use the copy created by `rsync` via `make sync`. Note that you might also have a `stats` directory created during the [Version control on CAEN Linux](setup_caen.html#version-control-on-caen-linux) tutorial. +Change directory to the folder containing your source code. In this tutorial, we're going to use the copy created by `rsync` via `make sync`. Note that you might also have a `p1-stats` directory created during the [Version control on CAEN Linux](setup_caen.html#version-control-on-caen-linux) tutorial. ``` console $ pwd /home/awdeorio $ ls -stats stats-copy -$ cd stats-copy +p1-stats p1-stats-copy +$ cd p1-stats-copy $ pwd -/home/awdeorio/stats-copy +/home/awdeorio/p1-stats-copy ``` ### Run style checks @@ -178,7 +178,7 @@ We've provided a `make style` Makefile target to run all the style checks for yo $ hostname caen-vnc-vm16.engin.umich.edu $ pwd -/home/awdeorio/stats-copy +/home/awdeorio/p1-stats-copy $ make style ... EECS 280 style checks PASS diff --git a/docs/setup_visualstudio.md b/docs/setup_visualstudio.md index 03ae04d1..27398059 100644 --- a/docs/setup_visualstudio.md +++ b/docs/setup_visualstudio.md @@ -47,7 +47,7 @@ Select "Console App". Click "Next". -Set a project name, we'll call our example project `stats`. Pick a location where you'll store your projects. Check "Place solution and project in the same directory. We recommend this in EECS 280 so that everyone has a one-level structure (`stats/main.cpp`) instead of a two-level structure (`stats/stats/main.cpp`). Click "Next". +Set a project name, we'll call our example project `p1-stats`. Pick a location where you'll store your projects. Check "Place solution and project in the same directory. We recommend this in EECS 280 so that everyone has a one-level structure (`p1-stats/main.cpp`) instead of a two-level structure (`p1-stats/p1-stats/main.cpp`). Click "Next".
**Pitfall:** Avoid paths that contain spaces. Spaces cause problems with some command line tools. @@ -55,13 +55,13 @@ Set a project name, we'll call our example project `stats`. Pick a location whe | Bad Example | Good Example | |-----------------|----------------| | `EECS 280/` | `eecs280/` | -| `EECS 280 Stats Project/` | `stats/` | +| `Project 1 Stats/` | `p1-stats/` |
-You can see the files created by Visual Studio in the File Explorer. Right-click `stats`, select "Show in Finder". +You can see the files created by Visual Studio in the File Explorer. Right-click `p1-stats`, select "Show in Finder". | | | @@ -72,11 +72,11 @@ You can also see the files created by Visual Studio from the WSL command line. ```console $ tree . -├── stats.cpp -├── stats.sln -├── stats.vcxproj -├── stats.vcxproj.filters -└── stats.vcxproj.user +├── p1-stats.cpp +├── p1-stats.sln +├── p1-stats.vcxproj +├── p1-stats.vcxproj.filters +└── p1-stats.vcxproj.user ``` ### Rename main file @@ -92,7 +92,7 @@ Right-click `stats.cpp` and select "Rename". Change the file name. Visual Studio created `main.cpp` by default. Skip this subsection your first time through the tutorial. You can come back to it. -Open your project folder by selecting `File` > `Open` > `Project/Solution`, navigate to your project directory (`stats` in this example) and open `stats.sln`. An alternative is to double-click `stats.sln` in the File Explorer. +Open your project folder by selecting `File` > `Open` > `Project/Solution`, navigate to your project directory (`p1-stats` in this example) and open `p1-stats.sln`. An alternative is to double-click `p1-stats.sln` in the File Explorer. Right-click "Source Files", then select "Add" > "New Item". @@ -114,7 +114,7 @@ If you have starter files, add them to your project directory. This example is ```console $ ls main.cpp -stats.sln +p1-stats.sln ... ``` @@ -139,10 +139,10 @@ $ tree ├── cats.csv ├── cats.out.correct ├── main.cpp -├── stats.sln -├── stats.vcxproj -├── stats.vcxproj.filters -├── stats.vcxproj.user +├── p1-stats.sln +├── p1-stats.vcxproj +├── p1-stats.vcxproj.filters +├── p1-stats.vcxproj.user ├── library.cpp ├── library.hpp ├── stats.hpp @@ -229,7 +229,7 @@ $ ./two_sample.exe HCMST_ver_3.04.tsv q24_met_online 1 0 ppage The arguments above specify the name of a data file, coulumns, and filter values for the program to use. -Right-click the project in the Solution Explorer (`stats` in this example). Select "Properties". +Right-click the project in the Solution Explorer (`p1-stats` in this example). Select "Properties". @@ -248,7 +248,7 @@ Without input redirection, here's how to type input in the Visual Studio command -To configure input redirection, right-click the project in the Solution Explorer (`stats` in this example). Select "Properties". +To configure input redirection, right-click the project in the Solution Explorer (`p1-stats` in this example). Select "Properties". @@ -351,8 +351,8 @@ To reset Visual Studio project settings and starter files, first quit Visual Stu ```console /Users/awdeorio/src/eecs280 -$ cp -a stats stats.bak # Backup -$ rm -rf stats # Delete +$ cp -a p1-stats p1-stats.bak # Backup +$ rm -rf p1-stats # Delete ``` Visual Studio has a *lot* of settings. You can reset the entire user interface to the default settings by selecting "Tools" -> "Import" and Export Settings" -> "Reset all settings". This is optional. diff --git a/docs/setup_vscode_macos.md b/docs/setup_vscode_macos.md index 24ea7439..79aa7fd0 100644 --- a/docs/setup_vscode_macos.md +++ b/docs/setup_vscode_macos.md @@ -77,18 +77,18 @@ Go ahead and close the VS Code window for now. We'll open it back up in a moment ## Create a project -To create a VS Code project, create a folder (directory). There are many ways to create folders: Finder, VS Code interface, VS Code integrated terminal, and the system terminal. We'll use the system terminal and call our example project `stats`. +To create a VS Code project, create a folder (directory). There are many ways to create folders: Finder, VS Code interface, VS Code integrated terminal, and the system terminal. We'll use the system terminal and call our example project `p1-stats`. Open the Terminal ([Terminal on macOS](cli.html#open-terminal-macos)). Create a new folder for your project. ```console -$ mkdir -p ~/eecs280/stats -$ cd ~/eecs280/stats +$ mkdir -p ~/eecs280/p1-stats +$ cd ~/eecs280/p1-stats ``` -This `mkdir -p` command creates a new `stats` folder within an `eecs280` folder (creating that too, if it doesn't exist), within your Ubuntu home directory (`~`). The `cd` command changes your working directory to the new `stats` directory. +This `mkdir -p` command creates a new `p1-stats` folder within an `eecs280` folder (creating that too, if it doesn't exist), within your Ubuntu home directory (`~`). The `cd` command changes your working directory to the new `p1-stats` directory.
**Pitfall:** Avoid paths that contain spaces. Spaces causes problems with some command line tools. @@ -96,18 +96,18 @@ This `mkdir -p` command creates a new `stats` folder within an `eecs280` folder | Bad Example | Good Example | |-----------------|----------------| | `EECS 280/` | `eecs280/` | -| `EECS 280 Stats Project/` | `stats/` | +| `Project 1 Stats/` | `p1-stats/` |
Now, verify you're in the project directory with `pwd` and launch VS code with `code .`: ```console $ pwd -/Users/awdeorio/eecs280/stats +/Users/awdeorio/eecs280/p1-stats $ code . ``` -The `.` in `code .` means "current working directory". It would also be fine to use an absolute path, for example, `code ~/eecs280/stats`. +The `.` in `code .` means "current working directory". It would also be fine to use an absolute path, for example, `code ~/eecs280/p1-stats`. You can also open your project folder through the VS Code interface. Go to `File` > `Open Folder...`, then find your project folder. @@ -127,7 +127,7 @@ This tutorial includes examples for compiling and debugging with a sample `main. ```console $ pwd -/Users/awdeorio/eecs280/stats +/Users/awdeorio/eecs280/p1-stats $ wget -nc https://eecs280staff.github.io/tutorials/main.cpp $ wget -nc https://eecs280staff.github.io/tutorials/Makefile ``` @@ -185,7 +185,7 @@ We'll run several commands to get the starter file (see below). We recommend usi ```console $ pwd -/Users/awdeorio/eecs280/stats +/Users/awdeorio/eecs280/p1-stats $ wget https://eecs280staff.github.io/stats/starter-files.tar.gz $ tar -xvzf starter-files.tar.gz $ mv starter-files/* . @@ -264,7 +264,7 @@ sum(data) = 60 **Pitfall:** If something doesn't seem to be working, you can always check your current directory with `pwd` or `ls` to verify your terminal is in the correct place with the correct files. ```console $ pwd -/Users/awdeorio/eecs280/stats +/Users/awdeorio/eecs280/p1-stats $ ls Makefile cats.out.correct library.hpp stats.hpp stats_tests.cpp cats.csv library.cpp stats.cpp stats_public_tests.cpp two_sample.cpp @@ -500,8 +500,8 @@ To reset VS Code project settings and starter files, first quit VS Code. Make a ```console $ pwd /Users/awdeorio/src/eecs280 -$ cp -a stats stats.bak # Backup -$ rm -rf stats # Delete +$ cp -a p1-stats p1-stats.bak # Backup +$ rm -rf p1-stats # Delete ``` VS Code has a *lot* of settings and extensions. You can reset the entire user interface and remove all extensions using these commands (Based on [Microsoft instructions](https://code.visualstudio.com/docs/setup/uninstall#_clean-uninstall)). This is optional. diff --git a/docs/setup_vscode_wsl.md b/docs/setup_vscode_wsl.md index 156c274a..545a8b0e 100644 --- a/docs/setup_vscode_wsl.md +++ b/docs/setup_vscode_wsl.md @@ -96,18 +96,18 @@ Clear out the search bar in the extensions panel. You should see: Go ahead and close the VS Code window for now. We'll open it back up in a moment. ## Create a project -To create a VS Code project, create a folder (directory). There are many ways to create folders: File Explorer, VS Code interface, VS Code integrated terminal, and the system terminal. We'll use the system terminal and call our example project `stats`. +To create a VS Code project, create a folder (directory). There are many ways to create folders: File Explorer, VS Code interface, VS Code integrated terminal, and the system terminal. We'll use the system terminal and call our example project `p1-stats`. Open the Terminal ([Ubuntu Bash Shell](cli.html#open-terminal-windows)). Create a new folder for your project. ```console -$ mkdir -p ~/eecs280/stats -$ cd ~/eecs280/stats +$ mkdir -p ~/eecs280/p1-stats +$ cd ~/eecs280/p1-stats ``` -This `mkdir -p` command creates a new `stats` folder within an `eecs280` folder (creating that too, if it doesn't exist), within your Ubuntu home directory (`~`). The `cd` command changes your working directory to the new `stats` directory. +This `mkdir -p` command creates a new `p1-stats` folder within an `eecs280` folder (creating that too, if it doesn't exist), within your Ubuntu home directory (`~`). The `cd` command changes your working directory to the new `p1-stats` directory.
**Pitfall:** Avoid paths that contain spaces. Spaces causes problems with some command line tools. @@ -115,18 +115,18 @@ This `mkdir -p` command creates a new `stats` folder within an `eecs280` folder | Bad Example | Good Example | |-----------------|----------------| | `EECS 280/` | `eecs280/` | -| `EECS 280 Stats Project/` | `stats/` | +| `Project 1 Stats/` | `p1-stats/` |
Now, verify you're in the project directory with `pwd` and launch VS code with `code .`: ```console $ pwd -/home/awdeorio/eecs280/stats +/home/awdeorio/eecs280/p1-stats $ code . ``` -The `.` in `code .` means "current working directory". It would also be fine to use an absolute path, for example, `code ~/eecs280/stats`. +The `.` in `code .` means "current working directory". It would also be fine to use an absolute path, for example, `code ~/eecs280/p1-stats`.
**Pitfall:** If you've just installed VS Code, you may need to restart your terminal before the `code` command will work. @@ -165,7 +165,7 @@ This tutorial includes examples for compiling and debugging with a sample `main. ```console $ pwd -/home/awdeorio/eecs280/stats +/home/awdeorio/eecs280/p1-stats $ wget -nc https://eecs280staff.github.io/tutorials/main.cpp $ wget -nc https://eecs280staff.github.io/tutorials/Makefile ``` @@ -224,7 +224,7 @@ We'll run several commands to get the starter file (see below). We recommend usi ```console $ pwd -/home/awdeorio/eecs280/stats +/home/awdeorio/eecs280/p1-stats $ wget https://eecs280staff.github.io/stats/starter-files.tar.gz $ tar -xvzf starter-files.tar.gz $ mv starter-files/* . @@ -309,7 +309,7 @@ sum(data) = 60 **Pitfall:** If something doesn't seem to be working, you can always check your current directory with `pwd` or `ls` to verify your terminal is in the correct place with the correct files. ```console $ pwd -/home/awdeorio/eecs280/stats +/home/awdeorio/eecs280/p1-stats $ ls Makefile cats.out.correct library.hpp stats.hpp stats_tests.cpp cats.csv library.cpp stats.cpp stats_public_tests.cpp two_sample.cpp @@ -575,8 +575,8 @@ To reset VS Code project settings and starter files, first quit VS Code. Make a ```console $ pwd /Users/awdeorio/src/eecs280 -$ cp -a stats stats.bak # Backup -$ rm -rf stats # Delete +$ cp -a p1-stats p1-stats.bak # Backup +$ rm -rf p1-stats # Delete ``` VS Code has a *lot* of settings and extensions. You can reset the entire user interface and remove all extensions using these commands (Based on [Microsoft instructions](https://code.visualstudio.com/docs/setup/uninstall#_clean-uninstall)). This is optional. diff --git a/docs/setup_wsl.md b/docs/setup_wsl.md index bc8e6d0d..30179ea5 100644 --- a/docs/setup_wsl.md +++ b/docs/setup_wsl.md @@ -155,7 +155,7 @@ We highly recommend you store all coding work for EECS 280 projects and labs her | Bad Example | Good Example | |-----------------|----------------| | `EECS 280/` | `eecs280/` | -| `EECS 280 Stats Project/` | `stats/` | +| `Project 1 Stats/` | `p1-stats/` |
diff --git a/docs/setup_xcode.md b/docs/setup_xcode.md index 1b088ed2..4a3c9e6f 100644 --- a/docs/setup_xcode.md +++ b/docs/setup_xcode.md @@ -45,7 +45,7 @@ Under "macOS", select "Command Line Tool". Click "Next". -Set a project name, we'll call our example project `stats`. Ensure that that the Language is set to "C++". Enter your uniqname in the "Organization Identifier" field. (It's used by the app store which we don't use, so you just need something there.) Click "Next". +Set a project name, we'll call our example project `p1-stats`. Ensure that that the Language is set to "C++". Enter your uniqname in the "Organization Identifier" field. (It's used by the app store which we don't use, so you just need something there.) Click "Next". @@ -59,11 +59,11 @@ In the File Dialog, navigate to the directory where you store your projects. You | Bad Example | Good Example | |-----------------|----------------| | `EECS 280/` | `eecs280/` | -| `EECS 280 Stats Project/` | `stats/` | +| `Project 1 Stats/` | `p1-stats/` | -Drag-and-drop `main.cpp` out of the `stats` folder, then delete the `stats` folder. We recommend this in EECS 280 so that everyone has a one-level structure (`stats/main.cpp`) instead of a two-level structure (`stats/stats/main.cpp`). This step is optional. +Drag-and-drop `main.cpp` out of the `p1-stats` folder, then delete the `p1-stats` folder. We recommend this in EECS 280 so that everyone has a one-level structure (`p1-stats/main.cpp`) instead of a two-level structure (`p1-stats/p1-stats/main.cpp`). This step is optional. | | | | | @@ -71,13 +71,13 @@ You can see the files created by Xcode in the Finder. Right-click `main` and se | | | -You can also see the files created by Xcode from the command line. Notice that Xcode created a folder with project metadata: `stats.xcodeproj`. +You can also see the files created by Xcode from the command line. Notice that Xcode created a folder with project metadata: `p1-stats.xcodeproj`. ```console $ tree . ├── main.cpp -└── stats.xcodeproj +└── p1-stats.xcodeproj ├── ... ``` @@ -87,17 +87,17 @@ $ tree Xcode created `main.cpp` by default. Skip this subsection your first time through the tutorial. You can come back to it. -Open your project folder by selecting `File` > `Open` > navigate to the `stats` folder and open `stats.xcodeproj`. +Open your project folder by selecting `File` > `Open` > navigate to the `p1-stats` folder and open `p1-stats.xcodeproj`.
**Pro-tip:** Here's a quick way to open Xcode to a specific project folder from the command line. ```console -$ open stats.xcodeproj +$ open p1-stats.xcodeproj ``` {: data-variant="no-line-numbers" }
-Right-click `stats` in the sidebar. Select "New File". +Right-click `p1-stats` in the sidebar. Select "New File". @@ -124,7 +124,7 @@ If you have starter files, add them to your project directory. This example is **Pitfall:** Make sure you're in the directory containing your source code. ```console $ ls -main.cpp stats.xcodeproj +main.cpp p1-stats.xcodeproj ``` @@ -145,7 +145,7 @@ $ tree ├── cats.csv ├── cats.out.correct ├── main.cpp -├── stats.xcodeproj +├── p1-stats.xcodeproj │   ├── ... ├── library.cpp ├── library.hpp @@ -157,7 +157,7 @@ $ tree Start Xcode and open your project. -Right-click `stats` in the sidebar. Select "Add Files". +Right-click `p1-stats` in the sidebar. Select "Add Files". @@ -182,7 +182,7 @@ An Xcode target compiles (builds) one executable. ### Compile sources {: .primer-spec-toc-ignore } -We need to avoid multiple `main()` functions by including the right files in our target. Click "stats" in the side bar, then "stats" under TARGETS. Click "Build Phases", the "Compile Sources". Include the files needed to compile the main program. Remove any other files by selecting them and clicking on the "–" button. +We need to avoid multiple `main()` functions by including the right files in our target. Click "p1-stats" in the side bar, then "p1-stats" under TARGETS. Click "Build Phases", the "Compile Sources". Include the files needed to compile the main program. Remove any other files by selecting them and clicking on the "–" button. @@ -209,7 +209,7 @@ Select your scheme, then "Edit Scheme". You can also use menu: Product > Scheme | | | -Select "Run", then "Options", then "Use custom working directory". Use the folder icon to browse to the directory containing your project's files. In this example, that's `/Users/awdeorio/src/eecs280/stats/src`. Click "Close". +Select "Run", then "Options", then "Use custom working directory". Use the folder icon to browse to the directory containing your project's files. In this example, that's `/Users/awdeorio/src/eecs280/p1-stats/src`. Click "Close". @@ -378,8 +378,8 @@ To reset Xcode project settings and starter files, first quit Xcode. Make a bac ```console $ pwd /Users/awdeorio/src/eecs280 -$ cp -a stats stats.bak # Backup -$ rm -rf stats # Delete +$ cp -a p1-stats p1-stats.bak # Backup +$ rm -rf p1-stats # Delete ``` Xcode has a *lot* of settings. You can reset the entire user interface to the default settings using this command. This is optional. diff --git a/docs/style_guide.md b/docs/style_guide.md index cb17b670..d557834f 100644 --- a/docs/style_guide.md +++ b/docs/style_guide.md @@ -338,11 +338,11 @@ using decision you made, and can't override it with their own. ## Project-specific ways to make your code better -1. P2 Image: Respect the interfaces. That includes in your unit tests! -2. P3 Euchre: +1. Image Processing: Respect the interfaces. That includes in your unit tests! +2. Euchre: 1. Don't copy paste calls to `deal_one()`. Write a function. 2. Write moar functions. -3. P4 Machine Learning: Write moar functions. +3. Machine Learning: Write moar functions. ## Further reading