Early in the afternoon Esme, some friends, and I went to see the
Westland Boat Parade. The boats are decorated with flowers, fruits,
Later, when I got up, Esme spotted a tiny rodent. It ran towards her,
she was still sitting, and nestled itself against her upper
leg. Carefully I picked up the little animal and Esme took a few
photos. I guess it's a common vole, Microtus arvalis. I moved the
tiny animal to a safe spot in the shadow of a tree.
In this post, I want to share a small little pattern that I’ve found
to have a surprisingly high quality-of-life improvement, and I call
it the list of monoids pattern.
The idea is that whenever we have a monoidal value - a type that is
an instance of the Monoid type class - we can sometimes produce a
more ergonomic API if we change our functions to instead to a list
of these monoidal values.
This book is for anyone who is interested in computing, and wants to
learn more about the exciting, but sometimes daunting world of The
Shell. The shell is simple interface for working with computers and
programs and learning some of its features can enormously increase
your productivity as any computer user - whether a home user or
hobbyist, programmer, data scientist, writer, administrator or other
The some and any keywords are not new in Swift. The some
keyword was introduced in Swift 5.1 whereas the any keyword was
introduced in Swift 5.6. In Swift 5.7, Apple makes another great
improvement on both of these keywords. We can now use both of these
keywords in the function’s parameter position!
I start a lot of projects. A lot! Django is my go-to framework for
spinning up a quick personal project, and while it's a fantastic
framework, a big part of the reason I love Django is that it feels
I have a lot of muscle memory for starting a new project. Here are
six things that I do after I run django-admin startproject.
Go’s paradox is that error handling is core to the language yet the
language doesn’t prescribe how to handle errors. Community efforts
have been made to improve and standardize error handling but many
miss the centrality of errors within our application’s domain. That
is, your errors are as important as your Customer and Order
One of the promises of Docker is reproducibility: you can build an
image on a different machine, and assuming you’ve done the
get the same result. So it can be a little confusing when you try to
build your Python-based Dockerfile on a new Mac, and everything
starts failing. What used to work before—on an older Mac, or on a
Linux machine—fails in completely unexpected ways.
I’ve been writing more and more Haskell lately, as part of a side
project involving GraphQL. As part of working with the language,
I’ve had to work with its compile errors. The Haskell compiler gives
you errors that are extremely informative—if you know the
language. If you don’t know the language very well, the compiler
errors can occasionally be opaque and unhelpful.
I’ve very much enjoyed using Haskell, and I figure the best way for
me to give back to the community is to make this situation a little
better. In order to do this, we’re going to take a fun dive into
Haskell errors, why they’re confusing, and how they might be
This article is an introduction to QUIC and its potential for
censorship resistance, as well as a survey of current QUIC blocking
in various countries. The presented findings reveal QUIC censorship
in China, India, Russia and Uganda.
This post is an informal walk through bootstrap setup of
nixpkgs. It’s quite long and has many facets we look at here. If
you don’t understand some bits of it don’t worry: it’s both a
complicated topic and I did a bad job at explaining it.
The mobile-first design methodology is great—it focuses on what
really matters to the user, it’s well-practiced, and it’s been a
common design pattern for years. So developing your CSS mobile-first
should also be great, too…right?
HTTP/3 builds on User Datagram Protocol (UDP), and is already being
used by prominent internet companies such as Google and Facebook. If
you’re using Chrome and connecting to a Google service, you’re
probably already using QUIC.
Web scraping describes the various techniques employed in extracting
data from websites. More often than not, this is done
programmatically using tiny programs called spiders. However, web
scraping offers insidious challenges and obstacles that might not be
immediately obvious. One of them is issues with data validity.
The Original Sin of Rust async programming is making it
multi-threaded by default. If premature optimization is the root of
all evil, this is the mother of all premature optimizations, and it
curses all your code with the unholy Send + 'static, or worse yet
Send + Sync + 'static, which just kills all the joy of actually
git snap creates a commit that includes most local changes on a
user- and machine-specific snapshots branch. It doesn't ask for a
commit message. It also doesn't touch the working tree, saves and
restores the index, and switches back to the branch that was checked
out before running git snap. In other words, everything looks the
same as before after running git snap, but your changes are safely
stored by Git and can be pushed to a remote for redundancy or
sharing. This is in contrast to stashes.
A new iteration of HTTP, the protocol that powers the World Wide
Web, is now with us. Designated HTTP/3, it’s been in development
since 2018 and is currently in the Internet Draft stage of the
I’ve always found Go’s standard library very
approachable to read. Parts of the standard library include concepts
that are self-contained and do not require too much prior context to
dive into. When I read that the sorting algorithm for Go has
to something called “pdqsort”, I thought it would be nice to go take
a look and learn about it.
Our engineering team focuses on getting the maximum amount of
information from the network while sending as little traffic as
possible. This lean approach to network discovery is driven by our
goal of being fast and safe for all networks. The more we can learn
about a system from a single measurement, the less traffic we create
and the quicker things run. In this post, I want to share how Rumble
uses one of the most common network protocols to obtain a wealth of
information about network-attached devices.
I have seen a lot of programmers over the years express concerns;
what if something accidentally conforms to an interface and causes
some horrible bug? What if I have an interface for Shoot() for a
video game and some object wanders in that Shoot()s a real gun by
accident? Isn't it safer to formally declare conformance?
As I’ve journeyed deeper into the world of NixOS I have realized
that there were some major issues with the way I managed machine
configurations. What I’m presenting here is the outcome of that
I was recently reading the first few chapters of Software Design
(SDF). Doing so reminded of the duality between closures in
Functional Programming (FP) and object instances in Object-Oriented
Programming (OOP). When I'd heard it previously this connection had
seemed tenuous at best and irrelevant at worst. However when I
considered this duality this last time, I was able to internalize
The good news is that Apple has done most of the heavy lifting here
by having built a pluggable authentication module (PAM) for Touch
ID; all you need to do is essentially turn it on, which takes just a
few simple steps.
In this post, we’ll cover the details of garbage collection in
Python. First, we’ll review the basics about memory management and
why we need garbage collection. Then we’ll look at how Python
implements garbage collection. Finally, we’ll take a practical look
at how you should think about garbage collection when writing your
With pandas it is easy to read Excel files and convert the data into
a DataFrame. Unfortunately Excel files in the real world are often
poorly constructed. In those cases where the data is scattered
across the worksheet, you may need to customize the way you read the
data. This article will discuss how to use pandas and openpyxl to
read these types of Excel files and cleanly convert the data to a
DataFrame suitable for further analysis.
Five members of the Missing Persons Task Force investigate the
mysterious disappearance of 17-year-old Evi. While unraveling the
girl's troubled relationship with her parents, which leaves her
father as one of the prime suspects, they discover that her life had
recently taken a bizarre turn, with the teenager seen at several sex
parties, receiving expensive gifts from a shadowy new friend. Was
Evi the victim of a pimp, or did her father discover his daughter's
double life and lose control?
In the evening Esme and I watched
Vermist on Netflix (Missing
Persons Unit). I liked the movie and give it a 7 out of 10.
We mock PostgreSQL tables using Docker and
allowing unit testing for application code queries without a remote
database. This allows our tests to cover both the SQL logic and the
Python code at the same time, all without hitting network resources.
I've now been using NixOS for one year. I use it to manage both my
private PC and my laptop at work. Overall, it has been a great
experience. I really appreciate the scale and control it brings to
my digital life.
In May 2022, I stepped it up a notch by adding a third device
running NixOS, namely a custom-built router! After a month of
interspersed work I had successfully replaced my home network
In this blog post I'll go through why I embarked on this journey,
how I did it, and lessons learned.
In web development,
is a technique to add interactivity to server-rendered HTML. It’s a
page into a dynamic web page by attaching event handlers to the HTML
However, attaching event handlers to the Document Object Model (DOM)
is not the most challenging or expensive part of hydration.
In this article, I’ll explain why I believe hydration is
overhead. It’s not the solution; it’s a hack that consumes memory
and slows down startup, especially on mobile. For the sake of this
article, let’s define overhead as work that can be avoided and still
leads to the same end result.
This began as a reply to another article by Lucas F. Costa; it lists
practices to improve user-experience (UX) of command-line interfaces
(CLIs). It comes from a good place, and has some good advice: I
particularly like its advice on input-validation and understandable
errors. Unfortunately, a number of its suggestions are problematic,
particularly from an accessibility perspective.