CS193: Tools is a Purdue University CS course designed to teach CS/DS/AI freshmen essential development tools such as UNIX shells, debugging tools, and Git.
You can find resources I used for demos in lectures while working as an instructor for two semesters. Future instructors are welcome to use this repository.
- Run
lecture2.sh
to initialize~/cs193-demos/lecture2/
folder ls && ls-al
,clear
cd c
(show the tab completion) andpwd
cd ..
,touch NewFile.java
,mv NewFile.java java/
cat ProjectVersionFinalFinalFinalActuallyFinal.java
mv ProjectVersionFinalFinalFinalActuallyFinal.java Pj.java
cat Pj.java
rm ProjectVersionOne.java
cd.. && rm -rf cpp
- Show
man vim
, locate--clean
option vim --clean
and demo Vim
- Run
lecture4.sh clean
to delete the demo folder - Run
lecture4.sh local
orlecture4.sh remote
to initializelocal
andremote
folders within~/cs193-lecture-demo/lecture4/
- Using
tmux
or two separate terminal windows, navigate tolocal
andremote
folder respectively - Demonstrate SFTP navigation commands (
lcd
,lls
,lpwd
) - Modify
code.c
in theremote
SFTP> get code.c
.cat
the downloaded contentSFTP> put -r folder_to_upload
scp -r <login>@remote.edu:./folder_to_download/ ./
- Open
VowelCount.java
in IntelliJ IDEA - Show
java: bad operand types for binary operator '=='
error and error highlighting - Set a breakpoint before the
countVowels
call, start the debugger - Show "step over" (line by line in the current method)
- Show "step into" (stepping into a method)
- Fix the issue by changing the string to all lowercase using
input = input.toLowerCase()
- Make a new GitHub repository. Show the message for
git init
command (just mention it) and clone the repository - Show that the cloned repository is a regular directory with
.git
folder usingls -la
command - Create a new file called
hello.py
. Make a new line - Show
git status
command git add . && git commit
- Show that the change is not available on the remote repository
- Add a new line to the file,
git add . && git commit -m "(message)"
git push
and show that the commits have been reflected on the remote repositorygit log && git revert <commit-id>
git push
- Create a new repository
- Create a new file called
hello.c
and add the following content:
#include <stdio.h>
int main() {
printf("Hello CS193 students!");
return 0;
}
- Change the line 4 (print statement) to something like "Nice to meet you..."
- Make a commit in the local repository. It's a good time to review "add - commit" workflow. Do NOT push
- In GitHub web interface, change the line 4 to something else (e.g. "I'm an evil coworker")
git status
->git pull
- Show merge conflict, fix it, commit, and push