| Random Link ¯\_(ツ)_/¯ | ||
| May 27, 2026 | » | Majority Element in Array
3 min; updated May 27, 2026
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. 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 \(> \lfloor N/2 \rfloor\)? What kind of arithmetic would such a value survive? In a sorted array, a number that appears \(> \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 \(> \lfloor N/2 \rfloor\). ... |
| May 16, 2026 | » | Dictionary-Based Implementation of Classes and Objects (Python)
4 min; updated May 16, 2026
implements a toy version of Python’s object
system using dictionaries that contain references to properties, functions and
other dictionaries. Consider two shapes, ObjectsA function is an object, where the bytes in a function are instructions. For example: … creates an object in memory that contains instructions to print a string,
and assigns that object to the variable |
| May 9, 2026 | » | Model Context Protocol (MCP)
12 min; updated May 14, 2026
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. MCP 101There are 3 key participants in the MCP architecture:
|
| Oct 25, 2021 | » | Stories of Your Life and Others
14 min; updated Jan 17, 2026
Stories of Your Life and Others.
Ted Chiang.
2010.
ISBN: 9781931520898 .
Tower of BabylonStory focused on Hillalum, who lived during the construction of the Tower of Babel . 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. ... |
| Dec 11, 2021 | » | Saga
4 min; updated Jan 17, 2026
Themes (Mostly War)Planet Landfall (Alana’s) and Wreath (its moon, Marko’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’t really think about the battles being waged in their names in distant lands. #societal-apathy ... |
| Jan 17, 2026 | » | Babel, or the Necessity of Violence
21 min; updated Jan 17, 2026
Babel, or the Necessity of Violence.
An Arcane History of the Oxford Translators' Revolution.
R. F. Kuang.
On LanguageLanguage was always the companion of the empire, and as such, together they begin, grow, and flourish. And later, together, they fall. ... |
| Jan 3, 2026 | » | AoC 2024 Day 14: Restroom Redoubt
3 min; updated Jan 3, 2026
ParsingThe input is a list of all robots’ current positions \(p = (x, y)\) and velocities \(v = (dx, dy)\), one robot per line, e.g., \(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. ... |
| Dec 27, 2025 | » | Children of Time
29 min; updated Dec 30, 2025
Children of Time.
Adrian Tchaikovsky.
ISBN: 978-1-4472-7328-8 .
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. Of Self-Proclaimed MessiahsDr. Avrana Kern reminds me of ruthless pragmatists common in dystopian stories, e.g., Boy Wonder in “Alien: Earth”, Evelyn Maddox in “The Ark”, etc. ... |
| Dec 14, 2025 | » | CS 81n: Hackers and Heroes
2 min; updated Dec 14, 2025
|
| Dec 24, 2024 | » | Using LLMs to Enhance My Capabilities
6 min; updated Nov 30, 2025
Sample Use CasesLLMs are increasingly here to stay despite the reservations . How can I use them to enhance my capabilities? 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’s more accurate than the baloney you just read. ... |
| Sep 6, 2022 | » | Fiction Potpourri
10 min; updated Oct 26, 2025
A collection of notes/impressions from titles where I didn’t find enough to necessitate a dedicated page. Usually short works of fiction. Unknown NumberUnknown Number.
Blue Neustifter.
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. ... |
| Aug 23, 2025 | » | AoC 2024 Day 07: Bridge Repair
6 min; updated Aug 23, 2025
ParsingEach line represents a single equation, e.g., Part One needs to make a decision based on each line independently. Parsing each line into a data structure and yielding that should suffice. Part OneUsing only add and multiply, 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? ... |
| Aug 23, 2025 | » | AoC 2024 Day 05: Print Queue
3 min; updated Aug 23, 2025
ParsingThe notation The input contains page ordering rules (pairs of Part OneDetermine 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? ... |
| Oct 1, 1974 | » | 03. The Surgical Team
4 min; updated Jul 19, 2025
The DilemmaThere 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. 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? The major part of the cost of large teams is communication, and system debugging to correct the ill effects of miscommunication. ... |
| May 28, 2023 | » | Relational Model Versus Document Model
8 min; updated Jul 19, 2025
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. ... |
| Feb 17, 2025 | » | Calculators
4 min; updated Feb 17, 2025
Android CalculatorMaking a precise calculator is not trivial. While \(10^{100} + 1 - 10^{100} = 1\), iOS’s calculator gives back \(0\). explores how Android’s calculator gets this right courtesy of . Real number representations are fundamentally imprecise because we can’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}\). ... |
| Feb 16, 2025 | » | UX for LLMs
4 min; updated Feb 16, 2025
|
| Dec 1, 2021 | » | The Wicked + The Divine
4 min; updated Dec 25, 2024
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. ... |
| Feb 18, 2022 | » | The Department of Truth
2 min; updated Dec 25, 2024
The Department of Truth | Image Comics.
James Tynion IV; Martin Simmonds.
Expecting a modern take on 1984, which I didn’t finish because I lost interest. Plot Points[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… 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. #tulpa ... |
| Aug 14, 2022 | » | House of M
2 min; updated Dec 25, 2024
Plot Points[Xavier] Wanda, put the world back now! [Wanda] No! [Xavier] Put it back! [Wanda] But my children! [Xavier] Never existed! Wanda’s overarching desire to have a family to the detriment of others has been explored in the films WandaVision, and Doctor Strange: Multiverse of Madness. First time seeing it in comic form. [Logan] Someone do the math for me… How many more of you does she have to kill before you snap out of it? ... |
| Nov 20, 2022 | » | Bitter Root
7 min; updated Dec 25, 2024
Bitter Root.
David F. Walker; Chuck Brown; Sanford Greene.
Snapshots[Dr. Sylvester] 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’ve seen this before – 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. ... |
| Dec 3, 2022 | » | Invisible Kingdom (2019 - 2021)
8 min; updated Dec 25, 2024
Invisible Kingdom.
G. Willow Wilson; Christian Ward.
A Flawed Religious Organization[Vess] But what if… What if you found something here that seemed wrong? That seemed out of place? [Krikko] I would go straight to Mother Proxima and ask for guidance. That’s why she’s here. [Vess] And… If the something wrong had to do with Mother Proxima herself? [Krikko] Then I would question myself. Because doubting her would mean I had strayed from my vow of obedience. ... |
| Dec 23, 2022 | » | Doom Patrol (1987 - 1995)
13 min; updated Dec 25, 2024
Doom Patrol (1987-1995).
Grant Morrison; Richard Case; John Nyberg.
PunchlinesFather 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. |
| Feb 5, 2023 | » | Vision (2015 - 2016)
13 min; updated Dec 25, 2024
Vision Vol. 1: Little Worse Than A Man.
Tom King; Gabriel Hernandez Walta.
SnapshotsMost of the Visions’ 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. ... |
| Mar 24, 2023 | » | Superman: Birthright (2003 - 2004)
12 min; updated Dec 25, 2024
Superman: Birthright.
Mark Waid; Leinil Francis Yu; Gerry Alanguilan; Dave McCaig.
SnapshotsJOR-EL. 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… so they conquered it with the marvels of science. They yearned for heaven… 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. ... |
| Jun 4, 2023 | » | Star Trek: Year Five (2019 - 2021)
6 min; updated Dec 25, 2024
Star Trek: Year Five.
Brandon Easton; Jody Houser; Jim McCann; Collin Kelly; Jackson Lanzing.
SnapshotsSPOCK. 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… 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. |
| Jul 30, 2023 | » | Arca (2023)
5 min; updated Dec 25, 2024
Arca.
Van Jensen; Jesse Lonergan.
2023.
SnapshotsARCA. 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… |
| Aug 6, 2023 | » | Nightmare Country (The Sandman Universe)
5 min; updated Dec 25, 2024
The Sandman Universe: Nightmare Country.
James Tynion IV; Lisandro Estherren; Yanick Paquette; Andrea Sorrentino.
SnapshotsMR. ECSTASY. 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’s hunger for meaning, without providing
anything he can hold in his hands. What matters is chasing the real.
It’s what you can touch. What you can feel. Allow me to demonstrate. |
| Jan 29, 2024 | » | American Jesus
5 min; updated Dec 25, 2024
The American Jesus Trilogy.
Mark Millar; Peter Gross.
SnapshotsIt’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. ... |
| Aug 31, 2024 | » | NBA 2K25: MyNBA
11 min; updated Dec 15, 2024
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? 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’s NBA and that’s not accounting for the playoffs. Simulating games is the way to go; might help improve my understanding of the game. ... |
| Oct 16, 2020 | » | 06. Version Control (Git)
4 min; updated Nov 27, 2024
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. Git’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. The abstraction is leaky in the sense that to wield it effectively, the user
must understand the underlying data model, e.g., |
| Nov 22, 2024 | » | Why Have We Stopped?
11 min; updated Nov 24, 2024
Stuck in TrafficThinking through both sides of these scenarios can help me reduce the times when I (or my team) is the blocker. Blocked By Another TeamUnderstand and explain. 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. Make the work easier. 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. ... |
| Jun 1, 2019 | » | 05. Technical and Fundamental Analysis
5 min; updated Nov 23, 2024
Technical AnalysisStudy 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. 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’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. ... |
| Jul 21, 2024 | » | Minimum Penalty for a Shop
4 min; updated Jul 21, 2024
Minimum Penalty for a Shop.
ProblemYou are given the customer visit log of a shop represented by a
zero-indexed string |
| Mar 3, 2021 | » | LLMs: Stochastic Parrots 🦜 and How (Not) to Use Them
10 min; updated Dec 14, 2023
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. A lot changed since mid-2021, when I initially wrote this page. OpenAI’s ChatGPT took the world by storm – 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). ... |
| Jul 4, 2020 | » | On Socio-Economic Classes
13 min; updated Nov 24, 2023
#meritocracy #inequality #socioeconomics Our Lot in LifeNot recognizing your blessings feeds into the dark side of capitalism and meritocracy: success is a choice, and that those who haven’t achieved success are not unlucky, but unworthy. I’m relatively lucky. I don’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’m in the camp that believes wealth is a bigger divider than race. ... |
| Sep 18, 2022 | » | On Societal Oppressions
8 min; updated Nov 19, 2023
Looking for parallels should be done cautiously. For example, the advantaging associated with race may be different from the one associated with heterosexism. It’s also hard to disentangle [dis]advantaging where social class, economic class, race, religion, sexuality, ethnic identity, and other factors interact. Isn’t this the crux of intersectionality studies? 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. ... |
| Jun 3, 2020 | » | 12. A Fitness Manual for Random Walkers and Other Investors
9 min; updated Aug 19, 2023
Exercise 1: Have a regular savings program.Start investing early because compound interest and time are you greatest resource. When it comes to setting saving accounts’ interest rates with regard to the interest rate that banks enjoy from the fed , banks are downwards-flexible and upwards-sticky. Depositors lose the tune of $100b when interest rates are rising. One is better off with special accounts such as Marcus by Goldman Sachs (1.05% APY) or Ally (1.00% APY) or PNC High Yield (1.00% APY) . Some of these accounts are limited to US citizens. ... |
| Aug 14, 2021 | » | The Sandman
12 min; updated Jul 30, 2023
LoveDream: Sister – 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… Death: So you sentenced her to hell. ... |
| Mar 14, 2022 | » | Parable of the Sower
3 min; updated Jul 29, 2023
Parable of the Sower.
A Graphic Novel Adaptation (Original by Butler, 1993).
Damian Duffy; John Jennings; Octavia E. Butler.
Notable Plot Moments“A pessimist if I’m not careful.” 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’s evils and refusing to live in denial, all the while choosing to remember that humanity is also capable of great good. ... |
| Apr 10, 2022 | » | Snow, Glass, Apples
3 min; updated Jul 29, 2023
Snow, Glass, ApplesSnow 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’s vampirism, and so she had a servant kill her by carving out her heart and dump her in the forest. ... |
| Sep 5, 2022 | » | Monstress
4 min; updated Jul 29, 2023
Ms. Liu notes that Monstress is a creator-owned comic book series. Why is “creator-owned” significant? While creator ownership has been common in fiction writing, it’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’s Vertigo imprint (now Black Label), and Dark Horse Comics’ Legend imprint. ... |
| Feb 4, 2023 | » | The Last Days of Ptolemy Grey
3 min; updated Jul 29, 2023
The Last Days of Ptolemy Grey.
Walter Mosley.
Snapshots[Ptolemy] Well, what I always tell Reggie he got to do? [Reggie] Uh, I got to take care of my kids. I got to go to the doctor if I run a fever. And… And, uh, I got to put in at least ten dollars in the bank every time I get paid. ... |
| May 2, 2020 | » | On Learning
11 min; updated May 27, 2023
Mental Attitude While LearningDistinguish Mere Facts From Conclusions or OpinionsDiscriminate between mere statements of facts, necessary conclusions which follow therefrom, and mere opinions which they seem to render reasonable. There’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. ... |
| Mar 30, 2023 | » | Intro to Design Patterns
3 min; updated Mar 30, 2023
What Are Design Patterns?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. I’ve also encountered the “you aren’t gonna need it” (YAGNI) school of thought that aims to minimize writing code that anticipates too far into the future, as such guesses usually don’t pan out. 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 now. 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. ... |
| May 2, 2020 | » | Health Ethics
3 min; updated Mar 22, 2023
Harden, a liberal behavior geneticist, is publishing a book, “The Genetic Lottery: Why DNA Matters for Social Equality”. Watch this space as it casts doubt on prevailing social justice thesis that environmental factors, and not genetics, influence behavior or social outcomes. Check back in Sept 2022 (one year from now). Faster Human TrialsIn 1986, AZT (AIDS treatment) showed 1/145 deaths compared to the placebo’s 16/137. 6,000 AIDS patients were offered AZT, helping it get to the public much faster. ... |
| Sep 17, 2021 | » | The Lathe of Heaven
4 min; updated Mar 22, 2023
Premise: Orr can have “effective” dreams that retroactively change reality for everyone else, except those who are aware of him dreaming. See for a refresher on the plot. Notable Plot PointsProdded 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’t really kill anyone. ... |
| Apr 26, 2020 | » | Philanthropy
4 min; updated Feb 19, 2023
Criticism/Defense Of Billionaire PhilanthropyTaxes will probably not go to the same causes, e.g. reforming the bail system, grassroot efforts for migrants, etc. Admittedly, these are things that the government should be doing, but it seems that the government doesn’t do enough. Furthermore, some of these issues so politicized, e.g. immigrants, that government support can be fickle. Foundations are more effective than governments as they do their due diligence, e.g. Bill Gates. Reforming the government is a long battle. ... |
| May 19, 2020 | » | Chrome vs. Everybody
3 min; updated Feb 12, 2023
![]() At the very least, Chrome is worth studying. Something worked out. I’m biased, I only plan to deeply explore Chromium-based browsers and Firefox. Stability, Testing and the Multi-Process ArchitectureIn 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. ... |
| Jan 23, 2021 | » | Research on Privacy Enhancing Techniques
2 min; updated Feb 12, 2023
Journalsnote 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. ... |
| Jul 13, 2021 | » | On Becoming a Better Point Guard
10 min; updated Feb 12, 2023
Objective: Learn to read the game and make smart predictions. Reaction times are overrated; perception and prediction rule . Offensive Playmaking and Scoringtracks the following play types: transition, isolation, pick & roll ball handler, pick & roll roll man, post up, spot up, handoff, cut, off screen and put-backs. |
| Sep 28, 2021 | » | Observer
8 min; updated Feb 12, 2023
Rant: some of willchan’s thoughts on WeakPtr, for those who care to read criticizes the observer pattern for murking dependency chains. Investigate more in this regard. IntentA one-to-many dependency between object so that when one object (subject) changes, all its dependents (observers) are notified and update automatically. ... |
| Jan 2, 2022 | » | Modular Arithmetic
4 min; updated Feb 12, 2023
What is Modular Arithmetic?Where \(A\) and \(B\) are integers, we can write: $$ \frac{A}{B} = Q \text{ remainder } R $$ Using the same \(A, B, Q, \text{ and } R\) as above, we have: $$ A \text{ mod } B = R $$ \(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’s negative we step counterclockwise. ... |
| Jan 11, 2022 | » | Journal Reviews
5 min; updated Feb 12, 2023
Link PredictionGiven network-structured data, predict whether a link exists between two nodes. Applications include: predicting drug-drug interactions (common in treating patients with complex/co-existing diseases) as they may cause changes in the drugs’ pharmacological activity . ... |
| Jan 15, 2022 | » | Software Engineering Journal Reviews
9 min; updated Feb 12, 2023
Formal Software DesignAlloy 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’s tool, the Alloy Analyzer is a solver that takes the constraints of a model and finds structures that satisfy them. The Alloy Analyzer leverages a SAT solver, and this precludes Alloy from analyzing optimization problems. propose AlloyMax, an extension of Alloy that can analyze problems with optimal solutions, soft constraints and priorities. AlloyMax adds new language constructs for specifying optimization problems, and uses an analysis engine that leverages a Maximum Satisfiability (MaxSAT) solver. also provide a translation mechanism from a first-order relational logic into a weighted conjunctive normal form (WCNF) that the MaxSAT solver expects. ... |
| Jan 20, 2023 | » | Gödel, Escher, Bach: An Eternal Golden Braid
10 min; updated Feb 12, 2023
Strange LoopsA Strange Loop occurs whenever, by moving upwards (or downwards) through the levels of some hierarchical system, we unexpectedly find ourselves right back where we started. The 3-voice Canon Per Tonos 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! |
| Dec 17, 2021 | » | 01. The Case for the Scout Mindset
6 min; updated Feb 12, 2023
Two Types of ThinkingSoldier MindsetReasoning is like defensive combat. Finding out you’re wrong means suffering a defeat. Seeks out evidence to fortify and defend your beliefs. Directionally motivated reasoning. When we want something to be true, we ask, “Can I believe this?” When we don’t want something to be true, we ask, “Must I believe this?” Scout MindsetReasoning is like mapmaking. Finding out you’re wrong means revising your map. Seeks out evidence that will make your map more accurate. ... |
| Jun 15, 2021 | » | Thoughts on Academic Research
7 min; updated Dec 3, 2022
Why Even Read Papers?While tutorials and docs help you write code right now, the academic papers can help you understand where programming came from and where it’s going. You also understand the paths that foundational academic research did not take. There’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. ... |
| Jul 5, 2020 | » | Of Code Smells and Hygiene
10 min; updated Nov 30, 2022
Pick up from: On AbstractionsIf 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. ... |
| Nov 28, 2022 | » | Meta-Programming
(2 items)
Attributes and Reflection in C#; C++ Meta-Programming; |
| Nov 28, 2022 | » | C++ Meta-Programming
4 min; updated Nov 28, 2022
Clang, LLVM, GCC, and MSVCLLVM is an umbrella project, with several sub-projects, e.g. LLVM Core and Clang. LLVM Core libraries provide an optimizer and code generator for different CPUs. Clang is an “LLVM native” C/C++/Objective-C compiler which aims for fast compilation, useful error and warning messages, and a platform for building source-level tools. The Clang Static Analyzer and clang-tidy are examples of such tools. 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! ... |
| Sep 11, 2022 | » | How to Read Fiction
6 min; updated Sep 11, 2022
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. On the fiction’s importance, phrases it nicely:
|
| Apr 29, 2014 | » | The Gene-Free Model of Expertise
2 min; updated Sep 5, 2022
Reaction Times are OverratedElite athletes do not display superior reaction times to those of average people; most hover at 200ms. However, games are played at speeds where 200ms is too slow, e.g. 100-mph baseballs, 130-mph tennis serves, etc. Superior PerceptionAthletes outperformed novices when asked if there was a ball in a rapidly flashed slide. Some athletes could even tell the slide’s game! ... |
| Oct 7, 2020 | » | Fables in Service of Capitalism
4 min; updated Sep 5, 2022
EnvironmentalismOver the last 70 years, less than 10% of plastic waste has been recycled - it’s uneconomical. Recycling shifts attention from the environmental impact of plastics and their overproduction to the consumer’s willingness to recycle. Reducing and reusing is a much better environmental strategy. #environmentalism Betting (and Gambling)I’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? ... |
| Dec 21, 2021 | » | We The Consumers
5 min; updated Sep 5, 2022
Product Differentiation and Price DiscriminationProduct 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. |
| Feb 26, 2015 | » | The Creator's Code: The Six Essential Skills of Extraordinary (0 items) |
| Sep 18, 2018 | » | On DNA Testing
3 min; updated Sep 5, 2022
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. The Accuracy of DNA Testing is Wanting74/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. ... |
| Jan 22, 2019 | » | Monopolistic Tendencies in the Prescription Glasses Industry
2 min; updated Sep 5, 2022
Luxottica - Queen of the Seven KingdomsLuxottica owns and licenses Armani, Brooks Brothers, Burberry, Chanel, Coach, DKNY, Dolce & Gabbana, Michael Kors, Oakley, Oliver Peoples, Persol, Polo Ralph Lauren, Ray-Ban, Tiffany, Valentino, Vogue and Versace. Italy’s Luxottica also runs EyeMed Vision Care, LensCrafters, Pearle Vision, Sears Optical, Sunglass Hut and Target Optical. It also merged with the world’s leading maker of prescription eyeglass lenses and contact lenses, to form EssilorLuxottica. ... |
| Jan 27, 2020 | » | Tech and Democracy
5 min; updated Sep 5, 2022
Political AdsCambridge Analytica (CA) paid people to take in-app survey; mined FB profile data including friends’ 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. |
| Apr 29, 2020 | » | Free Speech in Cyberspace
6 min; updated Sep 5, 2022
Should Platforms Be Neutral?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 “Life After Hate” suggested to them. 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? ... |
| May 2, 2020 | » | Wall Street University: USD 101
3 min; updated Sep 5, 2022
Short SellingSay $A shares are selling at $100, but I think they’re overpriced. So I borrow 10 shares, pay my brokerage interest and post some collateral. I then sell the shares for $1,000. |
| May 6, 2020 | » | COVID-19
3 min; updated Sep 5, 2022
Contact Tracing“Apps” in this context means contact tracing apps released by public health authorities to do contact tracing. The APIs are limited to them. Big PictureRelease 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. This ensures broad adoption, but will be on an opt-in basis. |
| Nov 14, 2020 | » | Software Dependencies
6 min; updated Sep 5, 2022
Dependency ManagementGolang 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. 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’s fixing suggestions. ... |
| Dec 15, 2020 | » | Politics Potpourri
3 min; updated Sep 5, 2022
State SurveillanceIn the aftermath of the Capitol insurrection, FBI was contacting people whose cellphones pinged cell towers near the Capitol during the riots. #state-surveillance 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. ... |
| Aug 31, 2021 | » | Why People Are [Epistematically] Irrational About Politics
5 min; updated Sep 5, 2022
Motivation: Why are politics so contentious? How can I relate better with people that hold opposing political beliefs?
Salient features of political disagreements: widespread (many people disagree on many issues), strong conviction/confidence, and persistent (difficult to resolve). Political Disputes Are Not Explained by Miscalculation or IgnoranceMiscalculation Theory: Political issues are difficult and partisans make mistakes in their reasoning. ... |
| Oct 4, 2021 | » | Online Markets
4 min; updated Sep 5, 2022
WWW ‘21: The Web Conference 2021REST: Relational Event-Driven Stock Trend ForecastingREST, 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. #stock-trend-forecasting #computational-finance The value of stock trend forecasting is not unanimous, e.g. Malkiel contends that forecasting is a fool’s game , while Simon’s RenTech is all about the math . But it seems like the question is an empirical one, and therefore, a good answer should exist. Why are there opposing camps? ... |
| Oct 12, 2021 | » | Evolution
3 min; updated Sep 5, 2022
Why Birds Can Fly Over Mount Everestfeatures a good anecdote of insight favoring the prepared. On a jog in London in January, probably primed by reading Nick Lane’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. ... |
| Oct 31, 2021 | » | In Defense of a Liberal Education
5 min; updated Sep 5, 2022
Societal Preference for STEM Over the Liberal ArtsNot everyone can [wants to?] take the sciences, but they were pushed out of their passions into applicable degrees like Business and Communications. The initially high economic return to applied STEM degrees declines by more than 50% in the first decade. People who major in LA don’t get first jobs that are as lucrative, but they do catch up. 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. ... |
| Nov 7, 2021 | » | Bloom Filters
5 min; updated Sep 5, 2022
Bloom FiltersMotivationA Bloom filter for a set \(X: \{x_1, x_2, …, 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. ... |
| Nov 7, 2021 | » | 'Monte Carlo' Algorithms and Data Structures
(1 items)
Bloom Filters; |
| Dec 4, 2021 | » | As the Last I May Know
4 min; updated Sep 5, 2022
As the Last I May Know.
Shi Lian Huang.
Memorable PointsBackground: Sere missiles can wipe out a city completely. Nyma’s nation has been the only recipient of a seres strike. They’ve since acquired their own seres stockpile. They’re engaged in war with an state that lacks seres weapons. ... |
| Dec 24, 2021 | » | Projects That Never Made It
5 min; updated Sep 5, 2022
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. 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. I’d categorize my flashcards web app as a project that never made it. Sure, I use it for my own learning, but I doubt it’ll ever be used regularly by anyone other than me. ... |
| May 10, 2022 | » | TV and Film
3 min; updated Sep 5, 2022
Crime DramaOzark’s highlights are Ruth Langmore’s 90s’ hip hop playlist, Wendy Byrde’s sociopathic ambition, and Del Rio’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. ’s Bill Dubuque also wrote The Accountant (2016 Film) , 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. ... |
| Jul 2, 2022 | » | Debugging
7 min; updated Sep 5, 2022
Debugging 101Definition? Debugging involves inspecting a program’s internal state.
|
| May 21, 2018 | » | 05. The Childhood Neighbor
2 min; updated Sep 5, 2022
Money was a sore point in the Holmes household. Holmes’s grandparents had squandered away their share of the Fleischmann fortune. Richard Fuisz, a family friend, was a flashy successful businessman. So in a way, Elizabeth didn’t grow up in wealth? This puts a spin on Chapter 01: A Purposeful Life . Fuisz was offended that Elizabeth never consulted him. Fuisz made his money patenting medical inventions that he anticipated other companies would someday want. ... |
| Jan 2, 2022 | » | 04. Changing Your Mind
6 min; updated Sep 5, 2022
How to Be Wrongfound that experts were barely able to forecast better than random chance. However, a small subset of people (coined “superforecasters” ) 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. 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. ... |
| Sep 6, 2016 | » | Formal & Red Herring Fallacies
3 min; updated Sep 5, 2022
Argument from ConsequencesIf God does not exist, then everything is permitted. Straw ManThe essence of this technique is to caricature a position to make it easier to attack. My opponent is trying to convince you that we evolved from chimpanzees who were swinging from trees, a truly ludicrous claim. Environmentalists care more for snail darters and spotted owls than they do for people. Appeal to FearYou 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. ... |
| Jul 8, 2016 | » | 1. The 3 Rules of Epidemics
2 min; updated Sep 5, 2022
The Law of the FewFrom 1995 to 1996, the # of children born in Baltimore with syphillis increased 500%. CDC blamed it on cocaine and reduction in clinics. 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. Gaëtan Dugas, an Air-Canada flight attendant, is [mis?]regarded as “Patient Zero” for AIDS in the US. It’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. ... |
| Jan 22, 2019 | » | Privacy in CS and in the Law
4 min; updated Sep 5, 2022
Incomplete List of Information Privacy Properties
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. As of 2020, in Florida, long-term-care, life and disability insurers are no longer exempt. ... |
| Oct 11, 2020 | » | Brandolini's Bullshit Asymmetry Principle
1 min; updated Sep 5, 2022
The PrincipleBrandolini’s Bullshit Asymmetry Principle: The amount of energy needed to refute bullshit is an order of magnitude bigger than to produce it. In Essence of Bullshit , Frankfurt posits that the essence of bullshit is lack of concern for the truth, which may explain why bullshit is easier to produce. Jonathan Swift: Falsehood flies, and the Truth comes limping after it; so that when Men come to be undeceiv’d, it is too late; the Jest is over, and the Tale has had its Effect… ... |
| Jul 8, 2016 | » | 0. Introduction
2 min; updated Sep 5, 2022
IntroductionThe Tipping Point is the biography of how little things had big effects. From 1992 to 1997, murder rates dropped 64.3% to 770 and total crimes fell by \(\approx\) 50% to 355,893. Geometric progressions are non-intuitive, e.g. if given a large paper and asked to fold it 50x, the stack’s height will be \(\approx\) the distance to the sun. This is a popular illustration. The standard paper’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 \). ... |
| May 12, 2022 | » | Classes in C++
15 min; updated May 12, 2022
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. 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 |
| Mar 16, 2022 | » | AoC 2021 Day 09: Smoke Basin
13 min; updated Mar 16, 2022
massiv; Fusion; Box vs. Unboxed; Connected Components; Data.Set; Monadic map |
| Mar 5, 2022 | » | AoC 2021 Day 07: The Treachery of Whales
7 min; updated Mar 5, 2022
Day 7 - Advent of Code 2021.
Eric Wastl.
Part I DescriptionA giant whale has decided that your submarine is its next meal, and it’s much faster than you are. There’s nowhere to run! Suddenly, a swarm of crabs (each in its own tiny submarine - it’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’re aiming! ... |
| Mar 1, 2022 | » | AoC 2021 Day 06: Lanternfish
12 min; updated Mar 1, 2022
Day 6 - Advent of Code 2021.
Eric Wastl.
Part I DescriptionThe sea floor is getting steeper. Maybe the sleigh keys got carried this way? 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. ... |
| Feb 19, 2022 | » | Learning Haskell via AoC 2021
14 min; updated Feb 19, 2022
This page contains remarks on Haskell that I encountered when working with source files that span multiple AoC 2021 problems. and have Haskell solutions. It’ll be nice to compare how they solved the problems. I don’t want to end up perfecting the wrong approach! Setting Up Haskell Env for AoCTo manage dependencies, Cabal and Stack are pretty popular. Stack incorporates the Cabal build system. ... |
| Jan 7, 2022 | » | 019. Counting Sundays
6 min; updated Jan 7, 2022
Problem StatementYou are given the following information, but you may prefer to do some research for yourself:
How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)? ... |
| Jan 22, 2019 | » | Secure Multiparty Computation
3 min; updated Oct 27, 2021
Timeline of Secure Multi-Party CommunicationIn 1982, secure two-party computation (2PC) was introduced for problems that are boolean predicates, e.g. Yao’s Millionaires' Problem that asks whether \(a \ge b\) is true without revealing the actual values of \(a\) and \(b\). Andrew Yao generalized 2PC for any feasible computation in 1986. Goldreich, Micali and Wigderson later generalized it to secure multiparty communication. 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’s circuit has \(\approx 50K\) gates, while the 4095-bit edit distance function has \(\approx 6B\) gates. ... |
| Oct 2, 2017 | » | The Binomial Random Variable
3 min; updated Sep 2, 2021
\(X\) is a binomial random variable if it takes the values \(0, 1, 2, …, n\) and $$ \mathbb{P}\{X = k\} = { n \choose k } \cdot p^k \cdot (1 - p)^{n-k} $$ Sanity Check: Do the probabilities sum to 1?$$ \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 $$ I totally didn’t understand how we got to \(\left( p + (1 - p) \right)^n\). In my notes, I simply noted “Calculus Theorem” and that was it. ლ(ಠ_ಠ ლ) ... |
](/img/computer-science/www/stat-counter-browser-share-2009-2020.png)
So typically, the MCP server and the client are implementation details that the end user doesn’t really see. The user’s view is mediated by the MCP host.
...