Skip to content

Instantly share code, notes, and snippets.

View MangaD's full-sized avatar
📚
studying

David Gonçalves MangaD

📚
studying
View GitHub Profile
@MangaD
MangaD / cpp_code_intelligence_ecosystem.md
Created June 5, 2026 10:32
The Modern C++ Code Intelligence Ecosystem: Bear, Clang, clangd, LSP, IDEs, Static Analysis, and Distributed Builds

The Modern C++ Code Intelligence Ecosystem: Bear, Clang, clangd, LSP, IDEs, Static Analysis, and Distributed Builds

CC0

Disclaimer: ChatGPT generated document.

Below is a map of the whole ecosystem.

1. The core problem: C++ tooling needs your real compile command

@MangaD
MangaD / cpp_static_initialization_order_fiasco.md
Created May 31, 2026 18:58
The Static Initialization Order Fiasco in C++: Causes, Pitfalls, and Modern Solutions

The Static Initialization Order Fiasco in C++: Causes, Pitfalls, and Modern Solutions

CC0

Disclaimer: ChatGPT generated document.

The static initialization order fiasco is a C++ problem where one object with static storage duration depends on another static object whose initialization order is not guaranteed.

It usually happens with global objects, namespace-scope objects, static data members, and sometimes function-local statics during destruction.

@MangaD
MangaD / cpp_brace_elision.md
Created May 31, 2026 18:50
Brace Elision in C++: History, Language Rules, Evolution, Pitfalls, and Modern Best Practices

Brace Elision in C++: History, Language Rules, Evolution, Pitfalls, and Modern Best Practices

CC0

Disclaimer: ChatGPT generated document.

Brace elision is the C++ aggregate-initialization rule that lets you omit inner braces for subobjects.

struct Pair { int x, y; };
@MangaD
MangaD / cpp_method_or_member_function.md
Created May 31, 2026 18:46
Method vs. Member Function: Object-Oriented Theory and C++ Terminology

Method vs. Member Function: Object-Oriented Theory and C++ Terminology

CC0

Disclaimer: ChatGPT generated document.

This is a surprisingly subtle question because "method" and "member function" are often used interchangeably in practice, but there are differences depending on whether you're discussing object-oriented theory or C++ specifically.


@MangaD
MangaD / cpp_copy_elision.md
Created May 29, 2026 19:52
Copy Elision in C++: Complete Guide from C++98 to C++26 (RVO, NRVO, Guaranteed Elision, and Prvalue Semantics)

Copy Elision in C++: Complete Guide from C++98 to C++26 (RVO, NRVO, Guaranteed Elision, and Prvalue Semantics)

CC0

Disclaimer: ChatGPT generated document.

Copy elision is a C++ optimization/semantic rule where the compiler avoids creating a temporary object and therefore avoids calling a copy or move constructor.

In modern C++, especially since C++17, copy elision is not merely an optimization in some cases. Some object constructions are defined so that no temporary object exists at all.

@MangaD
MangaD / cpp_initialization.md
Last active May 31, 2026 18:35
C++ Initialization: A Complete Practical Guide

C++ Initialization: A Complete Practical Guide

CC0

Disclaimer: ChatGPT generated document.

Below is a practical map of C++ initialization types, with syntax, behavior, pros, cons, and typical use cases.

1. Default initialization

@MangaD
MangaD / engineer_meaning.md
Last active May 28, 2026 16:31
The Meaning of “Engineer”: Origins, Cultures, and What Truly Defines One

The Meaning of “Engineer”: Origins, Cultures, and What Truly Defines One

CC0

Disclaimer: ChatGPT generated document.

The word engineer has a surprisingly deep history, and the meaning of the term varies significantly across cultures, legal systems, professions, and historical periods. In some places, “engineer” is a protected title tied to public safety and licensure. In others, it broadly means “someone who designs or builds technical systems.” In still others, it can even refer to mechanics, train operators, or software developers.

The modern concept combines:

@MangaD
MangaD / evolution_programming_languages.md
Created May 10, 2026 12:30
The Evolution of Programming Languages: From Machine Code to Modern Paradigms

The Evolution of Programming Languages: From Machine Code to Modern Paradigms

CC0

Disclaimer: ChatGPT generated document.

The “first programming languages” depend on what you count as a programming language. There is a progression from mechanical instructions, to assembly-like systems, to high-level symbolic languages. The history is fascinating because it mirrors the evolution of computers themselves.

Before Electronic Computers

@MangaD
MangaD / oop_why_term_objects.md
Created May 10, 2026 10:48
Why Are They Called “Objects” in Object-Oriented Programming?

Why Are They Called “Objects” in Object-Oriented Programming?

CC0

Disclaimer: ChatGPT generated document.

The term “object” in Object-Oriented Programming comes from the idea that a program should be built from independent entities that resemble real-world things --- things that have:

  • state (data, properties),
  • behavior (actions, methods),
@MangaD
MangaD / unified_diff_format.md
Created April 23, 2026 13:01
Unified Diff Format

Unified Diff Format

CC0

Disclaimer: ChatGPT generated document.

The unified diff format is one of those deceptively simple tools that quietly powers a huge portion of modern software development. Whether you’re reviewing a pull request, debugging a regression, or applying a patch from a mailing list, you’re almost certainly interacting with unified diffs—often without thinking about it.

Let’s unpack what it is, how it works, and the ecosystem of tools built around it.