{"id":20554070,"url":"https://github.com/vasilescur/compsci-201-setup-guide","last_synced_at":"2026-02-15T06:31:00.632Z","repository":{"id":115938476,"uuid":"165085062","full_name":"vasilescur/Compsci-201-Setup-Guide","owner":"vasilescur","description":"An opinionated in-depth setup guide for Duke CompSci 201 students.","archived":false,"fork":false,"pushed_at":"2019-01-10T17:48:39.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T03:51:36.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vasilescur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-10T15:35:56.000Z","updated_at":"2019-01-10T17:48:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"fedaa739-d893-455b-9001-a10c5384e5ba","html_url":"https://github.com/vasilescur/Compsci-201-Setup-Guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vasilescur/Compsci-201-Setup-Guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2FCompsci-201-Setup-Guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2FCompsci-201-Setup-Guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2FCompsci-201-Setup-Guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2FCompsci-201-Setup-Guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasilescur","download_url":"https://codeload.github.com/vasilescur/Compsci-201-Setup-Guide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilescur%2FCompsci-201-Setup-Guide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29471941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T02:46:14.327Z","updated_at":"2026-02-15T06:31:00.562Z","avatar_url":"https://github.com/vasilescur.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compsci 201 Setup Guide\nAn opinionated in-depth setup guide for Duke CompSci 201 students.\n\n## Prerequisites\n\nThe following things need to be installed before you continue:\n\n- Latest version of the Java JDK - [Link](https://www.oracle.com/technetwork/java/javase/downloads/index.html).\nYou're going to want the **SE** version. Pick the most recent version. At the \ntime of this writing, it's JDK 11. It should be the big button at the top. \n\n## Installing Git\n\n### Windows\n\nInstall from here: [https://git-scm.com/download/win](https://git-scm.com/download/win)\n\nIn the installer, use all the default options. If it asks you if you want to \nadd git to your `PATH`, say **yes**.\n\nThen, log out, and log back in. (or restart)\n\n### MacOS\n\n#### Step 1 - Install Homebrew\n\nIf you don't have it already, you're gonna need to first install *Homebrew*, \nthe package manager for MacOS.\n\nCopy and paste the following into a terminal window and hit enter:\n\n```bash\nruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\nbrew doctor\n```\n\nYou will be asked to install the *Command Line Developer Tools* from *Apple*. \nConfirm by clicking **Install**. After that finishes, continue installing \nHomebrew by hitting enter again.\n\n#### Step 2 - Install Git\n\nCopy and paste the following into a terminal window and hit enter:\n\n```bash\nbrew install git\n```\n\n### Linux\n\nIf you're running linux, you should probably know how to install git.\n\n```bash\nsudo apt-get install git\n```\n\nor\n\n```bash\nsudo pacman -S git\n```\n\nif you're an Arch kind of person.\n\n## Windows Only -- Adding Java to the PATH\n\nFor y'all windows users out there, you have to do these terribly convoluted \nsteps to get your system to see Java.\n\n1. Open the Start menu search bar or whatever and type \"sytem environment\"\n2. Click on the option that says \"Edit the system environment variables\"\n3. Click the \"Environment Variables\" button at the bottom-right\n4. In the pop-up, look at the **bottom** half of the window. **Click on the entry in that list called `PATH`**. Then, click the \"Edit\" button. Then, click the \"New\" button.\n5. Open a File Explorer window. `Go to C:\\Program Files\\Java`\n6. Go into the folder of the jdk you installed. \n7. Click the address bar of your file explorer to select the current directory path and then  hit `Ctrl-C` to copy it. It should be something like `C:\\Program Files\\Java\\jdk-something`.\n8. Back in your environment variables path \"New\" window, paste that path in and save it.\n9. Go back to File Explorer. Go into the `bin` folder inside the JDK. Copy and paste that file path into a \"New\" `PATH` entry as well, just like last time.\n10. Click `Apply` or `OK` or whatever on all the windows, then re-open it to make sure it saved the new entries.\n11. **Go back to the window with a top and bottom list** (where you selected the PATH one to edit). Click the \"New\" button (IN THE BOTTOM HALF) to create a new variable (it will go in the same list as PATH is in). Call this variable `JAVA_HOME` and give it a value of the **first** path you copied into the PATH. (the path to your main JDK folder, **not** the `bin`)\n12. `OK`, `Apply`, Save, whatever. Open it again to make sure it saved.\n11. Restart your computer.\n\nAll that junk basically made it so Windows can see java from a terminal window.\n\n## Installing the IDE\n\nEclipse is old and ugly and crashes a lot, so instead, we're gonna use a much newer, better editor called Visual Studio Code. **IMPORTANT! Visual Studio Code and Visual Studio are two very different things.**\n\nInstall the correct version for your computer from [here](https://code.visualstudio.com/download).\n\nWhen it's done installing, open it.\n\n## A Quick Tour of VS Code\n\nWhen you first open it up, it should land at a Welcome page with a bunch of stuff. Close that tab.\n\nOn the left you have your sidebar. This has a few tabs on the very left of the window (the big icons) that allows\nthe sidebar to show different things.\n\n1. The first icon from the top is the file browser. This will show all the files in the folder that is currently open\nin VS Code. Each Java program you write should probably have its own folder. You'd make that folder with your File\nExplorer (or Finder on mac), and then go in VS Code and click Open Folder and select it to open that as a project.\n\n2. The second icon searches your project.\n\n3. The third icon is a handy dandy Git integration.\n\n4. The fourth icon is a debugger. It allows you to go through and run your code step by step. \n\n5. The fifth icon is a boxy-lookin thing and it is the Extensions manager. This is what you'll use for the next steps. Click on it.\n\n## Configuring Visual Studio Code\n\n### Extensions\n\nThe main difference between VS Code and Eclipse is that Eclipse was built for Java\nspecifically, while VS Code is for any programming language. That means it doesn't know\njack about Java unless we install a Java extension. Same for other languages-- if you want\nto use VS Code with Python, for example, you have to install a Python extension.\n\nGo to the extensions tab in VS Code (in the sidebar, the boxy icon, 5th down probably).\n\nGo through this list, typing the name in the search bar, and clicking install on the right one. Make sure you check\nthat you're installing the one by the right Author as some have similar names.\n\n#### Useful Extensions\n\n- Java Extension Pack *by Microsoft*\n- Better Comments *by Aaron Bond*\n- Nord *by arcticicestudio*\n- Python *by Microsoft* -- if you want it\n\nAfter you've clicked install on all of them one by one, do `Ctrl+Shift+P` (or `Command+Shift+P` on Mac) and then \ntype `Reload Window` and hit enter.\n\n(Fun fact: VS Code actually runs in a browser and is built in HTML and JavaScript. Reload Window basically \"refreshes\" it to\napply the new extensions.)\n\n### Settings\n\nGo to a main VS Code window and hit `Ctrl+comma`. In the top-right, click the `{ }` icon. \n\nClick in the right-hand pane. Delete everything. Paste this in and then save:\n\n```js\n{\n    // Workbench and Editor\n    \"workbench.startupEditor\": \"newUntitledFile\",\n    \"explorer.confirmDelete\": false,\n\n    \"editor.smoothScrolling\": true,\n    \"editor.mouseWheelZoom\": true,\n    \"window.zoomLevel\": 0,\n    \"editor.fontSize\": 14,\n    \"editor.minimap.enabled\": false,\n    \"editor.wordWrap\": \"on\",\n    \"editor.highlightActiveIndentGuide\": true,\n    \"explorer.confirmDragAndDrop\": false,\n\n    // Files\n    \"files.autoSaveDelay\": 3000,\n    \"files.autoSave\": \"afterDelay\",\n\n    \"files.associations\": {\n        \"*.md\": \"markdown\",\n        \"*.html\": \"html\",\n        //\".zsh_aliases\": \"shellscript\",\n        //\"*.asm\": \"mips\"\n    },\n\n    // Python\n\n    //\"python.pythonPath\": \"/usr/bin/python3\",\n    //\"python.linting.pylintPath\": \"/usr/local/bin/pylint\",\n    //\"python.linting.pep8Path\": \"/usr/local/bin/pep8\",\n    //\"python.formatting.autopep8Path\": \"/usr/local/bin/autopep8\",\n\n    // Git\n    \"git.enableSmartCommit\": true,\n    \"git.autofetch\": true,\n\n    // Integrated shell (Platform-dependent)\n    //\"terminal.integrated.shell.linux\": \"bash\",\n    \"terminal.integrated.shell.osx\": \"bash\",\n    //\"terminal.integrated.shell.windows\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n    \n    // Themes and Colors\n    \"workbench.colorTheme\": \"Nord\",\n    //\"workbench.iconTheme\": \"eq-material-theme-icons-ocean\",\n\n    \"editor.tokenColorCustomizations\": {\n        \"[Nord]\": {\n            \"comments\": \"#697d8b\"   // Make comments a bit brighter\n        }\n    },\n\n    // Extension Settings\n\n    // SmoothType\n    //\"smoothtype.duration\": 80,\n    //\"smoothtype.autoReload\": true,\n\n    // Java\n    \"java.errors.incompleteClasspath.severity\": \"ignore\",\n}\n```\n\nGo up to the `\"terminal.integrated.shell.xxxxxx\"` section and un-comment out the one for your system and \ncomment out the others. If you're a `zsh` person feel free to do that.\n\nReload the window again (`Ctrl+Shift+P`, \"Reload Window\", enter).\n\n## Using VS Code for Java\n\nLike I said, VS Code doesn't know what Java is unless you have that extension. So it won't have a \"Run Code\" button.\nYou have to run the code from the terminal. Here's how:\n\n1. Write your code\n2. Press `Ctrl` and the backtick character below escape to open the integrated terminal\n3. To compile your code, type:\n\n```bash\njavac Program.java\n```\n\n4. To run your code, type:\n\n```bash\njava Program\n```\n\nYou can put these together on the same line, too:\n\n```bash\njavac Program.java \u0026\u0026 java Program\n```\n\nIf you have more than one class/Java file, you can use\n\n```bash\njavac *.java \u0026\u0026 java MyMainClass\n```\n\nto compile all `.java` files at once.\n\nIf you are working on an assignment and you have a `src` and a `bin` folder and stuff, it's a bit more compicated:\n\n1. Open integrated terminal (Control + backtick)\n2. `cd src` to go into the `src` folder\n3. `javac *.java -d ../bin/` to compile files in there, outputting the result to the `bin` folder\n4. `cd ../bin` to go back to the main folder and then into `bin`\n5. `java MyMainClass` to run your program\n6. `cd ..` to return to your main project folder\n\nYou can probably also put those together (not tested):\n\n```bash\ncd src \u0026\u0026 javac *.java -d ../bin/ \u0026\u0026 cd ../bin \u0026\u0026 java MyMainClass \u0026 cd ..\n```\n\n## The Debugger\n\nTo use the debugger, go to the debug pane on the left, then click the little gear icon. Save the file that\nis auto-generated, and go back to your main file. In the debug pane, click the little green Play icon to start debugging.\n\nThis will launch your program in debug mode. Whenever you use Run or Debug from within VS Code, **BE WARNED!** You\nwon't be able to give your program any input (from the console).\n\nIn order to be able to step through your code one line at a time, you have to place a breakpoint. That's like a little\nflag that tells the debugger, \"Hey, pause here!\". To do that, click in the left-hand gutter of the editor (between the\nline numbers and the sidebar -- just to the left of the line numbers). You should get a little red bubble on the line\nyou want to set a breakpoint on. To clear it, just click it again.\n\nNow when you hit the play button and enter the debugger, it'll pause at that breakpoint and you can use the controls\nat the top to step through your program.\n\n- Resume does what you think it does\n- Step Over runs the current line and then goes to the next line, but if the current line is a function call it won't\nshow you inside the function. This is useful when you don't want to have to step through a billion lines in \nthe internals of java's libraries whenever you make a function call.\n- Step Into does the same thing but it does go into the function\n- IDK what Step Out does\n- Restart and Stop do what you think they do\n\nYou can also watch the left panes to see your variables update in real time as their values change.\n\n## Using Git\n\n**Make sure you've followed ola's instructions about SSH keys and stuff!**\n\nTo download a git repository to your computer, do:\n\n```bash\ngit clone [link goes here]\n```\n\n(you get the link from GitHub / GitLab where you say Clone and it has the link in a little text box. Copy paste that.)\n\nOpen the newly created folder in VS Code and do your work. To save it back up to GitHub/GitLab, do:\n\n```bash\ngit add .\ngit commit -m \"Short message describing what you did since the last time you pushed changes\"\ngit push\n```\n\nTo sync your local copy with the online copy by downloading any new changes, do:\n\n```bash\ngit pull\n```\n\nThe command `git status` is also useful (if a bit confusing).\n\n## Conclusion\n\nOk, you're ready to go. Make sure you go follow the rest of ola's instructions for Git SSH keys and stuff.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasilescur%2Fcompsci-201-setup-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasilescur%2Fcompsci-201-setup-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasilescur%2Fcompsci-201-setup-guide/lists"}