|
| 1 | +--- |
| 2 | +title: "Final report for Port C and C++ Course to xeus-cpp" |
| 3 | +layout: post |
| 4 | +excerpt: "A summary for my project to implement an educational course, explaining C and C++ features in a notebook environment" |
| 5 | +sitemap: false |
| 6 | +author: Georgi Runtolev |
| 7 | +permalink: blogs/xeus_cpp_G_Runtolev_blog_final/ |
| 8 | +thumbnail_image: /images/mg-pld-logo.png |
| 9 | +date: 2026-06-02 |
| 10 | +tags: c++ xeus-cpp jupyter internship systems-programming |
| 11 | +--- |
| 12 | + |
| 13 | +{% include dual-banner.html |
| 14 | +left_logo="/images/mg-pld-logo.png" |
| 15 | +right_logo="/images/cr-logo_old.png" |
| 16 | +caption="" |
| 17 | +height="20vh" %} |
| 18 | + |
| 19 | +### **Project Overview** |
| 20 | +The goal of this project was to modernize C and C++ education by porting a traditional curriculum into an interactive Jupyter Notebook environment using the **xeus-cpp** kernel. |
| 21 | +Unlike standard compilers that require a full write-build-run cycle, xeus-cpp uses a JIT interpreter to execute code cell by cell. |
| 22 | +This allows students to experiment with code incrementally while the program state, such as variables and functions, persists throughout the session. |
| 23 | + |
| 24 | +### **Why This Project Was Important** |
| 25 | +Traditional C++ learning often has a high barrier to entry due to complex compiler setups and the rigid nature of static builds. This project was vital because: |
| 26 | +* Students can start coding immediately in a browser without configuring local toolchains. |
| 27 | +* Provides instant feedback - errors are caught per cell, allowing students to fix bugs in real-time rather than waiting for a full program to compile. |
| 28 | +* The stateful nature of notebooks makes it easier to demonstrate how pointers and memory allocation evolve during execution. |
| 29 | + |
| 30 | +### **Results** |
| 31 | +The project resulted in a comprehensive curriculum, spanning from C fundamentals to advanced C++20 features. Key deliverables included: |
| 32 | +* **Interactive Notebooks:** 12 fully functional modules with theory and live code sandboxes. |
| 33 | +* **Safe Coding Patterns:** A documented set of techniques, such as using `#ifndef` macro guards and namespace versioning to prevent redefinition errors when re-running cells. |
| 34 | + |
| 35 | +### **What Worked Well and Key Challenges** |
| 36 | +* **Successes:** The modular design of the notebooks proved highly effective. Breaking concepts into small, isolated cells made complex topics like OOP much more approachable. |
| 37 | +* **Challenges:** The biggest hurdle was the fundamental difference in execution models. For instance, the traditional `int main()` function actually causes conflicts in a REPL environment. Additionally, managing the global state required strict discipline to avoid "pollution" where variables from previous cells unintentionally affected new ones. |
0 commit comments