Skip to content

Commit 5988589

Browse files
authored
Merge branch 'module_8' into master
2 parents 2bbdd30 + 1aea0d6 commit 5988589

File tree

10 files changed

+100
-7
lines changed

10 files changed

+100
-7
lines changed

book.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ additional-js = [
3838
"plugins/code-line-number-plugin.js",
3939
"theme/tabs.js",
4040
]
41+
4142
additional-css = ["plugins/last-changed.css", "plugins/line-number.css", "theme/tabs.css"]
4243

4344

45+
46+
4447
[preprocessor.last-changed]
4548
command = "mdbook-last-changed"
4649
renderer = ["html"]

plugins/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.bold-strong {
2+
font-weight: 600;
3+
font-size: large;
4+
}

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181

8282
# Beginning Programming
8383

84-
- [Choosing a programming language]()
84+
- [Choosing a programming language](./module_8/index.md)
8585
- [Available Programming languages]()
8686
- [JavaScript]()
8787
- [Rust]()
83.3 KB
Loading

src/module_1/introduction_to_programming.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@ To begin this module, see the video below.
66

77
## What is computer programming?
88

9-
Broadly, computer programming is telling a computer exactly what to do. This is done using a procedural syntax popularly referred to as **code**, which combines special words, signs, and symbols.
9+
Broadly, computer programming is telling a computer exactly what to do.
10+
Typically, the programmer need to understand the problem to be solved or the
11+
task at hand. Afterwords, the solution is implemented using special words,
12+
signs, and symbols, collective called code.
13+
14+
15+
The end result is like giving the computer a recipe so it knows how to make
16+
something happen.
1017

11-
It’s like giving the computer a recipe so it knows how to make something happen.
1218

1319
These special sets of words, signs and symbols constitute the term **computer programming languages**, a concept we will explore in detail.
20+
21+
22+
A fitting analogy to understand code and programming language is liking code to
23+
an English Essay and liking Programming language to the English language
24+

src/module_4/commands/pwd.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pwd
22

3-
The command pwd - Print Working Directory, is a Unix-based system commands that shows you the full path of the folder you're working in.
3+
The pwd command -- Print Working Directory, is a Unix-based system commands that
4+
shows you the full path of the folder you're working in.
45

56
```sh
67
pwd

src/module_5/scripts/conditional.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Conditional evaluation
22

3+
34
Like variables, conditional evaluation is one of the key concepts you'll come across in programming. It is used to execute a certain action based on matched conditions.
45

6+
57
Bash gives you four conditional keywords `if`, `elif`, `else` and `fi`.
68

79
1. Conditional evaluations must start with an `if` and end with an `fi`

src/module_5/scripts/for-loop.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
The `for` loop is often used to iterate over a collection or a list of items and carry out an action.
44

5-
Four key words are used to execute a for loop in Bash, `for`, `in`, `do`, and `done`.
5+
Four ingredients are required to execute a for loop in Bash, `for`, `in`, `do`, and `done`.
6+
7+
Consider the array of rainbow colors we mentioned earlier while learning about arrays
68

7-
Consider the array of rainbow colors we used in our first lesson on arrays.
89

910
```sh
1011
{{#include ../../code-samples/module_5/shell-array}}

src/module_5/scripts/making-script-executable.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Making scripts executable
22

3-
Earlier in this module, you wrote your first script and executed it directly in the terminal using the `sh <file_name>` command. It becomes tedious to do this repeatedly especially with multiple scripts but there's a solution.
3+
Earlier in this module, you wrote the first script, and executed directly in the terminal using the `sh <file_name>` commanand. It becomes tedious to do this repeatedly and that leads us to **making a script an executable**.
4+
45

56
You can make a script **executable**.
67

src/module_8/index.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Choosing a programming language
2+
3+
Before we begin this section, I would like to congratulate you for getting past
4+
the preliminary concepts section --- that's module 1 -- 7. In this section, our
5+
focus would be on programming! Let's being!
6+
7+
In a sense, choosing your first programming language can be a bit like choosing
8+
your first car, you'd want something which is comfortable and not overpriced.
9+
Here are some key things you should know before choosing a language
10+
11+
<dl>
12+
<dt class="bold-strong"> 1. The end goal</dt>
13+
<dd> What you intend to achieve or the domain you want to programming in </dd>
14+
15+
<dt class="bold-strong"> 2. Adoption</dt>
16+
<dd> When you build applications or software, you'd run into issues and in need of help, it's great to choose a language adopted for the domain, for instance using Golang for embedded software might be wrong, as of the time of this writing </dd>
17+
18+
<dt class="bold-strong"> 3. Learning curve</dt>
19+
<dd> While this isn't exactly a problem when you have excess time, a steep learning curve mean you need to do more groundwork to understand some concepts</dd>
20+
</dl>
21+
22+
Now, let's try to answer those questions,
23+
24+
1. The end goal: The end goal of this book is to teach you core programming
25+
concepts and make you a backend engineer.
26+
2. Adoption: I have carefully selected 4 programming languages used for backend
27+
applications
28+
3. Learning curve: The 4 available languages have different learning curves
29+
discussed below;
30+
31+
## Learning Curves
32+
33+
When we discussed the
34+
[classification of programming languages](../module_1/classification_of_programming_languages.md#classification-of-programming-language),
35+
I mentioned 2 classes, compiled and interpreted languages, allow me to extend it
36+
further to include, statically typed languages and dynamically typed languages;
37+
38+
### Statically typed languages
39+
40+
In statically typed languages, the programmer is often required to expressively
41+
indicate the type of a
42+
[variable](../module_5/scripts/using-variables.html?highlight=variable#using-variable).
43+
This mean you must state if your variable is a number or letters or something
44+
else, and example of such in this resource is Rust and Golang.
45+
46+
### Dynamically typed languages
47+
48+
In dynamically typed language like JavaScript and Python, it is relatively easy
49+
to get to speed, compared to statically typed languages. However, down the lane
50+
the learning becomes hard to quantify and it seems as if learning is standstill.
51+
52+
Broadly, statically typed languages are longer to be established in and master
53+
but they make it easier to learn other statically typed languages and the
54+
dynamically typed ones rather quickly.
55+
56+
## Which language should you choose?
57+
58+
The short answer is anyone is fine.
59+
60+
Long answer, I've used Rust and JavaScript in and out of work environment and I
61+
can say for a fact that It's always best to know both, personally, I prefer
62+
statically typed language for medium to large-size projects, while I used
63+
JavaScript for small size application, scripting and prototyping.
64+
65+
At the end So learning one and switching to the other is fine, one thing you
66+
must not doing when starting out is learning two languages concurrently, it's
67+
usually difficult.
68+
69+
In the next module, I encourage you to choose one of the four languages and
70+
stick it to the end of the material for effective learning

0 commit comments

Comments
 (0)