I had been learned C in university but honestly, that was useless and I am not good at programming at that time, I also have no idea what a real-life C program is.
I make this repo is to learn C seriously again, and my clear purpose is to dig into PrimJS to understand how it works.
Caution: This course is made for experienced programmers
- C language overview and distinguishing features
- Setting up a professional development environment
- Compilation process and build tools
- Basic syntax, functions, and program structure
- Memory model and execution flow
- Debugging: Using debuggers (GDB, LLDB) and debug builds
- Practice: Create a multi-file program with debugging configuration
- Primitive types, modifiers, and type conversions
- Variables, scope, and storage classes
- Pointers fundamentals and pointer arithmetic
- Dynamic memory allocation and management
- Memory leak detection tools (Valgrind, AddressSanitizer)
- Testing: Unit testing memory management functions
- Practice: Implement a dynamic array with memory tests
- Array implementation and relationship to pointers
- String handling in C (null-terminated strings)
- Memory manipulation functions (memcpy, memmove, memset)
- Cache-friendly data structures and algorithms
- Debugging: Finding buffer overflows and memory corruption
- Practice: Build a string library with comprehensive tests
- Struct and union definitions and memory layout
- Self-referential structures and complex data structures
- Function pointers and callbacks
- Testing Framework: Introduction to frameworks (Unity, Check, CUnit)
- Test-driven development (TDD) in C
- Practice: Implement a hash table with complete test suite
- Introduction to database APIs in C (SQLite, libpq, MySQL C API)
- Connection management and connection pooling
- Executing queries and handling result sets
- Prepared statements and parameterized queries
- Transaction management
- Error handling in database operations
- Practice: Build a database access layer with connection pooling
- Process vs. threads programming
- POSIX threads (pthreads) API
- Mutex, semaphores, and condition variables
- Thread safety and race conditions
- Thread-safe database operations
- Connection pooling in multi-threaded environments
- Practice: Implement a thread-safe database service
- Compiler optimization flags
- Profiling tools (gprof, perf, Valgrind)
- Database query optimization
- Statement caching and batch operations
- CPU cache considerations and alignment
- Testing: Performance benchmarking methodologies
- Practice: Optimize database operations and benchmark results
- File I/O and buffering strategies
- Socket programming and network I/O models
- Non-blocking I/O techniques
- Memory-mapped files for performance
- I/O multiplexing for database and network operations
- Debugging: Network and I/O debugging tools
- Practice: Build a non-blocking server with database integration
- Integration testing with databases
- Test fixtures and database setup/teardown
- Mocking database connections for unit tests
- Database migration for testing
- Continuous integration for C projects
- Code coverage tools (gcov, lcov)
- Practice: Create a test suite with database integration tests
- Architecture design with database persistence
- Concurrent implementation with thread-safe database access
- Database schema design for metrics storage
- Query optimization for metrics retrieval
- Performance benchmarking of database operations
- Final Project: Complete server monitoring application with database backend
By the end of this course, you'll have built a server monitoring application that:
- Collects system metrics (CPU, memory, disk, network) efficiently
- Stores collected metrics in a database (SQLite or similar)
- Uses a thread pool for concurrent processing
- Implements thread-safe database operations
- Features optimized queries for metrics storage and retrieval
- Includes a complete test suite with database integration tests
- Demonstrates professional-grade C programming practices
- Supports configuration via files
- Implements robust error handling and recovery