1940 |
2022 |
Computational thinking is breaking down a problem and formulating a solution in a way that both human and computer can understand and execute.
Source: Wing (2006)
Finite list of well-defined instructions that take input and produce output.
Consists of a sequence of simple steps that start from input, follow some control flow and have a stopping rule.
Formal language used to define sequences of instructions (for computers to execute) that includes:
3.5
[1] 3.5
"cat"
[1] "cat"
3.5 + 2
[1] 5.5
3.5 + 2
[1] 5.5
3.5 2 +
Error in parse(text = x, srcfile = src): <text>:1:5: unexpected numeric constant 1: 3.5 2 ^ Traceback:
"cat" + 3.5
Error in "cat" + 3.5: non-numeric argument to binary operator Traceback:
Grace Murray Hopper popularised the term bug after in 1947 her team traced an error in the Mark II to a moth trapped in a relay.
print()
statement to check the state between proceduresExtra: Five reasons why researchers should learn to love the command line
Microsoft PowerShell (Windows) |
Z shell, zsh (macOS) |
bash (Linux/UNIX) |
Command (Windows) | Command (macOS/Linux) | Description |
---|---|---|
exit |
exit |
close the window |
cd |
cd |
change directory |
cd |
pwd |
show current directory |
dir |
ls |
list directories/files |
copy |
cp |
copy file |
move |
mv |
move/rename file |
mkdir |
mkdir |
create a new directory |
del |
rm |
delete a file |
Extra: Introduction to CLI
Command | Description |
---|---|
git init <project name> |
Create a new local repository |
git clone <project url> |
Download a project from remote repository |
git status |
Check project status |
git diff <file> |
Show changes between working directory and staging area |
git add <file> |
Add a file to the staging area |
git commit -m “<commit message>” |
Create a new commit from changes added to the staging area |
git pull <remote> <branch> |
Fetch changes from remote and merge into merge |
git push <remote> <branch> |
Push local branch to remote repository |
Extra: Git Cheatsheet