Skip to content

Commit 7d61742

Browse files
Merge pull request #191 from coding-for-reproducible-research/issue190-julia_typos
Fix typos in Julia Intro notes
2 parents ab1a72f + 70e2c20 commit 7d61742

File tree

7 files changed

+28
-22
lines changed

7 files changed

+28
-22
lines changed

individual_modules/introduction_to_julia/arrays_and_matrices.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"metadata": {},
5353
"source": [
5454
"#### Constructor\n",
55-
"It is also possible to make use of the `Array` constructor, allowing for more control over the arrays properties, relevant to when considering specific performance elements. The use of the constructor can be helpful in situations where performance is needed as to allow for the array to remain unitiatilised until the final values are put into the array, and not requiring the array to be populated with zeros and ones until that time arrives. \n",
55+
"It is also possible to make use of the `Array` constructor, allowing for more control over the arrays properties, relevant to when considering specific performance elements. The use of the constructor can be helpful in situations where performance is needed as to allow for the array to remain uninitialised until the final values are put into the array, and not requiring the array to be populated with zeros and ones until that time arrives.\n",
5656
"\n",
5757
"The code below creates an uninitialized arrays of integers with 5 elements. If you print the values for the array you will get a different "
5858
]
@@ -81,7 +81,7 @@
8181
"id": "f806f17f-f65f-4af0-8716-0892be608684",
8282
"metadata": {},
8383
"source": [
84-
"#### Rnages and Comprehension \n",
84+
"#### Ranges and Comprehension \n",
8585
"It is also possible to create arrays with the use of ranges and comprehension as seen below. If the value of `c` is printed as it is, it will give a `UnitRange` object, the `collect` function is able to convert the range into an array, which then gives the format seen before when printing the variable. "
8686
]
8787
},
@@ -248,7 +248,7 @@
248248
"Manipulating arrays involved accessing and modifying their elements, as well as performing various operations on them. \n",
249249
"\n",
250250
"#### Indexing\n",
251-
"Square brackets with indices can be used to access specific elements. Of note is that in Julia indexesing starts at 1."
251+
"Square brackets with indices can be used to access specific elements. Of note is that in Julia indexing starts at 1."
252252
]
253253
},
254254
{

individual_modules/introduction_to_julia/control_flow.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"\n",
2222
"\n",
2323
"## Conditional Statements \n",
24-
"Julia uses `if`, `else`, and `elseif` to allow your program to execute different sections of code based on whether a coniditon (or set of conditions) is true or false. For example the code below will determine if a given number is negative, positive or zero."
24+
"Julia uses `if`, `else`, and `elseif` to allow your program to execute different sections of code based on whether a condition (or set of conditions) is true or false. For example the code below will determine if a given number is negative, positive or zero."
2525
]
2626
},
2727
{

individual_modules/introduction_to_julia/functions.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
" - **Parameter**: In the above function this is `radius`. The syntax of `::Float64` denotes type annotation for double precision floating point numbers. \n",
6363
" - **Returns**: The computed area using the const\n",
6464
"\n",
65-
"To then make use of the function there is a need to call the function with the arguement for the parameter, seen in the above with calculating the area of a circle with a radius of 5. \n",
65+
"To then make use of the function there is a need to call the function with the argument for the parameter, seen in the above with calculating the area of a circle with a radius of 5. \n",
6666
"\n",
6767
"## Lambda (Anonymous) Functions \n",
6868
"Lambda functions are functions that are not bound to a name and often used as short code snippets that are passed onto higher-order functions. An example definition and usage of a lambda function can be seen below."
@@ -94,7 +94,7 @@
9494
"metadata": {},
9595
"source": [
9696
"## Multiple Dispatch\n",
97-
"Multiple dispatch is a key feature of Julia, where the function that is called depends on the runtime types of all arguements, allowing for efficient and flexible code. Below is an example defining multiple version of an \"add\" function, where each handles a different type of input. "
97+
"Multiple dispatch is a key feature of Julia, where the function that is called depends on the runtime types of all arguments, allowing for efficient and flexible code. Below is an example defining multiple version of an \"add\" function, where each handles a different type of input. "
9898
]
9999
},
100100
{
@@ -137,7 +137,7 @@
137137
"The use of multiple dispatch has a range of different benefits including:\n",
138138
"- **Flexibility**: Functions can be written in a generic manner, with specific behaviour implemented for specific types.\n",
139139
"- **Performance**: Julia is able to optimize the method calls at runtime, leading to efficient code execution.\n",
140-
"- **Extenability**: New types can be introducted without requiring existing code modification. "
140+
"- **Extensibility**: New types can be introduced without requiring existing code modification."
141141
]
142142
}
143143
],

individual_modules/introduction_to_julia/io.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"- Implement data processing tasks using various file formats \n",
2121
"\n",
2222
"## Overview of I/O\n",
23-
" I/O (Input/Output) operations involve reading data from data streams and outputing data into streams, these typically involve writing data to files and reading data from files.\n",
23+
" I/O (Input/Output) operations involve reading data from data streams and outputting data into streams, these typically involve writing data to files and reading data from files.\n",
2424
"\n",
2525
"### File Handling \n",
26-
"File handling can be used in a number of different circumstances including data processing, storage and retrival, alongside creating logs and configuration files."
26+
"File handling can be used in a number of different circumstances including data processing, storage and retrieval, alongside creating logs and configuration files."
2727
]
2828
},
2929
{
@@ -33,7 +33,7 @@
3333
"source": [
3434
"## Basic File Operations \n",
3535
"### Opening and Closing Files \n",
36-
"The first arguement to the function `open()` gives the filepath for the file that is to be opened, with the second arguement outlining the permissions, in the case below, read denoted with `r`, but write access could be set with `w`. "
36+
"The first argument to the function `open()` gives the filepath for the file that is to be opened, with the second argument outlining the permissions, in the case below, read denoted with `r`, but write access could be set with `w`."
3737
]
3838
},
3939
{
@@ -55,7 +55,7 @@
5555
"id": "73256311-4553-41cf-a428-9b880ff27ffa",
5656
"metadata": {},
5757
"source": [
58-
"Ofcourse simply opening and closing the file is not a lot of use, and at the very least we will want to read the data in the file. \n",
58+
"Of-course simply opening and closing the file is not a lot of use, and at the very least we will want to read the data in the file.\n",
5959
"\n",
6060
"### Reading from and Writing to Files \n",
6161
"#### Reading from a text file \n"
@@ -136,7 +136,7 @@
136136
"id": "85d11a40-f4a8-4e34-bc0e-520ca7f5a608",
137137
"metadata": {},
138138
"source": [
139-
"As you can see from the output the only content within the file is the content that we have put into the file. If we want to instead append data to the file, then we can make use of the arguement `a` rather than `w`."
139+
"As you can see from the output the only content within the file is the content that we have put into the file. If we want to instead append data to the file, then we can make use of the argument `a` rather than `w`."
140140
]
141141
},
142142
{

individual_modules/introduction_to_julia/operations.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"- Understand the syntax and usage of different operators in Julia\n",
2020
"- Implement basic mathematical and logical operations in Julia scripts\n",
2121
"\n",
22-
"## Arthmetic Operations"
22+
"## Arithmetic Operations"
2323
]
2424
},
2525
{

individual_modules/introduction_to_julia/package_management.ipynb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"# Package Management\n",
1515
"## Learning Objectives\n",
1616
"- Understand the basics of Julia's package management system\n",
17-
"- Add, remove, and update packages using Julias package manage (Pkg)\n",
17+
"- Add, remove, and update packages using Julia's package manage (Pkg)\n",
1818
"- View and manage installed packages in your Julia environment\n",
1919
"- Explore common Julia packages and their functionalities\n",
2020
"- Implement package management best practices in your Julia projects \n",
2121
"\n",
2222
"As seen at various points throughout this course, Julia makes use of packages to provide access to key functionality that you will likely you commonly within your workflow. \n",
2323
"\n",
2424
"## Overview of Julia's Package System \n",
25-
"Julia has a rich ecosystem of packages, enabling access to extended functioanlity for a number ofvarious tasks, including data analysis, visualisation, and scientific computing to name a few. The Julia package manager (Pkg) is a powerful tool for managing these packages. \n",
25+
"Julia has a rich ecosystem of packages, enabling access to extended functionality for a number of various tasks, including data analysis, visualisation, and scientific computing to name a few. The Julia package manager (Pkg) is a powerful tool for managing these packages.\n",
2626
"\n",
2727
"The use of the Pkg manager allows for effective package management, making it easy to install, update, and manage dependencies.\n",
2828
"\n",
@@ -53,7 +53,8 @@
5353
"tags": []
5454
},
5555
"source": [
56-
"of note is that before you are able to use a package you first need to import it, which in Julia can be achieved with the use of 'using <package-name>`. Infact within Julia Pkg is also a package and so needs to be imported before you are then able to import other packages. \n",
56+
"Of note is that before you are able to use a package you first need to import it, which in Julia can be achieved with the use of 'using <package-name>`.\n",
57+
"In fact within Julia Pkg is also a package and so needs to be imported before you are then able to import other packages.\n",
5758
"\n",
5859
"### Removing Packages\n",
5960
"Removing packages can be achieved with the use of `Pkg.rm`. For example to remove the package \"Plots\" we could make use of the command `Pkg.rm(\"Plots\")`\n",
@@ -118,12 +119,13 @@
118119
"[JuliaDB.jl](http://juliadb.org/latest/)\n",
119120
"\n",
120121
"## 5. JuMP.jl\n",
121-
"`JuMP.jl` is a domain-specific modeling language for mathematical optimization embedded in Julia. It is used for linear programming, nonlinear programming, and other optimization problems.\n",
122+
"`JuMP.jl` is a domain-specific modelling language for mathematical optimization embedded in Julia.\n",
123+
"It is used for linear programming, non-linear programming, and other optimization problems.\n",
122124
"\n",
123125
"[JuMP.jl](https://jump.dev/JuMP.jl/stable/)\n",
124126
"\n",
125127
"## 6. Distributions.jl\n",
126-
"`Distributions.jl` provides a large collection of probability distributions and related functions. It is useful for statistical modeling and probabilistic computations.\n",
128+
"`Distributions.jl` provides a large collection of probability distributions and related functions. It is useful for statistical modelling and probabilistic computations.\n",
127129
"\n",
128130
"[Distributions.jl](https://juliastats.org/Distributions.jl/stable/)\n",
129131
"\n",

individual_modules/introduction_to_julia/performant_code.ipynb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"source": [
1414
"# Performant Code\n",
15-
"Julia was designed for high-performance numerical and scientific computing. In order to fully utilise Julia capabilities writing performant code is cruical, particularly for the computationaly intensive tasks it has been desinged for. \n",
15+
"Julia was designed for high-performance numerical and scientific computing.\n",
16+
"In order to fully utilise Julia capabilities writing performant code is crucial, particularly for the computationally intensive tasks it has been designed for.\n",
1617
"\n",
1718
"## Learning Objectives\n",
1819
"- Understand the basics of performance tuning strategies in Julia\n",
@@ -32,7 +33,9 @@
3233
"### Type Stability\n",
3334
"**Definition**: Type stability means that the type of a variable's value is predictable and consistent within a function. Julia's Just-In-Time (JIT) compiler can optimize type stable code more efficiently. \n",
3435
"\n",
35-
"In the example below, type stability is achieved through the use of the type hinting done with the use of `::Vector{Int}` in the function arguement declaration. The `::Vector{Int}` in Julia specifies that the variable should be a vector (array) of integers, ensuring type stability and enabling the compiler to optimize the code more effectively. Type hinting is achieved with the use of the `::`."
36+
"In the example below, type stability is achieved through the use of the type hinting done with the use of `::Vector{Int}` in the function argument declaration.\n",
37+
"The `::Vector{Int}` in Julia specifies that the variable should be a vector (array) of integers, ensuring type stability and enabling the compiler to optimize the code more effectively.\n",
38+
"Type hinting is achieved with the use of the `::`."
3639
]
3740
},
3841
{
@@ -112,7 +115,8 @@
112115
"metadata": {},
113116
"source": [
114117
"### Avoiding Global Variables \n",
115-
"Global variables can lead to type instability and hinder the compiler's optimization efforts. In order to tackle the issues of global vairbales, local variables should be used within functions and pass necessary global data as arguments."
118+
"Global variables can lead to type instability and hinder the compiler's optimization efforts.\n",
119+
"In order to tackle the issues of global variables, local variables should be used within functions and pass necessary global data as arguments."
116120
]
117121
},
118122
{
@@ -348,7 +352,7 @@
348352
"id": "ce43ab12-540a-4ee3-8ada-bf64884e549c",
349353
"metadata": {},
350354
"source": [
351-
"We can see that running code to run the sum of 1000 rand numbers took a defined amount of time to run. If we increase the size of the numbers that we want to sum over then it will take longer to run. Understanding how the time taken to run the code will change when the size of the input data changes is key to being able to understadn the complexity of the code. It is common place to have a large computational task that is run for a smaller subset of data that will then be able to be used to extrapolate to an estimate of the time it will take the full computational run. "
355+
"We can see that running code to run the sum of 1000 rand numbers took a defined amount of time to run. If we increase the size of the numbers that we want to sum over then it will take longer to run. Understanding how the time taken to run the code will change when the size of the input data changes is key to being able to understand the complexity of the code. It is common place to have a large computational task that is run for a smaller subset of data that will then be able to be used to extrapolate to an estimate of the time it will take the full computational run."
352356
]
353357
},
354358
{

0 commit comments

Comments
 (0)