Skip to content

C++ Engineering Module

Làm chủ ngôn ngữ của hiệu năng — Từ quản lý bộ nhớ đến Modern C++17

Tại sao C++?

C++ không chỉ là một ngôn ngữ lập trình — nó là nền tảng của computing. Từ game engines (Unreal), browsers (Chrome), đến embedded systems và AI frameworks (TensorFlow core), C++ vẫn thống trị mọi nơi hiệu năng là tối quan trọng.

🎯 PENALGO C++ Philosophy

Chúng tôi không dạy C++ như một ngôn ngữ cũ. Chúng tôi dạy Modern C++ (C++17/20) với mindset của Systems Engineer — hiểu sâu về memory, ownership, và performance.

Learning Path

┌─────────────────────────────────────────────────────────────────┐
│                    C++ ENGINEERING ROADMAP                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  📘 MODULE 1: BASICS               🏛️ MODULE 2: OOP             │
│  ├─ Memory Model (Stack/Heap)      ├─ Tại sao OOP?              │
│  ├─ Variables & Types              ├─ Class Anatomy             │
│  ├─ Pointers & References          ├─ Access Modifiers          │
│  ├─ Control Flow                   ├─ this Pointer              │
│  ├─ Modern Loops                   ├─ Member Initialization     │
│  ├─ Functions                      └─ RPG Character Project     │
│  ├─ Scope & Lifetime                                            │
│  └─ const Best Practices                                        │
│                                                                 │
│  🔧 PART 5: TEMPLATES              ⚡ PART 6: CONCURRENCY        │
│  ├─ Function Templates             ├─ std::thread               │
│  ├─ Class Templates                ├─ Race Conditions           │
│  ├─ Specialization                 ├─ Synchronization (mutex)   │
│  └─ C++20 Concepts                 └─ Deadlocks                 │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Modules hiện có

📘 Part 1 & 2: Basics Available

Nền tảng vững chắc về C++ — Memory Model, Variables, Pointers, Control Flow, và Functions.

  • Part 1: Memory Model, Variables & Types, Pointers & References, I/O
  • Part 2: Control Flow, Modern Loops, Functions, Scope & Lifetime, const

🏛️ Part 3: Object-Oriented Programming Available

Encapsulation, Inheritance, Polymorphism — Tư duy đối tượng.

  • Part 1: Classes, Access Modifiers, this pointer, Member Init
  • Part 2: Inheritance, Virtual Functions, Polymorphism, Abstract Classes
  • 🎮 Projects: RPG Character + RPG Class System

📦 Part 4: STL Containers Available

Standard Template Library — Containers và Performance Analysis.

  • The Big 3: std::vector, std::string, std::map/unordered_map
  • Algorithms: sort, find, transform, accumulate với lambdas
  • Performance: Big O analysis cho mọi container

🔧 Part 5: Templates Available

Generic Programming — DRY principle với Templates.

  • Function Templates: Generic functions
  • Class Templates: Box<T>, custom containers
  • Specialization: Full và partial specialization
  • 🚀 C++20 Concepts: Modern template constraints

Part 6: Concurrency Available

Lập trình đa luồng — Threads, Race Conditions, và Synchronization.

  • Threads: std::thread spawning & joining
  • Race Conditions: Demo data corruption
  • Synchronization: mutex, lock_guard, unique_lock
  • ☠️ Deadlocks: Dining Philosophers Problem

🔗 Part 7: Graph Algorithms Available

Thuật toán đồ thị — Biểu diễn và Duyệt đồ thị.

  • Representation: Adjacency Matrix vs List
  • BFS: Breadth-First Search
  • DFS: Depth-First Search
  • Applications: Shortest path, Cycle detection

🔌 Part 8: Embedded Programming Available

Lập trình nhúng — Gần gũi với phần cứng.

  • Memory Constraints: Low RAM/ROM coding
  • Bit Manipulation: Register control
  • volatile: Hardware mapping
  • Interrupts: ISR basics

🧠 Part 9: Memory Management Available

Quản lý bộ nhớ hiện đại — RAII và Smart Pointers.

  • RAII: Resource Acquisition Is Initialization
  • Smart Pointers: unique_ptr, shared_ptr, weak_ptr
  • Rule of 5: Copy/Move constructors, assignments

So sánh với ngôn ngữ khác

Đặc điểmC++RustGoPython
Quản lý bộ nhớManual (new/delete)Ownership SystemGCGC
Hiệu năng⚡⚡⚡⚡⚡⚡⚡⚡
Learning curve📈📈📈📈📈📈📈📈
Null safety❌ (có nullptr)✅ (Option)✅ (nil check)❌ (None)
ConcurrencyManualFearlessGoroutinesGIL limited

Bắt đầu học

Nếu bạn đã có kinh nghiệm với ngôn ngữ khác (Python, JavaScript, Java), bạn có thể bắt đầu ngay với Part 1: Basics.

📘 Bắt đầu với Memory Model →


"Premature optimization is the root of all evil. But pessimization is even worse."