Plurrrr

week 24, 2022

git-snap

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.

Source: git-snap: Create snapshot commits on a not checked-out branch without touching the working tree or losing staged changes, an article by Lukas Waymann.

HTTP/3 Deep Dive

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 Standards Track.

Source: HTTP/3 Deep Dive, an article by Jerry Bartlett.

Go’s new sorting algorithm: pdqsort

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 changed¹ to something called “pdqsort”, I thought it would be nice to go take a look and learn about it.

Source: Go’s new sorting algorithm: pdqsort.

One ping to find them: lean network discovery

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.

Source: One ping to find them: lean network discovery, an article by HD Moore.

Why Duck Typing Is Safe

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?

Source: Why Duck Typing Is Safe, an article by Jeremy Bowers.

NixOS: Confederation

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 cleanup work.

Source: NixOS: Confederation, an article by Martin Myrseth.

Illustrating the duality of closures and objects

I was recently reading the first few chapters of Software Design for Flexibility (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 its significance.

Source: Illustrating the duality of closures and objects, an article by Jonathan E. Magen.

Python Garbage Collection: What It Is and How It Works

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 Python applications.

Source: Python Garbage Collection: What It Is and How It Works, an article by Alex DeBrie.

Reading Poorly Structured Excel Files with Pandas

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.

Source: Reading Poorly Structured Excel Files with Pandas, an article by Chris Moffitt.

Vermist (2007)

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.

Building a router with NixOS

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 router.

In this blog post I'll go through why I embarked on this journey, how I did it, and lessons learned.

Source: Building a router with NixOS, an article by Johan Andersson.

JavaScript Hydration Is a Workaround, Not a Solution

In web development, Hydration is a technique to add interactivity to server-rendered HTML. It’s a technique in which client-side JavaScript converts a static HTML web page into a dynamic web page by attaching event handlers to the HTML elements.

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.

Source: JavaScript Hydration Is a Workaround, Not a Solution, an article by Miško Hevery.