week 03, 2022

Wordle With Grep

Let us solve a couple of Wordle games with the Unix grep command and the Unix words file. The Wordle games #217, #218, and #219 for 22 Jan 2022, 23 Jan 2022, and 24 Jan 22, respectively, are used as examples in this post.

Source: Wordle With Grep, an article by Susam Pal.

Managing your Docker infrastructure

This is the first installment of a series of articles I intend to write in early 2022. With Slackware 15.0 around the corner, I think it is a good time to show people that Slackware is as strong as ever a server platform. The core of this series is not about setting up a mail, print or web server – those are pretty well-documented already. I’m going to show what is possible with Slackware as your personal cloud platform.

Source: Slackware Cloud Server Series, Episode 1: Managing your Docker infrastructure, an article by Eric Hameleers.

Development and Proxies

I’m in the unfortunate circumstance to be using a mandatory proxy these days (including SSL) and unlike with browsers where it’s kind of fire and forget, if you’re developing software there’s a plethora of tools that will or will not accept the default environment variables, so here’s a list of stuff and how to fix it.

Source: Development and Proxies, an article by Florian Anderiasch.

The Wrong Missy (2020)

Tim thinks he's invited the woman of his dreams on a work retreat to Hawaii, realizing too late he mistakenly texted someone from a nightmare blind date.

In the evening we watched The Wrong Missy. I liked the movie somewhat and give it a 6.5 out of 10.

Terminal basics

This article is an introduction to the Command Line Interface (cli) in general on unixy machines, like macOS or linux. Target audience is (complete) beginner about the shell, but not programming.

Source: Terminal basics, an article by Grégoire Charvet.

Curl JSON support

I've been circling around this topic before. On this list I've previously gotten rather lukewarm responses or even several "don't do its", but after having asked around people on twitter I think maybe the time might come when we add some JSON specific command line options to the tool.

Source: Curl: JSON support, a message by Daniel Stenberg.

Git Organized: A Better Git Flow

The following approach was inspired by my coworker, Dan Wendorf, whose git flow tends to revolve around one core principle: do the work first, clean up the commits later. The benefit of this flow is that it separates the engineering work from the commit writing. In the end, we’ll be left with a sequence of commits that are logically grouped, each relating to one main change in the code, thus cleaning up our git history and paving the way for a quicker PR review.

Source: Git Organized: A Better Git Flow, an article by Annie Sexton.

Feature modules

In the current post, I want to focus on the feature modules. Feature module provides complete functionality for a dedicated app feature. We can also call them product modules because they usually implement a particular part of the final product.

Source: Feature modules, an article by Majid Jabrayilov.

Postgres Indexes for Newbies

The role of database indexes is similar to the index section at the back of a book. A database index stores information on where a data row is located in a table so the database doesn't have to scan the entire table for information. When the database has a query to retrieve, it goes to the index first and then uses that information to retrieve the requested data.

Source: Postgres Indexes for Newbies, an article by Elizabeth Christensen.

How vectorization speeds up your Python code

Python is not the fastest programming language. So when you need to process a large amount of homogeneous data quickly, you’re told to rely on “vectorization.”

This leads to more questions:

  • What does “vectorization” actually mean?
  • When does it apply?
  • How does vectorization actually make code faster?

To answer that question, we’ll consider interesting performance metrics, learn some useful facts about how CPUs work, and discover that NumPy developers are working hard to make your code faster.

Source: How vectorization speeds up your Python code, an article by Itamar Turner-Trauring.

FreeBSD 13.0 Base Jails With ZFS and VNET

As of late I have had some pain points with iocage, which I used since I started using FreeBSD in 2017. I came from an Ubuntu with LXD + ZFS background and iocage had the command line interface I wanted that felt familiar with LXD at the time.

Well, iocage seems dead now. Its last release was in 2019 and its last commit (at the time of writing this) was September 30, 2021. Of course, that commit isn’t in what’s in FreeBSD ports, unless you use the devel package..and, that package has some issues (for me, iocage list doesn’t work right).

Because of this, I decided to take up the challenge of making my own base jails.

Source: FreeBSD 13.0 Base Jails With ZFS and VNET.

Cluster provisioning with Nomad and Pot on FreeBSD

Pot is a jail abstraction framework/management tool that aims to replace Docker in your DevOps tool chest and it has support for using Nomad for orchestration of clustered services. The team behind Pot are aiming to provide modern container infrastructure on top of FreeBSD and have been progressing over the last 3 years to get Pot into production.

The Pot project was started in 2018 with the ambitious goal of taking the best things from Linux container management and creating a new container model based on FreeBSD technologies, running on FreeBSD.

Source: Cluster provisioning with Nomad and Pot on FreeBSD, an article by Tom Jones.

Efficient Pagination Using Deferred Joins

Paginating records across large datasets in a web application seems like an easy problem that can actually be pretty tough to scale. The two main pagination strategies are offset/limit and cursors.

We'll first take a look at the two methods and then a slight modification that can make offset/limit extremely performant.

Source: Efficient Pagination Using Deferred Joins, an article by Aaron Francis.

Tricking Postgres into using a faster query plan

This article will show you one such optimization story, which is interesting because both the before and after query plans will look somewhat ridiculous (in terms of cost). Moreover, it shows how PostgreSQL row count estimation can go very wrong. In this case, domain knowledge will help us trick PostgreSQL into a different query plan which will be waaay faster, without adding any additional indices.

Source: Tricking Postgres into using an insane - but 200x faster - query plan, an article by Jacob Martin.

Learn the workings of Git, not just the commands

When I started working with Git I had some experience with Concurrent Versions System (CVS) and Apache Subversion (SVN), so I tried to understand it in terms of those classic source code repository systems. That way of thinking only got me a limited understanding of Git’s capabilities. Since then I have grown to understand Git much better, so this article is a kind of “note to self” text to remind myself how Git works and explain it to those who are new to it. I assume you know your way around other more classical source code repositories like CVS or SVN.

Source: Learn the workings of Git, not just the commands, an article by Andre Fachat.

Python bytecode explained

Python is an interpreted language; When a program is run, the python interpreter is first parsing your code and checking for any syntax errors, then it is translating the source code into a series of bytecode instructions; these bytecode instructions are then run by the python interpreter. This text is explaining some of the features of the python bytecode.

Source: Python bytecode explained.

Some ways DNS can break

When I first learned about it, DNS didn’t seem like it should be THAT complicated. Like, there are DNS records, they’re stored on a server, what’s the big deal?

But with DNS, reading about how it works in a textbook doesn’t prepare you for the sheer volume of different ways DNS can break your system in practice. It’s not just caching problems!

Source: Some ways DNS can break, an article by Julia Evans.

High ROI Python Patterns (Part 1)

Logging is super difficult to get right for it to provide any value within an application. It’s usually easy to setup, but for it to actually be useful for the end-user, a developer and/or for debugging purposes is a completely different story. If you were to ask me why this is the case, I’d probably say because it’s up to the developer to accurately describe why something was logged and any context around the logged event.

Source: High ROI Python Patterns (Part 1), an article by Marcello Salvati.

The Wisdom of Crowds

Chaos. Fury. Destruction.

The Great Change is upon us . . .

Some say that to change the world you must first burn it down. Now that belief will be tested in the crucible of revolution: the Breakers and Burners have seized the levers of power, the smoke of riots has replaced the smog of industry, and all must submit to the wisdom of crowds.

With nothing left to lose, Citizen Brock is determined to become a new hero for the new age, while Citizeness Savine must turn her talents from profit to survival before she can claw her way to redemption. Orso will find that when the world is turned upside down, no one is lower than a monarch. And in the bloody North, Rikke and her fragile Protectorate are running out of allies . . . while Black Calder gathers his forces and plots his vengeance.

The banks have fallen, the sun of the Union has been torn down, and in the darkness behind the scenes, the threads of the Weaver's ruthless plan are slowly being drawn together . . .

In the evening I started in The Wisdom of Crowds (The Age of Madness book 3) by Joe Abercrombie.