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.
To learn how to build more maintainable and usable Python libraries,
I’ve been reading some of the most widely used Python
packages. Along the way, I learned some things about Python that are
off the beaten path. Here are a few things I didn’t know before.
In this post we will be looking briefly at, and at a high-level, the
various data types and data structures used in designing software
systems, and from which specific types of algorithms can
subsequently be built upon and optimized for.
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.
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.
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.
It’s common knowledge that you shouldn’t put all your eggs in the
but most of the time on IRC or on reddit (or the Internet at large,
really), I see people using one single ssh key for all uses. How
would you look at someone using a single key for their car, house,
safe, work place, and so on?
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
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”.
This page lists some of the changes I make to a vanilla install of
FreeBSD for security hardening. Some changes to increase network
performance or make things a bit more more sane are also
included. It only covers basic changes that a sysadmin can make to a
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
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.
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.
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
Ideally, passwords should be as long as
previously, the advice was to use password policies (such as
enforcing the use of special characters), current best practice is
and instead to encourage long passwords.
Years ago I wrote a blog post about exponential backoff and
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.
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!
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!