Plurrrr

week 33, 2022

Another visit to Avonturia De Vogelkelder

In the morning we took the bus to The Hague. I wanted to pay another visit to the huge pet shop "Avonturia De Vogelkelder". Not to buy tarantulas, this time, but just to have a look and buy some tarantula food: superworms (Zophobas morio darkling beetle larvae). The beetle larvae were sold out, so I have to order them online once more.

We spend quite some time looking at the various animals on display, including tarantulas and a scorpion.

Jackson's chameleon Trioceros jacksonii xantholophus
Jackson's chameleon Trioceros jacksonii xantholophus.
Lesser flamingo Phoeniconaias minor
Lesser flamingo Phoeniconaias minor.
Black beauty stick insect Peruphasma schultei
Black beauty stick insect Peruphasma schultei.

Why I'm using (Neo)Vim

The interest in Vim started with me wanting to get things done fast. I was impatient and wanted to get things done quickly, so much that eventually I ended up getting injured by it.

Source: Why I'm using (Neo)Vim, an article by Dolev Hadar.

Why the Learning Styles myth spreads

Learning Styles theory is the most famous myth in education. Different variants of the theory exist, which all make the claim that people can be categorised by which ‘style’ of teaching they learn best from. There is no reliable evidence in favour of the theory being accurate.

Source: Why the Learning Styles myth spreads, an article by Matthew Phillips.

Introducing Rust Sitter

Rust Sitter is a new approach to writing parsers in Rust. By combining macros with an external compile-time tool, it can automatically generate efficient parsers with Tree Sitter and bindings that extract results into high-level user structures.

Source: Introducing Rust Sitter, an article by Shadaj Laddad.

Invasive procedures: Python affordances for performance measurement

When your Python code is too slow, you need to identify the bottleneck that’s causing it: you need to understand what your code is doing. Luckily, beyond pre-existing profiling tools, there are also a variety of ways you can poke and prod Python programs to get a better understanding of what they’re doing internally.

Source: Invasive procedures: Python affordances for performance measurement, an article by Itamar Turner-Trauring.

Using :has() as a CSS Parent Selector and much more

It’s been a long-standing dream of front-end developers to have a way to apply CSS to an element based on what’s happening inside that element.

Maybe we want to apply one layout to an article element if there’s a hero image at the top, and a different layout if there is no hero image. Or maybe we want to apply different styles to a form depending on the state of one of its input fields. How about giving a sidebar one background color if there’s a certain component in that sidebar, and a different background color if that component is not present? Use cases like these have been around for a long time, and web developers have repeatedly approached the CSS Working Group, begging them to invent a “parent selector”.

Source: Using :has() as a CSS Parent Selector and much more, an article by Jen Simmons.

How to Patch Requests to Have a Default Timeout

Python’s requests package is very popular. Even if you don’t use it directly, it’s highly likely one of your dependencies does.

One wrinkle in requests’ design is that it has no default timeout. This means that requests can hang forever if the remote server doesn’t respond, unless the author remembered to add a timeout. Issue #3070 tracks the discussion on adding such a default timeout, but it has been open several years. httpx learned a lesson from this and it has default timeout of five seconds.

Source: How to Patch Requests to Have a Default Timeout, an article by Adam Johnson.

Deconstructing Bézier curves

Graphists, animators, game programmers, font designers, and other graphics professionals and enthusiasts are often working with Bézier curves. They're popular, extensively documented, and used pretty much everywhere. That being said, I find them being explained almost exclusively in 2 or 3 dimensions, which can be a source of confusion in various situations. I'll try to deconstruct them a bit further in this article. At the end or the post, we'll conclude with a concrete example where this deconstruction is helpful.

Source: Deconstructing Bézier curves.

Rise of the Anti-Join

Find me all the things in set "A" that are not in set "B".

This is a pretty common query pattern, and it occurs in both non-spatial and spatial situations. As usual, there are multiple ways to express this query in SQL, but only a couple queries will result in the best possible performance.

Source: Rise of the Anti-Join, an article by Paul Ramsey.

Passgen: A password generator

I have a bit of a love-hate relationship with passwords. On the one hand, they are necessary for authenticating with services, and for decrypting drives. On the other hand, losing them means losing data or access to accounts. Choosing simpler passwords or reusing them across accounts makes dealing with them easier, but compromises their security.

Ideally, passwords should be as long as possible1. While previously, the advice was to use password policies (such as enforcing the use of special characters), current best practice is to avoid that2, and instead to encourage long passwords.

Source: Passgen: A password generator that uses a regex-like syntax to create secure passwords of any shape, an article by Patrick Elsen.

What is Backoff For?

Years ago I wrote a blog post about exponential backoff and jitter, which has turned out to be enduringly popular. I like to believe that it's influenced at least a couple of systems to add jitter, and become more stable. However, I do feel a little guilty about pushing the popularity of jitter without clearly explaining what backoff and jitter do, and do not do.

Source: What is Backoff For?, an article by Marc Brooker.

Why Xcode tools are slow after reboot

I ran git status on a newly created, very small repository, but the command took more than 10 seconds to finish. This was highly unusual, as git status is mostly instantaneous for me. Indeed it was instantaneous the next time I ran it on the same repository. Puzzled, I could only think of one thing out of the ordinary: I had just rebooted my Mac. So I tried rebooting again, and then the issue occurred again!

Source: Why Xcode tools are slow after reboot, an article by Jeff Johnson.

Quaternions: A practical guide

This article demonstrates how to use quaternions for practical applications. In it, we build intuition about how to use quaternions as building blocks to solve engineering and geometry problems. Applications include computer graphics, attitude systems for air and spacecraft, and structural chemistry models. You may have read that quaternions have advantages over Euler angles to represent orientations, including preventing gimbal lock, and advantages over rotation matrices, such as more efficient computation, and compact form. This is true. You may have also read that they're complicated, difficult to use, or counter-intuitive. This isn't!

Source: Quaternions: A practical guide.