<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lander's blog</title><link>https://www.landerwells.com/notes/</link><description>Recent content on Lander's blog</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://www.landerwells.com/notes/index.xml" rel="self" type="application/rss+xml"/><item><title>Resource acquisition is initialization (RAII)</title><link>https://www.landerwells.com/notes/resource-acquisition-is-initialization-raii/</link><pubDate>Thu, 19 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/resource-acquisition-is-initialization-raii/</guid><description>&lt;p&gt;Previous: &lt;a href=""&gt;Ownership in programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Resource acquisition is initialization (RAII) is a programming idiom, or design
pattern, used for managing resources such as memory, file handles, mutexes, and
more. The key idea is that resources are tied to the lifetime of objects. When
an object goes out of scope, its destructor is automatically called to release
any associated resources.&lt;/p&gt;
&lt;h3 id="why-raii-matters"&gt;Why RAII Matters&lt;/h3&gt;
&lt;p&gt;Manually managing memory (e.g., calling `delete` or `free` after every heap
allocation) is error-prone and can lead to memory leaks, double frees, or
resource exhaustion. The same principle applies to other resources like locks;
forgetting to release a mutex can cause deadlocks.&lt;/p&gt;</description></item><item><title>Smart pointers in C++</title><link>https://www.landerwells.com/notes/smart-pointers-in-c++/</link><pubDate>Thu, 19 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/smart-pointers-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/resource-acquisition-is-initialization-raii/"&gt;Resource acquisition is initialization (RAII)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In C++, smart pointers are RAII wrappers for raw pointers. They eliminate the
need to use raw pointers and manually call &lt;code&gt;new&lt;/code&gt; / &lt;code&gt;delete&lt;/code&gt; in order to get
them. The three variations are &lt;code&gt;std::unique_ptr&lt;/code&gt;, &lt;code&gt;std::shared_ptr&lt;/code&gt;, and
&lt;code&gt;std::weak_ptr&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="std-unique-ptr"&gt;&lt;code&gt;std::unique_ptr&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Likely the most common of the three, &lt;code&gt;std::unique_ptr&lt;/code&gt; will fit in most
occasions where a raw pointer was desired. It is meant to be used when there is
unique ownership of a resource. For example, if a class is meant to manage a
pointer to another class, instead of manually calling &lt;code&gt;new&lt;/code&gt; in the constructor,
and &lt;code&gt;delete&lt;/code&gt; in the desturctor, using a unique pointer will automatically
deallocate the owned resource when the primary class is destructed.&lt;/p&gt;</description></item><item><title>Asynchronous programming</title><link>https://www.landerwells.com/notes/asynchronous-programming/</link><pubDate>Wed, 18 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/asynchronous-programming/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/concurrency/"&gt;Concurrency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Asynchronous programming is a form of programming where the programs execution
is non-linear.&lt;/p&gt;
&lt;p&gt;This is achieved by implementing &amp;ldquo;futures&amp;rdquo; or &amp;ldquo;promises&amp;rdquo;, which will return a
value at some point, but not immediately. It breaks the flow of execution that
is typically expected from reading source code.&lt;/p&gt;
&lt;p&gt;In Rust, this is achieved by the &lt;code&gt;async&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt; keywords.&lt;/p&gt;
&lt;p&gt;Async is typically a better option if the program is I/O bound instead of CPU
bound.&lt;/p&gt;</description></item><item><title>Concurrency is not parallelism</title><link>https://www.landerwells.com/notes/concurrency-is-not-parallelism/</link><pubDate>Wed, 18 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/concurrency-is-not-parallelism/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/concurrency/"&gt;Concurrency&lt;/a&gt;, &lt;a href="https://www.landerwells.com/notes/parallelism/"&gt;Parallelism&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In computer science, the concepts of concurrency and parallelism are related,
but distinct ideas. There is a talk by Rob Pike, the co-author of Golang, of the
same name as this note where he outlines the difference between the two.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll start with an analogy used in &amp;ldquo;The Rust Programming Language&amp;rdquo; book in the
section for &lt;a href="https://www.landerwells.com/notes/asynchronous-programming/"&gt;asynchronous programming&lt;/a&gt;. Concurrency is when a single person is
assigned multiple tasks. They can switch between these tasks until each one is
complete, but cannot work on more than one at a time. Concurrency is possible on
a single core CPU while parallelism means that things are getting done at the
exact same time.&lt;/p&gt;</description></item><item><title>Interviewing</title><link>https://www.landerwells.com/notes/interviewing/</link><pubDate>Wed, 18 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/interviewing/</guid><description/></item><item><title>Multithreading</title><link>https://www.landerwells.com/notes/multithreading/</link><pubDate>Wed, 18 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/multithreading/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/concurrency/"&gt;Concurrency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Multithreading is a form of concurrency where a program can be executing on
multiple threads. There is a difference between operating system threads and
language threads, but that is not as apparent in languages like C++ and Rust
where there is a 1:1 relationship between the two.&lt;/p&gt;</description></item><item><title>Parallelism</title><link>https://www.landerwells.com/notes/parallelism/</link><pubDate>Wed, 18 Mar 2026 00:00:00 -0500</pubDate><guid>https://www.landerwells.com/notes/parallelism/</guid><description/></item><item><title>Concurrency</title><link>https://www.landerwells.com/notes/concurrency/</link><pubDate>Sun, 08 Mar 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/concurrency/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/operating-system/"&gt;Operating system&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Synchronization primitives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.landerwells.com/notes/lock-mutex/"&gt;Lock (Mutex)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.landerwells.com/notes/condition-variable/"&gt;Condition variable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.landerwells.com/notes/semaphore/"&gt;Semaphore&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Condition variable</title><link>https://www.landerwells.com/notes/condition-variable/</link><pubDate>Sun, 08 Mar 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/condition-variable/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/concurrency/"&gt;Concurrency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A condition variable is a synchronization primitive that allows threads to wait
efficiently until a specific condition becomes true. They are usually used in
conjunction with a &lt;a href="https://www.landerwells.com/notes/lock-mutex/"&gt;lock&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Lock (Mutex)</title><link>https://www.landerwells.com/notes/lock-mutex/</link><pubDate>Sun, 08 Mar 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/lock-mutex/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/concurrency/"&gt;Concurrency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A lock or mutex (short for mutual exclusion) is a synchronization primitive that
prevents data races by only allowing a single thread inside a critical section
at a time.&lt;/p&gt;</description></item><item><title>Semaphore</title><link>https://www.landerwells.com/notes/semaphore/</link><pubDate>Sun, 08 Mar 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/semaphore/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/concurrency/"&gt;Concurrency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A semaphore is a synchronization primitive similar to &lt;a href="https://www.landerwells.com/notes/lock-mutex/"&gt;locks&lt;/a&gt; and &lt;a href="https://www.landerwells.com/notes/condition-variable/"&gt;condition
variables&lt;/a&gt;. It provides two operations, &lt;code&gt;signal()&lt;/code&gt; and &lt;code&gt;wait()&lt;/code&gt;, and keeps
track of a count (an integer).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;wait&lt;/code&gt;: Decrements the semaphore&amp;rsquo;s count. If the new value is less than zero,
it blocks the calling thread.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;signal&lt;/code&gt;: Increments the semaphore&amp;rsquo;s count. If the count was negative before
the increment, it wakes one waiting thread and moves it to the ready queue.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>System design interview template</title><link>https://www.landerwells.com/notes/system-design-interview-template/</link><pubDate>Sun, 08 Mar 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/system-design-interview-template/</guid><description>&lt;p&gt;The system design interview template is from &amp;ldquo;System Design Interview&amp;rdquo; by Alex
Xu, and consists of four steps to guide interviewees through designing a system.&lt;/p&gt;
&lt;p&gt;The fours steps are:&lt;/p&gt;
&lt;h2 id="step-1-understand-the-problem-and-establish-design-scope"&gt;Step 1 - Understand the problem and establish design scope&lt;/h2&gt;
&lt;p&gt;Ask clarifying questions, get all of the requisite informatioe.&lt;/p&gt;
&lt;h2 id="step-2-propose-high-level-design-and-get-buy-in"&gt;Step 2 - Propose high-level design and get buy-in&lt;/h2&gt;
&lt;p&gt;Create initial blueprint and get help from the interviewer. Draw diagrams, and
do necessary calculations.&lt;/p&gt;</description></item><item><title>Backtracking</title><link>https://www.landerwells.com/notes/backtracking/</link><pubDate>Sun, 22 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/backtracking/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;, &lt;a href="https://www.landerwells.com/notes/depth-first-search/"&gt;Depth-first search&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Backtracking is an algorithmic paradigm that incrementally builds solutions
while discarding invalid states.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Base case&lt;/li&gt;
&lt;li&gt;Choices&lt;/li&gt;
&lt;li&gt;Constraints&lt;/li&gt;
&lt;li&gt;Backtrack&lt;/li&gt;
&lt;/ol&gt;
&lt;!--listend--&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;def&lt;/span&gt; &lt;span style="color:#268bd2"&gt;backtrack&lt;/span&gt;(params):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;if&lt;/span&gt; base_case_condition:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; save_result
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;return&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;for&lt;/span&gt; choice &lt;span style="color:#719e07"&gt;in&lt;/span&gt; choices:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;if&lt;/span&gt; violates_constraints:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;continue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; make_choice
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; backtrack(updated_params)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; undo_choice &lt;span style="color:#586e75"&gt;# Backtracking Step&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Depth-first search</title><link>https://www.landerwells.com/notes/depth-first-search/</link><pubDate>Sun, 22 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/depth-first-search/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Depth-first search (DFS) is a graph traversal algorithm that fully explores one
path before going back to explore others. This is in contrast to &lt;a href="https://www.landerwells.com/notes/breadth-first-search/"&gt;breadth-first
search&lt;/a&gt; which explores all nodes on a layer or level before moving on to another.
At its core, DFS uses a stack data structure to implement this behavior. Since a
stack can be replicated via recursion, it is often easier to implement DFS
recursively instead of iteratively.&lt;/p&gt;</description></item><item><title>Functors in C++</title><link>https://www.landerwells.com/notes/functors-in-c++/</link><pubDate>Sun, 22 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/functors-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;, &lt;a href="https://www.landerwells.com/notes/lambda-expressions-in-c&amp;#43;&amp;#43;/"&gt;Lambda expressions in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Functors in C++ are classes or structs that overload &lt;code&gt;operator()&lt;/code&gt;, allowing
instances to be called like regular functions. Because they are objects, they
can carry state between calls, which is something a plain function cannot do.
Under the hood, lambda expressions are simply compiler-generated functors.&lt;/p&gt;</description></item><item><title>Inheritance in C++</title><link>https://www.landerwells.com/notes/inheritance-in-c++/</link><pubDate>Sun, 22 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/inheritance-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href=""&gt;Object-oriented programming&lt;/a&gt;, &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Inheritance allows a derived class to acquire the properties and behaviors of a
base class. It is a core concept of object-oriented programming and a prime
example of subtype polymorphism. The following are not inherited from the base
class: constructors, destructors, overloaded operators, and friend functions.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;class&lt;/span&gt; &lt;span style="color:#268bd2"&gt;Animal&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;public&lt;/span&gt;&lt;span style="color:#719e07"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; string name;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;virtual&lt;/span&gt; &lt;span style="color:#dc322f"&gt;void&lt;/span&gt; &lt;span style="color:#268bd2"&gt;speak&lt;/span&gt;() { cout &lt;span style="color:#719e07"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style="color:#2aa198"&gt;&amp;#34;...&amp;#34;&lt;/span&gt;; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;};
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;class&lt;/span&gt; &lt;span style="color:#268bd2"&gt;Dog&lt;/span&gt; &lt;span style="color:#719e07"&gt;:&lt;/span&gt; &lt;span style="color:#719e07"&gt;public&lt;/span&gt; Animal {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;public&lt;/span&gt;&lt;span style="color:#719e07"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#dc322f"&gt;void&lt;/span&gt; speak() &lt;span style="color:#719e07"&gt;override&lt;/span&gt; { cout &lt;span style="color:#719e07"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style="color:#2aa198"&gt;&amp;#34;Woof!&amp;#34;&lt;/span&gt;; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;};
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="virtual-inheritance"&gt;Virtual Inheritance&lt;/h2&gt;
&lt;p&gt;When a member function is marked &lt;code&gt;virtual&lt;/code&gt;, the compiler generates a vtable
(virtual table) for the class and attaches a vpointer to each instance. At
runtime, function calls are dispatched through the vtable, allowing the correct
overridden method to be called regardless of the pointer type. This is known as
dynamic dispatch.&lt;/p&gt;</description></item><item><title>Three different types of index notes</title><link>https://www.landerwells.com/notes/three-different-types-of-index-notes/</link><pubDate>Sun, 22 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/three-different-types-of-index-notes/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/zettelkasten/"&gt;Zettelkasten&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In &lt;em&gt;A System for Writing&lt;/em&gt; by Bob Doto, he suggests three types of indexes that
will help you navigate your zettelkasten as it grows larger.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Hub Notes These notes are more just launch off point into your zettelkasten.
The take a few of the notes that you have in a subject as a starting point
and link them here. It will serve as a jumping board into your notes in order
to find more information on the subject you desire.&lt;/li&gt;
&lt;li&gt;Structure Notes These are meant to expand upon a topic, becoming a central
location for your thoughts and connections. Explain all connections.&lt;/li&gt;
&lt;li&gt;Keyword Index: This is allegedly what Niklas Luhmann used the most in his
personal zettelkasten. This is most akin to an index at the back of a book,
where keywords list their locations in order for the reader to find them. You
could have multiple of these kinds of note, each with a different criteria,
but generally I think one would be more than sufficient. Most people would
opt to imitate what is found in books, while others can index by things like
how the notes make them feel or where the notes were taken.&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Abstraction</title><link>https://www.landerwells.com/notes/abstraction/</link><pubDate>Wed, 18 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/abstraction/</guid><description/></item><item><title>Access specifiers in C++</title><link>https://www.landerwells.com/notes/access-specifiers-in-c++/</link><pubDate>Wed, 18 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/access-specifiers-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In C++, access specifiers control how class, struct, or union members can be
accessed from outside the class or by derived types. The three available
specifiers are public, protected, and private.&lt;/p&gt;
&lt;p&gt;Public and private are the most commonly used, while protected is mainly
relevant in inheritance hierarchies. It allows derived classes to access certain
members while still hiding them from outside code.&lt;/p&gt;
&lt;p&gt;The following table summarizes the accessibility rules:&lt;/p&gt;</description></item><item><title>Auto keyword in C++</title><link>https://www.landerwells.com/notes/auto-keyword-in-c++/</link><pubDate>Wed, 18 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/auto-keyword-in-c++/</guid><description>&lt;p&gt;The &lt;code&gt;auto&lt;/code&gt; keyword has existed since the earliest versions of C++, but its
modern meaning was introduced in C++11. Originally, auto specified automatic
storage duration, which was the default for local variables and rarely used. In
C++11 and later, &lt;code&gt;auto&lt;/code&gt; allows the compiler to deduce the type of a variable
from its initializer.&lt;/p&gt;
&lt;p&gt;The use of &lt;code&gt;auto&lt;/code&gt; defers type deduction to the compiler, allowing you to avoid
explicitly writing out the type of the data being assigned. This is useful for
simplifying code, especially when dealing with complex types such as iterators
or lambda expressions.&lt;/p&gt;</description></item><item><title>Recursive lambda expressions in C++</title><link>https://www.landerwells.com/notes/recursive-lambda-expressions-in-c++/</link><pubDate>Wed, 18 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/recursive-lambda-expressions-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/lambda-expressions-in-c&amp;#43;&amp;#43;/"&gt;Lambda expressions in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unlike Python, C++ lambdas don&amp;rsquo;t support generic recursion. There are
workarounds, but they all come with meaningful drawbacks. Additionally, I
believe recursion has little place in production code, recursive lambdas even
less so. The options below are fun to know, but should be considered trivia at
best.&lt;/p&gt;
&lt;h2 id="std-function"&gt;&lt;code&gt;std::function&lt;/code&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;#include&lt;/span&gt; &lt;span style="color:#719e07"&gt;&amp;lt;functional&amp;gt;&lt;/span&gt;&lt;span style="color:#719e07"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;function&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;(&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;)&lt;span style="color:#719e07"&gt;&amp;gt;&lt;/span&gt; factorial &lt;span style="color:#719e07"&gt;=&lt;/span&gt; [&lt;span style="color:#719e07"&gt;&amp;amp;&lt;/span&gt;](&lt;span style="color:#dc322f"&gt;int&lt;/span&gt; n) &lt;span style="color:#719e07"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#dc322f"&gt;int&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#719e07"&gt;return&lt;/span&gt; n &lt;span style="color:#719e07"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color:#2aa198"&gt;1&lt;/span&gt; &lt;span style="color:#719e07"&gt;?&lt;/span&gt; &lt;span style="color:#2aa198"&gt;1&lt;/span&gt; &lt;span style="color:#719e07"&gt;:&lt;/span&gt; n &lt;span style="color:#719e07"&gt;*&lt;/span&gt; factorial(n &lt;span style="color:#719e07"&gt;-&lt;/span&gt; &lt;span style="color:#2aa198"&gt;1&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;};
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Works from C++11 onward. The main drawback is that you must spell out all
parameter types inside the std::function template, which largely defeats the
brevity that made you want a lambda in the first place. There&amp;rsquo;s also a runtime
overhead cost from type erasure.&lt;/p&gt;</description></item><item><title>Declaration, initialization, instantiation</title><link>https://www.landerwells.com/notes/declaration-initialization-instantiation/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/declaration-initialization-instantiation/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/variable-assignment-and-initialization-in-c&amp;#43;&amp;#43;/"&gt;Variable assignment and initialization in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Declaration: Telling the compiler that a variable or object exists, specifying
its type. No memory for the actual value is necessarily allocated (depends on
context). Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;int x;&lt;/li&gt;
&lt;li&gt;Foo* p;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Initialization: Assigning an initial value to a variable or object. Happens
after declaration or at the same time. Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;int x = 5;&lt;/li&gt;
&lt;li&gt;Foo obj(10);&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instantiation: Creating an instance of a class (an actual object). Involves
memory allocation for the object. Example:&lt;/p&gt;</description></item><item><title>Decltype keyword in C++</title><link>https://www.landerwells.com/notes/decltype-keyword-in-c++/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/decltype-keyword-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/auto-keyword-in-c&amp;#43;&amp;#43;/"&gt;Auto keyword in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;decltype&lt;/code&gt; keyword and operator in C++ is used to query the type of a
variable or an expression. It is related to &lt;code&gt;auto&lt;/code&gt; in that it is a form of type
deduction, but it does not follow the same rules. &lt;code&gt;decltype&lt;/code&gt; almost always
yields the type of a variable or expression without any modifications.&lt;/p&gt;</description></item><item><title>Euclidean algorithm</title><link>https://www.landerwells.com/notes/euclidean-algorithm/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/euclidean-algorithm/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Euclidean algorithm or Euclid&amp;rsquo;s algorithm is for efficiently finding the
greatest common divisor of two numbers. The idea of the algorithm is based on
the observation that, if r is the remainder when a is divided by b, then the
common divisors of a and b are precisely the same as the common divisors of b
and r. This we can use the equation: GCD(a,b) == GCD(b,r).&lt;/p&gt;</description></item><item><title>Linked List</title><link>https://www.landerwells.com/notes/linked-list/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/linked-list/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/data-structure/"&gt;Data structure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One of the big benefits of a linked list over a &lt;a href=""&gt;Dynamic Array&lt;/a&gt; is that modifying
a known element is an O(1) operation. Meaning that modifying the beginning of a
list isn&amp;rsquo;t O(n).&lt;/p&gt;
&lt;p&gt;A downside of using them is that you loose O(1) random access. Because arrays
store an address that points to a contiguous block of memory, a little
arithmetic will allow you to directly get to the elemetn at i, but linked lists
are stored on the heap and are not contigious&lt;/p&gt;</description></item><item><title>Recursively Enumerable</title><link>https://www.landerwells.com/notes/recursively-enumerable/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/recursively-enumerable/</guid><description>&lt;p&gt;Previous: &lt;a href=""&gt;Mathematics&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A set &lt;code&gt;S&lt;/code&gt; of natural numbers is recursively enumerable if there exists an
&lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;algorithm&lt;/a&gt; that enumerates its elements: s₁, s₂, s₃, &amp;hellip; (the algorithm may run
forever for infinite sets).&lt;/p&gt;
&lt;p&gt;Examples: x² generates {0, 1, 4, 9, 16, &amp;hellip;}, the primes {2, 3, 5, 7, 11, &amp;hellip;}&lt;/p&gt;
&lt;p&gt;Every computable set is recursively enumerable, but not every recursively
enumerable set is computable.&lt;/p&gt;
&lt;p&gt;Recursive enumeration is the process of generating new elements from old ones by
fixed rules.&lt;/p&gt;</description></item><item><title>References in C++</title><link>https://www.landerwells.com/notes/references-in-c++/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/references-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Added in C++11 was the distinction between lvalue and rvalue references, which
enabled the possibility of many new features mainly &lt;a href="https://www.landerwells.com/notes/move-semantics-in-c&amp;#43;&amp;#43;/"&gt;move semantics&lt;/a&gt;. References
are not objects, they are typically implemented as pointers underneath, and
their primary purpose is to serve as an alias for another value. They are
supplied with more safety constraints and better syntax than raw pointers. That
said, they do also suffer from issues like dangling that pointers do.&lt;/p&gt;</description></item><item><title>Variable assignment and initialization in C++</title><link>https://www.landerwells.com/notes/variable-assignment-and-initialization-in-c++/</link><pubDate>Mon, 16 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/variable-assignment-and-initialization-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt; a; &lt;span style="color:#586e75"&gt;// default-initialization (no initializer)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#586e75"&gt;// Traditional initialization forms:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt; b &lt;span style="color:#719e07"&gt;=&lt;/span&gt; &lt;span style="color:#2aa198"&gt;5&lt;/span&gt;; &lt;span style="color:#586e75"&gt;// copy-initialization (initial value after equals sign)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt; &lt;span style="color:#268bd2"&gt;c&lt;/span&gt; ( &lt;span style="color:#2aa198"&gt;6&lt;/span&gt; ); &lt;span style="color:#586e75"&gt;// direct-initialization (initial value in parenthesis)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#586e75"&gt;// Modern initialization forms (preferred):
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt; d { &lt;span style="color:#2aa198"&gt;7&lt;/span&gt; }; &lt;span style="color:#586e75"&gt;// direct-list-initialization (initial value in braces)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt; e {}; &lt;span style="color:#586e75"&gt;// value-initialization (empty braces)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;By default assignment copies values. Copy initialization is used whenever values
are implicitly copied: passing arguments, by value, returning by value.&lt;/p&gt;
&lt;p&gt;List initialization is probably the best and easiest to recommend for modern C++
programming.&lt;/p&gt;</description></item><item><title>Computer science</title><link>https://www.landerwells.com/notes/computer-science/</link><pubDate>Sun, 15 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/computer-science/</guid><description/></item><item><title>Lambda calculus</title><link>https://www.landerwells.com/notes/lambda-calculus/</link><pubDate>Sun, 15 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/lambda-calculus/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/computer-science/"&gt;Computer science&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lambda calculus is a &lt;a href=""&gt;Formal System&lt;/a&gt; in mathematics for expressing computation
based on &lt;a href=""&gt;function&lt;/a&gt; &lt;a href="https://www.landerwells.com/notes/abstraction/"&gt;abstraction&lt;/a&gt; using variable binding and substitution.
&lt;a href="https://www.landerwells.com/notes/functional-programming/"&gt;Functional programming&lt;/a&gt; derives its core concepts from lambda calculus. The LISP
family of languages is directly based on it. In 1937, Alan Turing proved that
lambda calculus and Turing machine are equivalent models of computation.&lt;/p&gt;
&lt;p&gt;Features of the language:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Single-letter variable names (a-z)&lt;/li&gt;
&lt;li&gt;Application: &lt;code&gt;ab&lt;/code&gt; means call function a with parameter b (left associative, so
&lt;code&gt;abc&lt;/code&gt; = &lt;code&gt;(ab)c&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Abstraction: define anonymous functions using λ&lt;/li&gt;
&lt;li&gt;Parentheses for grouping expressions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Grammar:&lt;/p&gt;</description></item><item><title>Models of Computation</title><link>https://www.landerwells.com/notes/models-of-computation/</link><pubDate>Sun, 15 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/models-of-computation/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/computer-science/"&gt;Computer science&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In computer science, a model of computation is a formal framework that describes
how computations are performed. &lt;a href="https://www.landerwells.com/notes/lambda-calculus/"&gt;Lambda calculus&lt;/a&gt; and general recursive functions
are functional models, while Turing machines are sequential models. Not all
models of computation have equal computational power, but the ones listed below
are all Turing-complete and thus equivalent in what they can compute:&lt;/p&gt;</description></item><item><title>Org-mode syntax export test</title><link>https://www.landerwells.com/notes/org-mode-syntax-export-test/</link><pubDate>Sun, 15 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/org-mode-syntax-export-test/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;
&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#headings"&gt;Headings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#first-level-heading"&gt;First Level Heading&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#second-level-heading"&gt;Second Level Heading&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#text-formatting"&gt;Text Formatting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#lists"&gt;Lists&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#unordered-lists"&gt;Unordered Lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#ordered-lists"&gt;Ordered Lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#description-lists"&gt;Description Lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#checklists"&gt;Checklists&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#tables"&gt;Tables&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#simple-table"&gt;Simple Table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#table-with-formulas"&gt;Table with Formulas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#table-with-alignment"&gt;Table with Alignment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#source-code-blocks"&gt;Source Code Blocks&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#inline-code"&gt;Inline Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#code-blocks-with-syntax-highlighting"&gt;Code Blocks with Syntax Highlighting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-blocks"&gt;Example Blocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#export-verbatim-blocks"&gt;Export/Verbatim Blocks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#quotes-and-verses"&gt;Quotes and Verses&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#block-quotes"&gt;Block Quotes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#verse-blocks"&gt;Verse Blocks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#horizontal-rules"&gt;Horizontal Rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#tags"&gt;Tags&lt;/a&gt;:tag:
&lt;ul&gt;
&lt;li&gt;&lt;a href="#heading-with-single-tag"&gt;Heading with Single Tag&lt;/a&gt;:work:&lt;/li&gt;
&lt;li&gt;&lt;a href="#heading-with-multiple-tags"&gt;Heading with Multiple Tags&lt;/a&gt;:work:important:&lt;/li&gt;
&lt;li&gt;&lt;a href="#heading-with-inherited-tags"&gt;Heading with Inherited Tags&lt;/a&gt;:project:development:&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#properties-and-drawers"&gt;Properties and Drawers&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#heading-with-properties"&gt;Heading with Properties&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#heading-with-logbook"&gt;Heading with Logbook&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#mathematical-expressions--latex"&gt;Mathematical Expressions (LaTeX)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#inline-math"&gt;Inline Math&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#display-math"&gt;Display Math&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#special-symbols-and-entities"&gt;Special Symbols and Entities&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#macros"&gt;Macros&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#comments"&gt;Comments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#special-blocks"&gt;Special Blocks&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#note-block"&gt;Note Block&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#warning-block"&gt;Warning Block&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#org-babel-features"&gt;Org Babel Features&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#executable-code"&gt;Executable Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#table-generation-from-code"&gt;Table Generation from Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#code-with-variables"&gt;Code with Variables&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#miscellaneous"&gt;Miscellaneous&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#line-breaks"&gt;Line Breaks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#subscripts-and-superscripts"&gt;Subscripts and Superscripts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#special-strings"&gt;Special Strings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#emphasis-in-headlines"&gt;Emphasis in Headlines&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--endtoc--&gt;
&lt;p&gt;This document demonstrates the full range of Org mode syntax features.&lt;/p&gt;</description></item><item><title>As-if rule in C++</title><link>https://www.landerwells.com/notes/as-if-rule-in-c++/</link><pubDate>Sat, 14 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/as-if-rule-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/compiler-optimizations-in-c&amp;#43;&amp;#43;/"&gt;Compiler optimizations in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The as-if rule says that a compiler is allowed to make modifications to a
program in attempt to optimize as long as the effects do not affect the
observable behavior.&lt;/p&gt;</description></item><item><title>Binary search</title><link>https://www.landerwells.com/notes/binary-search/</link><pubDate>Sat, 14 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/binary-search/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Binary search is an algorithm that finds an item in a sorted array in O(log(n))
time complexity. Given no other information other than the array is sorted it is
the optimal algorithm for finding the index of an element if it exists, or if it
should exist.&lt;/p&gt;</description></item><item><title>Compiler optimizations in C++</title><link>https://www.landerwells.com/notes/compiler-optimizations-in-c++/</link><pubDate>Sat, 14 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/compiler-optimizations-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Phong lighting</title><link>https://www.landerwells.com/notes/phong-lighting/</link><pubDate>Sat, 14 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/phong-lighting/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/graphics-programming/"&gt;Graphics programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Phong lighting model consists of 3 components: ambient, diffuse, and
specular lighting.&lt;/p&gt;
&lt;p&gt;Ambient lighting is just the base level of ligthing an object receives, from
&amp;ldquo;all&amp;rdquo; light sources, even if there aren&amp;rsquo;t any, an object will still be lit with
the ambient light source. Generally this is accomplished by dimming all objects
by a set value.&lt;/p&gt;</description></item><item><title>Signed distance function</title><link>https://www.landerwells.com/notes/signed-distance-function/</link><pubDate>Sat, 14 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/signed-distance-function/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/ray-marching/"&gt;Ray marching&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A signed distnace function returns the distance to the boundary of an object
(shape) from a given point. If the point is inside the object, then this value
will be negative.&lt;/p&gt;</description></item><item><title>Disjoint set data structure</title><link>https://www.landerwells.com/notes/disjoint-set-data-structure/</link><pubDate>Fri, 13 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/disjoint-set-data-structure/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/data-structure/"&gt;Data structure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The disjoint set data structure, also called a union-find data structure, is
used in many graph problems to represent a collection of disjoint sets. It
provides two main operations: union for joining sets, and find for determining
which set an element belongs to.&lt;/p&gt;
&lt;p&gt;Useful to think of electricity as an example. If there are a lot of nodes,
connecting them will put them in the same circuit, but if two nodes aren&amp;rsquo;t
connected, then they aren&amp;rsquo;t in the same circuit.&lt;/p&gt;</description></item><item><title>Memory segmentation</title><link>https://www.landerwells.com/notes/memory-segmentation/</link><pubDate>Fri, 13 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/memory-segmentation/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/virtual-memory/"&gt;Virtual memory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Memory segmentation is a form of virtual memory management that preceded &lt;a href=""&gt;Memory
paging&lt;/a&gt;. It divides memory into variable-sized segments (code, stack, heap,
etc.) rather than fixed-size pages. Originally implemented with a base-and-bounds
technique where each segment has a base address (starting location in physical
memory) and a bounds/limit (size of the segment).&lt;/p&gt;
&lt;p&gt;Address translation is simple: take the virtual address (offset within segment),
add the base register, check against bounds. Each segment can be placed anywhere
in physical memory. The MMU tracks segment growth direction (positive for heap,
negative for stack).&lt;/p&gt;</description></item><item><title>Ray marching</title><link>https://www.landerwells.com/notes/ray-marching/</link><pubDate>Fri, 13 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/ray-marching/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/graphics-programming/"&gt;Graphics programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ray marching is a technique used in graphics programming to draw shapes using
&lt;a href="https://www.landerwells.com/notes/signed-distance-function/"&gt;signed distance functions&lt;/a&gt;. It involves incrementally stepping along a ray by a
safe distance (provided by the SDF).&lt;/p&gt;</description></item><item><title>Special member functions in C++</title><link>https://www.landerwells.com/notes/special-member-functions-in-c++/</link><pubDate>Tue, 10 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/special-member-functions-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In C++, special member functions are the functions that the compiler can
automatically generate for a class if you don’t declare them yourself. They are
responsible for the core object lifecycle and copying/moving behavior. Here’s
the full list:&lt;/p&gt;
&lt;p&gt;Constructors in C++ are a special member function that is automatically called
after a non-aggregate type is created.&lt;/p&gt;
&lt;p&gt;Destructors are meant for when an object is being destroyed There is one special
member fucntion that if defined will not prevent the others from being
implicitly defined by the compiler That is the constructor, I would like some
more information about this? what is happening, does defining a copy constructor
prevent there from implicitly defining a move&lt;/p&gt;</description></item><item><title>The rule of three, five, and zero in C++</title><link>https://www.landerwells.com/notes/the-rule-of-three-five-and-zero-in-c++/</link><pubDate>Tue, 10 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/the-rule-of-three-five-and-zero-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/copy-semantics-in-c&amp;#43;&amp;#43;/"&gt;Copy semantics in C++&lt;/a&gt;, &lt;a href="https://www.landerwells.com/notes/move-semantics-in-c&amp;#43;&amp;#43;/"&gt;Move semantics in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The rule of three, five, and zero in C++ are guidelines that help determine
which &lt;a href="https://www.landerwells.com/notes/special-member-functions-in-c&amp;#43;&amp;#43;/"&gt;special member functions&lt;/a&gt; a class should implement. The rule of three
originally stated that if a class implemented a custom destructor, copy
constructor, or copy assignment operator, then it should probably implement the
other two.&lt;/p&gt;
&lt;p&gt;This was updated to the rule of five in C++11 due to the addition of move
semantics, adding the move constructor and the move assignemnt operator to the
rule of three.&lt;/p&gt;</description></item><item><title>Kruskal's algorithm</title><link>https://www.landerwells.com/notes/kruskals-algorithm/</link><pubDate>Sun, 08 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/kruskals-algorithm/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithms&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kruskal&amp;rsquo;s algorithm is a method of obtaining a minimum spanning tree of an
undirected, edge-weighted graph. It makes use of a &lt;a href="https://www.landerwells.com/notes/disjoint-set-data-structure/"&gt;disjoint set data structure&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The solution using Kruskal&amp;rsquo;s algorithm requires both the edges and the number of
vertices. If the vertices are not explicitly provided, they can be inferred by
examining all unique endpoints in the edge list. Moving on to the actual
algorithm, sort the edges by weight in ascending order and then begin adding
them to the MST using the disjoint set to detect cycles. An edge is added only
if it connects two different components and doesn&amp;rsquo;t create a cycle. A minimum
spanning tree has been produced when the number of edges added is equal to the
number of vertices minus one.&lt;/p&gt;</description></item><item><title>Sorting</title><link>https://www.landerwells.com/notes/sorting/</link><pubDate>Sun, 08 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/sorting/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Most common types of sorts&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quicksort&lt;/li&gt;
&lt;li&gt;Mergesort&lt;/li&gt;
&lt;li&gt;Radix sort&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="stability"&gt;Stability&lt;/h2&gt;
&lt;p&gt;Stable sorting algorithms sort equal elements in the same order that they appear
in the input. Relative order of equal value elements will be preserved in a
stable sort. Stability is a non-issue on sets where all elements are distinct,
or when elements are indistinguishable, like primitive values.&lt;/p&gt;
&lt;p&gt;Stability is useful when stacking sorts, like sorting a deck of cards initially
by the rank, and then followed by the suit. This will produce ordered sections
of suits, whereas an unstable sort would not preserve this order.&lt;/p&gt;</description></item><item><title>Cache affinity</title><link>https://www.landerwells.com/notes/cache-affinity/</link><pubDate>Wed, 04 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/cache-affinity/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/operating-system/"&gt;Operating system&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cache affinity, also called processor affinity or CPU pinning, is the concept
that a process when run on a particular CPU, builds up a fair bit of state in
the caches (and TLBs) of the CPU. When the process is switched out and back in,
it would be adventageous for it to run on the same CPU.&lt;/p&gt;</description></item><item><title>Forwarding references in C++</title><link>https://www.landerwells.com/notes/forwarding-references-in-c++/</link><pubDate>Tue, 03 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/forwarding-references-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/references-in-c&amp;#43;&amp;#43;/"&gt;References in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Forwarding references (also known as &amp;ldquo;universal references&amp;rdquo;) can bind to both
lvalues and rvalues. The syntax is generally the same as rvalue references
&lt;code&gt;T&amp;amp;&amp;amp;&lt;/code&gt;, but they arise in two specific contexts: function template parameters,
and &lt;code&gt;auto&lt;/code&gt; declarations. Both cases have to deal with type deduction. Form must
be &lt;code&gt;T&amp;amp;&amp;amp;&lt;/code&gt; precisely, and type deduction must occur, otherwise &lt;code&gt;T&amp;amp;&amp;amp;&lt;/code&gt; denotes
an rvalue reference.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;void&lt;/span&gt; &lt;span style="color:#268bd2"&gt;f&lt;/span&gt;(Widget&lt;span style="color:#719e07"&gt;&amp;amp;&amp;amp;&lt;/span&gt; param); &lt;span style="color:#586e75"&gt;// rvalue reference
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;auto&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;amp;&amp;amp;&lt;/span&gt; var2 &lt;span style="color:#719e07"&gt;=&lt;/span&gt; var1; &lt;span style="color:#586e75"&gt;// unversal reference
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;template&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#719e07"&gt;typename&lt;/span&gt; T&lt;span style="color:#719e07"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#dc322f"&gt;void&lt;/span&gt; f(T&lt;span style="color:#719e07"&gt;&amp;amp;&amp;amp;&lt;/span&gt; param); &lt;span style="color:#586e75"&gt;// universal reference
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Perfect forwarding in C++</title><link>https://www.landerwells.com/notes/perfect-forwarding-in-c++/</link><pubDate>Tue, 03 Feb 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/perfect-forwarding-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/forwarding-references-in-c&amp;#43;&amp;#43;/"&gt;Forwarding references in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Perfect forwarding is a technique where a forwarding reference is passed to
another function using &lt;code&gt;std::forward&lt;/code&gt;. This action preserves the value category
of the original argument allowing for proper semantics to be invoked and
compiler optimization.&lt;/p&gt;</description></item><item><title>Entity component system</title><link>https://www.landerwells.com/notes/entity-component-system/</link><pubDate>Sat, 31 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/entity-component-system/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/bevy/"&gt;Bevy&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Entity component sysetm (ECS) is a design pattern that involves breaking a
program up into entities, components, and systems. Entities are unique things
which are assigned components, and then processed using systems.&lt;/p&gt;
&lt;p&gt;An entity is an ID. A component is a stuct of data. A system is the logic that
operates on the components.&lt;/p&gt;</description></item><item><title>Game development</title><link>https://www.landerwells.com/notes/game-development/</link><pubDate>Sat, 31 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/game-development/</guid><description/></item><item><title>Quaternion</title><link>https://www.landerwells.com/notes/quaternion/</link><pubDate>Sat, 31 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/quaternion/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/transform/"&gt;Transform&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A quaternion is a mathematical concept that is incredibly useful in &lt;a href="https://www.landerwells.com/notes/graphics-programming/"&gt;graphics
programming&lt;/a&gt; and &lt;a href="https://www.landerwells.com/notes/game-development/"&gt;game development&lt;/a&gt;. Just as complex numbers form a two-dimensional
number system over the reals, quaternions form a four-dimensional number system
over the reals.&lt;/p&gt;
&lt;h2 id="multiplication"&gt;Multiplication&lt;/h2&gt;
&lt;p&gt;Comparing quaterions again to complex numbers, multiplication provides a
rotation in three-dimensional space. For instance, &lt;code&gt;q * v&lt;/code&gt; rotates the vector
&lt;code&gt;v&lt;/code&gt; by the rotation represented by &lt;code&gt;q&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Transform</title><link>https://www.landerwells.com/notes/transform/</link><pubDate>Sat, 31 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/transform/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/bevy/"&gt;Bevy&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A tranform is a primitive component in game programming for representing an
object&amp;rsquo;s position. They are used in most game engines and are a good abstraction
for handling the behvavior of an object.&lt;/p&gt;
&lt;p&gt;Tranforms generally contain three pieces: position, rotation, and scale.
Position and scale are represeted with vectors, and rotation is represented with
a quaternion.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;class&lt;/span&gt; &lt;span style="color:#268bd2"&gt;Transform&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; glm&lt;span style="color:#719e07"&gt;::&lt;/span&gt;vec3 position;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; glm&lt;span style="color:#719e07"&gt;::&lt;/span&gt;quat rotation;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; glm&lt;span style="color:#719e07"&gt;::&lt;/span&gt;vec3 scale;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Virtual address space</title><link>https://www.landerwells.com/notes/virtual-address-space/</link><pubDate>Sun, 25 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/virtual-address-space/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/process/"&gt;Process&lt;/a&gt;, &lt;a href="https://www.landerwells.com/notes/virtual-memory/"&gt;Virtual memory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A virtual address space is what is provided by the operating system to each
process to provide the illusion of a large, uninterrupted physical address space
that the process can use. This virtual space is broken up into multiple
different sections which have different rules and uses to a process.&lt;/p&gt;
&lt;p&gt;Starting from the very bottom, there will usually be a virtual address of 0,
which is used for null pointers. The CPU cannot translate address 0, which
results in a page fault being triggered, and the OS terminating the process.&lt;/p&gt;</description></item><item><title>Virtual memory</title><link>https://www.landerwells.com/notes/virtual-memory/</link><pubDate>Sun, 25 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/virtual-memory/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/operating-system/"&gt;Operating system&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Virtual memory is an abstraction for &lt;a href="https://www.landerwells.com/notes/process/"&gt;processes&lt;/a&gt; provided by the operating system.
It protects processes from one another, and gives them the illusion of a large,
uninteruppted address space.&lt;/p&gt;
&lt;p&gt;Hera are some additional notes on the topic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.landerwells.com/notes/virtual-address-space/"&gt;Virtual address space&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.landerwells.com/notes/memory-segmentation/"&gt;Memory segmentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Memory paging&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=""&gt;Translation lookaside buffer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Algorithm</title><link>https://www.landerwells.com/notes/algorithm/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/algorithm/</guid><description>&lt;p&gt;Algorithm: a finite set of rules that gives a sequence of operations for solving
a specific type of problem.&lt;/p&gt;
&lt;p&gt;Algorithms have 5 general characteristics:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Algorithms must always terminate after a finite number of steps.&lt;/li&gt;
&lt;li&gt;Each step of the algorithm must be precisely defined.&lt;/li&gt;
&lt;li&gt;An algorithm has zero or more inputs&lt;/li&gt;
&lt;li&gt;An algorithm has one or more outputs.&lt;/li&gt;
&lt;li&gt;An algorithm is generally expected to be effective.
Could be done using pencil and paper&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Bevy</title><link>https://www.landerwells.com/notes/bevy/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/bevy/</guid><description/></item><item><title>Breadth-first search</title><link>https://www.landerwells.com/notes/breadth-first-search/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/breadth-first-search/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;</description></item><item><title>C++</title><link>https://www.landerwells.com/notes/c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/c++/</guid><description/></item><item><title>Category theory</title><link>https://www.landerwells.com/notes/category-theory/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/category-theory/</guid><description/></item><item><title>Compounding resources</title><link>https://www.landerwells.com/notes/compounding-resources/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/compounding-resources/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/habits/"&gt;Habits&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Compounding resources are resources which have an exponential growth factor. In
the book &amp;ldquo;Atomic Habits&amp;rdquo;, James Clear shows that habits are one of these
resources, which over time will lead to extraordinary results.&lt;/p&gt;
&lt;p&gt;Habits aren&amp;rsquo;t the only compouding resource though, I can think of multiple other
examples: the Zettelkasten, knowledge, and wealth.&lt;/p&gt;
&lt;p&gt;The first of these two kind of go hand-in-hand. The Zettelkasten system grows in
its ability to produce thoughts the more time, effort, and notes that are put
into it. Knowledge is the same way, and the more you possess, the easier it is
to acquire more.&lt;/p&gt;</description></item><item><title>Constructors in C++</title><link>https://www.landerwells.com/notes/constructors-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/constructors-in-c++/</guid><description>&lt;p&gt;&lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Constructors are a special member function which are automatically called after
a non-aggregate class type object is created. At the point when a constructor
is executed, storage for the object has been allocated and the constructor is
only performing initialization.&lt;/p&gt;
&lt;p&gt;Memory is allocated and then the constructor is called which initializes the
object.&lt;/p&gt;
&lt;p&gt;Constructors have special syntax, they have no return type (not even void) and
their names must match the name of the class they are in. A default constructor
is a constructor with no arguments&lt;/p&gt;</description></item><item><title>Copy semantics in C++</title><link>https://www.landerwells.com/notes/copy-semantics-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/copy-semantics-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/special-member-functions-in-c&amp;#43;&amp;#43;/"&gt;Special member functions in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Copy semantics are invoked when an object is needed to be copied. They define
specifically &amp;ldquo;how&amp;rdquo; the object is going to be copied into the new independent
object. The way C++ achieves is with two special member functions: the copy
constructor, and copy assignment operator.&lt;/p&gt;
&lt;h2 id="the-copy-constructor"&gt;The copy constructor&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;copy constructor&lt;/strong&gt; is a special member function that initializes a new
object from an existing object of the same type. If you do not declare one, the
compiler automatically generates a default version that performs a member-wise
copy. This implicit copy constructor is usually adequate, especially for classes
that only contain value-type members and do not manage external resources.&lt;/p&gt;</description></item><item><title>Data structure</title><link>https://www.landerwells.com/notes/data-structure/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/data-structure/</guid><description/></item><item><title>Destructors in C++</title><link>https://www.landerwells.com/notes/destructors-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/destructors-in-c++/</guid><description>&lt;p&gt;&lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Destructors in C++ are special member functions that handle cleanup when an
object goes out of scope or is explicitly deleted. They release resources such
as memory, file handles, or network connections and perform necessary teardown
tasks.&lt;/p&gt;
&lt;p&gt;If a destructor is not declared, the compiler provides a default one. For simple
classes without resource management, the default is usually sufficient.&lt;/p&gt;
&lt;p&gt;A destructor should generally be public and virtual, or protected and
non-virtual. Classes that manage resources often need explicit cleanup before
destruction.&lt;/p&gt;</description></item><item><title>Dijkstra's algorithm</title><link>https://www.landerwells.com/notes/dijkstras-algorithm/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/dijkstras-algorithm/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Dijkstra&amp;rsquo;s algorithm can be seen as a variation of &lt;a href="https://www.landerwells.com/notes/breadth-first-search/"&gt;Breadth-first search&lt;/a&gt;
made to work on graphs with weighted edges. The only real modification to the
algorithm is to set up a &lt;a href="https://www.landerwells.com/notes/heap-data-structure/"&gt;priority queue&lt;/a&gt; instead of a regular queue so at each
node, it will look for the next shortest path.&lt;/p&gt;</description></item><item><title>Doom Emacs cheatsheet</title><link>https://www.landerwells.com/notes/doom-emacs-cheatsheet/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/doom-emacs-cheatsheet/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/emacs/"&gt;Emacs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Doom Emacs is a mneumonic editor based off Emacs with Vi bindings.&lt;/p&gt;
&lt;p&gt;Here are some of the commands that I find myself using most in Doom Emacs.&lt;/p&gt;
&lt;h2 id="keybinds"&gt;Keybinds&lt;/h2&gt;
&lt;h3 id="follow-org-link"&gt;Follow org link&lt;/h3&gt;
&lt;p&gt;C-c C-o&lt;/p&gt;
&lt;h3 id="reload-config"&gt;Reload Config&lt;/h3&gt;
&lt;p&gt;space h r r&lt;/p&gt;
&lt;h3 id="find-notes"&gt;Find notes&lt;/h3&gt;
&lt;p&gt;space n r f&lt;/p&gt;
&lt;h3 id="open-backlinks"&gt;Open backlinks&lt;/h3&gt;
&lt;p&gt;space n r r&lt;/p&gt;
&lt;h3 id="insert-structure-template"&gt;Insert structure template&lt;/h3&gt;
&lt;p&gt;C-c C-,&lt;/p&gt;
&lt;h3 id="org-agenda--open-next-10-day-view"&gt;Org Agenda (open next 10 day view)&lt;/h3&gt;
&lt;p&gt;space o A a (n)&lt;/p&gt;
&lt;p&gt;I actually like the n better since it gives the agenda and non-scheduled TODOs&lt;/p&gt;</description></item><item><title>Dynamic programming</title><link>https://www.landerwells.com/notes/dynamic-programming/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/dynamic-programming/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/algorithm/"&gt;Algorithm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Dynamic programming is an mathematical optimization technique that solves
complex problems by solving smaller subproblems once and reusing their solutions
instead of recomputing.&lt;/p&gt;
&lt;p&gt;There are two core properties that dynamic programming problems need to have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Optimal Substructure: The answers to subproblems can be used to construct the
final answer&lt;/li&gt;
&lt;li&gt;Overlapping Subproblems: Same problem is solved multiple times (re-computing)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Solutions that can be found by breaking down into non-overlapping sub-problems
are not considered dynamic programming but are instead divide and conquer.&lt;/p&gt;</description></item><item><title>Emacs</title><link>https://www.landerwells.com/notes/emacs/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/emacs/</guid><description/></item><item><title>Embarassingly parallel</title><link>https://www.landerwells.com/notes/embarassingly-parallel/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/embarassingly-parallel/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/parallelism/"&gt;Parallelism&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Embarassingly parallel is a term used when a problem or workload where little or
no effort is needed to split the problem into a number of parallel tasks.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.landerwells.com/notes/graphics-programming/"&gt;Computer graphics&lt;/a&gt; rendering is one such example of this since each individual
pixel does not need to know anything about its surrounding ones. All of this
parallelism is achieved on the GPU, which is tailored perfectly for the task.&lt;/p&gt;</description></item><item><title>Fragmentation</title><link>https://www.landerwells.com/notes/fragmentation/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/fragmentation/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/virtual-memory/"&gt;Virtual memory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Fragmentation is a concept in computer sciece that involves the distribution of
data within a finite space. Memory needs to be structured in some way so that
processes are unable to directly access memory from a different process.&lt;/p&gt;
&lt;p&gt;There are two types of fragmentation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;External: Occurs when using &lt;a href="https://www.landerwells.com/notes/memory-segmentation/"&gt;segmentation&lt;/a&gt;. Space between segments becomes
wasted. Can be solved by compaction, but this is expensive.&lt;/li&gt;
&lt;li&gt;Internal: Occurs when using &lt;a href=""&gt;paging&lt;/a&gt;, because fixed size pages that aren&amp;rsquo;t full
will inevitably waste spaces. Solved by having smaller pages, but that makes
tradeoffs with the page table being larger.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Functional programming</title><link>https://www.landerwells.com/notes/functional-programming/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/functional-programming/</guid><description/></item><item><title>Graphics programming</title><link>https://www.landerwells.com/notes/graphics-programming/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/graphics-programming/</guid><description/></item><item><title>Habits</title><link>https://www.landerwells.com/notes/habits/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/habits/</guid><description>&lt;p&gt;Habits are routine for us, they are the biggest indicator of what we will be
doing in the long-term. They are hard to form and hard to break. Maintaining
good habits decreases our reliance on willpower, a fleeting resource for humans.
Habits also combat the conflict between long-term and short-term interests for
us. Applying strong habits to learning and thinking will allow for a much
greater understanding over time.&lt;/p&gt;</description></item><item><title>Hash table</title><link>https://www.landerwells.com/notes/hash-table/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/hash-table/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/data-structure/"&gt;Data structure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A hash table is a data structure which utilizes a hash function to speed up
lookups. There are two primary ways of building a hash table structure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Separate chaining&lt;/li&gt;
&lt;li&gt;Open addressing&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="hash-functions"&gt;Hash functions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Modulo (division) method
hash(k) = k mod(m)&lt;/li&gt;
&lt;li&gt;Multiplication method
hash(k) = (a*k) mod(2^w) &amp;gt;&amp;gt; (w-r)
where w is the word size of the machine
and a is a random word, meaning a*k will be 2 words in length. Should be odd
and not close to power of 2
m = 2^r
in practice works quite well. Theoretically can perform worse&lt;/li&gt;
&lt;li&gt;Universal hashing
h(k) = [(ak + b) * mod(p)] * mod(m)
a and b are large primes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="perfect-hashing"&gt;Perfect hashing&lt;/h2&gt;
&lt;p&gt;A perfect hash function h for a set S is a hash function that maps distinct
elements in S to a set of m integers, with no collisions. In mathematical terms
it is an injective function.&lt;/p&gt;</description></item><item><title>Header files in C++</title><link>https://www.landerwells.com/notes/header-files-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/header-files-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Header files in C++ are files that should contain all forward declarations of a
source file. They are used to structure and create programs that span multiple
files.&lt;/p&gt;
&lt;p&gt;A clean header file implementation is subjective, but it should have at least
the following to get started:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Header guard&lt;/li&gt;
&lt;li&gt;Include additional headers and files that the header needs&lt;/li&gt;
&lt;li&gt;Documentation about what the file does, and what each function can do.&lt;/li&gt;
&lt;li&gt;Class and function declarations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Header files are not technically compiled, they are included via the
preprocessor in the earlier stages of compilation.&lt;/p&gt;</description></item><item><title>Heap data structure</title><link>https://www.landerwells.com/notes/heap-data-structure/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/heap-data-structure/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/data-structure/"&gt;Data structure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Heaps are the underlying data structure to priority queues and&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Heap-order property: Root maintains the target with all elements being either
larger or smaller than it depending on if its a min heap or max heap.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the most idiomatic way of creating a minimum heap in C++&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;priority_queue&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;, std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;vector&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;gt;&lt;/span&gt;, std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;greater&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;gt;&amp;gt;&lt;/span&gt; min_heap;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#586e75"&gt;// Useful if there are pairs
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;priority_queue&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;pair&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;,&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;gt;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;vector&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;pair&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;,&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;gt;&amp;gt;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;greater&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;std&lt;span style="color:#719e07"&gt;::&lt;/span&gt;pair&lt;span style="color:#719e07"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;,&lt;span style="color:#dc322f"&gt;int&lt;/span&gt;&lt;span style="color:#719e07"&gt;&amp;gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#719e07"&gt;&amp;gt;&lt;/span&gt; pq;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#586e75"&gt;// There is also std::make_heap which will create a heap given iterators.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The heap is a tree like data structure that satisfies the heap property.&lt;/p&gt;</description></item><item><title>Homomorphism</title><link>https://www.landerwells.com/notes/homomorphism/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/homomorphism/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/category-theory/"&gt;Category theory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A homomorphism is not an &lt;a href="https://www.landerwells.com/notes/isomorphism/"&gt;Isomorphism&lt;/a&gt; when it is not bijective, meaning it
either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fails to be injective (one-to-one): This happens when different elements in
the domain are mapped to the same element in the codomain. For example, the
kernel of the homomorphism (the set of elements that map to the identity
element in the codomain) is not trivial, indicating that the homomorphism is
not injective.&lt;/li&gt;
&lt;li&gt;Fails to be surjective (onto): This occurs when not every element in the
codomain has a preimage in the domain. In this case, some elements of the
codomain are not &amp;ldquo;reached&amp;rdquo; by the homomorphism.&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Isomorphism</title><link>https://www.landerwells.com/notes/isomorphism/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/isomorphism/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/category-theory/"&gt;Category theory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An isomorphism is a special kind of &lt;a href="https://www.landerwells.com/notes/homomorphism/"&gt;homomorphism&lt;/a&gt;, where structure is preserved
through the mapping between two structures. This means all isomorphisms are
homomorphisms, but homomorphisms are only isomorphic if they are also a
bijection.&lt;/p&gt;</description></item><item><title>Lambda expressions in C++</title><link>https://www.landerwells.com/notes/lambda-expressions-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/lambda-expressions-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lambda expressions, also known as lambdas or closures, were added in C++11 and
refined further in later versions. They allow you to define an unnamed function
object which can be nested inside of other functions.&lt;/p&gt;
&lt;p&gt;Although lambdas behave a lot like functions, they are not functions themselves.
The type of a lambda expression is a unique, unnamed, non-union class type
generated by the compiler. Specifically, they define an overloaded function call
operator (operator()), which makes them functors (also called function objects).&lt;/p&gt;</description></item><item><title>Lifetimes in Rust</title><link>https://www.landerwells.com/notes/lifetimes-in-rust/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/lifetimes-in-rust/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/rust/"&gt;Rust&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lifetimes in Rust are a type of generic for validating references. Lifetimes are
inextricably linked to references and the concept of borrowing.&lt;/p&gt;
&lt;p&gt;Lifetimes are a crucial aspect of Rust’s memory management model that ties into
borrowing. A lifetime specifies the scope for which a reference to a resource is
valid. In Rust, the compiler uses lifetimes to ensure that references do not
outlive the data they refer to, thus preventing dangling references. Lifetimes
help the compiler understand how long a reference should be considered valid,
and they need to be specified when the compiler cannot automatically infer the
duration itself. This makes lifetimes a powerful—though sometimes challenging,
tool for managing memory safely and efficiently.&lt;/p&gt;</description></item><item><title>Merge sort</title><link>https://www.landerwells.com/notes/merge-sort/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/merge-sort/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/sorting/"&gt;Sorting&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Merge sort is a divide-and-conquer algorithm for sorting an array in O(n(log(n)))
time complexity in both best and worst case. The space complexity is O(n) due to
the extra copies needed for the merge routine.&lt;/p&gt;
&lt;p&gt;The actual sort algorithm is quite simple: recursively halve the array
until you are down to two single elements, and then merge the two halves.&lt;/p&gt;
&lt;p&gt;The merge is a bit trickier to write: allocate two copies of the array, maintain
3 pointers, and compare values from the copies, placing them in the main array
until they are exhausted.&lt;/p&gt;</description></item><item><title>Most vexing parse in C++</title><link>https://www.landerwells.com/notes/most-vexing-parse-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/most-vexing-parse-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/c&amp;#43;&amp;#43;/"&gt;C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;most vexing parse&lt;/em&gt; phenomenon is a syntactic ambiguity resolution that can
stump unassuming programmers who have not encountered it before (and even those
who have). It says that any statement that fits the criteria to be a function
declaration will be.&lt;/p&gt;
&lt;p&gt;For instance:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Widget &lt;span style="color:#268bd2"&gt;f&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This piece of code may look like it is going to call the default constructor
with no arguments, but it is instead declaring &lt;code&gt;f()&lt;/code&gt; that returns a &lt;code&gt;Widget&lt;/code&gt;.
Direct initialization (using braces) can help prevent this.&lt;/p&gt;</description></item><item><title>Move semantics in C++</title><link>https://www.landerwells.com/notes/move-semantics-in-c++/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/move-semantics-in-c++/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/special-member-functions-in-c&amp;#43;&amp;#43;/"&gt;Special member functions in C++&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Move semantics were introduced in C++11 as an optimization for efficiently
transferring ownership of resources between objects. Before their introduction,
copying temporary objects would invoke copy semantics, resulting in an
unnecessary deep copy of data, followed by destruction of the temporary.&lt;/p&gt;
&lt;p&gt;C++11 clarified the distinction between &lt;strong&gt;lvalues&lt;/strong&gt; and &lt;strong&gt;rvalues&lt;/strong&gt;, enabling the
implementation of move semantics. With the addition of &lt;strong&gt;&lt;strong&gt;rvalue references&lt;/strong&gt;&lt;/strong&gt;
(`T&amp;amp;&amp;amp;`), the language gained the ability to identify temporary (expiring)
objects and &lt;strong&gt;move&lt;/strong&gt; their resources instead of copying them.&lt;/p&gt;</description></item><item><title>Nix</title><link>https://www.landerwells.com/notes/nix/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/nix/</guid><description>&lt;p&gt;Nix is a language, package manager, and operating operating system (NixOS).&lt;/p&gt;</description></item><item><title>OpenGL</title><link>https://www.landerwells.com/notes/opengl/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/opengl/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/graphics-programming/"&gt;Graphics programming&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Operating system</title><link>https://www.landerwells.com/notes/operating-system/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/operating-system/</guid><description/></item><item><title>Process</title><link>https://www.landerwells.com/notes/process/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/process/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/operating-system/"&gt;Operating system&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A process is possibly the most fundamental abstraction provided by the operating
system. At its most basic level a process is simply a program that is being
executed by CPU. Each process is given its own &lt;a href="https://www.landerwells.com/notes/virtual-address-space/"&gt;virtual address space&lt;/a&gt; which is
its own abstraction for memory.&lt;/p&gt;
&lt;h2 id="process-states"&gt;Process states&lt;/h2&gt;
&lt;p&gt;A process can be in one of three primary states:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running: Actively having instructions executed by the CPU&lt;/li&gt;
&lt;li&gt;Ready: Waiting for the CPU&lt;/li&gt;
&lt;li&gt;Blocked: The process has initiated some operation which prevents it from being
able to execute further instructions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A &lt;a href=""&gt;scheduler&lt;/a&gt; can move a process between the running and ready states.&lt;/p&gt;</description></item><item><title>References in Rust</title><link>https://www.landerwells.com/notes/references-in-rust/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/references-in-rust/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/rust/"&gt;Rust&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Rules of references in Rust&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At any given time, you can have either one mutable reference or any number of
immutable references.&lt;/li&gt;
&lt;li&gt;References must always be valid.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A reference in Rust never owns the value it points to; it only provides access
to it. This ties references directly into Rust’s ownership system: borrowing
values instead of transferring ownership. The act of creating a reference is
called borrowing.&lt;/p&gt;
&lt;p&gt;The borrow checker ensures that multiple immutable references can coexist, but a
mutable reference must always be unique. This enforces Rust’s principle of
immutability by default, consistent with `let` (immutable) and `mut` (mutable)
bindings.&lt;/p&gt;</description></item><item><title>Rust</title><link>https://www.landerwells.com/notes/rust/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/rust/</guid><description/></item><item><title>Shader</title><link>https://www.landerwells.com/notes/shader/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/shader/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/graphics-programming/"&gt;Graphics programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A shader is a small program that is specifically meant to be run on the GPU to
take advantage of its massive parallel compute. There are many different kinds
of shaders but the most often used for game development are the vertex and
fragment shader.&lt;/p&gt;
&lt;p&gt;These two both play massive parts in the rendering pipeline. The vertex shader
runs upon the GPU receiving information such as vertex data from the application
running on the CPU. The fragment shader runs later in the rendering pipeline and
is purely responsible for coloring each of the pixels on the screen.&lt;/p&gt;</description></item><item><title>Vertex buffer object</title><link>https://www.landerwells.com/notes/vertex-buffer-object/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/vertex-buffer-object/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/opengl/"&gt;OpenGL&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A vertex buffer object (VBO) is OpenGL&amp;rsquo;s way of uploading vertex data to the
GPU.&lt;/p&gt;</description></item><item><title>Why titles matter in a Zettelkasten</title><link>https://www.landerwells.com/notes/why-titles-matter-in-a-zettelkasten/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/why-titles-matter-in-a-zettelkasten/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/zettelkasten/"&gt;Zettelkasten&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Titals are vital to a Zetelkasten, specifically, specific ones. If a title is
too vague, then it isn&amp;rsquo;t of very much use to the user. If you cannot tell what
the contens of a note are based off the title, then it is named poorly. There is
nothing wrong with long and descriptive titles when creating notes; it is better
to be overly specific than not specific enough.&lt;/p&gt;
&lt;p&gt;The two biggest benefits to specific note titles:&lt;/p&gt;</description></item><item><title>Zettelkasten</title><link>https://www.landerwells.com/notes/zettelkasten/</link><pubDate>Sat, 24 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/zettelkasten/</guid><description>&lt;p&gt;A Zettelkasten is a &lt;em&gt;system&lt;/em&gt; for taking notes in a style originally developed by
Niklas Luhmann. It involves the creation of many small notes which can be linked
together, much like the internet and webpages.&lt;/p&gt;</description></item><item><title>Vertex array object</title><link>https://www.landerwells.com/notes/vertex-array-object/</link><pubDate>Thu, 15 Jan 2026 00:00:00 -0600</pubDate><guid>https://www.landerwells.com/notes/vertex-array-object/</guid><description>&lt;p&gt;Previous: &lt;a href="https://www.landerwells.com/notes/opengl/"&gt;OpenGL&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A vertex array object (VAO) is the means or context for which the GPU should
parse the &lt;a href="https://www.landerwells.com/notes/vertex-buffer-object/"&gt;Vertex buffer object&lt;/a&gt;. It defines things like positions, textures, and
other information. It ties together the buffer with the actual layout of the
data.&lt;/p&gt;</description></item></channel></rss>