diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..844305f --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1 @@ +- [Belinda Weaver](https://github.com/weaverbel), Griffith University Library \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f19b804 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,13 @@ +--- +title: "Contributor Code of Conduct" +--- + +As contributors and maintainers of this project, +we pledge to follow the [The Carpentries Code of Conduct][coc]. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by following our [reporting guidelines][coc-reporting]. + + +[coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html +[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..7632871 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,79 @@ +--- +title: "Licenses" +--- + +## Instructional Material + +All Carpentries (Software Carpentry, Data Carpentry, and Library Carpentry) +instructional material is made available under the [Creative Commons +Attribution license][cc-by-human]. The following is a human-readable summary of +(and not a substitute for) the [full legal text of the CC BY 4.0 +license][cc-by-legal]. + +You are free: + +- to **Share**---copy and redistribute the material in any medium or format +- to **Adapt**---remix, transform, and build upon the material + +for any purpose, even commercially. + +The licensor cannot revoke these freedoms as long as you follow the license +terms. + +Under the following terms: + +- **Attribution**---You must give appropriate credit (mentioning that your work + is derived from work that is Copyright (c) The Carpentries and, where + practical, linking to ), provide a [link to the + license][cc-by-human], and indicate if changes were made. You may do so in + any reasonable manner, but not in any way that suggests the licensor endorses + you or your use. + +- **No additional restrictions**---You may not apply legal terms or + technological measures that legally restrict others from doing anything the + license permits. With the understanding that: + +Notices: + +* You do not have to comply with the license for elements of the material in + the public domain or where your use is permitted by an applicable exception + or limitation. +* No warranties are given. The license may not give you all of the permissions + necessary for your intended use. For example, other rights such as publicity, + privacy, or moral rights may limit how you use the material. + +## Software + +Except where otherwise noted, the example programs and other software provided +by The Carpentries are made available under the [OSI][osi]-approved [MIT +license][mit-license]. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +## Trademark + +"The Carpentries", "Software Carpentry", "Data Carpentry", and "Library +Carpentry" and their respective logos are registered trademarks of [Community +Initiatives][ci]. + +[cc-by-human]: https://creativecommons.org/licenses/by/4.0/ +[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode +[mit-license]: https://opensource.org/licenses/mit-license.html +[ci]: https://communityin.org/ +[osi]: https://opensource.org diff --git a/config.yaml b/config.yaml index bc5361d..bdb1ee1 100644 --- a/config.yaml +++ b/config.yaml @@ -8,13 +8,13 @@ # lc: Library Carpentry # cp: Carpentries (to use for instructor training for instance) # incubator: The Carpentries Incubator -carpentry: 'incubator' +carpentry: 'lc' # Overall title for pages. -title: 'Lesson Title' +title: 'Introducing Computational Thinking' # Date the lesson was created (YYYY-MM-DD, this is empty by default) -created: +created: "2022-08-12" # Comma-separated list of keywords for the lesson keywords: 'software, data, lesson, The Carpentries' @@ -27,7 +27,7 @@ life_cycle: 'pre-alpha' license: 'CC-BY 4.0' # Link to the source repository for this lesson -source: 'https://github.com/carpentries/workbench-template-md' +source: 'https://github.com/GULibrarySandbox/intro-computational-thinking' # Default branch of your lesson branch: 'main' @@ -59,14 +59,14 @@ contact: 'team@carpentries.org' # Order of episodes in your lesson episodes: -- 0-intro.md -- 1-exercise.md -- 2-lesson.md -- 3-lesson.md -- 4-lesson.md -- 5-solutions.md -- 6-resources.md -- 7-glossary.md +- intro.md +- exercise.md +- computation_practice.md +- computation_programming.md +- pseudocode.md +- solutions.md +- resources.md +- glossary.md # Information for Learners diff --git a/site/_pkgdown.yaml b/site/_pkgdown.yaml index 64efb29..1b5a271 100644 --- a/site/_pkgdown.yaml +++ b/site/_pkgdown.yaml @@ -2,7 +2,7 @@ # This file was generated by sandpaper version '0.12.4' # If you want to make changes, please edit '/Users/lawrencetlee/Personal/Lesson Job/intro-computational-thinking/config.yaml' # ------------------------------------------------------------------ information -title: Lesson Title +title: Introducing Computational Thinking home: title: Home strip_header: yes @@ -10,35 +10,35 @@ home: template: package: varnish params: - time: 2023-07-12 20:11:35 +0000 - source: https://github.com/carpentries/workbench-template-md + time: 2023-07-17 16:19:38 +0000 + source: https://github.com/GULibrarySandbox/intro-computational-thinking branch: main contact: team@carpentries.org license: CC-BY 4.0 handout: ~ cp: no - lc: no + lc: yes dc: no swc: no - carpentry: incubator - carpentry_name: Carpentries Incubator - carpentry_icon: incubator + carpentry: lc + carpentry_name: Library Carpentry + carpentry_icon: library life_cycle: pre-alpha pre_alpha: yes alpha: ~ beta: ~ - title: Lesson Title - created: ~ + title: Introducing Computational Thinking + created: '2022-08-12' keywords: software, data, lesson, The Carpentries episodes: - - 0-intro.md - - 1-exercise.md - - 2-lesson.md - - 3-lesson.md - - 4-lesson.md - - 5-solutions.md - - 6-resources.md - - 7-glossary.md + - intro.md + - exercise.md + - computation_practice.md + - computation_programming.md + - pseudocode.md + - solutions.md + - resources.md + - glossary.md learners: ~ instructors: ~ profiles: ~ diff --git a/site/built/AUTHORS.md b/site/built/AUTHORS.md new file mode 100644 index 0000000..844305f --- /dev/null +++ b/site/built/AUTHORS.md @@ -0,0 +1 @@ +- [Belinda Weaver](https://github.com/weaverbel), Griffith University Library \ No newline at end of file diff --git a/site/built/CODE_OF_CONDUCT.md b/site/built/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f19b804 --- /dev/null +++ b/site/built/CODE_OF_CONDUCT.md @@ -0,0 +1,13 @@ +--- +title: "Contributor Code of Conduct" +--- + +As contributors and maintainers of this project, +we pledge to follow the [The Carpentries Code of Conduct][coc]. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by following our [reporting guidelines][coc-reporting]. + + +[coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html +[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html diff --git a/site/built/LICENSE.md b/site/built/LICENSE.md new file mode 100644 index 0000000..7632871 --- /dev/null +++ b/site/built/LICENSE.md @@ -0,0 +1,79 @@ +--- +title: "Licenses" +--- + +## Instructional Material + +All Carpentries (Software Carpentry, Data Carpentry, and Library Carpentry) +instructional material is made available under the [Creative Commons +Attribution license][cc-by-human]. The following is a human-readable summary of +(and not a substitute for) the [full legal text of the CC BY 4.0 +license][cc-by-legal]. + +You are free: + +- to **Share**---copy and redistribute the material in any medium or format +- to **Adapt**---remix, transform, and build upon the material + +for any purpose, even commercially. + +The licensor cannot revoke these freedoms as long as you follow the license +terms. + +Under the following terms: + +- **Attribution**---You must give appropriate credit (mentioning that your work + is derived from work that is Copyright (c) The Carpentries and, where + practical, linking to ), provide a [link to the + license][cc-by-human], and indicate if changes were made. You may do so in + any reasonable manner, but not in any way that suggests the licensor endorses + you or your use. + +- **No additional restrictions**---You may not apply legal terms or + technological measures that legally restrict others from doing anything the + license permits. With the understanding that: + +Notices: + +* You do not have to comply with the license for elements of the material in + the public domain or where your use is permitted by an applicable exception + or limitation. +* No warranties are given. The license may not give you all of the permissions + necessary for your intended use. For example, other rights such as publicity, + privacy, or moral rights may limit how you use the material. + +## Software + +Except where otherwise noted, the example programs and other software provided +by The Carpentries are made available under the [OSI][osi]-approved [MIT +license][mit-license]. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +## Trademark + +"The Carpentries", "Software Carpentry", "Data Carpentry", and "Library +Carpentry" and their respective logos are registered trademarks of [Community +Initiatives][ci]. + +[cc-by-human]: https://creativecommons.org/licenses/by/4.0/ +[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode +[mit-license]: https://opensource.org/licenses/mit-license.html +[ci]: https://communityin.org/ +[osi]: https://opensource.org diff --git a/site/built/README_original.md b/site/built/README_original.md deleted file mode 100644 index 0fe55d8..0000000 --- a/site/built/README_original.md +++ /dev/null @@ -1,149 +0,0 @@ -{% capture aboutworkshop %} - -## Topic and aims - -An introduction to computational thinking - -Once you have completed this workshop, you should be able to: - -- Identify the steps involved in computational thinking -- Break a problem down into more manageable pieces -- Develop an algorithm to solve the problem -- Use abstraction to make the algoritm re-usable - -## Audience - -This workshop is aimed at researchers at all stages who want to understand the building blocks of computational thinking. - -## Prerequisites - -To successfully complete this workshop you will need: - -- A pen and paper - -## Assumed knowledge - -No prior knowledge is assumed. - -{% endcapture %} - -{% include card.html header="About this workshop" text=aboutworkshop %} - -# About the Griffith Library Workshop Template - -This template is derived from `workshop-template-b` by Evan Williamson. It is a Jekyll template for a simple workshop website, with a [Bootstrap](https://getbootstrap.com/)-based theme, designed for hosting on [GitHub Pages](https://pages.github.com/). - -Works best for about 5 pages of instructions, plus an index page, all written in Markdown. -The navigation to the main pages is exposed at top and bottom of each page for easy stepping through the sections. - -**Please note: the template was updated in Nov 2021 to Bootstrap 5!** - -> For a more minimal version, try the original [workshop-template](https://github.com/evanwill/workshop-template) - -## Why? - -Rather than making slides for a workshop, why not make a website? -It's easier to write, access, share, and reuse. -GitHub and GitHub Pages makes this pretty easy. - -It is a better Open Educational Resource since anyone can make a copy and adapt! - -## How To Use Template - -The [workshop-template-b repository](https://github.com/evanwill/workshop-template-b) is a template project --> to get started quickly, make a copy and replace the demo with your own content and customizations. -The [demo site](https://evanwill.github.io/workshop-template-b/) demonstrates the output on GitHub Pages. -The content pages serve as documentation and examples to copy from. - -Overview: - -1. Click the green "Use this template" button on the [Library Workshop Template](https://github.com/GULibrarySandbox/library-template-2022) to make your own new copy of the code (make sure you are logged into GitHub!). -2. Work on the GitHub web interface or clone to your local machine to edit files (tip: click `.` on any GitHub repository to [open the web editor](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor)). -3. Edit the `_config.yml` with your info. -4. Edit/add the content pages in Markdown (found in the "content" folder). -5. Add any images to the "images" folder. -5. Push to GitHub or commit on the web interface. -6. In your repository's settings, activate GitHub Pages, using main branch. - -### Basic Configuration - -Edit the "_config.yml" to get your workshop website set up with the basics such as `title` and `author`. -Check comments (denoted by `#` in YAML) in the file for all the options! - -Once you have edited the "_config.yml", you are ready to start editing your content pages. -All your content is written in Markdown in the "content" folder. - -### Creating content pages - -Content pages are written in markdown and can be enhanced using Liquid includes that are packaged with the template (see "_includes/" folder). -Start by editing the examples or creating new files in the "content" folder. - -At the top of each page is "YAML front matter" used to configure the page. -Use these options: - -- `nav:` add the text you want to appear in the the header and footer navigation. - - Alternatively, use `nav: true` to use the page's `title` value for the nav text. - - Do not include `nav` if you do not want the page to appear in the nav elements. - - All pages with a `nav` value will appear in the header and footer navigation, sorted by order of filenames. For simplicity use leading numbers in the lesson page filenames to create correct order. -- `title:` value will appear as `h1` at the top of the page. -- `topics:` will appear as a small feature below the title (optional). -- `description:` will appear as an indented text block below the title (optional). This gives you a chance to summarize the section contents. -- `youtubeid:` will add an YouTube video embed (optional). Find the id in the YouTube link. For example, in `https://youtu.be/moJgWrD6dwg` or `https://www.youtube.com/watch?v=moJgWrD6dwg` the youtubeid is `moJgWrD6dwg`. -- Alternatively, if you don't want `title` or other options to appear on the page, you can over ride the section layout by adding `layout: default` - -### Components Includes - -`workshop-template-b` contains a series of [Liquid "includes"](https://jekyllrb.com/docs/includes/) to simplify adding basic [Bootstrap 5 components](https://getbootstrap.com/docs/5.0/components/) to your Markdown content. -The includes can be found in the "_includes" folder. -Check the comments at the top of each include file for details about options and how to use them. - -#### Figures / Images - -- put any images you want to use in the "images" folder, or use a full URL to external images. -- in a markdown file where you want the image to appear, use the "figure.html" include on its own line, following the pattern: `{% include figure.html img="my-cat.jpg" alt="cat" caption="My cat" width="50%" %}` -- figures will be centered, and can optionally be given a caption and percentage width. - -Additional includes are available in the "_includes" folder, check the comments for how to use them. - -### Style customization [optional] - -The file "assets/css/custom.scss" exposes variables that can customize the basic style of website: - -- `$top-border` adds a tiny splash of color on the header and footer borders. Try tweaking the color using an [HTML # value](https://www.w3schools.com/colors/colors_picker.asp). -- `$text-color` sets the body text color -- `$link-color` sets link color -- `$base-font-size` sets the body text size -- `$container-max` sets a maximum width for the text body--keeping it narrow can make it easier to read, but gives less screen space! - -To use the Bootstrap defaults for *any* of these values, comment out the variable in "custom.scss", using `//` in front of the option's line (e.g. `// $text-color: #111 !default;` ). - -To add your own custom CSS, use the file "_sass/_custom.scss". -Any CSS/SASS you add to this file will override the template and Bootstrap classes. - -### Google Analytics [optional] - -Griffith's Google id has already been added to "_config.yml" in `google-analytics-id:` - -To use an alternative analytics, paste the code snippet provided by the platform into the file "_includes/template/analytics.html". - -The analytics code will only be added when using "production" environment. -This happens automatically on GitHub Pages. -To build manually you need to add "JEKYLL_ENV", like: `JEKYLL_ENV=production jekyll build`. - -## Demos - -- [Demo](https://evanwill.github.io/workshop-template-b/) (this repository) -- [Go Go GitHub Pages (v.2)](https://evanwill.github.io/go-go-ghpages-b/) -- [Make OER!](https://evanwill.github.io/make-oer/) (presentation) -- [Web Crash Course](https://evanwill.github.io/web-crash-course/) (workshop) -- [Write MD](https://evanwill.github.io/write-md/) (workshop) - -My workshop sites using an [minimal version of this template](https://github.com/evanwill/workshop-template) (no bootstrap): - -- [get-git](https://evanwill.github.io/get-git/) -- [hello-arduino](https://evanwill.github.io/hello-arduino/) -- [clean-your-data](https://evanwill.github.io/clean-your-data/) -- [go-go gh-pages](https://evanwill.github.io/go-go-ghpages/) - -> Repository does not include a Gemfile because it is a very simple project. -> Originally built using Ruby 2.5+ and Jekyll 3.7+; most recently used Ruby 3 and Jekyll 4.2.1. -> Designed for use with [GitHub Pages automatic build versions](https://pages.github.com/versions/). diff --git a/site/built/2-lesson.md b/site/built/computation_practice.md similarity index 100% rename from site/built/2-lesson.md rename to site/built/computation_practice.md diff --git a/site/built/3-lesson.md b/site/built/computation_programming.md similarity index 100% rename from site/built/3-lesson.md rename to site/built/computation_programming.md diff --git a/site/built/config.yaml b/site/built/config.yaml index bc5361d..c2f2619 100644 --- a/site/built/config.yaml +++ b/site/built/config.yaml @@ -59,14 +59,14 @@ contact: 'team@carpentries.org' # Order of episodes in your lesson episodes: -- 0-intro.md -- 1-exercise.md -- 2-lesson.md -- 3-lesson.md -- 4-lesson.md -- 5-solutions.md -- 6-resources.md -- 7-glossary.md +- intro.md +- exercise.md +- computation_practice.md +- computation_programming.md +- pseudocode.md +- solutions.md +- resources.md +- glossary.md # Information for Learners diff --git a/site/built/1-exercise.md b/site/built/exercise.md similarity index 100% rename from site/built/1-exercise.md rename to site/built/exercise.md diff --git a/site/built/7-glossary.md b/site/built/glossary.md similarity index 100% rename from site/built/7-glossary.md rename to site/built/glossary.md diff --git a/site/built/0-intro.md b/site/built/intro.md similarity index 100% rename from site/built/0-intro.md rename to site/built/intro.md diff --git a/site/built/md5sum.txt b/site/built/md5sum.txt index c0db724..4f96058 100644 --- a/site/built/md5sum.txt +++ b/site/built/md5sum.txt @@ -1,17 +1,19 @@ "file" "checksum" "built" "date" -"README_original.md" "688f44422e45a40de479b9eb98c87597" "site/built/README_original.md" "2023-07-07" -"config.yaml" "6f16ccf689d32b1aa9eccf9c2f0a2ddb" "site/built/config.yaml" "2023-07-07" +"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2023-07-17" +"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2023-07-17" +"config.yaml" "106b3a81dec98c0ce37461ee85097c35" "site/built/config.yaml" "2023-07-17" "index.md" "19273739f3a00da34d29e608f5a7f8af" "site/built/index.md" "2023-07-07" "search.md" "2d215d6e5c915ce30f5a5072d986609f" "site/built/search.md" "2023-07-07" -"episodes/0-intro.md" "aeefa4e1d306ef1dbcca97f8466617b1" "site/built/0-intro.md" "2023-07-07" -"episodes/1-exercise.md" "4339a60af85f135131825ca4d84ff584" "site/built/1-exercise.md" "2023-07-07" -"episodes/2-lesson.md" "1d4488c042bbc4298c7edf3d7976e639" "site/built/2-lesson.md" "2023-07-07" -"episodes/3-lesson.md" "f7916f524266a645ce75c34d76fd54e2" "site/built/3-lesson.md" "2023-07-07" -"episodes/4-lesson.md" "24387444c222935269be5ac1784c3955" "site/built/4-lesson.md" "2023-07-12" -"episodes/5-solutions.md" "5458d351e50e71ba9e97af244c4bdaef" "site/built/5-solutions.md" "2023-07-07" -"episodes/6-resources.md" "445c463cd61a5866e8f982832522d0fa" "site/built/6-resources.md" "2023-07-07" -"episodes/7-glossary.md" "a972c8204c583630331ae87ede34be4a" "site/built/7-glossary.md" "2023-07-07" +"episodes/intro.md" "aeefa4e1d306ef1dbcca97f8466617b1" "site/built/intro.md" "2023-07-17" +"episodes/exercise.md" "4339a60af85f135131825ca4d84ff584" "site/built/exercise.md" "2023-07-17" +"episodes/computation_practice.md" "1d4488c042bbc4298c7edf3d7976e639" "site/built/computation_practice.md" "2023-07-17" +"episodes/computation_programming.md" "f7916f524266a645ce75c34d76fd54e2" "site/built/computation_programming.md" "2023-07-17" +"episodes/pseudocode.md" "24387444c222935269be5ac1784c3955" "site/built/pseudocode.md" "2023-07-17" +"episodes/solutions.md" "5458d351e50e71ba9e97af244c4bdaef" "site/built/solutions.md" "2023-07-17" +"episodes/resources.md" "445c463cd61a5866e8f982832522d0fa" "site/built/resources.md" "2023-07-17" +"episodes/glossary.md" "a972c8204c583630331ae87ede34be4a" "site/built/glossary.md" "2023-07-17" "instructors/instructor-notes.md" "cae72b6712578d74a49fea7513099f8c" "site/built/instructor-notes.md" "2023-07-07" "learners/reference.md" "d41d8cd98f00b204e9800998ecf8427e" "site/built/reference.md" "2023-07-07" "learners/setup.md" "8b560e25189bc613b01710870b24252d" "site/built/setup.md" "2023-07-07" "profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-07-07" +"AUTHORS.md" "6006c2361c8eb909790196e64e571d42" "site/built/AUTHORS.md" "2023-07-17" diff --git a/site/built/4-lesson.md b/site/built/pseudocode.md similarity index 100% rename from site/built/4-lesson.md rename to site/built/pseudocode.md diff --git a/site/built/6-resources.md b/site/built/resources.md similarity index 100% rename from site/built/6-resources.md rename to site/built/resources.md diff --git a/site/built/5-solutions.md b/site/built/solutions.md similarity index 100% rename from site/built/5-solutions.md rename to site/built/solutions.md diff --git a/site/docs/404.html b/site/docs/404.html index 8752878..f1f227c 100644 --- a/site/docs/404.html +++ b/site/docs/404.html @@ -1,5 +1,5 @@ -Lesson Title: Page not found -
@@ -145,7 +145,7 @@

@@ -154,7 +154,7 @@

@@ -163,7 +163,7 @@

@@ -172,7 +172,7 @@

@@ -181,7 +181,7 @@

@@ -190,7 +190,7 @@

@@ -199,7 +199,7 @@

@@ -208,7 +208,7 @@

@@ -281,12 +281,12 @@

Page not found

This lesson is subject to the Code of Conduct

- Edit on GitHub + Edit on GitHub - | Contributing - | Source

-

Cite | Contact | About

+ | Contributing + | Source

+

Cite | Contact | About

@@ -316,8 +316,8 @@

Page not found

"url": "https://carpentries.github.io/workbench-template-md/404.html", "identifier": "https://carpentries.github.io/workbench-template-md/404.html", "dateCreated": "2022-08-12", - "dateModified": "2023-07-12", - "datePublished": "2023-07-12" + "dateModified": "2023-07-17", + "datePublished": "2023-07-17" } +
+ Introducing Computational Thinking +
+ +
+
+ + + + + +
+
+

+

Last updated on 2023-07-14 | + + Edit this page

+ + + +
+ +
+ + +
+
+ + +
+
+ + + diff --git a/site/docs/AUTHORS.html b/site/docs/AUTHORS.html new file mode 100644 index 0000000..b6d652c --- /dev/null +++ b/site/docs/AUTHORS.html @@ -0,0 +1,364 @@ + +Introducing Computational Thinking: +
+ Introducing Computational Thinking +
+ +
+
+ + + + + +
+
+

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + +
+
+ + +
+
+ + + diff --git a/site/docs/CODE_OF_CONDUCT.html b/site/docs/CODE_OF_CONDUCT.html new file mode 100644 index 0000000..e1297e7 --- /dev/null +++ b/site/docs/CODE_OF_CONDUCT.html @@ -0,0 +1,371 @@ + +Lesson Title: Contributor Code of Conduct +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Contributor Code of Conduct

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

As contributors and maintainers of this project, we pledge to follow +the The +Carpentries Code of Conduct.

+

Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by following our reporting +guidelines.

+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/LICENSE.html b/site/docs/LICENSE.html new file mode 100644 index 0000000..f50e8f6 --- /dev/null +++ b/site/docs/LICENSE.html @@ -0,0 +1,422 @@ + +Lesson Title: Licenses +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Licenses

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

Instructional Material +

+

All Carpentries (Software Carpentry, Data Carpentry, and Library +Carpentry) instructional material is made available under the Creative Commons +Attribution license. The following is a human-readable summary of +(and not a substitute for) the full legal +text of the CC BY 4.0 license.

+

You are free:

+
  • to Share—copy and redistribute the material in any +medium or format
  • +
  • to Adapt—remix, transform, and build upon the +material
  • +

for any purpose, even commercially.

+

The licensor cannot revoke these freedoms as long as you follow the +license terms.

+

Under the following terms:

+
  • Attribution—You must give appropriate credit +(mentioning that your work is derived from work that is Copyright (c) +The Carpentries and, where practical, linking to https://carpentries.org/), provide a link to the +license, and indicate if changes were made. You may do so in any +reasonable manner, but not in any way that suggests the licensor +endorses you or your use.

  • +
  • No additional restrictions—You may not apply +legal terms or technological measures that legally restrict others from +doing anything the license permits. With the understanding +that:

  • +

Notices:

+
  • You do not have to comply with the license for elements of the +material in the public domain or where your use is permitted by an +applicable exception or limitation.
  • +
  • No warranties are given. The license may not give you all of the +permissions necessary for your intended use. For example, other rights +such as publicity, privacy, or moral rights may limit how you use the +material.
  • +

Software +

+

Except where otherwise noted, the example programs and other software +provided by The Carpentries are made available under the OSI-approved MIT +license.

+

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +“Software”), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions:

+

The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+

Trademark +

+

“The Carpentries”, “Software Carpentry”, “Data Carpentry”, and +“Library Carpentry” and their respective logos are registered trademarks +of Community Initiatives.

+
+
+ + +
+
+ + + diff --git a/site/docs/aio.html b/site/docs/aio.html index 9ac9826..e886bb8 100644 --- a/site/docs/aio.html +++ b/site/docs/aio.html @@ -3,7 +3,7 @@ -Lesson Title: All in One View +Introducing Computational Thinking: All in One View +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Computational thinking in practice

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

While thinking computationally is a prerequisite for programming, +programming and computational thinking are not the same thing.

+ + + + + + +
Programming Computational thinking
instructs a computer to carry out a sequence of steps +in a particular order. is the process that helps decide what those steps +will be, i.e. what the computer will be told to do.

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.

+
Computational thinking at work
The computational thinking process in +action
+
+

Computational thinking in our daily lives

+

Subconsciously, we practise computational thinking every day of our +lives. As Jeannette Wing stated:

+

“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.”

+

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.

+
  • Project managers use computational thinking to plan complex +activities such as building a tunnel or revamping a playground.

  • +
  • Epidemiologists use it to identify patterns that help predict how +a disease outbreak will spread.

  • +
  • Parents use it to juggle work, parenting, community +responsibilities and housework.

  • +
  • Lost bushwalkers can use it to try to find their way out of the +bush.

  • +
+
+

Breaking problems down with structure diagrams

+

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.

+

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.

+

In the bushwalking 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.

+
Structure diagram
Basic Structure Diagram
+

+
+

Practice

+

Imagine that night is now falling fast, and our friends are still +stuck in the bush. Add some more detail to the structure diagram to help +them survive the night.

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/computation_programming.html b/site/docs/computation_programming.html new file mode 100644 index 0000000..f3f8c15 --- /dev/null +++ b/site/docs/computation_programming.html @@ -0,0 +1,418 @@ + +Lesson Title: Computational thinking in programming +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Computational thinking in programming

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

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.

+

Suppose we want to find the ten words most commonly used in a text. +How might we go about that?

+
+

Linear code

+

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.,

+
counting words in a text
Counting words in a text
+

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.

+

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.

+

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.

+

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.

+
+
+

Branching code

+

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.

+
Branching code
Branching code
+

+
+

Practice

+

Our friends have finally made it out of the bush and back to +civilisation. Their experience, while unpleasant, has not put them off +bushwalking. Draw a structure diagram of the planning they need to do +for next time to avert another disaster.

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/config.yaml b/site/docs/config.yaml index bc5361d..c2f2619 100644 --- a/site/docs/config.yaml +++ b/site/docs/config.yaml @@ -59,14 +59,14 @@ contact: 'team@carpentries.org' # Order of episodes in your lesson episodes: -- 0-intro.md -- 1-exercise.md -- 2-lesson.md -- 3-lesson.md -- 4-lesson.md -- 5-solutions.md -- 6-resources.md -- 7-glossary.md +- intro.md +- exercise.md +- computation_practice.md +- computation_programming.md +- pseudocode.md +- solutions.md +- resources.md +- glossary.md # Information for Learners diff --git a/site/docs/exercise.html b/site/docs/exercise.html new file mode 100644 index 0000000..121dee3 --- /dev/null +++ b/site/docs/exercise.html @@ -0,0 +1,438 @@ + +Lesson Title: Exercise +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Exercise

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

In this exercise, we will see how computational thinking can be used +to add up all the numbers between 1 and 200 in our heads, +i.e. 1 + 2 + 3 + 4 and so on. We should be able to do this +in less than a minute.

+

Seems impossible?

+

It’s not.

+

Using the first computational thinking step - Decomposition +- we break the problem up into smaller pieces. Rather than trying to add +the numbers up sequentially, which would be challenging for many people +to do in their heads, let’s approach the task in a different way.

+
+

Decomposition

+

Let’s begin at each end of the 1-200 sequence by adding up the first +and last numbers.

+

What is 200 + 1? The answer is 201.

+

Let’s now add up the second and the second last numbers, +i.e. 199 + 2. The answer is 201.

+

Let’s now add up the third and the third last numbers, +i.e. 198 + 3. The answer is 201.

+
+
+

Pattern recognition

+

Using our second step - Pattern recognition - we should be +able to spot a clear pattern, i.e. that each pair of numbers appears to +add up to 201.

+
Spotting a pattern
Spotting a pattern
+

If we follow this same process with all the numbers +between 1 and 200, we will end up with 100 pairs, each +of which will add up to 201.

+
+
+

Algorithm

+

Using an Algorithm - another name for a series of steps - +how do we calculate the final total?

+

We multiply the number of pairs (100) by +201 (the total to which each pair adds up).

+

100 * 201 gives us the answer of +20,100.

+

So far, so good.

+

Now, what about about our fourth step, Abstraction?

+
+
+

Abstraction

+

Abstraction will enable us to generalise from that +experience, i.e. repeat the process we used to add up all the numbers +between 1 and 200 to add up a different set of numbers, e.g., +1-500.

+

The Algorithm will be

+

(number to be added divided by 2) multiplied by +(number to be added +1). We can express that as an +algebraic formula:

+

(x/2) * (x + 1)

+

where x is the +number to be added.

+

That’s it! Using those four key steps, we have learned the basics of +computational thinking.

+
+

Practice

+

Use the algorithm above to add up all the numbers between 1 and 24, 1 +and 50, and 1 and 1,000.

+
+
+

Discussion

+

The numbers above are all even numbers. What would be the process for +adding up numbers if the final number is an odd one, e.g., 17? Can you +use the same formula? If not, what adaptations would you need to make to +the formula?

+
+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/glossary.html b/site/docs/glossary.html new file mode 100644 index 0000000..7f53028 --- /dev/null +++ b/site/docs/glossary.html @@ -0,0 +1,449 @@ + +Lesson Title: Glossary of terms +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Glossary of terms

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TermMeaning
AbstractionAbstractions involves reducing a problem’s complexity +by focusing solely on the most important details. For example, a model +is an abstract representation of a real system. The use of variables in +algebra or computer programming is another example. Abstraction can also +be called generalising.
  
AlgorithmAn algorithm is a series of steps that must be followed +in a specific order to solve a problem. When you plan a route home from +work or cook a recipe, you are executing an algorithm. Providing a +solution to a problem in the form of an algorithm makes a process +repeatable and reproducible by others.
  
AutomationAutomation can involve using a computer program to +perform repetitive tasks or calculations. By making processes +reproducible, algorithms are a key enabler of automation.
  
CodingAnother word for computer programming, i.e. writing +computer code that instructs a computer in what to do.
  
DecompositionSolving a complex problem by breaking it down into +smaller, more manageable tasks.
  
Pattern matchingPattern matching identifies specific patterns within +data, regardless of where the pattern might occur. In contrast to +pattern recognition, pattern matching only identifies exact matches. +Regular expressions can be used to specify these patterns.
  
Pattern recognitionIn computational thinking, identifying patterns or +connections across the different parts of a larger problem is one of the +keys to solving it. Our brains are excellent at spotting patterns and +similarities, making it easier to use previous experience and methods to +come up with solutions.
  
Regular expressionsOften abbreviated to regex, regular +expressions can be used to specify exact search patterns within data. +Such patterns are generally used for search or +search and replace operations within data, e.g., searching +for postcodes, telephone numbers, names, chemical formulae and so +on.
  
ProgrammingAnother word for coding.
  
ValueIn programming, a value is an entity that can be +manipulated by a program. It is usually a number (a whole integer, +e.g. 10 or a floating point number, e.g. 5.126), a single character, or +a string of characters.
  
VariableIn programming, a variable is a kind of ‘container’ for +a value or a range of values that are swapped in and out as a program +runs.
  
WorkflowA workflow is a series of sequential steps to +accomplish a specific task.
  
Working with dataWorking with data frequently involves computational +thinking. Collecting data, analysing data, and visualising data can all +help you break a problem down.
+
+ + +
+
+ + + diff --git a/site/docs/images.html b/site/docs/images.html index a8a84ef..6c1b463 100644 --- a/site/docs/images.html +++ b/site/docs/images.html @@ -3,7 +3,7 @@ -Lesson Title: All Images +Introducing Computational Thinking: All Images -
@@ -156,7 +156,7 @@

@@ -165,7 +165,7 @@

@@ -174,7 +174,7 @@

@@ -183,7 +183,7 @@

@@ -192,7 +192,7 @@

@@ -201,7 +201,7 @@

@@ -210,7 +210,7 @@

@@ -219,7 +219,7 @@

@@ -266,11 +266,11 @@

Summary and Setup

@@ -303,7 +303,7 @@

Windows

-
+

Download Github and R through their respective mediums. Or, you can follow the steps listed at the official guide at Carpentries

@@ -318,7 +318,7 @@

MacOS

-
+

Download Github and R through their respective mediums. Or, you can follow the steps listed at the official guide at Carpentries

@@ -333,7 +333,7 @@

Linux

-
+

Download Github and R through their respective mediums. Or, you can follow the steps listed at the official guide at Carpentries

@@ -342,11 +342,11 @@

@@ -356,12 +356,12 @@

This lesson is subject to the Code of Conduct

- Edit on GitHub + Edit on GitHub - | Contributing - | Source

-

Cite | Contact | About

+ | Contributing + | Source

+

Cite | Contact | About

@@ -391,8 +391,8 @@

"url": "https://carpentries.github.io/workbench-template-md/index.html", "identifier": "https://carpentries.github.io/workbench-template-md/index.html", "dateCreated": "2022-08-12", - "dateModified": "2023-07-12", - "datePublished": "2023-07-12" + "dateModified": "2023-07-17", + "datePublished": "2023-07-17" } -
@@ -144,7 +144,7 @@

@@ -153,7 +153,7 @@

@@ -162,7 +162,7 @@

@@ -171,7 +171,7 @@

@@ -180,7 +180,7 @@

@@ -189,7 +189,7 @@

@@ -198,7 +198,7 @@

@@ -207,7 +207,7 @@

@@ -280,12 +280,12 @@

Page not found

This lesson is subject to the Code of Conduct

- Edit on GitHub + Edit on GitHub - | Contributing - | Source

-

Cite | Contact | About

+ | Contributing + | Source

+

Cite | Contact | About

@@ -315,8 +315,8 @@

Page not found

"url": "https://carpentries.github.io/workbench-template-md/instructor/404.html", "identifier": "https://carpentries.github.io/workbench-template-md/instructor/404.html", "dateCreated": "2022-08-12", - "dateModified": "2023-07-12", - "datePublished": "2023-07-12" + "dateModified": "2023-07-17", + "datePublished": "2023-07-17" } +
+ Introducing Computational Thinking +
+ +
+
+ + + + + +
+
+

+

Last updated on 2023-07-14 | + + Edit this page

+ + + + + +
+ +
+ + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/AUTHORS.html b/site/docs/instructor/AUTHORS.html new file mode 100644 index 0000000..4734c41 --- /dev/null +++ b/site/docs/instructor/AUTHORS.html @@ -0,0 +1,365 @@ + +Introducing Computational Thinking: +
+ Introducing Computational Thinking +
+ +
+
+ + + + + +
+
+

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/CODE_OF_CONDUCT.html b/site/docs/instructor/CODE_OF_CONDUCT.html new file mode 100644 index 0000000..06022d6 --- /dev/null +++ b/site/docs/instructor/CODE_OF_CONDUCT.html @@ -0,0 +1,372 @@ + +Lesson Title: Contributor Code of Conduct +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Contributor Code of Conduct

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

As contributors and maintainers of this project, we pledge to follow +the The +Carpentries Code of Conduct.

+

Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by following our reporting +guidelines.

+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/LICENSE.html b/site/docs/instructor/LICENSE.html new file mode 100644 index 0000000..b4d5b43 --- /dev/null +++ b/site/docs/instructor/LICENSE.html @@ -0,0 +1,423 @@ + +Lesson Title: Licenses +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Licenses

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

Instructional Material +

+

All Carpentries (Software Carpentry, Data Carpentry, and Library +Carpentry) instructional material is made available under the Creative Commons +Attribution license. The following is a human-readable summary of +(and not a substitute for) the full legal +text of the CC BY 4.0 license.

+

You are free:

+
  • to Share—copy and redistribute the material in any +medium or format
  • +
  • to Adapt—remix, transform, and build upon the +material
  • +

for any purpose, even commercially.

+

The licensor cannot revoke these freedoms as long as you follow the +license terms.

+

Under the following terms:

+
  • Attribution—You must give appropriate credit +(mentioning that your work is derived from work that is Copyright (c) +The Carpentries and, where practical, linking to https://carpentries.org/), provide a link to the +license, and indicate if changes were made. You may do so in any +reasonable manner, but not in any way that suggests the licensor +endorses you or your use.

  • +
  • No additional restrictions—You may not apply +legal terms or technological measures that legally restrict others from +doing anything the license permits. With the understanding +that:

  • +

Notices:

+
  • You do not have to comply with the license for elements of the +material in the public domain or where your use is permitted by an +applicable exception or limitation.
  • +
  • No warranties are given. The license may not give you all of the +permissions necessary for your intended use. For example, other rights +such as publicity, privacy, or moral rights may limit how you use the +material.
  • +

Software +

+

Except where otherwise noted, the example programs and other software +provided by The Carpentries are made available under the OSI-approved MIT +license.

+

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +“Software”), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions:

+

The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+

Trademark +

+

“The Carpentries”, “Software Carpentry”, “Data Carpentry”, and +“Library Carpentry” and their respective logos are registered trademarks +of Community Initiatives.

+
+
+ + +
+
+ + + diff --git a/site/docs/instructor/aio.html b/site/docs/instructor/aio.html index 37b69d1..4e1baac 100644 --- a/site/docs/instructor/aio.html +++ b/site/docs/instructor/aio.html @@ -3,7 +3,7 @@ -Lesson Title: All in One View +Introducing Computational Thinking: All in One View +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Computational thinking in practice

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

While thinking computationally is a prerequisite for programming, +programming and computational thinking are not the same thing.

+ + + + + + +
Programming Computational thinking
instructs a computer to carry out a sequence of steps +in a particular order. is the process that helps decide what those steps +will be, i.e. what the computer will be told to do.

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.

+
Computational thinking at work
The computational thinking process in +action
+
+

Computational thinking in our daily lives

+

Subconsciously, we practise computational thinking every day of our +lives. As Jeannette Wing stated:

+

“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.”

+

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.

+
  • Project managers use computational thinking to plan complex +activities such as building a tunnel or revamping a playground.

  • +
  • Epidemiologists use it to identify patterns that help predict how +a disease outbreak will spread.

  • +
  • Parents use it to juggle work, parenting, community +responsibilities and housework.

  • +
  • Lost bushwalkers can use it to try to find their way out of the +bush.

  • +
+
+

Breaking problems down with structure diagrams

+

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.

+

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.

+

In the bushwalking 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.

+
Structure diagram
Basic Structure Diagram
+

+
+

Practice

+

Imagine that night is now falling fast, and our friends are still +stuck in the bush. Add some more detail to the structure diagram to help +them survive the night.

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/computation_programming.html b/site/docs/instructor/computation_programming.html new file mode 100644 index 0000000..c8d8e0c --- /dev/null +++ b/site/docs/instructor/computation_programming.html @@ -0,0 +1,419 @@ + +Lesson Title: Computational thinking in programming +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Computational thinking in programming

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

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.

+

Suppose we want to find the ten words most commonly used in a text. +How might we go about that?

+
+

Linear code

+

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.,

+
counting words in a text
Counting words in a text
+

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.

+

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.

+

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.

+

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.

+
+
+

Branching code

+

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.

+
Branching code
Branching code
+

+
+

Practice

+

Our friends have finally made it out of the bush and back to +civilisation. Their experience, while unpleasant, has not put them off +bushwalking. Draw a structure diagram of the planning they need to do +for next time to avert another disaster.

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/exercise.html b/site/docs/instructor/exercise.html new file mode 100644 index 0000000..f634e9d --- /dev/null +++ b/site/docs/instructor/exercise.html @@ -0,0 +1,439 @@ + +Lesson Title: Exercise +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Exercise

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

In this exercise, we will see how computational thinking can be used +to add up all the numbers between 1 and 200 in our heads, +i.e. 1 + 2 + 3 + 4 and so on. We should be able to do this +in less than a minute.

+

Seems impossible?

+

It’s not.

+

Using the first computational thinking step - Decomposition +- we break the problem up into smaller pieces. Rather than trying to add +the numbers up sequentially, which would be challenging for many people +to do in their heads, let’s approach the task in a different way.

+
+

Decomposition

+

Let’s begin at each end of the 1-200 sequence by adding up the first +and last numbers.

+

What is 200 + 1? The answer is 201.

+

Let’s now add up the second and the second last numbers, +i.e. 199 + 2. The answer is 201.

+

Let’s now add up the third and the third last numbers, +i.e. 198 + 3. The answer is 201.

+
+
+

Pattern recognition

+

Using our second step - Pattern recognition - we should be +able to spot a clear pattern, i.e. that each pair of numbers appears to +add up to 201.

+
Spotting a pattern
Spotting a pattern
+

If we follow this same process with all the numbers +between 1 and 200, we will end up with 100 pairs, each +of which will add up to 201.

+
+
+

Algorithm

+

Using an Algorithm - another name for a series of steps - +how do we calculate the final total?

+

We multiply the number of pairs (100) by +201 (the total to which each pair adds up).

+

100 * 201 gives us the answer of +20,100.

+

So far, so good.

+

Now, what about about our fourth step, Abstraction?

+
+
+

Abstraction

+

Abstraction will enable us to generalise from that +experience, i.e. repeat the process we used to add up all the numbers +between 1 and 200 to add up a different set of numbers, e.g., +1-500.

+

The Algorithm will be

+

(number to be added divided by 2) multiplied by +(number to be added +1). We can express that as an +algebraic formula:

+

(x/2) * (x + 1)

+

where x is the +number to be added.

+

That’s it! Using those four key steps, we have learned the basics of +computational thinking.

+
+

Practice

+

Use the algorithm above to add up all the numbers between 1 and 24, 1 +and 50, and 1 and 1,000.

+
+
+

Discussion

+

The numbers above are all even numbers. What would be the process for +adding up numbers if the final number is an odd one, e.g., 17? Can you +use the same formula? If not, what adaptations would you need to make to +the formula?

+
+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/glossary.html b/site/docs/instructor/glossary.html new file mode 100644 index 0000000..f710491 --- /dev/null +++ b/site/docs/instructor/glossary.html @@ -0,0 +1,450 @@ + +Lesson Title: Glossary of terms +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Glossary of terms

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TermMeaning
AbstractionAbstractions involves reducing a problem’s complexity +by focusing solely on the most important details. For example, a model +is an abstract representation of a real system. The use of variables in +algebra or computer programming is another example. Abstraction can also +be called generalising.
  
AlgorithmAn algorithm is a series of steps that must be followed +in a specific order to solve a problem. When you plan a route home from +work or cook a recipe, you are executing an algorithm. Providing a +solution to a problem in the form of an algorithm makes a process +repeatable and reproducible by others.
  
AutomationAutomation can involve using a computer program to +perform repetitive tasks or calculations. By making processes +reproducible, algorithms are a key enabler of automation.
  
CodingAnother word for computer programming, i.e. writing +computer code that instructs a computer in what to do.
  
DecompositionSolving a complex problem by breaking it down into +smaller, more manageable tasks.
  
Pattern matchingPattern matching identifies specific patterns within +data, regardless of where the pattern might occur. In contrast to +pattern recognition, pattern matching only identifies exact matches. +Regular expressions can be used to specify these patterns.
  
Pattern recognitionIn computational thinking, identifying patterns or +connections across the different parts of a larger problem is one of the +keys to solving it. Our brains are excellent at spotting patterns and +similarities, making it easier to use previous experience and methods to +come up with solutions.
  
Regular expressionsOften abbreviated to regex, regular +expressions can be used to specify exact search patterns within data. +Such patterns are generally used for search or +search and replace operations within data, e.g., searching +for postcodes, telephone numbers, names, chemical formulae and so +on.
  
ProgrammingAnother word for coding.
  
ValueIn programming, a value is an entity that can be +manipulated by a program. It is usually a number (a whole integer, +e.g. 10 or a floating point number, e.g. 5.126), a single character, or +a string of characters.
  
VariableIn programming, a variable is a kind of ‘container’ for +a value or a range of values that are swapped in and out as a program +runs.
  
WorkflowA workflow is a series of sequential steps to +accomplish a specific task.
  
Working with dataWorking with data frequently involves computational +thinking. Collecting data, analysing data, and visualising data can all +help you break a problem down.
+
+ + +
+
+ + + diff --git a/site/docs/instructor/images.html b/site/docs/instructor/images.html index b790a58..5a5e86c 100644 --- a/site/docs/instructor/images.html +++ b/site/docs/instructor/images.html @@ -3,7 +3,7 @@ -Lesson Title: All Images +Introducing Computational Thinking: All Images -
@@ -148,7 +148,7 @@

@@ -157,7 +157,7 @@

@@ -166,7 +166,7 @@

@@ -175,7 +175,7 @@

@@ -184,7 +184,7 @@

@@ -193,7 +193,7 @@

@@ -202,7 +202,7 @@

@@ -211,7 +211,7 @@

@@ -258,11 +258,11 @@

Summary and Schedule

@@ -275,7 +275,7 @@

Duration: 00h 00m - 1. Introduction + 1. Introduction @@ -283,7 +283,7 @@

Duration: 00h 10m - 2. Exercise + 2. Exercise @@ -291,7 +291,8 @@

Duration: 00h 20m - 3. Computational thinking in practice + 3. Computational thinking in +practice @@ -299,7 +300,8 @@

Duration: 00h 30m - 4. Computational thinking in programming + 4. Computational thinking in +programming @@ -307,7 +309,7 @@

Duration: 00h 40m - 5. Pseudocode + 5. Pseudocode @@ -315,7 +317,7 @@

Duration: 00h 50m - 6. Potential solutions to practice + 6. Potential solutions to practice exercises @@ -324,7 +326,7 @@

Duration: 01h 00m - 7. References and further resources + 7. References and further resources @@ -332,7 +334,7 @@

Duration: 01h 10m - 8. Glossary of terms + 8. Glossary of terms @@ -372,7 +374,7 @@

Windows

-
+

Download Github and R through their respective mediums. Or, you can follow the steps listed at the official guide at Carpentries

@@ -387,7 +389,7 @@

MacOS

-
+

Download Github and R through their respective mediums. Or, you can follow the steps listed at the official guide at Carpentries

@@ -402,7 +404,7 @@

Linux

-
+

Download Github and R through their respective mediums. Or, you can follow the steps listed at the official guide at Carpentries

@@ -411,11 +413,11 @@

@@ -425,12 +427,12 @@

This lesson is subject to the Code of Conduct

- Edit on GitHub + Edit on GitHub - | Contributing - | Source

-

Cite | Contact | About

+ | Contributing + | Source

+

Cite | Contact | About

@@ -460,8 +462,8 @@

"url": "https://carpentries.github.io/workbench-template-md/instructor/index.html", "identifier": "https://carpentries.github.io/workbench-template-md/instructor/index.html", "dateCreated": "2022-08-12", - "dateModified": "2023-07-12", - "datePublished": "2023-07-12" + "dateModified": "2023-07-17", + "datePublished": "2023-07-17" } +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Introduction

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

Computational thinking is an essential prerequisite for anyone +wanting to learn to program computers and write code.

+

Different definitions of computational thinking exist. However, +computational thinking can be described as a set of strategies to enable +people to solve problems, especially complex ones. The BBC provides a +good definition:

+

“Computers can be used to help us solve problems. However, before +a problem can be tackled, the problem itself and the ways in which it +could be solved need to be understood. Computational thinking … allows +us to take a complex problem, understand what the problem is and develop +possible solutions. We can then present these solutions in a way that a +computer, a human, or both, can understand.”

+
Arrows pointing different ways
+

Problem scenario

+

Four friends are out on an afternoon bushwalk. Their plan was to go +only for a short hike, so no-one has brought along an emergency beacon, +and all mobile phones were left in the car. Everyone has a water bottle, +though these are no longer full, but no-one brought a map as the trail +they were planning to follow is clearly marked and signposted.

+

However, they all left the trail together in a great rush when they +heard a distant cry for help. After some fast walking through dense bush +trying and failing to reach whoever made that distress call, they +realise quite suddenly that they are lost. The cries sound much more +distant now, but when they retrace their steps to what they thought was +the path to strike out in a different direction, they cannot find +it.

+

The sun is starting to sink, it is growing colder, they are now +hopelessly lost, and everyone is starting to feel hungry …

+

So what do they do?

+
Arrows pointing different ways

+
+

Breaking down a complex problem

+

This is a complex problem. As we progress through this lesson, we +will learn how to break this problem down so that we can start to solve +it. Let’s first come to grips with what computational thinking is.

+
The four components of computational thinking
The four components of computational +thinking
+

There are four essential components of computational thinking:

+
  • +Decomposition – breaking a problem down into more +manageable parts so that solutions can be found for each. This is also +called factoring.
  • +
  • +Pattern recognition – looking for similarities +within a problem or with other problems so that past solutions or +knowledge can be re-used
  • +
  • +Algorithms – developing step-by-step solutions to +each part of the problem
  • +
  • +Abstraction – generalising (abstracting) the +important detail to make a solution reusable
  • +

Professor Jeannette Wing raised computational thinking as an +important issue for researchers in a 2006 paper. She stated, +“Informally, 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, or more generally, by +combinations of humans and machines.”

+
brain

Wing believes that computational thinking is just as important a +skill for school children to learn as reading, writing and arithmetic. +Increasingly, schools are including computational thinking in school +curricula.

+
+
+

But first, do no harm …

+

While automation brings many benefits, such as lightning-fast data +capture and analysis, it can also render decisions and analysis opaque +and overly rigid. The famous phrase ‘Computer says no’ from the +TV show Little Britain is a perfect example of this kind of +intransigence. Experiences of this kind will frustrate users.

+

Algorithms have also been criticised for bias. As Karan Praharaj says: +“Algorithms do what they’re taught. Unfortunately, some are +inadvertently taught prejudices and unethical biases by societal +patterns hidden in the data … When these algorithms do the job of +amplifying racial, social and gender inequality, instead of alleviating +it; it becomes necessary to take stock of the ethical ramifications and +potential malevolence of the technology.”

+

Use automation, but use it wisely, and ethically, and always with +lashings of human oversight.

+
+
+

What’s next?

+

Our friends in the bush are still in the shouting, blaming and +squabbling stage of their predicament, so while they are occupied in +NOT solving their problem, we will look at +computational thinking in a little more detail and examine how we can +use each step to solve a maths problem.

+
+
+

References

+
  1. British Broadcasting +Corporation BBC Bitesize. KS3: +Introduction to computational thinking.

  2. +
    1. Wing, Jeannette M. “Computational Thinking”, Communications of +the ACM, March 2006, Vol. 49 No. 3, Pages 33-35. DOI: 10.1145/1118178.1118215.
    2. +
  3. +
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/key-points.html b/site/docs/instructor/key-points.html index 9a6b6d8..1397d8b 100644 --- a/site/docs/instructor/key-points.html +++ b/site/docs/instructor/key-points.html @@ -3,7 +3,7 @@ -Lesson Title: Key Points +Introducing Computational Thinking: Key Points -
@@ -144,7 +144,7 @@

@@ -153,7 +153,7 @@

@@ -162,7 +162,7 @@

@@ -171,7 +171,7 @@

@@ -180,7 +180,7 @@

@@ -189,7 +189,7 @@

@@ -198,7 +198,7 @@

@@ -207,7 +207,7 @@

@@ -267,12 +267,12 @@

Learner Profiles

This lesson is subject to the Code of Conduct

- Edit on GitHub + Edit on GitHub - | Contributing - | Source

-

Cite | Contact | About

+ | Contributing + | Source

+

Cite | Contact | About

@@ -302,8 +302,8 @@

Learner Profiles

"url": "https://carpentries.github.io/workbench-template-md/instructor/profiles.html", "identifier": "https://carpentries.github.io/workbench-template-md/instructor/profiles.html", "dateCreated": "2022-08-12", - "dateModified": "2023-07-12", - "datePublished": "2023-07-12" + "dateModified": "2023-07-17", + "datePublished": "2023-07-17" } +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Pseudocode

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

Regardless of programming language, pseudocode is a +useful tool to break coding problems down. Pseudocode helps you list +each step of a planned process so your steps are in a logical order +before you code.

+

Pseudocode is also a good way to explain your needs to software +developers or to run your ideas past people who may not be +programmers.

+
+

Pseudocode example

+

Suppose we are fans of the Lord of the Rings novels, but we +wonder how much the female character of Galadriel featured in the story +compared to the male characters Frodo, Gandalf, Aragorn, Legolas and +Boromir. We could flick through, say, The Fellowship of the +Ring to check (which would be painfully slow), or we could run a +short piece of code to count the number of times each character’s name +is mentioned throughout the story. We could document those steps in +pseudocode before writing any code to be sure we have covered all the +things we will need to do.

+
Pseudocode steps
Pseudocode steps
+

Notes

+
  • The text +only version of The Fellowship of the Ring is the file the +code will process.
  • +
  • The characters’ names, Galadriel, Frodo, Gandalf, Aragorn, Legolas +and Boromir are the values the program will look for and count.
  • +
  • A .txt file is important for this kind of activity, as +all the “smart” formatting (i.e. curly quote marks, hyphens converted to +em and en dashes) that appear within a +.doc or .docx file is stripped out when saving +a .doc or .docx file as a .txt +file.
  • +
  • We could re-use the code to run a similar operation on The +Two Towers and The +Return Of The King, or we could adapt the code even further for +any name or word frequency question we want to automate.
  • +

Spoiler alert - Galadriel gets only 35 +mentions by name compared to Frodo’s 944.

+
+
+

Loops

+

The code that will be used to do this job is an example of a +loop. Loops allow us to execute the same command over +and over again until a certain pre-set condition has been met. In this +case, the condition is to have counted all the appearances of each name +on a designated list.

+
How loops work
Loops in programming
+

In the example above, the program will search all the way through the +text of The +Fellowship of the Ring, adding up all the appearances of the +first value in the list (Galadriel). Then it will go +through the text again to do the count for the second value +(Frodo). The same process will then be done for all the +other characters respectively, and then the program will report its +findings for each value. It will then stop running because the list of +names has been exhausted, i.e. the condition has been met.

+

The name values can also be called variables, because the +value will vary each time the loop runs through the text. Variables are +an important part of abstraction.

+

The same piece of code could be re-used for any word counting +exercise by changing the list variables and the input source. That would +be another example of abstraction.

+
+
+

Practice 1. Creating backup copies of files

+

In a folder, we have 250 image files for which we want to create +backup copies before we process the images for archiving. Manually +creating 250 copies of files seems like a very boring thing to do, so we +are going to automate the workflow to create the backup copies.

+

Write some pseudocode of how you might automate this process.

+
+
+

Practice 2a. Tidying up

+

We have a large folder of files left over from a project that is now +finished. The files are all sitting in the one folder which makes it +hard to navigate. We want to archive the project and its files, but in +the process, we want to create folders by file type, e.g., +.pdf, .jpg, .doc, so that anyone +wanting to access those particular file types can do so easily. We also +want to delete files that have no file extensions. New folders will need +to be created and the different files moved into them by file type.

+

Write some pseudocode of how you might automate this process.

+
+
+

Practice 2b. Tidying up more carefully

+

In the process of doing the above, we actually made a few blunders. +We accidentally deleted some files we should have kept either because +they were mislabelled or they were missing a file extension. Because +this automation is a complex operation that cannot be undone, we want to +make sure we don’t make those kinds of mistakes again.

+

One way to do that is to check we have coded the workflow correctly +before we finally execute the automation. Therefore we could +introduce a step that mimics what would happen if we executed the script +on the files, perhaps by printing the filenames we want to move or +delete to the screen (or to a file) rather than actually +deleting or moving them. That way we can check we are working on the +correct files and only execute the final move workflow once we are sure +we have everything right.

+

Write some pseudocode for that step of the process.

+
+
+

Practice 3. Managing incoming data

+

Suppose you have a number of acoustic listening devices set up in the +bush. Every day, you receive an email from each device with an attached +data file recording that day’s activity. In order to analyse the data +from the devices, all the separate daily data files need to be combined +weekly into a single file. It is important that each device ID is listed +within a column in the combined data file to identify all the different +locations.

+

In order to analyse the data over time, you need to append the weekly +file digest to the existing, now very large, main data file. Before +adding anything new, and in order to safeguard the integrity of the +data, you need to create a backup of that main data file and send a copy +of that backup file to your cloud storage account for safekeeping. Once +the new data has been appended, you need to rename the new main data +file with today’s date as part of the file name, and run software +against the file to ensure the integrity of the data, e.g., to check +that no data is missing (which might indicate a malfunctioning +device).

+

Write some pseudocode of how you might automate this process.

+

Some potential solutions to these practice coding exercises can be +found on the Solutions page.

+
+
+

Learning to program

+

This lesson should help you prepare to learn to code by understanding +the process that coders use to break complex problems down into +programmable parts.

+

Links to sites that teach coding and other resources on computational +thinking are listed in the Resources section.

+
+
+

For later

+

Suppose you write that file movement script and it works a treat.

+

Why not get it to run every month to tidy up folders that invariably +become messy over time, e.g., your computer’s Downloads +folder?

+

Or, suppose you use a file naming convention that starts with +YYYY-MM-DD. Why not run a script annually to sort and +organise your documents by year?

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/reference.html b/site/docs/instructor/reference.html new file mode 100644 index 0000000..1821e6f --- /dev/null +++ b/site/docs/instructor/reference.html @@ -0,0 +1,365 @@ + +Introducing Computational Thinking: Reference +
+ Introducing Computational Thinking +
+ +
+
+ + + + + +
+
+

Reference

+

Last updated on 2023-07-14 | + + Edit this page

+ + + + + +
+ +
+ + +

Glossary +

+

This is a placeholder file. Please add content here.

+
+
+ + +
+
+ + + diff --git a/site/docs/instructor/resources.html b/site/docs/instructor/resources.html new file mode 100644 index 0000000..6416cf9 --- /dev/null +++ b/site/docs/instructor/resources.html @@ -0,0 +1,419 @@ + +Lesson Title: References and further resources +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

References and further resources

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + + +
+

Learning to code

+

There are many courses, MOOCs and other online lessons on learning to +code, whether that be in Python, R, or something else. Find one that +suits you.

+

Python

+
  1. Automate the boring +stuff with Python
  2. +
  3. Introduction +to Python
  4. +
  5. Learn Python
  6. +

R

+
  1. R for data +science
  2. +
  3. Learn R programming
  4. +
  5. R +tutorial
  6. +

General courses (free)

+
  1. Software +Carpentry
  2. +
  3. The Programming +Historian
  4. +

Paid courses

+
  1. Udemy
  2. +
  3. Codecademy
  4. +
  5. DataCamp
  6. +
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/instructor/search.html b/site/docs/instructor/search.html index 6d14f8c..6fbad33 100644 --- a/site/docs/instructor/search.html +++ b/site/docs/instructor/search.html @@ -144,7 +144,7 @@

@@ -153,7 +153,7 @@

@@ -162,7 +162,7 @@

@@ -171,7 +171,7 @@

@@ -180,7 +180,7 @@

@@ -189,7 +189,7 @@

@@ -198,7 +198,7 @@

@@ -207,7 +207,7 @@

@@ -336,7 +336,7 @@

Search site content +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Potential solutions to practice exercises

+

Last updated on 2023-07-17 | + + Edit this page

+ + + + + +
+ +
+ + + +

Different people might approach these practice tasks in very +different ways so these solutions are suggestions only. They are offered +here to provide some guidance for people who might otherwise struggle +with laying out steps.

+
+

Practice 1. Creating backup copies of files

+

In a folder, we have 250 image files for which we want to create +backup copies before we process the images for archiving. Manually +creating 250 copies of files seems like a very boring thing to do, so we +are going to automate the workflow to create the backup copies.

+

This is a perfect task for a loop, as the task is simple and +repetitive.

+
+
+

Potential solution

+

Steps in the copying process

+
Steps in the loop
Steps in the copying loop
+

+
Example code in the Unix shell
+

for filename in "*.jpg" "*.tif" "*.png"
+     do
+     cp $filename backup-$filename
+     echo $filename backup-$filename
done

+
Loop as it would be written in the Unix shell
Coding a loop in the Unix shell
+

Notes

+

In the code example above, the loop will run through the folder +creating back up copies of all the files with the file extension +.jpg. As each file is copied, each original filename and +the filename of each new file will be printed to the screen.

+

Then the loop will restart and repeat the process for all the files +with the file extension .tif, again printing the original +filenames and the filenames of the new files to the screen.

+

Then the loop will restart and run through the folder a third time, +creating back up copies of all the files with the file extension +.png, again printing the original filenames and the +filenames of the new files to the screen.

+

The loop will then stop, as there are no more variables to work +on.

+
+
+
+

Practice 2a. Tidying up

+

We have a large folder of files left over from a project that is now +finished. The files are all sitting in the one folder which makes it +hard to navigate. We want to archive the project and its files, but in +the process, we want to create folders by file type, e.g., +.pdf, .jpg, .doc, so that anyone +wanting to access those particular file types can do so easily. We also +want to delete files that have no file extensions. New folders will need +to be created and the different files moved into them by file type.

+
+
+

Potential solution

+

Steps in the moving process

+
  1. Identify the different file types in the folder.
  2. +
  3. Create new folders to house the different file types.
  4. +
  5. Create a series of loops to work through the folder, file type by +file type, moving the files to the correct folders.
  6. +
  7. Once the final loop has run, delete all remaining files left within +the main folder.
  8. +
  9. Print filenames to the screen as the loop runs to verify it is +working as required.
  10. +

Using a shell script to automate the work

+

The task above could be fully automated using a shell script. A shell +script is a text file containing a sequence of commands for a UNIX-based +operating system that allows those commands to be run in one go, rather +than by entering each command one at a time. Scripts make task +automation possible. The script would contain the commands to do the +tasks listed above, such as folder creation, file movement using loops, +file deletion and so on. The benefit of shell scripts is that the code +they contain can be re-used or adapted for similar tasks.

+
+
+

Practice 2b. Tidying up more carefully

+

In the process of doing the above, we actually made a few blunders. +We accidentally deleted some files we should have kept either because +they were missing a file extension. Because this automation is a complex +operation that cannot be undone, we want to make sure we don’t make +those kinds of mistakes again.

+

One way to do that is to check we have coded the workflow correctly +before we finally execute the automation, possibly by simply +printing to screen all the relevant filenames prior to moving them - +that way, it is possible to check we are working on the right files +before any action is taken.

+

To prevent accidental deletion of files, we could introduce a step to +check whether or not to delete a file, e.g., by using the remove command +rm in the Unix shell with an -i flag. The +-i flag forces the system to ask for confirmation on +whether or not to delete a file. One can answer either +Y or N to the example below.

+

{% include figure.html img=“code-in-shell.png” alt=“RM command in the +shell” caption=“Confirming a ‘remove’ command” width=“75%” %}

+
+
+

Practice 3. Managing incoming data

+

Suppose you have a number of acoustic listening devices set up in the +bush. Every day, you receive an email from each device with an attached +data file recording that day’s activity. In order to analyse the data +from the devices, all the separate daily data files need to be combined +weekly into a single file. It is important that each device ID is listed +within a column in the combined data file to identify all the different +locations.

+

In order to analyse the data over time, you need to append the weekly +file digest to the existing, now very large, main data file. Before +adding anything new, and in order to safeguard the integrity of the +data, you need to create a backup of that main data file and send a copy +of that backup file to your cloud storage account for safekeeping. Once +the new data has been appended, you need to rename the new main data +file with today’s date as part of the file name, and run software +against the file to ensure the integrity of the data, e.g., to check +that no data is missing (which might indicate a malfunctioning +device).

+

Steps in the data combination process

+
  1. Create a new copy of the main data file with today’s date as part of +the file name.
  2. +
  3. Move the previous version of the main data file to cloud +storage.
  4. +
  5. Save all the new data files individually to local storage with the +device ID of each as part of the file names.
  6. +
  7. Create a new weekly data file digest into which the daily digests +from the different devices will be imported.
  8. +
  9. Import each daily digest to that data file with an +append command, ensuring that the device ID relating to +each file’s data is written into a separate column.
  10. +
  11. Append the weekly digest to the newly renamed main data file.
  12. +
  13. Verify that no data is missing. In OpenRefine, using +Facet by Blank on the relevant data fields could be one way +to verify that no data is missing.
  14. +

Using a shell script to automate the work

+

Again, a shell script could be used to automate this work. Given that +these tasks are run weekly, it would make sense to turn this into an +automated task rather than a manual one as that will not only be faster, +but will reduce the opportunity for error.

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/intro.html b/site/docs/intro.html new file mode 100644 index 0000000..af51150 --- /dev/null +++ b/site/docs/intro.html @@ -0,0 +1,466 @@ + +Lesson Title: Introduction +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Introduction

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

Computational thinking is an essential prerequisite for anyone +wanting to learn to program computers and write code.

+

Different definitions of computational thinking exist. However, +computational thinking can be described as a set of strategies to enable +people to solve problems, especially complex ones. The BBC provides a +good definition:

+

“Computers can be used to help us solve problems. However, before +a problem can be tackled, the problem itself and the ways in which it +could be solved need to be understood. Computational thinking … allows +us to take a complex problem, understand what the problem is and develop +possible solutions. We can then present these solutions in a way that a +computer, a human, or both, can understand.”

+
Arrows pointing different ways
+

Problem scenario

+

Four friends are out on an afternoon bushwalk. Their plan was to go +only for a short hike, so no-one has brought along an emergency beacon, +and all mobile phones were left in the car. Everyone has a water bottle, +though these are no longer full, but no-one brought a map as the trail +they were planning to follow is clearly marked and signposted.

+

However, they all left the trail together in a great rush when they +heard a distant cry for help. After some fast walking through dense bush +trying and failing to reach whoever made that distress call, they +realise quite suddenly that they are lost. The cries sound much more +distant now, but when they retrace their steps to what they thought was +the path to strike out in a different direction, they cannot find +it.

+

The sun is starting to sink, it is growing colder, they are now +hopelessly lost, and everyone is starting to feel hungry …

+

So what do they do?

+
Arrows pointing different ways

+
+

Breaking down a complex problem

+

This is a complex problem. As we progress through this lesson, we +will learn how to break this problem down so that we can start to solve +it. Let’s first come to grips with what computational thinking is.

+
The four components of computational thinking
The four components of computational +thinking
+

There are four essential components of computational thinking:

+
  • +Decomposition – breaking a problem down into more +manageable parts so that solutions can be found for each. This is also +called factoring.
  • +
  • +Pattern recognition – looking for similarities +within a problem or with other problems so that past solutions or +knowledge can be re-used
  • +
  • +Algorithms – developing step-by-step solutions to +each part of the problem
  • +
  • +Abstraction – generalising (abstracting) the +important detail to make a solution reusable
  • +

Professor Jeannette Wing raised computational thinking as an +important issue for researchers in a 2006 paper. She stated, +“Informally, 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, or more generally, by +combinations of humans and machines.”

+
brain

Wing believes that computational thinking is just as important a +skill for school children to learn as reading, writing and arithmetic. +Increasingly, schools are including computational thinking in school +curricula.

+
+
+

But first, do no harm …

+

While automation brings many benefits, such as lightning-fast data +capture and analysis, it can also render decisions and analysis opaque +and overly rigid. The famous phrase ‘Computer says no’ from the +TV show Little Britain is a perfect example of this kind of +intransigence. Experiences of this kind will frustrate users.

+

Algorithms have also been criticised for bias. As Karan Praharaj says: +“Algorithms do what they’re taught. Unfortunately, some are +inadvertently taught prejudices and unethical biases by societal +patterns hidden in the data … When these algorithms do the job of +amplifying racial, social and gender inequality, instead of alleviating +it; it becomes necessary to take stock of the ethical ramifications and +potential malevolence of the technology.”

+

Use automation, but use it wisely, and ethically, and always with +lashings of human oversight.

+
+
+

What’s next?

+

Our friends in the bush are still in the shouting, blaming and +squabbling stage of their predicament, so while they are occupied in +NOT solving their problem, we will look at +computational thinking in a little more detail and examine how we can +use each step to solve a maths problem.

+
+
+

References

+
  1. British Broadcasting +Corporation BBC Bitesize. KS3: +Introduction to computational thinking.

  2. +
    1. Wing, Jeannette M. “Computational Thinking”, Communications of +the ACM, March 2006, Vol. 49 No. 3, Pages 33-35. DOI: 10.1145/1118178.1118215.
    2. +
  3. +
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/key-points.html b/site/docs/key-points.html index 4fcc02f..0223054 100644 --- a/site/docs/key-points.html +++ b/site/docs/key-points.html @@ -3,7 +3,7 @@ -Lesson Title: Key Points +Introducing Computational Thinking: Key Points -
@@ -145,7 +145,7 @@

@@ -154,7 +154,7 @@

@@ -163,7 +163,7 @@

@@ -172,7 +172,7 @@

@@ -181,7 +181,7 @@

@@ -190,7 +190,7 @@

@@ -199,7 +199,7 @@

@@ -208,7 +208,7 @@

@@ -268,12 +268,12 @@

Learner Profiles

This lesson is subject to the Code of Conduct

- Edit on GitHub + Edit on GitHub - | Contributing - | Source

-

Cite | Contact | About

+ | Contributing + | Source

+

Cite | Contact | About

@@ -303,8 +303,8 @@

Learner Profiles

"url": "https://carpentries.github.io/workbench-template-md/profiles.html", "identifier": "https://carpentries.github.io/workbench-template-md/profiles.html", "dateCreated": "2022-08-12", - "dateModified": "2023-07-12", - "datePublished": "2023-07-12" + "dateModified": "2023-07-17", + "datePublished": "2023-07-17" } +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Pseudocode

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

Regardless of programming language, pseudocode is a +useful tool to break coding problems down. Pseudocode helps you list +each step of a planned process so your steps are in a logical order +before you code.

+

Pseudocode is also a good way to explain your needs to software +developers or to run your ideas past people who may not be +programmers.

+
+

Pseudocode example

+

Suppose we are fans of the Lord of the Rings novels, but we +wonder how much the female character of Galadriel featured in the story +compared to the male characters Frodo, Gandalf, Aragorn, Legolas and +Boromir. We could flick through, say, The Fellowship of the +Ring to check (which would be painfully slow), or we could run a +short piece of code to count the number of times each character’s name +is mentioned throughout the story. We could document those steps in +pseudocode before writing any code to be sure we have covered all the +things we will need to do.

+
Pseudocode steps
Pseudocode steps
+

Notes

+
  • The text +only version of The Fellowship of the Ring is the file the +code will process.
  • +
  • The characters’ names, Galadriel, Frodo, Gandalf, Aragorn, Legolas +and Boromir are the values the program will look for and count.
  • +
  • A .txt file is important for this kind of activity, as +all the “smart” formatting (i.e. curly quote marks, hyphens converted to +em and en dashes) that appear within a +.doc or .docx file is stripped out when saving +a .doc or .docx file as a .txt +file.
  • +
  • We could re-use the code to run a similar operation on The +Two Towers and The +Return Of The King, or we could adapt the code even further for +any name or word frequency question we want to automate.
  • +

Spoiler alert - Galadriel gets only 35 +mentions by name compared to Frodo’s 944.

+
+
+

Loops

+

The code that will be used to do this job is an example of a +loop. Loops allow us to execute the same command over +and over again until a certain pre-set condition has been met. In this +case, the condition is to have counted all the appearances of each name +on a designated list.

+
How loops work
Loops in programming
+

In the example above, the program will search all the way through the +text of The +Fellowship of the Ring, adding up all the appearances of the +first value in the list (Galadriel). Then it will go +through the text again to do the count for the second value +(Frodo). The same process will then be done for all the +other characters respectively, and then the program will report its +findings for each value. It will then stop running because the list of +names has been exhausted, i.e. the condition has been met.

+

The name values can also be called variables, because the +value will vary each time the loop runs through the text. Variables are +an important part of abstraction.

+

The same piece of code could be re-used for any word counting +exercise by changing the list variables and the input source. That would +be another example of abstraction.

+
+
+

Practice 1. Creating backup copies of files

+

In a folder, we have 250 image files for which we want to create +backup copies before we process the images for archiving. Manually +creating 250 copies of files seems like a very boring thing to do, so we +are going to automate the workflow to create the backup copies.

+

Write some pseudocode of how you might automate this process.

+
+
+

Practice 2a. Tidying up

+

We have a large folder of files left over from a project that is now +finished. The files are all sitting in the one folder which makes it +hard to navigate. We want to archive the project and its files, but in +the process, we want to create folders by file type, e.g., +.pdf, .jpg, .doc, so that anyone +wanting to access those particular file types can do so easily. We also +want to delete files that have no file extensions. New folders will need +to be created and the different files moved into them by file type.

+

Write some pseudocode of how you might automate this process.

+
+
+

Practice 2b. Tidying up more carefully

+

In the process of doing the above, we actually made a few blunders. +We accidentally deleted some files we should have kept either because +they were mislabelled or they were missing a file extension. Because +this automation is a complex operation that cannot be undone, we want to +make sure we don’t make those kinds of mistakes again.

+

One way to do that is to check we have coded the workflow correctly +before we finally execute the automation. Therefore we could +introduce a step that mimics what would happen if we executed the script +on the files, perhaps by printing the filenames we want to move or +delete to the screen (or to a file) rather than actually +deleting or moving them. That way we can check we are working on the +correct files and only execute the final move workflow once we are sure +we have everything right.

+

Write some pseudocode for that step of the process.

+
+
+

Practice 3. Managing incoming data

+

Suppose you have a number of acoustic listening devices set up in the +bush. Every day, you receive an email from each device with an attached +data file recording that day’s activity. In order to analyse the data +from the devices, all the separate daily data files need to be combined +weekly into a single file. It is important that each device ID is listed +within a column in the combined data file to identify all the different +locations.

+

In order to analyse the data over time, you need to append the weekly +file digest to the existing, now very large, main data file. Before +adding anything new, and in order to safeguard the integrity of the +data, you need to create a backup of that main data file and send a copy +of that backup file to your cloud storage account for safekeeping. Once +the new data has been appended, you need to rename the new main data +file with today’s date as part of the file name, and run software +against the file to ensure the integrity of the data, e.g., to check +that no data is missing (which might indicate a malfunctioning +device).

+

Write some pseudocode of how you might automate this process.

+

Some potential solutions to these practice coding exercises can be +found on the Solutions page.

+
+
+

Learning to program

+

This lesson should help you prepare to learn to code by understanding +the process that coders use to break complex problems down into +programmable parts.

+

Links to sites that teach coding and other resources on computational +thinking are listed in the Resources section.

+
+
+

For later

+

Suppose you write that file movement script and it works a treat.

+

Why not get it to run every month to tidy up folders that invariably +become messy over time, e.g., your computer’s Downloads +folder?

+

Or, suppose you use a file naming convention that starts with +YYYY-MM-DD. Why not run a script annually to sort and +organise your documents by year?

+
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/reference.html b/site/docs/reference.html new file mode 100644 index 0000000..3dcdffb --- /dev/null +++ b/site/docs/reference.html @@ -0,0 +1,364 @@ + +Introducing Computational Thinking: Reference +
+ Introducing Computational Thinking +
+ +
+
+ + + + + +
+
+

Reference

+

Last updated on 2023-07-14 | + + Edit this page

+ + + +
+ +
+ + +

Glossary +

+

This is a placeholder file. Please add content here.

+
+
+ + +
+
+ + + diff --git a/site/docs/resources.html b/site/docs/resources.html new file mode 100644 index 0000000..314d2ed --- /dev/null +++ b/site/docs/resources.html @@ -0,0 +1,418 @@ + +Lesson Title: References and further resources +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

References and further resources

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + + +
+

Learning to code

+

There are many courses, MOOCs and other online lessons on learning to +code, whether that be in Python, R, or something else. Find one that +suits you.

+

Python

+
  1. Automate the boring +stuff with Python
  2. +
  3. Introduction +to Python
  4. +
  5. Learn Python
  6. +

R

+
  1. R for data +science
  2. +
  3. Learn R programming
  4. +
  5. R +tutorial
  6. +

General courses (free)

+
  1. Software +Carpentry
  2. +
  3. The Programming +Historian
  4. +

Paid courses

+
  1. Udemy
  2. +
  3. Codecademy
  4. +
  5. DataCamp
  6. +
+ + + +
+
+ + +
+
+ + + diff --git a/site/docs/search.html b/site/docs/search.html index 9dc382f..d0db2c1 100644 --- a/site/docs/search.html +++ b/site/docs/search.html @@ -145,7 +145,7 @@

@@ -154,7 +154,7 @@

@@ -163,7 +163,7 @@

@@ -172,7 +172,7 @@

@@ -181,7 +181,7 @@

@@ -190,7 +190,7 @@

@@ -199,7 +199,7 @@

@@ -208,7 +208,7 @@

@@ -335,7 +335,7 @@

Search site content +
+ Lesson Title +
+ +
+
+ + + + + +
+
+

Potential solutions to practice exercises

+

Last updated on 2023-07-17 | + + Edit this page

+ + + +
+ +
+ + + +

Different people might approach these practice tasks in very +different ways so these solutions are suggestions only. They are offered +here to provide some guidance for people who might otherwise struggle +with laying out steps.

+
+

Practice 1. Creating backup copies of files

+

In a folder, we have 250 image files for which we want to create +backup copies before we process the images for archiving. Manually +creating 250 copies of files seems like a very boring thing to do, so we +are going to automate the workflow to create the backup copies.

+

This is a perfect task for a loop, as the task is simple and +repetitive.

+
+
+

Potential solution

+

Steps in the copying process

+
Steps in the loop
Steps in the copying loop
+

+
Example code in the Unix shell
+

for filename in "*.jpg" "*.tif" "*.png"
+     do
+     cp $filename backup-$filename
+     echo $filename backup-$filename
done

+
Loop as it would be written in the Unix shell
Coding a loop in the Unix shell
+

Notes

+

In the code example above, the loop will run through the folder +creating back up copies of all the files with the file extension +.jpg. As each file is copied, each original filename and +the filename of each new file will be printed to the screen.

+

Then the loop will restart and repeat the process for all the files +with the file extension .tif, again printing the original +filenames and the filenames of the new files to the screen.

+

Then the loop will restart and run through the folder a third time, +creating back up copies of all the files with the file extension +.png, again printing the original filenames and the +filenames of the new files to the screen.

+

The loop will then stop, as there are no more variables to work +on.

+
+
+
+

Practice 2a. Tidying up

+

We have a large folder of files left over from a project that is now +finished. The files are all sitting in the one folder which makes it +hard to navigate. We want to archive the project and its files, but in +the process, we want to create folders by file type, e.g., +.pdf, .jpg, .doc, so that anyone +wanting to access those particular file types can do so easily. We also +want to delete files that have no file extensions. New folders will need +to be created and the different files moved into them by file type.

+
+
+

Potential solution

+

Steps in the moving process

+
  1. Identify the different file types in the folder.
  2. +
  3. Create new folders to house the different file types.
  4. +
  5. Create a series of loops to work through the folder, file type by +file type, moving the files to the correct folders.
  6. +
  7. Once the final loop has run, delete all remaining files left within +the main folder.
  8. +
  9. Print filenames to the screen as the loop runs to verify it is +working as required.
  10. +

Using a shell script to automate the work

+

The task above could be fully automated using a shell script. A shell +script is a text file containing a sequence of commands for a UNIX-based +operating system that allows those commands to be run in one go, rather +than by entering each command one at a time. Scripts make task +automation possible. The script would contain the commands to do the +tasks listed above, such as folder creation, file movement using loops, +file deletion and so on. The benefit of shell scripts is that the code +they contain can be re-used or adapted for similar tasks.

+
+
+

Practice 2b. Tidying up more carefully

+

In the process of doing the above, we actually made a few blunders. +We accidentally deleted some files we should have kept either because +they were missing a file extension. Because this automation is a complex +operation that cannot be undone, we want to make sure we don’t make +those kinds of mistakes again.

+

One way to do that is to check we have coded the workflow correctly +before we finally execute the automation, possibly by simply +printing to screen all the relevant filenames prior to moving them - +that way, it is possible to check we are working on the right files +before any action is taken.

+

To prevent accidental deletion of files, we could introduce a step to +check whether or not to delete a file, e.g., by using the remove command +rm in the Unix shell with an -i flag. The +-i flag forces the system to ask for confirmation on +whether or not to delete a file. One can answer either +Y or N to the example below.

+

{% include figure.html img=“code-in-shell.png” alt=“RM command in the +shell” caption=“Confirming a ‘remove’ command” width=“75%” %}

+
+
+

Practice 3. Managing incoming data

+

Suppose you have a number of acoustic listening devices set up in the +bush. Every day, you receive an email from each device with an attached +data file recording that day’s activity. In order to analyse the data +from the devices, all the separate daily data files need to be combined +weekly into a single file. It is important that each device ID is listed +within a column in the combined data file to identify all the different +locations.

+

In order to analyse the data over time, you need to append the weekly +file digest to the existing, now very large, main data file. Before +adding anything new, and in order to safeguard the integrity of the +data, you need to create a backup of that main data file and send a copy +of that backup file to your cloud storage account for safekeeping. Once +the new data has been appended, you need to rename the new main data +file with today’s date as part of the file name, and run software +against the file to ensure the integrity of the data, e.g., to check +that no data is missing (which might indicate a malfunctioning +device).

+

Steps in the data combination process

+
  1. Create a new copy of the main data file with today’s date as part of +the file name.
  2. +
  3. Move the previous version of the main data file to cloud +storage.
  4. +
  5. Save all the new data files individually to local storage with the +device ID of each as part of the file names.
  6. +
  7. Create a new weekly data file digest into which the daily digests +from the different devices will be imported.
  8. +
  9. Import each daily digest to that data file with an +append command, ensuring that the device ID relating to +each file’s data is written into a separate column.
  10. +
  11. Append the weekly digest to the newly renamed main data file.
  12. +
  13. Verify that no data is missing. In OpenRefine, using +Facet by Blank on the relevant data fields could be one way +to verify that no data is missing.
  14. +

Using a shell script to automate the work

+

Again, a shell script could be used to automate this work. Given that +these tasks are run weekly, it would make sense to turn this into an +automated task rather than a manual one as that will not only be faster, +but will reduce the opportunity for error.

+
+ + + +
+
+ + +
+
+ + +