Extended mind
Notes and Thoughts
The keeping of a second brain
Home
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 …
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 …
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 …
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 …
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 …
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 …
© Lingyi