Error handling in Rust is very different if you’re coming from other
languages. In languages like Java, JS, Python etc, you usually
throw exceptions and return successful values. In Rust, you
return something called a Result.
While LXD is mostly known for providing system containers, since the
4.0 LTS, it also natively supports virtual machines. With the recent
5.0 LTS, LXD virtual machines are at feature parity with
containers. In this blog, we’ll explore some of the main LXD virtual
machine features and how you can use them to run your
Go 1.18 was a big release with huge features like generics, fuzzing,
and workspaces. There was plenty of excitement around its
features. Go 1.19 is not a
release on that scale. But it does pack in a lot of small
improvements that can help the average Go developer. Let’s take a
look at what some of them are.
My blog gets generated with
Hugo, which I’m generally happy with. Until
recently, I hosted the static files on
Netlify but now decided to get my own
little server again. There are two main reasons for this:
I actually missed doing some sysadmin work.
The Internet was supposed to be a federated system and I don’t
want to outsource everything to a few tech giants.
Stephanie is a single mother with a parenting vlog who befriends
Emily, a secretive upper-class woman who has a child at the same
elementary school. When Emily goes missing, Stephanie takes it upon
herself to investigate.
In the evening Esme and I watched A Simple
Favor. I liked the movie and
give it a 7 out of 10.
I suspect any developer reading this is aware of the DRY principle
because it is just so ubiquitous. If not though, you just need to
know that it stands for "Don't Repeat Yourself" and is generally
invoked when advising people to not copy and paste snippets of code
all over the place and instead consolidate logic into a central
DRY was the first programming principle I encountered and probably
the only one I was aware of for the first year that I was a
developer. It's also probably one of the simplest principles to
understand. If you see two things in your code that are the same,
maybe they should just be one thing. Hard to argue with that. But, I
think that DRY is just like every other principle out there - it has
its place, but it's best taken in moderation. And I think that, due
to its ubiquity and simplicity, we tend to take DRY too far, far too
For a long time, I’ve wanted to develop Python code on NixOS, but
using Nix to manage dependencies was a major pain. If the
dependencies you want are already in Nixpkgs, then you’re good, but
otherwise you need to use things like
pypi2nix to turn Pypi packages
into nix derivations. This never quite worked out for me, so I ended
up writing the nix derivations myself… which sucked.
I’ve been aware of pipenv for a
while now, and it seemed like the ideal solution. It gives
Nix/Stack/Yarn-like reproducibility, while still being actively
maintained, unlike some of these Nix-specific Python package tools. I
had never managed to get this to work for me, but I’ve finally got a
configuration working on Nix.
As easy as it seems to achieve dynamic dispatch in OOP, it is not
the case when it comes to Protocol-Oriented Programming
(POP). Trying to accomplish dynamic dispatch using protocols always
comes with unpredicted difficulties due to various limitations in
the Swift compiler.
With the release of Swift 5.7, all these have become history!
Achieving dynamic dispatch in the realm of POP has never been
easier. In this article, let’s explore what kind of improvements we
get from Swift 5.7 and what it takes to accomplish dynamic dispatch
using protocol with associated types.
The following is a primer for the
Scheme family of programming
languages. It was originally written to aid newcomers to technology
being developed at The Spritely
Institute but is designed to be
general enough to be readable by anyone who is interested in Scheme.
At the time of this writing, Git's been with us for over a decade
and a half. During that time the ecosystem has absolutely
exploded. From the rise of GitHub and GitLab to the myriad of new
subcommands (just look at all this cool
stuff), clearly Git has seen
widespread adoption and success.
One difficulty when using Nix is that it’s possible to hit a purity
wall. A dependency is not in nixpkgs (yet), and you have to package
it yourself. But the project does some impure things during the
build. It’s using some esoteric language that doesn’t have a
<lang>2nix tool yet.
And sometimes it’s hard to go to your customer/boss and tell them
you have to spend the next 3 weeks doing “things right”(tm).
Luckily there is a workaround available, and this is why I’m writing
this article. To show a quick but impure alternative that can be
used in a pinch.
For most non-trivial SQL databases, the key to performance is
creating the right SQL indexes. In this context "the right SQL
indexes" means those that cause the queries that an application
needs to optimize run fast. The ".expert" command can assist with
this by proposing indexes that might assist with specific queries,
were they present in the database.
In this post I argue that integration-vs-unit is a confused, and
harmful, distinction. I provide a more useful two-dimensional mental
model instead. The model is descriptive (it allows to think more
clearly about any test), but I also include my personal
prescriptions (the model shows metrics which are and aren’t worth
Functional programming (FP) provides many advantages, and its
popularity has been increasing as a result. However, each
programming paradigm comes with its own unique jargon and FP is no
exception. By providing a glossary, we hope to make learning FP
This post is based on a webinar i've previously
given where I go
through some of my favourite tips for working with Kubernetes
clusters all day long. The goal of all of these techniques is to
make my life easier and (hopefully) less error prone. I start off
with the first 5 tips being applicable to anyone working with
Kubernetes and can be picked up right away. From there I move on to
a couple that would benefit from having some old-skool Linux
sys-admin experience. Finally I finish of with some more advanced
techniques that require some previous programming experience.