8000 Add content for lesson 0 and 9 · kavya-git3/intro-to-python@3198d34 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 3198d34

Browse files
committed
Add content for lesson 0 and 9
1 parent 2cf662d commit 3198d34

File tree

11 files changed

+567
-40
lines changed

11 files changed

+567
-40
lines changed

README.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ The course is a total beginner’s introduction to programming. It takes student
1111
The course breakdown is as follows:
1212

1313
## Session 0 - Fundamentals
14-
• Operating systems
14+
• Operating systems (OS)
1515
• Command-line interface (CLI)
16-
• Source control management (SCM) - Global information tracker (Git)
16+
• Bourne Again SHell (Bash)
17+
• Source control management (SCM) - Git
1718
• Integrated development environment (IDE)
18-
• Kanban
1919
• Markdown
2020

21-
This session introduces students to operating systems, how developers work collaboratively, how to use the computer via the command-line interface. They also learn about how developers use IDEs to make their life easier, how kanban boards maximize efficiency and help visualize your work, and how to write simple formatted documents.
21+
This session introduces students to operating systems, how developers work collaboratively and how to use the computer via the command-line interface. They also learn about how developers use IDEs to make their life easier and how to write simple formatted documents using Markdown.
2222

2323
## Session 1 & 2 – Getting started with Python
2424
• Intro to programming
@@ -59,31 +59,17 @@ These sessions teaches how to read and write data to files. Students calculate v
5959
• Agile Model
6060
• Programming principles
6161
• How to build a Command-line project
62+
• Kanban
6263

63-
This session introduces students to various strategies and models developers (and not only) use to work efficiently. They will also learn how to build a command line app on their own using all the principles, skills and knowledge accumulated.
64+
This session introduces students to various strategies, tools and models developers (and not only) use to work efficiently. They will also learn how to build a command line app on their own using all the principles, skills and knowledge accumulated.
6465

6566

6667

6768

68-
# Resources
69+
# Suggested reads
6 8000 970

70-
## Command Line and Git
7171
- What is the [Command Line](https://learntocodewith.me/learn/command-line/) and why do we use it?
72-
- Command Line [cheat sheet](https://www.git-tower.com/blog/command-line-cheat-sheet/)
73-
- Git commands [cheat sheet](https://education.github.com/git-cheat-sheet-education.pdf)
74-
75-
## Markdown, Kanban and IDE
76-
- What is [Kanban](https://kanbanize.com/kanban-resources/getting-started/what-is-kanban)?
7772
- What is an [IDE](https://www.redhat.com/en/topics/middleware/what-is-ide)?
78-
- Markdown [cheat sheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
79-
80-
## ASCII
81-
82-
- [Ascii Art Archive](https://www.asciiart.eu/), amazing resource for making your project look cooler and more personal!
83-
- [Ascii writing](https://patorjk.com/software/taag/#p=display&f=Slant&t=Oss), great for 🔥 fonts.
84-
- [Ascii images](https://asciiart.club/), great for converting images.
85-
86-
## Other
8773
- Very interesting [article](https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/) (but quite lengthy) about "What is code?".
88-
- [Ideas](https://hackr.io/blog/python-projects) of command line projects you could build.
8974
- Basic [programming principles](https://www.hongkiat.com/blog/basic-programming-principals/).
75+
- What is [Kanban](https://kanbanize.com/kanban-resources/getting-started/what-is-kanban)?

best_practices.md

Lines changed: 44 additions & 0 deletions
< F438 tr class="diff-line-row">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Best practices for when you are working on exercises
2+
3+
4+
Navigate the folders using the command-line and create your <homework_sessionNumber.py> (ex: homework_2.py) file:
5+
6+
```bash
7+
pwd # Prints to the console the path of your current working directory
8+
9+
ls # Lists the files in the directory you are in
10+
11+
12+
cd <directory_name> # Gets in a given directory
13+
14+
cd .. # Gets out of the directory you are in
15+
16+
17+
18+
mkdir <directory_name> # Creates new directory
19+
20+
rmdir my_folder # Deletes an empty Directory (Folder)
21+
22+
rm -r <directory_name> # Deletes the directory and its contents recursively
23+
24+
25+
touch <file_name.txt/file_name.py> # Creates new file
26+
27+
rm <file_name.txt/file_name.py> # Deletes file
28+
29+
30+
31+
```
32+
33+
---
34+
35+
When you are done for the day, don't forget to commit and push your work using the git commands:
36+
37+
```shell
38+
39+
git add . # Adds ALL changes to the staging area in preparation for committing them to the repository.​
40+
41+
git commit -m "<Short description of what you have worked on.>" # Saves changes to the local repository, along with your commit message, usually describing the changes.
42+
43+
git push origin main # Uploads local changes to your remote repository, on the main branch.
44+
```

session_00/README.md

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

33
In this session we cover:
44
- Operating systems such as Linux, Windows and Mac
5+
- Command-line interface (CLI)
6+
- Bash (Bourne Again SHell)
57
- Source control management (SCM) & Git
6-
- Kanban
78
- Markdown
89
- IDEs
9-
10-
Make a copy of the intro-to-python project [here](https://github.com/users/sergiuHudrea/projects/4).
11-
**Make sure you tick** the "Draft issues will be copied if selected" box.

session_00/slides_0.md

Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
# [fit] KPMG: Code
2+
## [fit] Python — Session 6 — Lesson
3+
4+
---
5+
6+
# [fit] OS, CLI, GIT & IDE​s
7+
8+
---
9+
10+
# Objectives
11+
12+
- Brief overview of Operating Systems​
13+
- Understand Terminal/CLI​
14+
- Understand Source Control Management & Git​
15+
- Brief overview of Markdown and IDEs
16+
17+
---
18+
19+
# [fit] Operating Systems (OS)
20+
21+
---
22+
23+
# Operating systems (OS)
24+
25+
- Software that communicates with machine hardware.​
26+
27+
- Can you name some popular examples?
28+
29+
---
30+
31+
# Operating systems
32+
33+
- Some include a graphical user interface (GUI) for manipulation (Windows, MAC OS)​
34+
35+
- Linux has multiple distributions - some can include a GUI (e.g. Ubuntu) while some don’t.​
36+
37+
- When would we want or not want to have a GUI?
38+
39+
---
40+
41+
# Linux
42+
43+
- Popular operating system based on UNIX​
44+
45+
- Open-source, multiple distributions​
46+
47+
- Commonly used for hosting web servers and scientific computing
48+
49+
---
50+
51+
# [fit] Command-line Interface (CLI) and Bash
52+
53+
---
54+
55+
56+
# CLI - Command Line Interface
57+
58+
- Also referred to as the ‘Console’ or ‘Terminal’.​
59+
60+
- Terminal app on your Mac (you will have it by default because Mac OS is UNIX based) or Git Bash on your Windows (needs downloading)
61+
62+
---
63+
64+
# Bash - Bourne Again SHell
65+
66+
- Command Language for most Linux distributions​
67+
68+
- sh = Shell​
69+
70+
- The Shell is the layer between the Operating System and the User (or other services)
71+
72+
---
73+
74+
# Bash commands
75+
76+
```bash
77+
pwd # Prints to the console the path of your current working directory
78+
79+
ls # Lists the files in the directory you are in
80+
81+
82+
cd <directory_name> # Gets in a given directory
83+
84+
cd .. # Gets out of the directory you are in
85+
86+
```
87+
88+
---
89+
90+
# More bash commands
91+
92+
```bash
93+
mkdir <directory_name> # Creates new directory
94+
95+
rmdir my_folder # Deletes an empty Directory (Folder)
96+
97+
rm -r <directory_name> # Deletes the directory and its contents recursively
98+
99+
100+
touch <file_name.txt/file_name.py> # Creates new file
101+
102+
rm <file_name.txt/file_name.py> # Deletes file
103+
104+
105+
mv original_file1 /home/newfile1 # Moves a file (can be used for renaming) ​
106+
107+
cp original_filename copy_filename # Makes a copy of a file
108+
109+
```
110+
111+
---
112+
113+
# More bash commands
114+
115+
```bash
116+
echo "Hello!" # Print the text "Hello!" in the terminal window​
117+
118+
echo "Bonjour!" > file.txt # Writes the text "Bonjour!" in the file.txt file​
119+
120+
cat file.txt # Reads the file.txt file -> prints the text "Bonjour!" to the console​
121+
122+
history # Displays your recently run Bash Commands​
123+
124+
wget <https://somewhere.com/afile.zip> # Downloads file/files from the link
125+
126+
clear # Clears the terminal screen
127+
128+
man <command> # Displays the manual and description for the chosen command -> ex: man ls/pwd/cd/mkdir
129+
130+
```
131+
132+
---
133+
134+
# Bash shortcuts
135+
136+
- TAB - autocompletes commands, file names, or directory names for you​.
137+
138+
- UP/DOWN Arrows - Scroll backward and forwards through previous commands you’ve typed in the current session. ​
139+
140+
- F3 - Repeat the previous command​.
141+
142+
- CTRL+C - Abort the current line you’re typing or a command that is currently executing​.
143+
144+
145+
---
146+
147+
# [fit] Source Control Management(SCM) and Git
148+
149+
---
150+
151+
152+
# Source Control Management(SCM)
153+
154+
- Refers to tools used to track modifications to a source code repository.​
155+
156+
- Source Control Management = Version Control​
157+
158+
---
159+
160+
# Why do we use Source Control?
161+
162+
- Helps teams work collaboratively.
163+
164+
- Developers can edit shared code without unknowingly overwriting each other’s work.
165+
166+
- Serves as a protection mechanism.
167+
168+
169+
---
170+
171+
# Git
172+
173+
- Git (Global Information Tracker) = a version control system.​
174+
175+
- Why Git? ​-> Because of its popularity, community, opensource nature, and decentralised approach.
176+
177+
---
178+
179+
# Git - What does it do?
180+
181+
- Allows you to *collaborate* on a project without interfering with each other’s work.​
182+
183+
- Keeps a historical record of everyone's work so you can go back to previous records.​
184+
185+
- You can work on your local copy of the codebase and then merge your changes with the main codebase.​
186+
187+
- Uses a series of snapshots, called commits, to track changes to the codebase over time along with the timestamp and user who made the changes.
188+
189+
---
190+
191+
# Terminology
192+
193+
### Remote Repository​
194+
195+
- This is where everyone shares their code centrally (ex: GitHub). ​
196+
197+
198+
### Local Repository​
199+
200+
- When you commit your code, a local version is created on your machine.
201+
202+
---
203+
204+
# Basic Git commmands
205+
206+
```bash
207+
git clone <https://github.com/sergiuHudrea/intro-to-python.git> # Copies an existing Git repository from a remote location to your local machine.​
208+
209+
210+
git init # Initializes an existing directory as a Git repository.
211+
212+
213+
git status # Shows the current status of the repository, including which files have been modified, which files have been added to the staging area, and which files are not being tracked by Git.
214+
```
215+
216+
---
217+
218+
# Basic Git commands
219+
220+
```bash
221+
222+
git add . # Adds ALL changes to the staging area in preparation for committing them to the repository.​
223+
224+
git commit -m "<Short description of what you have worked on.>" # Saves changes to the local repository, along with your commit message, usually describing the changes.
225+
226+
git push origin main # Uploads local changes to your remote repository, on the main branch.
227+
228+
git pull origin main # Downloads changes from the remote repository (main branch) and incorporates them into your local repository.
229+
230+
```
231+
232+
---
233+
234+
# Markdown and IDEs
235+
236+
---
237+
238+
# Markdown and README.md
239+
240+
- When creating a repository, you usually start off by writing a **README.md** file in a Markup language called Markdown.​
241+
242+
- The **README.md** summarises important information about the contents of the repo, instructions on how to edit or run the software, etc.​
243+
244+
- *Markdown* is a lightweight markup language for creating formatted text using a plain-text editor.
245+
246+
247+
---
248+
249+
# IDEs
250+
251+
- **IDE** = An Integrated development environment is a software for application building. It combines tools into a single graphical user interface (GUI).​
252+
253+
- Why use an IDE? ​--> The tools needed are already there and ready to use. It is efficient and makes life easier.​
254+
255+
- Imagine repairing a car in a parking lot VS repairing it in a garage.​
256+
257+
- You can develop applications without an IDE, but the you would have to build your own IDE by manually integrating the tools you need.​
258+
259+
- Replit = a cloud IDE --> No need for downloading software and configuring local environments. No more "But it works on my machine".
260+
261+
---

0 commit comments

Comments
 (0)
0