Tech content I liked 2019-12-01

about | archive


[ 2019-December-01 19:42 ]

Latency, Throughput, and Escalators

I took a networking class in undergrad that was basically all queueing theory. I wish I remembered it. This article is a pretty good reminder, and an example of how latency and throughput are related.

Tweets about testing

Here’s a good rule on code correctness. All code you haven’t tested is wrong. All code you have tested is also wrong, but appears to work by coincidence. And code you’ve proven correct does the wrong thing, correctly. - Tim Sweeney

If you know what property-based testing is and don't use it in your code, why don't you use it? (not saying you should, just curious about the reasons why people don't). - Wayne Hillel. The thread has an interesting discussion about the "economics" of testing: the trade-off between the value you get from an additional incremental bit of "test coverage" and the time cost to implement that test.

Metrics for the unmeasurable

The follow-up, Forecasting Synthetic Metrics, was published recently, which made me go back and read the original from January 2019. Together, these are a really interesting discussion about how to measure and predict using metrics that may not be perfect for things that are hard to measure, like security, reliability, or productivity.

Clang format tanks performance

A great example of a tiny micro-benchmark with some interesting performance lessons. The ultimate conclusion is a bit of a disappointment (the C preprocessor has unexpected consequences). However, there are lots of things to learn on the way. One brief sentence astonished me: "For small input sizes, the branch predictor learns the entire input sequence." Wow, modern CPUs are amazing. Unlike me, the author (Travis Downs) has the assembly/CPU knowledge to actually dig in to the reasons for various results, while in my linear search can be better than binary search post I had to throw up my hands and not explain many things.