Video summary
Video Pertemuan 2 Pengenalan Pemrograman
Main summary
Key takeaways
Main Ideas / Concepts Covered
1. Getting Started with the Coding Platform
- Register/sign up and enter your email.
- Follow the on-screen setup prompts (the presenter notes to “just follow it”).
- If a verification code is requested, enter the code.
- Verify using a link (click it to confirm verification).
- Create a name.
- In the editor interface, choose Write and Run Code.
- Wait for the status indicator to turn green (meaning the user is verified).
- Enter a project name.
- Create a C++ file using the + button.
- Example file name mentioned: CPP (used to create a C++ file).
2. Attendance / Post-Test Workflow
- A QR code contains attendance and post-test information.
- Viewers are instructed to scan the QR code first.
- The session will be continued by another person (“This will be continued by Kak Habib”).
3. Terminal Introduction: Basic Commands
pwd- Shows your current directory/location (example mentioned:
user/home).
- Shows your current directory/location (example mentioned:
ls- Lists files and directories in the current directory (example context includes folders like “practical 2” and “test 1”).
mkdir(“MK de” / “MK de” in subtitles)- Creates a new directory.
- Example intent: create something like test 2.
cd(Change directory)- Moves into other directories (examples mentioned:
test 2, “practical 2”). - Subtitles describe a case where
cd“comes out like that” (returns/acts like leaving out when the target ends up empty or invalid).
- Moves into other directories (examples mentioned:
4. Text Editors and Creating Code Files
- Two editors are mentioned: FIM and Nano.
- The presenter uses FIM because Nano is not available (“not downloaded”).
- Creating a file with FIM
- Use a command like:
fim create <filename>.c++(exact subtitle wording varies).
- Use a command like:
- Writing code inside the editor
- A simple C++ program is written (example includes printing “my name” and an npm value).
- Saving/exiting in FIM
- Use Shift + “/” to reach the editor command/saving interface.
- To save/write: type
w. - Then exit as needed.
5. Compiling and Running C++
- Compile using a
g++-type compiler command (the subtitles explicitly mentiong++/ compiler for C++, phrased as “G+”). - Compile the source file (example: “create file.c++”).
- Use
-oto specify the output executable name. - Run the executable using:
./<executable_name>(subtitles refer to “dot slash”).
- Example output (format partially unclear):
- Terminal prints something like: “Hello, my name is Habib and my npm is 25 …”
6. Explaining Code: Variables, Data Types, Operators, and Basics
Variables
- A variable is a container/place to store data.
- Example variables:
nameandnpm. - Example data type used: string
- Example values mentioned: “Habib” and a text value for “npm”.
Data Types Overview
- String
- Stores text (collections of characters).
- Integer
- Stores whole numbers.
- Short vs Long (integers)
short: for smaller integer ranges; described as more efficient when values fit.long integer: for very large numbers to avoid overflow.
- Float vs Double
float: stores fractional numbers (example:0.8754).double: similar to float but with higher precision.
- Char
- Stores one character/symbol.
- Boolean
- Stores true or false (used in conditions like
if true/if false).
- Stores true or false (used in conditions like
Bits vs Bytes Note
- 1 byte = 8 bits
- To convert bits to bytes, divide by 8.
Operators
- Arithmetic operators (like a calculator):
- add, subtract, divide
- multiplication uses
*
- Assignment vs comparison (subtitle unclear, but gestured):
- The distinction between
=and==is mentioned conceptually.
- The distinction between
- Compound assignment shortcuts:
+=, and similar forms for subtraction/multiplication/division.
7. Deleting Files and Directories
rmremoves files.- Example: deleting “practical 2” fails because it’s a directory.
- For directories, use recursive removal:
rm -r(subtitles mention “RM de” / remove directory).
- Example described outcome:
- After removing with the directory command, “practical 2” is deleted.
8. Post-Test / Assignment Instructions
- Code should use your:
- name
- npm
- Create/publish a link:
- Steps described: go to the file → publish the file → publish pad/editor → a link appears.
- Submit:
- Either:
- submit the link + screenshots of code/comments, or
- submit the link and a screenshot of what was requested (subtitles imply you can screenshot just the comment/code you made).
- Either:
- Put results into a document and submit it to the assigned collection folder/location (“collect it in the assigned font/folder” in subtitles).
Methodology / Step-by-Step Instructions
A) Platform Setup (Registration + File/Project Creation)
- Register/sign up on the platform.
- Enter your email.
- If prompted, enter the verification code.
- Click the verification link.
- Create a name for your profile.
- Open the editor via Write and Run Code.
- Wait for the status indicator to turn green.
- Enter a project name.
- Create a new C++ file:
- Click the + button.
- Provide a filename (example given: CPP).
- Ensure it is created as a C++ file.
B) Terminal Commands to Learn
- Check current directory:
pwd - List current files/directories:
ls - Create a directory:
mkdir(subtitles show “MK de”)- Example intent: create something like test2
- Change directories:
- Use
cd <directory_name>(examples include moving into practical/test folders). - Use
cdcarefully to return to the previous/parent directory (as described in subtitles).
- Use
C) Create, Save, Compile, and Run a C++ Program
- Open the editor (FIM used here)
- Example intent:
fim create <file>.c++
- Example intent:
- Write C++ code (example prints name and npm).
- Save:
- Press Shift + “/” to access command/saving interface.
- Enter
wto write/save. - Exit afterward as needed.
- Compile:
- Use a
g++-type compiler command. - Provide the source filename.
- Use
-oto name the output executable.
- Use a
- Run:
- Execute with
./<executable_name>.
- Execute with
- Confirm output appears (name and npm output is shown as the example).
D) Deleting Items in the Filesystem
- Delete a file: use
rm - Delete a directory:
- Use a recursive removal option (e.g.,
rm -r) becausermalone won’t delete directories.
- Use a recursive removal option (e.g.,
E) Submission / Post-Test Steps
- Scan the QR code (attendance + post-test info).
- Write your own code using your name and npm.
- Create a link by publishing:
- Go to the file → publish file → publish pad → copy the link.
- Submit:
- the link
- and screenshots of the code and/or comments/commands practiced
- Compile everything into a document and submit to the requested collection method/location.
Speakers / Sources Mentioned
- Kak Habib (person who continues the session)
- Current presenter (unnamed; explains the setup, commands, and concepts)
- QR code / post-test assignment materials (for attendance and tasks)