Skip to content

Commit e9b734f

Browse files
committed
source commit: e79d418
0 parents  commit e9b734f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1394
-0
lines changed

Diff for: 2023-11-20_tolkien_counts.xlsx

10 KB
Binary file not shown.

Diff for: 2024-05-20_comp-think-open-version.pptx

601 KB
Binary file not shown.

Diff for: 2024-05-31_script-for-teaching-comp-thinking.pdf

320 KB
Binary file not shown.

Diff for: AUTHORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- [Belinda Weaver](https://github.com/weaverbel), Griffith University Library

Diff for: CODE_OF_CONDUCT.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Contributor Code of Conduct"
3+
---
4+
5+
As contributors and maintainers of this project,
6+
we pledge to follow the [The Carpentries Code of Conduct][coc].
7+
8+
Instances of abusive, harassing, or otherwise unacceptable behavior
9+
may be reported by following our [reporting guidelines][coc-reporting].
10+
11+
12+
[coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html
13+
[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html

Diff for: LICENSE.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Licenses"
3+
---
4+
5+
## Instructional Material
6+
7+
All Carpentries (Software Carpentry, Data Carpentry, and Library Carpentry)
8+
instructional material is made available under the [Creative Commons
9+
Attribution license][cc-by-human]. The following is a human-readable summary of
10+
(and not a substitute for) the [full legal text of the CC BY 4.0
11+
license][cc-by-legal].
12+
13+
You are free:
14+
15+
- to **Share**---copy and redistribute the material in any medium or format
16+
- to **Adapt**---remix, transform, and build upon the material
17+
18+
for any purpose, even commercially.
19+
20+
The licensor cannot revoke these freedoms as long as you follow the license
21+
terms.
22+
23+
Under the following terms:
24+
25+
- **Attribution**---You must give appropriate credit (mentioning that your work
26+
is derived from work that is Copyright (c) The Carpentries and, where
27+
practical, linking to <https://carpentries.org/>), provide a [link to the
28+
license][cc-by-human], and indicate if changes were made. You may do so in
29+
any reasonable manner, but not in any way that suggests the licensor endorses
30+
you or your use.
31+
32+
- **No additional restrictions**---You may not apply legal terms or
33+
technological measures that legally restrict others from doing anything the
34+
license permits. With the understanding that:
35+
36+
Notices:
37+
38+
* You do not have to comply with the license for elements of the material in
39+
the public domain or where your use is permitted by an applicable exception
40+
or limitation.
41+
* No warranties are given. The license may not give you all of the permissions
42+
necessary for your intended use. For example, other rights such as publicity,
43+
privacy, or moral rights may limit how you use the material.
44+
45+
## Software
46+
47+
Except where otherwise noted, the example programs and other software provided
48+
by The Carpentries are made available under the [OSI][osi]-approved [MIT
49+
license][mit-license].
50+
51+
Permission is hereby granted, free of charge, to any person obtaining a copy of
52+
this software and associated documentation files (the "Software"), to deal in
53+
the Software without restriction, including without limitation the rights to
54+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
55+
of the Software, and to permit persons to whom the Software is furnished to do
56+
so, subject to the following conditions:
57+
58+
The above copyright notice and this permission notice shall be included in all
59+
copies or substantial portions of the Software.
60+
61+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
67+
SOFTWARE.
68+
69+
## Trademark
70+
71+
"The Carpentries", "Software Carpentry", "Data Carpentry", and "Library
72+
Carpentry" and their respective logos are registered trademarks of [Community
73+
Initiatives][ci].
74+
75+
[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
76+
[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
77+
[mit-license]: https://opensource.org/licenses/mit-license.html
78+
[ci]: https://communityin.org/
79+
[osi]: https://opensource.org

Diff for: computation_practice.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Computational thinking in practice
3+
teaching: 20
4+
exercises: 10
5+
---
6+
7+
::::::::::::::::::::::::::::::::::::::: objectives
8+
9+
- Understand the difference between programming and computational thinking
10+
- Recognize how computational thinking is applied in everyday life
11+
- Learn the steps of computational thinking such as problem breakdown, pattern recognition, and developing algorithms
12+
13+
::::::::::::::::::::::::::::::::::::::::::::::::::
14+
15+
:::::::::::::::::::::::::::::::::::::::: questions
16+
17+
- What is the difference between programming and computational thinking?
18+
- How is computational thinking used in daily life?
19+
- What are the steps involved in computational thinking?
20+
- How can structure diagrams help in breaking down problems?
21+
22+
::::::::::::::::::::::::::::::::::::::::::::::::::
23+
24+
25+
While thinking computationally is a prerequisite for programming, programming and computational thinking are not the same thing.
26+
27+
| **Programming** | &nbsp; | **Computational thinking** |
28+
| :---: | :---: | :---: |
29+
| instructs a computer to carry out a sequence of steps in a particular order. | &nbsp; | is the process that helps decide what those steps will be, i.e. what the computer will be told to do. |
30+
31+
------
32+
33+
Computers are precise, and computing instructions must be clear and unambiguous, as the computer cannot think - it can only follow orders. Unlike humans, computers do not get bored or distracted, they process data very quickly, and will carry out the same tedious, repetitive tasks over and over again without making mistakes.
34+
35+
![The computational thinking process in action](fig/proc-diagram.png){alt="Computational thinking at work" width="100%"}
36+
37+
#### Computational thinking in our daily lives
38+
39+
Subconsciously, we practise computational thinking every day of our lives.
40+
41+
::::::::::::::::::::::::::::::::::::::::::: testimonial
42+
43+
“Computational thinking describes the mental activity in formulating a problem to admit a computational solution. The solution can be carried out by a human or machine.”
44+
45+
— Jeannette Wing
46+
47+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
48+
49+
Every time we need to plan to do something, we use some of the steps of computational thinking such as problem breakdown, pattern recognition and developing algorithms.
50+
51+
- Project managers use computational thinking to plan complex activities such as building a tunnel or revamping a playground.
52+
53+
- Epidemiologists use it to identify patterns that help predict how a disease outbreak will spread.
54+
55+
- Parents use it to juggle work, parenting, community responsibilities and housework.
56+
57+
- Lost hikers can use it to try to find their way out of the forest.
58+
59+
#### Breaking problems down with structure diagrams
60+
61+
When trying to solve problems, it is essential to break them down into their constituent parts. Pasting sticky notes on a wall is one way to visualise the necessary steps.
62+
63+
Structure diagrams also allow you to plan problem breakdown visually. At the top should be the objective, and the steps underneath should start with high level considerations. These high level considerations can then be broken down into smaller and smaller steps.
64+
65+
In the hiking scenario, the group of four people have to try to solve the problem of being lost. This diagram is the very start of their thinking about their immediate needs.
66+
67+
![Basic Structure Diagram](fig/structure.png){alt="Structure diagram" width="100%"}
68+
69+
---------
70+
71+
:::challenge
72+
## Practice
73+
74+
Imagine that night is now falling fast, and our friends are still stuck in the forest. Add some more detail to the structure diagram to help them survive the night.
75+
:::
76+
77+
:::::::::::::::::::::::::::::::::::::::: keypoints
78+
79+
- Computational thinking involves breaking down problems, recognizing patterns, and developing algorithms.
80+
- While programming is instructing a computer to carry out tasks, computational thinking helps decide what those tasks will be.
81+
- Computational thinking is used in various fields, from project management to epidemiology, and even in daily tasks.
82+
- Structure diagrams are useful tools for visually breaking down and planning problem-solving steps.
83+
84+
::::::::::::::::::::::::::::::::::::::::::::::::::
85+

Diff for: computation_programming.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Computational thinking in programming
3+
teaching: 30
4+
exercises: 10
5+
---
6+
7+
::::::::::::::::::::::::::::::::::::::: objectives
8+
9+
- Understand the importance of decomposition in programming
10+
- Learn how to break down a problem into discrete parts for programming
11+
- Recognize the difference between linear and branching code
12+
- Apply pattern recognition to adapt existing code for new problems
13+
14+
::::::::::::::::::::::::::::::::::::::::::::::::::
15+
16+
:::::::::::::::::::::::::::::::::::::::: questions
17+
18+
- Why is decomposition crucial in programming?
19+
- How can we break down a problem like counting words in a text?
20+
- What is the difference between linear and branching code?
21+
- How can pattern recognition help in programming?
22+
23+
::::::::::::::::::::::::::::::::::::::::::::::::::
24+
25+
*Decomposition* is crucial in any kind of problem breakdown, but especially so in programming. The computer must be told **precisely** what to do, and in what order, so problems must be broken down into discrete parts and each section coded appropriately.
26+
27+
Suppose we want to find the ten words most commonly used in a text. How might we go about that?
28+
29+
#### Linear code
30+
31+
While there are many different ways to do this task, this is one way, where all the commands are run in a linear sequence, e.g.,
32+
33+
![Counting words in a text](fig/count-words.png){alt="counting words in a text" width="60%"}
34+
35+
First we save the file in `.txt` format to eliminate all the "smart" formatting created by programs like Word (as they would otherwise introduce a messy bunch of extraneous characters). Then we progressively eliminate everything from the text that is not a word, i.e. punctuation.
36+
37+
Converting all the words to lower case means we end up with a single version of each word - not two. This is important because, to a computer, `Word` (starting with an upper case letter) does not equal `word` (starting with a lower case letter) - it treats them as two separate entities.
38+
39+
By replacing spaces with `new line` characters, each word will end up on its own line, which makes them easy to sort alphabetically and then count.
40+
41+
Each part of the sequence would need to be individually programmed. Fortunately, programmers can adapt code that others have already used to do similar tasks, such as code to identify letter, number or word frequency. Once you are coding, this is where the computational thinking skill of *pattern recognition* comes in - identifying similar code that can be used for or adapted to the specific problem you want to solve.
42+
43+
--------
44+
45+
#### Branching code
46+
47+
Programming rarely works in such a linear fashion. Code generally includes branching so that different pathways can be taken, depending on whether or not certain conditions are met, e.g., different responses to a `Yes/No` or `True/False` decision, as in the example here.
48+
49+
![Branching code](fig/workflow.png){alt="Branching code" width="90%"}
50+
51+
----------------
52+
53+
:::challenge
54+
## Hiking Preparation Strategy
55+
56+
Our friends have finally made it out of the forest and back to civilisation. Their experience, while unpleasant, has not put them off hiking. Draw a structure diagram of the planning they need to do for next time to avert another disaster.
57+
:::
58+
59+
:::::::::::::::::::::::::::::::::::::::: keypoints
60+
61+
- Decomposition is essential for breaking down problems into discrete parts in programming.
62+
- Computers require precise instructions, and problems must be broken down accordingly.
63+
- Linear code runs commands in a sequence, while branching code allows for different pathways based on conditions.
64+
- Pattern recognition helps programmers adapt existing code for new problems.
65+
66+
::::::::::::::::::::::::::::::::::::::::::::::::::

Diff for: config.yaml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#------------------------------------------------------------
2+
# Values for this lesson.
3+
#------------------------------------------------------------
4+
5+
# Which carpentry is this (swc, dc, lc, or cp)?
6+
# swc: Software Carpentry
7+
# dc: Data Carpentry
8+
# lc: Library Carpentry
9+
# cp: Carpentries (to use for instructor training for instance)
10+
# incubator: The Carpentries Incubator
11+
carpentry: 'lc'
12+
13+
# Overall title for pages.
14+
title: 'Introducing Computational Thinking'
15+
16+
# Date the lesson was created (YYYY-MM-DD, this is empty by default)
17+
created: "2022-08-12"
18+
19+
# Comma-separated list of keywords for the lesson
20+
keywords: 'software, data, lesson, The Carpentries'
21+
22+
# Life cycle stage of the lesson
23+
# possible values: pre-alpha, alpha, beta, stable
24+
life_cycle: 'alpha'
25+
26+
# License of the lesson materials (recommended CC-BY 4.0)
27+
license: 'CC-BY 4.0'
28+
29+
# Link to the source repository for this lesson
30+
source: 'https://github.com/LibraryCarpentry/lc-computational-thinking/'
31+
32+
# Default branch of your lesson
33+
branch: 'main'
34+
35+
# Who to contact if there are any issues
36+
37+
38+
# Navigation ------------------------------------------------
39+
#
40+
# Use the following menu items to specify the order of
41+
# individual pages in each dropdown section. Leave blank to
42+
# include all pages in the folder.
43+
#
44+
# Example -------------
45+
#
46+
# episodes:
47+
# - introduction.md
48+
# - first-steps.md
49+
#
50+
# learners:
51+
# - setup.md
52+
#
53+
# instructors:
54+
# - instructor-notes.md
55+
#
56+
# profiles:
57+
# - one-learner.md
58+
# - another-learner.md
59+
60+
# Order of episodes in your lesson
61+
episodes:
62+
- intro.md
63+
- exercise.md
64+
- computation_practice.md
65+
- computation_programming.md
66+
- pseudocode.md
67+
- solutions.Rmd
68+
69+
70+
# Information for Learners
71+
learners:
72+
73+
# Information for Instructors
74+
instructors:
75+
76+
# Learner Profiles
77+
profiles:
78+
79+
# Customisation ---------------------------------------------
80+
#
81+
# This space below is where custom yaml items (e.g. pinning
82+
# sandpaper and varnish versions) should live
83+
84+
url: 'https://library-carpentry.org/lc-computational-thinking'
85+
analytics: carpentries
86+
lang: en
87+
88+
89+

0 commit comments

Comments
 (0)