finished flowcharts ver.1 lecture

This commit is contained in:
james ryan 2024-08-08 22:55:05 -04:00
commit a02e43836f
11 changed files with 618 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*out_*

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# Cooper Union CHESS CS Lectures
## James Ryan, Vaibhav Hariani. August 2024
These lectures are built with [mdslides](https://gitlab.com/da_doomer/markdown-slides).

Binary file not shown.

106
flowcharts/flowcharts.md Normal file
View File

@ -0,0 +1,106 @@
[comment]: # (THEME = black)
[comment]: # (CODE_THEME = base16/zenburn)
# Cooper CHESS CS: Flowcharts
August 2024
James Ryan, Vaibhav Hariani
[comment]: # (!!!)
## Brief Intro
Hi, we're two Class of 26 EE students, Vaibhav Hariani [vaibhav.hariani@cooper.edu]
\& James Ryan [james.ryan@cooper.edu].
Throughout the lecture, please do not be afraid to ask any questions!
[comment]: # (!!!)
## What even \*IS\* a flowchart, anyways? Why should I care? Who even are you people?
[comment]: # (|||)
![basically, this.](media/xkdc.png)
Note:
WE DONT CARE ABOUT SPECIFICS!!!
For now, just describe whats going on, theres a problem posed, and its being...
uh.. solved?
[comment]: # (|||)
Flowcharts let us take large, complex problems, and break them down into chunks.
In the context of computer science, we can use these to think about how to
implement our goals into code.
[comment]: # (|||)
## Ok, how do I start making one of these?
- Determine the problem
- Consider each factor involved
- What are the inputs?
- From that, consider the steps involved to process your input into an output,
from start to end.
[comment]: # (|||)
### Flowchart Operators: Terminal
<div style="font-size: .4em;">
(as according to ISO 5807.. your mileage may vary.....)
</div>
![term](media/ops/term.svg)<!-- .element: style="height:20vh; image-rendering: crisp-edges;" -->
The Terminal represents the *start* or *end* of a flowchart, and is usually
labeled as such, either explicitly or implicitly (eg. "receive signal")
[comment]: # (|||)
### Flowchart Operators: Process
![term](media/ops/proc.svg)<!-- .element: style="height:20vh; image-rendering: crisp-edges;" -->
The Process represents a (group of) operation(s) which *changes* our information
in some way.
[comment]: # (|||)
### Flowchart Operators: Decision
![term](media/ops/dec.svg)<!-- .element: style="height:20vh; image-rendering: crisp-edges;" -->
The Decision operator changes our flow based on the *condition* set inside of
the operator.
[comment]: # (|||)
### Flowchart Operators: I/O
![term](media/ops/io.svg)<!-- .element: style="height:20vh; image-rendering: crisp-edges;" -->
The I/O (in/out) operator represents either the input or output of information
into our workflow.
[comment]: # (!!!)
## Another Look
![basically, this.](media/xkdc.png)
Note:
Walk through step by step and outline how we see each block being used.
Comment how XKCD ignores ISO 5807 with the start blocks and io
However, CLARITY is the most important part. Despite not using standards,
we can tell whats going on lol
[comment]: # (|||)
### Your turn:
Consider you're at home, and need to decide to go grocery shopping or not.
What do you need in order to get that done? (eg, do i have time?) Can you do it?
Make a flowchart to figure that out.
Get into groups, or do it yourself, up to you. Good luck!
[comment]: # (!!!)

8
flowcharts/make.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if ! [ $# -eq 1 ]; then
echo -e "usage: $0 <presentation.md>\n\nmake sure media is in ./media!" | cowsay -n
exit 1
fi
mdslides $1 --include media --output_dir out_$1
firefox ./out_$1/index.html

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="320"
height="240"
id="svg2"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="Flowchart Decision.svg">
<title
id="title2985">Flowchart Decision</title>
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.76"
inkscape:cx="205.44407"
inkscape:cy="146.88238"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-center="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
originx="635px"
originy="-1270px" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title>Flowchart Decision</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Devin Cook</dc:title>
</cc:Agent>
</dc:creator>
<dc:publisher>
<cc:Agent>
<dc:title>IBM</dc:title>
</cc:Agent>
</dc:publisher>
<dc:source>IBM. (1970). Flowcharting Techniques, Publication: C20-8152-1 </dc:source>
<dc:description>The Decision Shape represents a Boolean structure.</dc:description>
<dc:date>2015-05-08</dc:date>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(635,457.63782)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m -475,-217.63782 160,-120 -160,-120 -160,120 z"
id="rect2987-1-7-4-1-7-8-7-1-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m -625.0625,-337.625 c 50.02083,37.52083 100.04167,75.04167 150.0625,112.5625 50.02083,-37.52083 100.04167,-75.04167 150.0625,-112.5625 -50.02083,-37.52083 -100.04167,-75.04167 -150.0625,-112.5625 -50.02083,37.52083 -100.04167,75.04167 -150.0625,112.5625 z"
id="rect2987-1-7-4-1-7-8-7-1-7-1"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="320"
height="160"
id="svg2"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="Flowchart IO.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.6901514"
inkscape:cx="203.5222"
inkscape:cy="94.191813"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-center="true"
inkscape:bbox-nodes="true"
inkscape:snap-nodes="true">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
originx="635px"
originy="-1310px" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title>Flowchart IO</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Devin Cook</dc:title>
</cc:Agent>
</dc:creator>
<dc:publisher>
<cc:Agent>
<dc:title>IBM</dc:title>
</cc:Agent>
</dc:publisher>
<dc:source>IBM. (1970). Flowcharting Techniques, Publication: C20-8152-1 </dc:source>
<dc:description>The IO Shape represents data being sent either into or out from the system.</dc:description>
<dc:date>2015-05-08</dc:date>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(635,417.63782)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="m -575,-417.63782 260,0 -60,160 -260,0 z"
id="rect2990-17"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m -626.375,-262.63782 c 82.41667,0 164.83333,0 247.25,0 18.5,-50 37,-100 55.5,-150 -82.41667,0 -164.83333,0 -247.25,0 -18.5,50 -37,100 -55.5,150 z"
id="rect2990-17-1"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="320"
height="60"
id="svg2"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="Flowchart Line.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.56"
inkscape:cx="218.86924"
inkscape:cy="19.403749"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-center="true"
inkscape:bbox-nodes="false"
inkscape:snap-nodes="true"
inkscape:snap-bbox-edge-midpoints="false"
inkscape:bbox-paths="true">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
originx="635px"
originy="-1395px" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title></dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Devin Cook</dc:title>
</cc:Agent>
</dc:creator>
<dc:publisher>
<cc:Agent>
<dc:title>IBM</dc:title>
</cc:Agent>
</dc:publisher>
<dc:source>IBM. (1970). Flowcharting Techniques, Publication: C20-8152-1 </dc:source>
<dc:description>Lines are used to show flow between shapes.</dc:description>
<dc:date>2015-05-08</dc:date>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(635,402.63782)">
<rect
style="fill:#000000;fill-opacity:1;stroke:none"
id="rect2988"
width="295"
height="5"
x="-635"
y="-375.13782" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path2990"
d="m -345,-402.63782 30,30 -30,30 z"
style="fill:#000000;fill-opacity:1;stroke:none" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="320"
height="160"
id="svg2"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="Flowchart Process.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.03"
inkscape:cx="72.305757"
inkscape:cy="83.888411"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-center="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
originx="275px"
originy="-1310px" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title>Flowchart Process</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Devin Cook</dc:title>
</cc:Agent>
</dc:creator>
<dc:publisher>
<cc:Agent>
<dc:title>IBM</dc:title>
</cc:Agent>
</dc:publisher>
<dc:source>IBM. (1970). Flowcharting Techniques, Publication: C20-8152-1 </dc:source>
<dc:description>The Process Shape represents something computed, analyzed, etc...</dc:description>
<dc:date>2015-05-08</dc:date>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(275,417.63782)">
<rect
style="fill:#000000;fill-opacity:1;stroke:none"
id="rect2990"
width="320"
height="160"
x="-275"
y="-417.63782" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none"
id="rect2990-1"
width="310"
height="150"
x="-270"
y="-412.63782" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="320"
height="160"
id="svg2"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="Flowchart Terminal.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.51"
inkscape:cx="185.83107"
inkscape:cy="83.888408"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-center="true"
inkscape:bbox-nodes="true"
inkscape:snap-nodes="false">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
originx="635px"
originy="-1310px" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title>Flowchart Terminal</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Devin Cook</dc:title>
</cc:Agent>
</dc:creator>
<dc:publisher>
<cc:Agent>
<dc:title>IBM</dc:title>
</cc:Agent>
</dc:publisher>
<dc:source>IBM. (1970). Flowcharting Techniques, Publication: C20-8152-1 </dc:source>
<dc:description>The Terminal Shape denotes the start and end of a program.</dc:description>
<dc:date>2015-05-08</dc:date>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(635,417.63782)">
<path
style="fill:#000000;fill-opacity:1;stroke:none"
d="M 80,0 C 35.81722,0 0,35.81722 0,80 c 0,44.18278 35.81722,80 80,80 l 160,0 c 44.18278,0 80,-35.81722 80,-80 C 320,35.81722 284.18278,0 240,0 L 80,0 z"
transform="translate(-635,-417.63782)"
id="rect2990-7"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="M 80 5 C 38.57864 5 5 38.57864 5 80 C 5 121.42136 38.57864 155 80 155 L 240 155 C 281.42136 155 315 121.42136 315 80 C 315 38.57864 281.42136 5 240 5 L 80 5 z "
transform="translate(-635,-417.63782)"
id="path2985" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
flowcharts/media/xkdc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB