Skip to content

C++

Learning C++

Useful tools

  • (IDE) VSCode C++ docs
  • Linter / Static Analysis
    • clang-tidy
    • Clang Static Analyzer
    • CppCheck
    • Compile with multiple compilers with all warning flags turned on
    • SonarLint
    • SonarCloud
    • Ericsson/codechecker
    • Google Sanitizers ASAN/TSAN
  • (Formatter) clang-format
  • Debugging tools
  • (Package Manager) vcpkg
  • Build system
    • Make
      • Managing projects with gnu make
      • makefiletutorial.com
    • Ninja
    • CMake
      • Mastering CMake
      • Professional CMake
  • Profiler
    • Valgrind Callgrind
    • Tracy Profiler
    • google/pprof
  • Testing
    • Google Test
    • Catch2
    • doctest
    • Look at SQLite, for all the tests they perform and how to replicate then in C++ (OS error, IO error, network error, …)
  • Compiler
    • GCC
    • Clang
  • List of open-source libraries
  • How to optimize bytecode (like JS uses UTF-16 by default, but UTF-8 can also be used).
  • AUTOSAR
    • Used in cars
    • Has a good C++ standard
  • Logging (?) (page 42 of yellow book)

Books

https://github.com/yuchdev/CppBooks

  • Understanding and Using C Pointers: Core Techniques for Memory Management (223 pages)

Compiler

Reddit post with information on resources.

  • Crafting Interpreters
  • CS 6120: Advanced Compilers
  • Engineering a Compiler 3rd edition
  • SSA-based Compiler Design
  • Static Program Analysis by Anders Moller
  • Modern Compiler Implementation in C
  • Advanced C and C++ Compiling
  • How to Write Shared Libraries by Ulrich Drepper

GCC

  • An Introduction to GCC for the GNU Compiler gcc and g++
  • GCC docs + what each optimize does

Qt

  • QT overviews explain the purpose of all libraries
  • Bryan Cairns udemy QT courses
  • Scythe Studio youtube
  • KDE Frameworks

C

Low Level Learning

Books

  • Computer Systems A Programmer’s Perspective 3rd edition (1078 pages)
  • Structure and Interpretation of Computer Programs 2nd edition (883 pages)
  • Code: The Hidden Language of Computer Hardware and Software (480 pages)
  • The Elements of Computer Systems: Building a Modern Computer from First Principles 2nd edition (344 pages)
  • Operating Systems: Three Easy Pieces (747 pages)
  • Structure and Interpretation of Computer Programs 2nd edition (657 pages)
  • Computer Architecture: A Quantitative Approach 6th edition (936 pages)
  • Computer Architecture by Charles Fox (560 pages)
  • Computer Organization and Design RISC: The Hardware Software Interface 5th edition (736 pages)
  • Computers as Components: Principles of Embedded Computing System Design 5th edition (560 pages)
  • Cache Memory Book 2nd edition (256 pages)

Courses

  • How do computers work by Sebastian Lague 4 video playlist
  • Computer Science by CrashCourse 40 video playlist
  • (Coursera) Build a Modern Computer from First Principles: From Nand to Tetris link
  • Article on C memory management link
  • Casey Muratori course
  • Zero to ASIC course
  • Binary Exploitation / Memory Corruption by LiveOverflow playlist
  • Courses by Professor Onur Mutlu

Projects

Template project

Page 55 yellow book

  • Add as many compilers as possible (add intel, amd also)
  • Add as many linters as possible
  • Add support for various devops options
    • Git
    • Github, Gitlab, Bitbucket, self-hosted options
    • Github Actions, Gitlab CI/CD, Jenkins, other options
    • Docker, podman
  • Code editor
  • Debugger
  • Testing
  • Docs
  • Package manager
  • Build system
  • Tools to help check assembly easily
  • Profiler
  • Benchmarking
  • Compiling different version of code with various performance flags and checking speed/memory usage

Fortran transpiler

  • Start from 66 standard and work your way up (look into various compiler options also)
  • fortran-lang.org
  • fortranwiki.org
  • Wiki has list of libraries using Fortran. Transpile them to C++, make test cases pass, test for performance to act as a proof of concept.
  • Use the official compilers for this task. A compiler has the following components
    • Lexical analysis - source code converted to tokens
    • Syntax analysis (parsing) - use tokens to create a syntax tree
    • Semantic analysis - check syntax tree for consistency, like type checking, vars/funcs are defined
    • Intermediate Code Generation - it is low-level, more abstract representation of the code that is easier to optimize, and is independent of the platform.

After successful completion of the project, you can look into other famous old languages.