Extended mind
Notes and Thoughts
The keeping of a second brain
Container design patterns
Sidecar An extra container to augment or extend the functionality of the main container. Examples: add HTTPS to a legacy service by using a HTTPS sidecar Dynamic configuration with sidecars …
Database replication
These are notes from reading A primer on database replication. Two main types: synchronous and asynchronous replication. Pros of asynchronous replication: Performance (latency) Availability (replicas …
Maintaining old API versions
link APIs as Infrastructure by Stripe The question is how to maintain old APIs without messing up the main code paths and introducing a bunch of messy if/else statements in your code. Versioning is …
Batch vs single APIs
The question is whether one should default to having a batch/bulk API (scatter-gather) instead of asking the client to make single parallel calls. Batch API pros: Reduce network bandwidth and latency …
Refactor vs rewrite
links hackernews article When faced with significant [tech-debt], whether you refactor or rewrite should depend on where the knowledge of the business is. If knowledge is on the team because the …
Conjunctive normal form
Conjunctive normal form (CNF) is an AND of ORs. Any boolean statement can be converted to CNF, but the conversion may not be trivial. e.g. (Cats in LA) or (Dogs in California) becomes (Cats OR Dogs) …
Problems of Philosophy
Book by Bertrand Russell. “The value of philosophy is, in fact, to be sought largely in its very uncertainty. The man who has no tincture of philosophy goes through life imprisoned in the …
Tech debt
Technical debt: The difference between the code and technical systems we have today vs. what we wish we had. Major dimensions of tech debt: Sometimes, debts are the result of early mistakes not …
Astronomical Algorithms
[WIP] People who write their own computer programs often wonder why the machine gives inaccurate planet positions, an unreal eclipse track, or a faulty Moon phase. Sometimes they insist, bewildered, …
On the Heights of Despair
Madness For the normal man, life is an undisputed reality; only the sick man is delighted by life and praises it so that he won’t collapse. We generally find it hard to understand that some …
Closures in Python capture variables not values
def random_function(s): print(s) letters = [] for s in ["a", "b", "c"]: letters.append((s, lambda : random_function(s))) for url, f in letters: f() This prints c c c The reason …
Common knowledge
There is a distinction between mutual knowledge and common knowledge. Mutual knowledge: knowledge that everyone knows. Common knowledge: not only knowledge that everyone knows, but something that …
Inspection paradox
The inspection paradox happens when the probability of observing a quantity is related to the quantity being observed. e.g. Average class size experienced by students will be larger than average …
Python dictionaries are insertion-ordered from 3.7+
They are insertion-ordered in CPython implementation of Python 3.6 as an implementation detail. Guido announced on the mailing list that it is officially part of the language spec in Python 3.7 …
Loading bootstrap multiple times may cause funny behaviour
Loading the boostrap js multiple times may cause funny behaviour where the dropdown toggle stops working because of the haywire javascript hooks. If you can’t avoid loading it multiple times …
Negotiation notes for Never Split the Difference
links cheatsheet Aim for “That’s right” (on board), not “You’re right” (defensive), not “I’ll try, you’re right” (I plan to fail). Mirror …
Albert Camus
What, then, is that incalculable feeling that deprives the mind of the sleep necessary to life? A world that can be explained even with bad reasons is a familiar world. But, on the other hand, in a …
Crime and deterrence
https://nij.gov/five-things/pages/deterrence.aspx The certainty of being caught is a vastly more powerful deterrent than the punishment. Sending an individual convicted of a crime to prison isn’t a …
Reading notes for Java Concurrency in Practice
Perhaps surprisingly, concurrent programming isn’t so much about threads or locks, any more than civil engineering is about rivets and I-beams. Of course, building bridges that don’t fall …
Curious by Ian Leslie
Book: Curious by Ian Leslie Children are most willing to learn when they display curiosity (point and ask questions). If you respond, you are encouraging their curiosity. If you don’t respond, …
Kafka vs REST
Some notes on the Kafka (or event driven architecture in general) vs REST. Kafka Good: Decoupling of logic between applications. You just publish what you do, instead of having to explicitly call or …
Physics Needs Philosophy, Philosophy Needs Physics
links article Those who deny the utility of philosophy, are doing philosophy. The origins of this idea arises from the background of logical positivism. The process of science: data -> …
Shut Up and Calculate
links arxiv, alternate arxiv-vanity link The main thesis is that the universe is a mathematical universe, i.e. mathematics does not describe a universe, they are the universe (a possible answer to …
The Unreasonable Effectiveness of Mathematics in the Natural Sciences
links paper, wiki The opening quote is by Bertrand Russell: Mathematics, rightly viewed, possesses not only truth, but supreme beauty cold and austere, like that of sculpture, without appeal to any …
Gödel, Escher, Bach: An Eternal Golden Braid
From Hofstadter’s preface to the book’s 20th-anniversary edition: GEB is a very personal attempt to say how it is that animate beings can come out of inanimate matter. What is a self, and …
Beyond Good and Evil reading notes
In the introduction about Nietzche: Thus we often find him praising lightheartedness: urging us not to burrow but to remain at the surfaces of things, practising a kind of ideal frivolity. But no …
The Critique of Pure Reason reading notes
Categorization of knowledge But although all our knowledge begins with experience, it does not follow that it arises from experience. Kant categorized knowledge as follows: empirical knowledge has …
© Lingyi