Unit 0 - Orientation
0.0. Welcome to the Class
- Intro to course - classroom, my schedule, website
- Computer Programming vs Computer Science: This course favors CS
- Expectations:
- You have a computer that works and is charged.
- You know how to look at error messages and diagnose typos in your programs: typos are not bugs.
- You have a notebook for this class that you write in.
- The material in this class will get challenging, but a combination of technical ability, creativity, good attitude, and perseverance can unlock almost anything!
0.1. Activities
- Install Miniconda
- Install VS Code
- Your computer's filesystem is well-organized?
- Facility with Terminal commands (below)
- hello_world_personal.py
- Worksheets
- Student Info form
- Reading in our online textbook, Problem Solving with Algorithms and Data Structures using Python, by Bradley N. Miller and David L. Ranum
0.2. Interacting with a POSIX terminal
- Common terminal addresses
~
→ shortcut to the user's home directory-
.
→ the current directory -
..
→ the next higher ("parent") directory -
/
→ the root directory, which contains all other files and directories
- Common shell commands:
pwd
ls path/to/directory
cd directory
mkdir directoryname
cp source destination
mv source destination
rm path/to/filename
cat path/to/filename
less (f, b, /, n, gg, G, q)
ssh userid@servername
scp source destination
man command
nano filename
0.3. Interacting with the course server
The two most common things people do with the course server in here are:
- Log in to the server using ssh
Note the lowercase p in this command.$ ssh -p 1030 username@crashwhite.polytechnic.org username@crashwhite.polytechnic.org's password: Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-74-generic x86_64) 23 packages can be updated. 0 updates are security updates. Last login: Fri Jan 17 10:20:29 2020 from 10.30.238.111 ________________________________________ / Mr. White, you are an evil, evil, man. \ \ - M. Greenwell / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || username@crashwhite:~$
While on the server you can use the shell to run programs, work on programs, etc.
When done, press ctrl-d to exit the server:
username@crashwhite:~$ logout Connection to crashwhite.polytechnic.org closed.
- Upload work from their own computer onto the server
Note the uppercase P in this command.$ scp -P 1030 sourcefile username@crashwhite.polytechnic.org:~/forInstructor/