Kevin Sookocheff, a software developer, writes about API design, messaging systems, Kafka, NTP, Anki and engineering team practices.
HN commenters link it for hypermedia API type comparisons and the zero bug policy post, which one commenter says worked well for their team.
Consider the following lambda calculus expression:
((λ x . ((x x) (x x))) (λ x . ((x x) (x x))))
Under β-reduction, this blows up: doubling with every reduction, never repeating itself, growing infinitely long. Let's name this expression "BlowsUp". Recall that the Church encoding for "false" is "(λ x . (λ y . y))". Recall that this acts like an "if/else" statement, taking two arguments and always returning the second, discarding the first. Then its clear that this expression:
((false BlowsUp) (λ y . y))
or more explicitly,
(((λ x . (λ y . y)) ((λ x . ((x x) (x x))) (λ x . ((x x) (x x)))) ) (λ y . y))
should evaluate to "(λ y . y)", the identity function. However, under a call-by-value evaluation strategy, which is eager, the value BlowsUp will need to be evaluated first. Only a lazy evaluation strategy will which first the "false" expression (thereby discarding the part of the program containing BlowsUp entirely, without evaluating it) will succeed.
This is an extraordinarily important case, because recursive functions are typically written with two branches: a base case that terminates, and a recursive case that goes on for ever. For example, consider everyone's favorite recursive function, factorial:
def factorial(n):
if n <= 1:
return 1
else:
return n * factorial(n-1)
Translated into the lambda calculus via the Y combinator, this (and pretty much every other non-trivial recursive function) will exhibit the…
Honestly there are so many tangentials in this post that it's really quite hard to get through without losing track of what's what, or what's real and what's hypothetical.
The article mentions network delay filtering algorithms that fall in broad categories x and y, but doesn't mention what NTP actually uses (linking to some pdf presentation elsewhere). Then there's a section about clock selection (which I understand to mean server selection) where it sounds like clocks are selected at random, no matter if they're on another continent, it's just favored if it has a low stratum. Then NTP talks to up to 5 servers and averages the resulting clock diff and, uh, applies that "using the PLL/FLL clock control system". This refers to some phase lock loop stuff from what earlier seemed to be a tangent: how quartz clocks work internally. So NTP actually tells the hardware to adjust how fast it counts? That sounds like I'd have heard of before but okay. If the offset is large and it's not enough to slow down or speed up your internal quartz for a time, it'll instead just update the time.
The TL;DR seems to be this picture: https://sookocheff.com/post/time/how-does-ntp-work/assets/ntp-pll.png
Where you can understand "selection and clustering algorithms" to mean "removing outlier data points" and substitute "combining algorithm" with "average the values". The abbreviation VFO is never mentioned on the page but this must be variable frequency oscillator, commonly referred to as…
Distributed SQL data warehouses? Start with the papers:
- C-Store (column-oriented database storage and processing): http://db.lcs.mit.edu/projects/cstore/vldb.pdf and https://sookocheff.com/post/databases/c-store/
- BigQuery (the original Dremel-based query engine): https://cloud.google.com/files/BigQueryTechnicalWP.pdf
- Snowflake paper: https://www.snowflake.com/resource/sigmod-2016-paper-snowflake-elastic-data-warehouse/
- Andy Pavlo's CMU distributed OLAP databases lecture: https://www.youtube.com/watch?v=dPMc7FZ3Gqo&t=1s
- MemSQL architecture: https://www.youtube.com/watch?v=HoompXCG5Mk
Start there and just read more about architecture of the various products. You'll learn the basics of distributed nodes that store data in column-oriented tables partitioned by a key and how to run queries over them using various performance techniques. Then you can dive into the unique differences of the various databases.
“The performance of the prime manufacturer can never exceed the capabilities of the least proficient of the suppliers”
Software connection: this is known as SLA Inversion [1], the phenomena that you can never be more reliable than your least reliable component. There are ways to get around it, but they involve having multiple redundant but independent paths to achieving a successful result. This is difficult for structural components of an aircraft because each redundant mechanism adds weight and decreases performance & fuel economy.
It's somewhat shocking to me that there are no redundant failsafes to something as critical (and potentially error-prone) as a loose bolt in a door plug, though. Or maybe there were and we'll see compound errors in the final FAA report, which will definitely be interesting to read.
[1] https://sookocheff.com/post/architecture/stability-antipatterns/#sla-inversion
This is known as a zero bug policy [1]. I've had decent success implementing it with my team. The main advantages are:
- Prioritizing is hard, so avoid wasting brain cycles deciding how important your bugs are
- It encourages all of your team to get things right the first time, because if they don't they know they will be going back to fix it immediately.
- If you want to create a culture of quality then it's an obvious first step.
- It saves time in the long term by addressing problems when you have the most context and by avoiding building hack upon hack upon hack
In extreme cases you can relax the policy, but be aware that if you don't quickly correct course then things will be permanently worse. Also accept that hard external deadlines are not suited to this approach, but using triage some of that can be mitigated.
[1] https://sookocheff.com/post/process/zero-bug-policy/
Making your own flashcards is the definitive way of learning something elsewhere, then putting it into Anki for long-term retention. What I'm saying is that Anki should almost always be supplemental to other stuff.
I've got exceptions, though; I do algorithmically generated clozes every day that I got from here: https://sookocheff.com/post/language/cloze-deletions/
They're good for me because you have to give yourself a looser standard for grading i.e. "I used a different word but does it make sense? Did I conjugate it correctly? Then Good. You also have to actively suspend bad cards. It can break you of the gamification habit that Anki stats can get you into. For example, no need to cry over leeches that get suspended; you'll get that word again on another card. Weird idiom? Stop doing flashcards and go look it up.