Video summary

Video Pertemuan 2 Pengenalan Pemrograman

Main summary

Key takeaways

Educational

Main Ideas / Concepts Covered

1. Getting Started with the Coding Platform

  1. Register/sign up and enter your email.
  2. Follow the on-screen setup prompts (the presenter notes to “just follow it”).
  3. If a verification code is requested, enter the code.
  4. Verify using a link (click it to confirm verification).
  5. Create a name.
  6. In the editor interface, choose Write and Run Code.
  7. Wait for the status indicator to turn green (meaning the user is verified).
  8. Enter a project name.
  9. 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).
  • 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).

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).
  • 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 mention g++ / compiler for C++, phrased as “G+”).
  • Compile the source file (example: “create file.c++”).
  • Use -o to 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: name and npm.
  • 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).

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.
  • Compound assignment shortcuts:
    • +=, and similar forms for subtraction/multiplication/division.

7. Deleting Files and Directories

  • rm removes 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).
  • 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)

  1. Register/sign up on the platform.
  2. Enter your email.
  3. If prompted, enter the verification code.
  4. Click the verification link.
  5. Create a name for your profile.
  6. Open the editor via Write and Run Code.
  7. Wait for the status indicator to turn green.
  8. Enter a project name.
  9. 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 cd carefully to return to the previous/parent directory (as described in subtitles).

C) Create, Save, Compile, and Run a C++ Program

  • Open the editor (FIM used here)
    • Example intent: fim create <file>.c++
  • Write C++ code (example prints name and npm).
  • Save:
    • Press Shift + “/” to access command/saving interface.
    • Enter w to write/save.
    • Exit afterward as needed.
  • Compile:
    • Use a g++-type compiler command.
    • Provide the source filename.
    • Use -o to name the output executable.
  • Run:
    • Execute with ./<executable_name>.
  • 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) because rm alone won’t delete directories.

E) Submission / Post-Test Steps

  1. Scan the QR code (attendance + post-test info).
  2. Write your own code using your name and npm.
  3. Create a link by publishing:
    • Go to the file → publish file → publish pad → copy the link.
  4. Submit:
    • the link
    • and screenshots of the code and/or comments/commands practiced
  5. 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)

Original video