Polymath Engineer Weekly #82
Emacs memes, Ledgers, Vtables, Monitoring, Open Source abuse, Mandelbrot, Health and Aphorisms
I have created a survey to get feedback from you. It is really short and anonymous. I would really appreciate if you take 2 minutes to help me make this site better.
Links of the week
Interview with an Emacs Enthusiast in 2023 [Colorized]
You will smile with this gem
Ledger: Stripe’s system for tracking and validating money movement
Ledger models internal data-producing systems with common patterns, and it relies on proactive alerting to surface issues and proposed solutions. Each day, Ledger sees five billion events and 99.99% of our dollar volume is fully ingested and verified within four days. Of that activity, 99.999% is monitored, categorized, and triaged through rich investigative tooling—while the remaining long-tail is reliably handled through manual analysis. Together, Ledger and the DQ Platform ensure over 99.9999% explainability of money movement, even as Stripe’s data volume has grown 10x.
Rust Deep Dive: Borked Vtables and Barking Cats
We’ll get to the specific layout of a vtable below, but for now suffice it to say that a vtable is a contiguous piece of storage in memory that is (mostly) an array of function pointers. The Pet-vtable for Cat contains function pointers to the implementations of the trait methods for Cat, while the Pet-vtable for Dog contains pointers to the implementations for Dog, and so on. And this helps us solve dynamic dispatch at runtime if, for every trait object Box<dyn Pet>, we keep track of which vtable is associated with a particular instance of a trait object.
Yes, the title is an intentional joke about “pane” versus “pain.” I frequently hear leaders say they wish they had a “single pane of glass” (aka SPOG) to visualize all of the possible metrics that could impact a service, an application, or their entire business. That ends up with a lot of tiny graphs all mashed together into a single dashboard, or a bunch of monitors stood up against a big wall.
No way.
I printed socketsnoop.d. The screen filled with my own script. It was the same incomplete attempt I had hacked up a year earlier, and published as open source. It included some weird code that only made sense when I wrote it (use of PFORMAT, prior to defaultargs) and was written in my earlier coding style. I was looking at my own fucking script.
"This is MY script."
Optimization Example: Mandelbrot Set, part 1
In order to demonstrate the thought processes that go into optimizing code, it is important to firstly to have a well defined problem to solve. The example chosen here is a Mandelbrot Set generator. This has the advantages of being well known and understood, suitable for optimization, small enough to explore the problem in a reasonable amount of time, and generates some pretty images. It has the disadvantage that there aren’t a lot algorithmic improvements that can be made, and is too small a problem to demonstrate any interesting data structures.
In my observation there are 3 categories of people :
Bucket A : Knowledgeable and practitioner Those who have knowledge about health and follow decent health practices.
Bucket B: Knowledgeable and non-practitioner Those who have knowledge about health but fail to adopt health practices.
Bucket C : Non-practitioner Those who don’t have knowledge about health (and hence fail to adopt health practices).
Book of the Week
The Bed of Procrustes: Philosophical and Practical Aphorisms
Do you have any more links our community should read? Feel free to post them on the comments.
Have a nice week. 😉
Have you read last week's post? Check the archive.