10. Unix Philosophy In Practice#
10.1. Philosophy in practice, using pipes#
Last class we experimented with creating issues from the terminal with a command from the gh
CLI (Command Line Interface)
We also looked at the getassignment.yml
workflow and we noticed how badges get posted.
One thing we saw here was being able to write a script to automate a bunch of actions in our repo easily
But the main thing we noticed was being able to use two commands from two separate tools together at once to complete a job
Think of the line we saw
cspt getassignment --type practice | gh issue create --title $pratitle --label practice --body-file -
Here we saw a few key things:
It uses a pipe
|
to connect a commandcspt getassignment
to thegh issue create
command.the
gh issue create
command uses the--body-file
option with a value-
which means to use stdinbut since this is to the right of the pipe, it puts the output of the first command into this option
We know that this action is what is used to create badge issues, so this custom code must be what gets information from the course website to get the assignments and prepare them for your badge issues.
One of the Unix Philosophy ideas were to make sure the input and output of a program are text streams to make it easier to connect different programs with each other and make them work together
“Expect the output of every program to become the input to another, as yet unknown, program. Don’t clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don’t insist on interactive input”
10.1.1. Installing from source#
As we saw in the action, we can install python packages from source via git. let’s install the new version of the code
pip install git+https://github.com/compsys-progtools/courseutils@main
For those of you who are having issues with the environment externally managed environment
remember to run the virtual environment we talked about in lab
Attention
Do the following step outside of either one of your repos. A good place to run this command would be the Systems
folder or CSC311
folder. As long as its not inside either repo folders.
Create a Python virtual environment
python venv -m venv
Run the virtual environment
source venv/bin/activate
source venv/Scripts/activate
Collecting git+https://github.com/compsys-progtools/courseutils@main
Cloning https://github.com/compsys-progtools/courseutils (to revision main) to /private/var/folders/8g/px8bm7bj0_j31j71yh6mfd_r0000gn/T/pip-req-build-gicd88lk
Running command git clone --filter=blob:none --quiet https://github.com/compsys-progtools/courseutils /private/var/folders/8g/px8bm7bj0_j31j71yh6mfd_r0000gn/T/pip-req-build-gicd88lk
Resolved https://github.com/compsys-progtools/courseutils to commit 395ac8754c55a119ffa2b3670afabfe4ba082c9e
Preparing metadata (setup.py) ... done
Requirement already satisfied: Click in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (8.1.7)
Requirement already satisfied: pandas in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (2.2.2)
Requirement already satisfied: lxml in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (5.3.0)
Requirement already satisfied: pyyaml in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (6.0.2)
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (2.1.1)
Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (2.32.3)
Requirement already satisfied: html5lib in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from syscourseutils==1.0.6) (1.1)
Requirement already satisfied: six>=1.9 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from html5lib->syscourseutils==1.0.6) (1.16.0)
Requirement already satisfied: webencodings in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from html5lib->syscourseutils==1.0.6) (0.5.1)
Requirement already satisfied: python-dateutil>=2.8.2 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from pandas->syscourseutils==1.0.6) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from pandas->syscourseutils==1.0.6) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from pandas->syscourseutils==1.0.6) (2024.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from requests->syscourseutils==1.0.6) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from requests->syscourseutils==1.0.6) (3.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from requests->syscourseutils==1.0.6) (1.26.20)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from requests->syscourseutils==1.0.6) (2024.8.30)
Building wheels for collected packages: syscourseutils
Building wheel for syscourseutils (setup.py) ... done
Created wheel for syscourseutils: filename=syscourseutils-1.0.6-py3-none-any.whl size=21580 sha256=9efce13a5eae8a7fd0d6a14dc2123117be62ecd35a9d09115ea0daa10a29f200
Stored in directory: /private/var/folders/8g/px8bm7bj0_j31j71yh6mfd_r0000gn/T/pip-ephem-wheel-cache-6zv5pffq/wheels/74/14/ad/64dd25a774af520d19cd1f28a5e0d167ef58b12046c1fc7572
Successfully built syscourseutils
Installing collected packages: syscourseutils
Attempting uninstall: syscourseutils
Found existing installation: syscourseutils 1.0.6
Uninstalling syscourseutils-1.0.6:
Successfully uninstalled syscourseutils-1.0.6
Successfully installed syscourseutils-1.0.6
TO confirm it worked, we use its base command
cspt
Usage: cspt [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
badgecounts check if early bonus is met from output of `gh pr list...
combinecounts combine two yaml files by adding values
createtoyfiles from a yaml source file create a set of toy files with...
earlybonus check if early bonus is met from output of `gh pr list...
exportac export ac files for site from lesson
exporthandout export prismia version of the content
exportprismia export prismia version of the content
getassignment get the assignment text formatted
getbadgedate cli for calculate badge date
grade calculate a grade from yaml that had keys of...
issuestat
issuestatus generate script to appy course issue statuse updates
kwlcsv generate the activity file csv file for the site...
mkchecklist transform input file to a gh markdown checklist, if the...
parsedate process select non dates
prfixlist check json output for titles that will not be counted...
processexport transform output from mac terminal export to myst...
progressreport list PR titles from json or - to use std in that have...
titlecheck check a single title
Remember, this tool searches for the assignment information on the course website, so if the assignments weren’t posted yet we get an error message
Let’s try the one we saw in the action
cspt getassignment --type prepare
404: Not Found
With default settings, it says 404.
We know that it goes online. So, for example, if you turn your wifi off and then try it again, you will get a different error code.
To learn more about this, lets use the --help
option.
A lot of CLI tools have this option. In this program, that Prof. Sarah Brown made,
the Python library click that is used to make this, provides the help
option automatically to show the documentation or lets the developer add help text to options.
cspt getassignment --help
Usage: cspt getassignment [OPTIONS]
get the assignment text formatted
Options:
--type TEXT type can be {prepare, review, or practice}; default prepare
--date TEXT date should be YYYY-MM-DD of the tasks you want; default most
recently posted
--help Show this message and exit.
Now we can see that it can take some options.
If we do not provide a date, I can tell you (and I should add to the documentation), it uses today’s date and attempts to get the next class’ prepare info. Since we ran this on a day with class, before the badges were posted, the file it looked for did not exist, so we got 404.
We can use the options to get the last posted prepare work
cspt getassignment --type prepare --date 2025-02-25
- [ ] Think through and make some notes about what you have learned about design so far. Try to answer the questions below in `design_before.md`. If you do not now know how to answer any of the questions, write in what questions you have.
```
- What past experiences with making decisions about design of software do you have?
- what experiences studying design do you have?
- What processes, decisions, and practices come to mind when you think about designing software?
- From your experiences as a user, how you would describe the design of command line tools vs other GUI based tools?
```
And let’s take a look at the gh issue create
command options
gh issue create --help
Create an issue on GitHub.
Adding an issue to projects requires authorization with the `project` scope.
To authorize, run `gh auth refresh -s project`.
USAGE
gh issue create [flags]
ALIASES
gh issue new
FLAGS
-a, --assignee login Assign people by their login. Use "@me" to self-assign.
-b, --body string Supply a body. Will prompt for one otherwise.
-F, --body-file file Read body text from file (use "-" to read from standard input)
-e, --editor Skip prompts and open the text editor to write the title and body in. The first line is the title and the remaining text is the body.
-l, --label name Add labels by name
-m, --milestone name Add the issue to a milestone by name
-p, --project title Add the issue to projects by title
--recover string Recover input from a failed run of create
-T, --template file Template file to use as starting body text
-t, --title string Supply a title. Will prompt for one otherwise.
-w, --web Open the browser to create an issue
INHERITED FLAGS
--help Show help for command
-R, --repo [HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format
EXAMPLES
$ gh issue create --title "I found a bug" --body "Nothing works"
$ gh issue create --label "bug,help wanted"
$ gh issue create --label bug --label "help wanted"
$ gh issue create --assignee monalisa,hubot
$ gh issue create --project "Roadmap"
$ gh issue create --template "bug_report.md"
LEARN MORE
Use `gh <command> <subcommand> --help` for more information about a command.
Read the manual at https://cli.github.com/manual
Learn about exit codes using `gh help exit-codes`
And these are the options only related to creating an issue.
There are a lot more options one can do with a gh issue:
gh issue --help
Work with GitHub issues.
USAGE
gh issue <command> [flags]
GENERAL COMMANDS
create: Create a new issue
list: List issues in a repository
status: Show status of relevant issues
TARGETED COMMANDS
close: Close issue
comment: Add a comment to an issue
delete: Delete issue
develop: Manage linked branches for an issue
edit: Edit issues
lock: Lock issue conversation
pin: Pin a issue
reopen: Reopen issue
transfer: Transfer issue to another repository
unlock: Unlock issue conversation
unpin: Unpin a issue
view: View an issue
FLAGS
-R, --repo [HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format
INHERITED FLAGS
--help Show help for command
ARGUMENTS
An issue can be supplied as argument in any of the following formats:
- by number, e.g. "123"; or
- by URL, e.g. "https://github.com/OWNER/REPO/issues/123".
EXAMPLES
$ gh issue list
$ gh issue create --label bug
$ gh issue view 123 --web
LEARN MORE
Use 'gh <command> <subcommand> --help' for more information about a command.
Read the manual at https://cli.github.com/manual
Navigate to your inclass repos
gh issue list
``consol no open issues in compsys-progtools/gh-inclass-AymanBx
+++{"lesson_part": "main"}
### Interactive Design
+++{"lesson_part": "main"}
We saw that if we just run the command without any options we get the interactive issue design
```bash
gh issue create
Creating issue in compsys-progtools/compsys-progtools-fa24-fall24-kwl-template
? Title test
? Body <Received>
? What's next? Submit
https://github.com/compsys-progtools/gh-inclass-AymanBx/issues/4
Notice that when you get to the body of the issue, if you’re a windows user, gh might prompt you to hit enter
to launch notepad
or possibly nano
. If you’re a macos/linux user gh will most likely prompt you to hit enter
to launch nano
.
Type the content of the issue body (issue description). and either save and exit with notepad
or ctrl + o
–> enter
–> ctrl + x
with nano.
Let’s see if we were successful
gh issue list
Showing 1 of 1 open issue in compsys-progtools/gh-inclass-AymanBx
#4 test less than a minute ago
gh issue #4 --web
Work with GitHub issues.
USAGE
gh issue <command> [flags]
GENERAL COMMANDS
create: Create a new issue
list: List issues in a repository
status: Show status of relevant issues
TARGETED COMMANDS
close: Close issue
comment: Add a comment to an issue
delete: Delete issue
develop: Manage linked branches for an issue
edit: Edit issues
lock: Lock issue conversation
pin: Pin a issue
reopen: Reopen issue
transfer: Transfer issue to another repository
unlock: Unlock issue conversation
unpin: Unpin a issue
view: View an issue
FLAGS
-R, --repo [HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format
INHERITED FLAGS
--help Show help for command
ARGUMENTS
An issue can be supplied as argument in any of the following formats:
- by number, e.g. "123"; or
- by URL, e.g. "https://github.com/OWNER/REPO/issues/123".
EXAMPLES
$ gh issue list
$ gh issue create --label bug
$ gh issue view 123 --web
LEARN MORE
Use 'gh <command> <subcommand> --help' for more information about a command.
Read the manual at https://cli.github.com/manual
I got the command wrong…
gh issue view #4 --web
accepts 1 arg(s), received 0
Also wrong, let’s try without the #
gh issue view 4 --web
Opening github.com/compsys-progtools/gh-inclass-AymanBx/issues/4 in your browser.
This shows us the issue on GitHub through the browser
What else can we do with the gh
tool?
gh issue -h
Work with GitHub issues.
USAGE
gh issue <command> [flags]
GENERAL COMMANDS
create: Create a new issue
list: List issues in a repository
status: Show status of relevant issues
TARGETED COMMANDS
close: Close issue
comment: Add a comment to an issue
delete: Delete issue
develop: Manage linked branches for an issue
edit: Edit issues
lock: Lock issue conversation
pin: Pin a issue
reopen: Reopen issue
transfer: Transfer issue to another repository
unlock: Unlock issue conversation
unpin: Unpin a issue
view: View an issue
FLAGS
-R, --repo [HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format
INHERITED FLAGS
--help Show help for command
ARGUMENTS
An issue can be supplied as argument in any of the following formats:
- by number, e.g. "123"; or
- by URL, e.g. "https://github.com/OWNER/REPO/issues/123".
EXAMPLES
$ gh issue list
$ gh issue create --label bug
$ gh issue view 123 --web
LEARN MORE
Use 'gh <command> <subcommand> --help' for more information about a command.
Read the manual at https://cli.github.com/manual
gh issue comment
accepts 1 arg(s), received 0
Forgot to give an issue number
gh issue comment 4
Once again, this opens a text editor whether it’s nano, vi or notepad. Fill out, save and exit
? Submit? Yes
https://github.com/compsys-progtools/gh-inclass-AymanBx/issues/4#issuecomment-2688714021
Let’s view the issue’s details
gh issue view 4
test #4
Open • AymanBx opened about 3 minutes ago • 1 comment
No description provided
AymanBx (Member) • 0m • Newest comment
This is a new comment
View this issue on GitHub: https://github.com/compsys-progtools/gh-inclass-AymanBx/issues/4
cspt getassignment --type practice --date 2025-02-25
- [ ] Read today's notes when they are posted. There are imporant tips and explanation to be sure you did and ideas for explore/build badges.
- [ ] Most real projects partly adhere and at least partly deviate from any major design philosophy or paradigm. Add a `## Unix Philosophy` section to your `software.md` about how that project adheres to and deviates from the unix philosophy. Be specific, using links to specific lines of code or specific sections in the documentation that support your claims. Provide at least one example of both adhering and deviating from the philosophy and three total examples (that is 2 examples for one side and one for the other). You can see what badge `software.md` was previously assigned in and the original instructions [on the KWL file list](https://compsys-progtools.github.io/spring2025/genindex.html).
10.2. Now with the pipe#
cspt getassignment --type practice --date 2025-02-25 | gh issue create --title "duplicate-practice" --body-file -
Creating issue in compsys-progtools/gh-inclass-AymanBx
https://github.com/compsys-progtools/gh-inclass-AymanBx/issues/5
gh issue list
Showing 2 of 2 open issues in compsys-progtools/gh-inclass-AymanBx
#5 duplicate-practice less than a minute ago
#4 test about 4 minutes ago
Let’s view the issue’s details
gh issue view 5
duplicate-practice #5
Open • AymanBx opened less than a minute ago • 0 comments
[ ] Read today's notes when they are posted. There are
imporant tips and explanation to be sure you did and
ideas for explore/build badges.
[ ] Most real projects partly adhere and at least
partly deviate from any major design philosophy or
paradigm. Add a ## Unix Philosophy section to your
software.md about how that project adheres to and
deviates from the unix philosophy. Be specific, using
links to specific lines of code or specific sections
in the documentation that support your claims. Provide
at least one example of both adhering and deviating
from the philosophy and three total examples (that is
2 examples for one side and one for the other). You
can see what badge software.md was previously
assigned in and the original instructions on the KWL
file list https://compsys-
progtools.github.io/spring2025/genindex.html.
View this issue on GitHub: https://github.com/compsys-progtools/gh-inclass-AymanBx/issues/5
gh issue view 5 --web
Opening github.com/compsys-progtools/gh-inclass-AymanBx/issues/5 in your browser.
gh issue close 5
✓ Closed issue #5 (duplicate-practice)
Since your repos are forks, they have two remotes, or upstream repositories, that you can pull from.
We can see with git remote
git remote
origin
upstream
it has a verbose
option with the -v
flag that shows more detail
git remote -v
origin https://github.com/compsys-progtools/spring25-kwl-AymanBx.git (fetch)
origin https://github.com/compsys-progtools/spring25-kwl-AymanBx.git (push)
upstream https://github.com/compsys-progtools/compsys-progtools-sp25-spring25-kwl-kwl-template (fetch)
upstream https://github.com/compsys-progtools/compsys-progtools-sp25-spring25-kwl-kwl-template (push)
We can change which of those is a default
gh repo set-default origin
expected the "[HOST/]OWNER/REPO" format, got "origin"
I forgot the format and tried to use the short name, origin
when gh
requires it tobe in owner/repo
format, but this error is informative, so we know what to do:
Important
Do this step!! It will fix some of your errors
gh repo set-default compsys-progtools/spring25-kwl-AymanBx
✓ Set compsys-progtools/spring25-kwl-AymanBx as the default repository for the current directory
Now, let’s do more work on the inclass repo
Navigate to inclass repo
cat README.md
# Practice
My name is Ayman
age = 27
|file | contents |
> | --| -- |
> | abstract_base_class.py | core abstract classes for the project |
> | helper_functions.py | utitly funtions that are called by many classes |
> | important_classes.py | classes that inherit from the abc |
> | alternative_classes.py | classes that inherit from the abc |
> | LICENSE.md | the info on how the code can be reused|
> | CONTRIBUTING.md | instructions for how people can contribute to the project|
> | setup.py | file with function with instructions for pip |
> | test_abc.py | tests for constructors and methods in abstract_base_class.py|
> | tests_helpers.py | tests for constructors and methods in helper_functions.py|
> | tests_imp.py | tests for constructors and methods in important_classes.py|
> | tests_alt.py | tests for constructors and methods in alternative_classes.py|
> | API.md | jupyterbook file to generate api documentation |
> | _config.yml | jupyterbook config for documentation |
> | _toc.yml | jupyter book toc file for documentation |
> | philosophy.md | overview of how the code is organized for docs |
> | example.md | myst notebook example of using the code |
> | scratch.ipynb | jupyter notebook from dev |
When I copied the content that I wanted to add to the README file the arrows from my terminal got copied as well, ruining the table in markdown syntax we were trying to create
Let’s try to fix this with codespace
gh remote view --web
unknown command "remote" for "gh"
Usage: gh <command> <subcommand> [flags]
Available commands:
alias
api
auth
browse
cache
classroom
co
codespace
completion
config
extension
gist
gpg-key
issue
label
org
pr
project
release
repo
ruleset
run
search
secret
ssh-key
status
variable
workflow
The correct command is repo
not remote
gh repo view --web
Opening github.com/compsys-progtools/gh-inclass-AymanBx in your browser.
We don’t see any of the changes we had made to this repo organizing the files
Let’s try switching to the Organization
branch
Ooh! There isn’t an Organization
branch!!
Let’s check what’s going on locally…
git status
On branch organization
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: tests_alt.py
deleted: tests_helpers.py
deleted: tests_imp.py
deleted: tsets_abc.py
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
tests/
no changes added to commit (use "git add" and/or "git commit -a")
Hmmm, No mentions on whether this branch is up to date with an online branch, aheah or behind…
That’s becuase we created this branch locally and we’ve been working locally all this time but we never pushed this branch or the changes made to it online
git push
fatal: The current branch test has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin Organization
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
This message is basically telling me, in order to push changes to GitHub, you must have a branch on GitHub (preferrably with the same name) to track the changes that occur to your local branch. It gives us a hint on how to do so…
git push -u origin organization
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 12 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 1.41 KiB | 1.41 MiB/s, done.
Total 9 (delta 3), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (3/3), completed with 1 local object.
remote:
remote: Create a pull request for 'organization' on GitHub by visiting:
remote: https://github.com/compsys-progtools/gh-inclass-AymanBx/pull/new/organization
remote:
To https://github.com/compsys-progtools/gh-inclass-AymanBx
* [new branch] organization -> organization
branch 'organization' set up to track 'origin/organization'.
Now, let’s work on GitHub Codespace
Codespaces are a virutal machine that you can use VSCode on in browser. You only have VSCode access to this system, but VSCode with the terminal is a lot of power.
If VSCode is new to you, use their documentation of the VSCode interface to get oriented to the different parts of the screen.
today we will also work in github codespaces.
Navigate to your github inclass repo on Github.com
Use the link in the README or the green code button to open a new codespace on main.
when your codespace is open, share its name (first part of the url 2 words)
a codespace is a virutal machine on a cloud platform, not cloud access to github.com
what might that mean about how we use it?
you need to commit changes
codespace is linux
this is why we learn bash in this class
as developers, we will all interact with linux/unix at times, so bash is the best shell to know if you only know one or do not want to switch between multiple
Multiple cursors are your friend
Let’s use multiple cursors to remove the unnecssary >
and extra line in our READMEs
Remember to add
, commit
and push
Codespace is a virtual machine, any work you do on it will need the same process that you would do on the personal device.
if your push gets rejected, read the hints, it probably has the answer.
10.3. Hack the course#
build and explore ideas
Develop new command line tools, github actions, VS Code (or other IDE) extensions, visual aids, etc. that help future students in the course. This is a way for you to demonstrate your learning and contribute to open source repos that you can then link to on a portfolio website or resume
You can participate in this at different levels (or multiple):
build: writing, documenting at the API level, and configuring major pieces (can be collaborative)
explore: writing example/tutorial style docs that another student (or team) build (mostly solo; open to justification for collab)
explore: adding summary/visuals to the notes
community: (test option): testing other students contributions and making descriptive issues or writing short reviews (~3-5 sentenccs); must not be spammy
community: (review option): reviewing PRs submitted by a classmate (can be within a collaborative build, but must be not your own code) a single PR can have multiple reivews if sensible and not duplicative; no spam
community: (contribution) add a glossary term to this site
see the bonus table for more information
10.4. Recap#
Why do I need a terminal
replication/automation
it’s always there and doesn’t change
it’s faster when you know it
So, the shell the feature that interacts with the operating system and then the terminal is the gui that interacts with the shell
10.5. Why do we need this for computer systems?#
10.5.1. Computer Systems are designed by people#
Computer Science is not a natural science like biology or physics where we try to understand some aspect of the world that we live in. Computer Science as a discipline, like algorithms, mostly derives from Math.
So, when we study computer science, while parts of it are limited by physics, most of it is essentially an imaginary world that is made by people. Understanding how people think, both generally, and common patterns within the community of programmers understand how things work and why they are the way they are. The why can also make it easier to remember, or, it can help you know what things you can find alternatives for, or even where you might invent a whole new thing that is better in some way.
Of course, not all programmers think the same way, but when people spend time together and communicate, they start to share patterns in how they think. So, while you do not have to think the same way as these patterns, knowing what they are will help you reading code, and understanding things.
10.5.2. Context Matters#
This context of how things were developed can influence how we understand it. We will also talk about the history of computing as we go through different topics in class so that we can build that context up.
10.5.3. Optimal is relative#
The “best” way to do something is always relative to the context. “Best” is a vague term. It could be most computationally efficient theoretically, fastest to run on a particular type of hardware, or easiest for another programmer to read.
10.6. Prepare for Next Class#
If on windows, you may need to reinstall gitbash or follow other steps from the gh docs mintty page for the following steps to work locally
install jupyterbook this is different from
jupyter lab
orjupyter notebook
that 310 usesMake sure that the
gh
CLI tool works by using it to create an issue called test on your kwl repo withgh issue create
. If on Windows try reinstalling with minttyFind 3 examples of documentation for libraries, frameworks, or developer tools that you have used and make a post on the class discussion board
10.7. Experience Report Evidence#
10.8. Badges#
TBD
TBD