Skip to content

Commit 8b56842

Browse files
Merge pull request #206 from coding-for-reproducible-research/proof_reading
Proof reading for computational thinking
2 parents b519bad + b7b163f commit 8b56842

26 files changed

+106
-108
lines changed

individual_modules/computational_thinking/abstraction.ipynb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"# Abstraction\n",
1515
"\n",
1616
"## Learning Objectives\n",
17-
"- Understand the concept of abstraction and its importance in problem-solvinging\n",
17+
"- Understand the concept of abstraction and its importance in problem-solvings\n",
1818
"- Differentiate between essential and non-essential information in problem-solving\n",
19-
"- Apply abstraction to simply complex problems\n",
19+
"- Apply abstraction to simplify complex problems\n",
2020
"- Use abstraction to create more efficient and effective solutions\n",
2121
"- Identify real-world examples of abstraction and how they simplify problem-solving\n",
2222
"\n",
@@ -44,8 +44,7 @@
4444
"\n",
4545
"If you see a simple interface covering a more complex implementation, this is abstraction. \n",
4646
"\n",
47-
"For example:\n",
48-
"* The interface of a car is simple; a steering wheel, accelerator, brake and gear stick. However, these cover a much more complex machine. You learn that pressing the accelerator makes the car go faster but you are not taught how the acceleration actually works - because the details of this are not important for you to drive the car.\n",
47+
"For example, the interface of a car is simple; a steering wheel, accelerator, brake and gear stick. However, these cover a much more complex machine. You learn that pressing the accelerator makes the car go faster but you are not taught how the acceleration actually works - because the details of this are not important for you to drive the car.\n",
4948
"\n",
5049
"### Activity: Tour Guide\n",
5150
"\n",

individual_modules/computational_thinking/algorithms.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@
3636
"* The method of a carbonara recipe is an algorithm designed to assemble certain elements into a meal. \n",
3737
"* Directions are an algorithm designed to navigate a person from A to B.\n",
3838
"* How to read a clock.\n",
39-
"* Wet laboratory protocol or or clinical trial protocol or data collection protocol\n",
39+
"* Wet laboratory protocol or clinical trial protocol or data collection protocol\n",
4040
"\n",
4141
"Algorithms are essential tools but they are also really powerful. Apart for the purpose of programming they can be advantageous for the following reasons\n",
4242
"\n",
4343
"1. Reproducibility - having a standardized process means you can ensure the same steps on every execution.\n",
4444
"2. Efficiency - knowing the stages of an algorithm means you can remove redundancy/identify repetitive processes.\n",
4545
"3. Scalability - a clearly defined process can easily be extended to run on larger datasets or more complex problems.\n",
4646
"4. Sharable - efficient way to share a process across colleagues, teams, departments or institutions.\n",
47-
"5. Automation - once a solution has be defined you can identify how it can be automated. \n",
47+
"5. Automation - once a solution has been defined you can identify how it can be automated. \n",
4848
"\n",
4949
"\n",
5050
"\n",
5151
"## Faulty design vs faulty implementation \n",
5252
"\n",
5353
"Being an efficient programmer is not only about writing code - it is about solving problems in a way that is translatable to a computer. It means using your knowledge of how a computer or language works, to use relevant constructs as the basis of your solution. Often what people think of as a problem with code writing is in fact a problem with the algorithm. \n",
5454
"\n",
55-
"In many of the examples above (recipes and directions) we have probably experienced time when they go wrong. We can use these to demonstrate the distinction between errors in the algorithm compared to errors in how it is transcribed into instructions.\n",
55+
"In many of the examples above (recipes and directions) we have probably experienced times when they went wrong. We can use these to demonstrate the distinction between errors in the algorithm compared to errors in how it is transcribed into instructions.\n",
5656
"\n",
5757
"Let's start with the case of directions, let's say you've arrive in London at Paddington train station and you need to get to Edgware. A friend has helpfully written down the route by the Underground. Your algorithm is as follows:\n",
5858
"\n",
@@ -72,7 +72,7 @@
7272
"\n",
7373
"Again you get out at your final destination, where the sign says High Barnet. The wrong location again! You call your friend, she runs through the instructions with you again and you compare to your written notes. This time you incorrectly wrote the instructions down. In this instance the problem was a coding error, the algorithm was fine, but you had an error in the set of instructions you used to navigate. \n",
7474
"\n",
75-
"Typically coding errors are easier to detect and fix, than problems with the underlying algorithm. A good text editor with syntax and language highlight can prevent these. To pick up issues with the algorithm, requires more manual work, typically working through the algorithm and compare what the code is actually doing compared to what you thought it should be doing. This uses a combination of predicting and evaluation to debug your code.\n",
75+
"Typically coding errors are easier to detect and fix than problems with the underlying algorithm. A good text editor with syntax and language highlight can prevent these. To pick up issues with the algorithm requires more manual work, typically working through the algorithm and compare what the code is actually doing compared to what you thought it should be doing. This uses a combination of predicting and evaluation to debug your code.\n",
7676
"\n",
7777
"Consider the exercise below:\n",
7878
"\n",
@@ -110,7 +110,7 @@
110110
"print(x+y)\n",
111111
"```\n",
112112
"\n",
113-
"Often what we think are issues with implementation are actually issues of algorithm. The claim there is something wrong with my code/script infers that the problem is syntax, when more likely the problem is with what you are asking the computer to do. This phrasing can be misleading as it fails to recognize the distinguish of the two possible sources of error.\n",
113+
"Often what we think are issues with implementation are actually issues of algorithm. The claim there is something wrong with my code/script infers that the problem is syntax, when more likely the problem is with what you are asking the computer to do. This phrasing can be misleading as it fails to distinguish between the two possible sources of error.\n",
114114
"\n",
115115
"## Designing algorithms\n",
116116
"\n",
@@ -138,7 +138,7 @@
138138
"\n",
139139
"### Activity: Snakes, ladders & flowcharts\n",
140140
"\n",
141-
"Snakes and ladders is dice game where players advance along the board based on the roll of the dice. Upon landing on a square on the board, a player may either encounter a snake, where they are forced backwards a number of squares, a ladder, where they advance a number of squares, or nothing, in which case they remain on that square. A player wins when they reach the end of the board.\n",
141+
"Snakes and ladders is a dice game where players advance along the board based on the roll of the dice. Upon landing on a square on the board, a player may either encounter a snake, where they are forced backwards a number of squares, a ladder, where they advance a number of squares, or nothing, in which case they remain on that square. A player wins when they reach the end of the board.\n",
142142
"\n",
143143
"Design a flowchart for the game. The total number of board squares should be 100, and the maximum number of squares a player is advanced or returned should be 30.\n",
144144
"\n",

individual_modules/computational_thinking/alignment.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
"* algorithms\n",
2828
"* decomposition\n",
2929
"* pattern recognition\n",
30-
"* abstraction\n",
30+
"* abstraction.\n",
3131
"\n",
32-
"These approaches have allowed us to develop a solution to our problem. Critically at this stage it is likely that the solution still looks like a human solution. In this lesson we are going to think about how we translate this solution into something we can write code for. To do this we need to align this human solution to concepts, constructs or paradigms for our language of choice. Whilst computational thinking is agnostic of programming language, this translation element may vary depending on the specific language. There are however some common themes we can identify.\n",
32+
"These approaches have allowed us to develop a solution to our problem. Critically at this stage it is likely that the solution still looks like a human solution. We are going to think about how we translate this solution into something we can write code for. To do this we need to align this human solution to concepts, constructs or paradigms for our language of choice. Whilst computational thinking is agnostic of programming language, this translation element may vary depending on the specific language. There are, however, some common themes we can identify.\n",
3333
"\n",
3434
"If you have the knowledge of a couple of different languages, with your solution in hand you are now in a position to evaluate which of those might be the best fit. Computational thinking and separating the design of the solution from the actual coding has benefits for even more experienced practitioners.\n",
3535
"\n",
@@ -51,7 +51,7 @@
5151
"\n",
5252
"We then start rolling the dice. To know where the current player is going to move to, we need to know the value of the dice roll, so this becomes another variable. We will call this `D`. We only need one element here as the players only roll the dice one at a time. Once the dice has been rolled we add this value to the current position of the current player. We can use `i` to extract the current position (by slicing or subsetting) and then replace it with the new position.\n",
5353
"\n",
54-
"Before this player's go is over, we need to check whether they have landed on either a snake or a ladder to determine if they need to move again. We are using this information to make a decision, we need to introduce two pathways in our program based on a criteria. This can only be achieved with an `IF` statement. To use an `IF` statement we need a condition we can evaluate to be either `TRUE` or `FALSE`. Furthermore, there are multiple possible squares with either snakes or ladders we want to check we have not landed on. We need a reference list of squares with snakes heads or bottoms of ladders to check. What's more, if we are on either a snake or ladder we will then need to know which square we are sent back to or advanced. In python we could use a dictionary where the key is the head of the snake and the value the tail, in R we would probably use a data.frame. If `TRUE`, we then replace the current position with the end of the snake or ladder (the value we looked up in the dictionary). \n",
54+
"Before this player's go is over, we need to check whether they have landed on either a snake or a ladder to determine if they need to move again. We are using this information to make a decision, we need to introduce two pathways in our program based on a criteria. This can only be achieved with an `IF` statement. To use an `IF` statement we need a condition we can evaluate to be either `TRUE` or `FALSE`. Furthermore, there are multiple possible squares with either snakes or ladders we want to check we have not landed on. We need a reference list of squares with snakes heads or bottoms of ladders to check. What's more, if we are on either a snake or ladder we will then need to know which square we are sent back to or advanced. In Python, we could use a dictionary where the key is the head of the snake and the value the tail. In R we would probably use a data.frame. If `TRUE`, we then replace the current position with the end of the snake or ladder (the value we looked up in the dictionary). \n",
5555
"\n",
5656
"This is a completed go and play now passes through to the next player. So we have already discussed how our variable `i` is used to track the progress of the game. But how do we get our program to rerun the same process for each player? Our flowchart clearly shows the repetition element of the game, and as we are iterating through players we might think that we need a for loop. However, a for loop will only rotate through each player once. It will then stop. \n",
5757
"\n",
@@ -64,7 +64,7 @@
6464
"\n",
6565
"For this programme to run we need to introduce some dice rolls. To simulate a dice, we sample from the numbers 1,2,3,4,5,6. \n",
6666
"\n",
67-
"If you want to see this in code here is an example for R:\n",
67+
"If you want to see this in code, here is an example for R:\n",
6868
"\n",
6969
"``` R\n",
7070
"nPlayers <- 4\n",
@@ -100,7 +100,7 @@
100100
"}\n",
101101
"```\n",
102102
"\n",
103-
"A solution in python would be\n",
103+
"A solution in Python would be\n",
104104
"\n",
105105
"``` python\n",
106106
"import random\n",

0 commit comments

Comments
 (0)