The objective of this activity is to improve your ability to write code by flow charting normal day to day tasks as algorithms. It's an activity that's meant to be repeated to allow for learning new insights.
Oftentimes, when we think of activities and tasks in a series of steps, we load a lot of assumptions into each step. To learn to think programmatically, we need to learn to think of tasks as smaller micro steps - dive into the assumed functions and variables.
Along with helping learn to think more programmatically, this activity can also be used to get over mental blocks when struggling with actual coding.
All you need is something to draw, write, or design on
- Pick an activity or task that you do in real life. This could be anything from peeling carrots to changing oil to waking up to playing a sport or game. try to focus on a very specific task or subtask
- Quickly jot out the steps as you experience them don't overthink this step, it should flow naturally
- an ordered or unordered list is recommended
- Pick any of the steps to break it down into smaller pieces. Identify the following:
- Return: What is the outcome of this activity (output/result)
- Variables: Basically any person, places, or things (nouns)
- Properties: Attributes of Variables that are relevant to the activity
- Functions: Any type of action (verbs)
- Main Step Create a flowchart for the step(s) that documents the minor tasks, decisions, and repeated actions
- visualize the task as if nothing can be done automatically or by impulse
- if you can't do anything else, do this step
- Note when the following things happen:
- Loop: Something is repeated until a condition is met (repetition)
- Conditional: A decision needs to be made between 2 or more options (choices)
- Reassignment: A property or value of a variable (noun) or function (verb) is changed
- Input: Does the output of an action (verb/function) depend on some kind of input? if so, what?
- Output: what is the outcome or end result of the activity/task (what is the return statement)
After completing this activity, you'll have a flowchart either sketched out by hand, a list in a document, or with design software.
Reflect on this and pay attention to steps that ended up being more complex than you originally thought. As you do this activity more often, you'll learn to see more and more details within each step (the things that we take for granted) - This is the essence of algorithmic thinking
Try converting your algorithim into a programming language with this activity (uses js examples but any language could be used)
Here is a minimal example of the different steps of this activity
TODO: Add an overview of a task
TODO: Add list form flowchart of the task
TODO: Add an image of a flowchart