In the afternoon I finished the sixth Dune Novel by Frank Herbert: Chapterhouse: Dune. Up until about 80% the novel was quite boring to me. Only in the last 20% action took place. However, I am still going to read the sequels by his son Brian Herbert.
We won't get into the specifics of what a hash function looks like. This post is instead concerned with hash collisions, which happen when your hash function assigns the same value to two different items.
Source: The probability of a hash collision, an article by Kevin Galligan
One-time passwords (OTP) are short sequences of numbers that authenticate user for a single login. They are often used as an additional layer of security when the 2-factor authorisation is enabled.
Source: How do One-Time passwords work?, an article by Serge Zaitsev.
By age twenty-four, Letty Davenport has seen more action and uncovered more secrets than many law enforcement professionals. Now a recent Stanford grad with a master’s in economics, she’s restless and bored in a desk job for U. S. Senator Colles. Letty’s ready to quit, but her skills have impressed Colles, and he offers her a carrot: feet-on-the-ground investigative work, in conjunction with the Department of Homeland Security.
Several oil companies in Texas have reported thefts of crude, Colles tells her. He isn’t so much concerned with the oil as he is with the money: who is selling the oil, and what are they doing with the profits? Rumor has it that a fairly ugly militia group—led by a woman known only as Lorelai—might be involved. Colles wants to know if the money is going to them, and if so, what they’re planning.
Letty is partnered with a DHS investigator, John Kaiser, and they head to Texas. When the case quicky turns deadly, they know they’re on the track of something bigger. Lorelai and her group have set in motion an explosive plan . . . and the clock is ticking down.
In the evening I started in The Investigator, book 1 in the Letty Davenport series by John Sandford.
The SSH agent is a central part of OpenSSH. In this post, I’ll explain what the agent is, how to use it, and how it works to keep your keys safe. I’ll also describe agent forwarding and how it works. I’ll help you reduce your risk when using agent forwarding, and I’ll share an alternative to agent forwarding that you can use when accessing your internal hosts through bastions.
Source: SSH Agent Explained, an article by Carl Tashian.
Have you ever heard of metaclasses in Python? I hadn’t until recently, and I had been using them for months without actually knowing how they work. Python’s metaclass functionality is one of those language features you’ll probably never need to know about, much less mess with, but it offers some keen insight into Python’s OOP model, and is actually quite powerful.
Source: Interfaces and Metaclasses in Python, an article by Joseph Bergeron.
Going around your files and directories using the shell can feel slow and confusing, and not only when you’re a beginner. Personally, I was using GUIs (Graphical User Interfaces) to display, rename, move, and delete my files for a long time. It took me a couple of years to really get used to the shell to perform these operations. Today, I only use the shell to manage my files, and I think it is the better way.
Source: File Management Tools for Your Favorite Shell, an article by Matthieu Cneude.
In a luxurious hotel, the lives of 6 people cross. A story about love, life and the search for happiness.
In the evening Esme and I watched Hotel Swooni. I didn't like the movie much and give it a 6 out of 10.
A lot of people are learning Python these days. Python is highly fashionable and people tell you that if you learn Python, you will have an easy time getting a job. This is probably true. Python presents low barriers for entry, a rich flora of decent libraries for everything from web programming to machine learning, and a lenient language that lets you be a bit vague in terms of types and whatnot. Or to be more precise: a language that allows you to be a bit sloppy.
Source: Please do not use Python for tooling, an article by Bjørn Borud.
Python 3.10 brought the
match casesyntax which is similar to the
switch casefrom other languages.
It's just similar though. Python's match case is WAY MORE POWERFUL than the switch case because it's a Structural Pattern Matching.
Source: Python Match Case Examples 🐍🕹, an article by Guilherme Latrova.
This post is about how I use Emacs to write Perl. I do not claim to have the best Perl setup of all time or anything like that. The features I need to write Perl effectively are syntax highlighting, auto-indentation, linting, and code navigation.
Source: How I use Emacs to write Perl, an article by Nicholas Hubbard.
Lemon is an LALR(1) parser generator for C. It does the same job as "bison" and "yacc". But Lemon is not a bison or yacc clone. Lemon uses a different grammar syntax which is designed to reduce the number of coding errors. Lemon also uses a parsing engine that is faster than yacc and bison and which is both reentrant and threadsafe. (Update: Since the previous sentence was written, bison has also been updated so that it too can generate a reentrant and threadsafe parser.) Lemon also implements features that can be used to eliminate resource leaks, making it suitable for use in long-running programs such as graphical user interfaces or embedded controllers.
Source: The Lemon Parser Generator.
The objective of this series of blog post is to understand what is a container, how does it work and create a container to create and manage containers, from scratch in Rust. The implementation will be based on the amazing Linux containers in 500 lines of code tutorial, but rewritten in Rust.
Source: Introduction to containers.
The SQL language made its first appearance in 1974, as part of IBM’s System R database. It is now over 50 years later, and SQL is the de facto language for operating the majority of industrial grade databases. Its usage has bifurcated into two domains – application programming and data analysis. The majority of my 12 year career (data engineer and data scientist) has been concerned with the latter, and SQL is by far the language that I have used the most. I love SQL for the productivity it has afforded me, but over time I’ve also become aware of its many flaws and idiosyncrasies.
Source: A Critique of SQL, 40 Years Later, an article by Carlin Eng.
If you scour Hacker News & Reddit for advice about databases, some common words of caution are that SQLite doesn't scale or that it is a single-user database and it's not appropriate for your web-scale application.
Like any folklore, it has some historical truth. But it's also so wildly out-of-date.
Source: How SQLite Scales Read Concurrency, an article by Ben Johnson.
Source: How to Debug Better with Chrome, an article by David Herbert.
Recently at work I was tasked with simulating the workload of a client’s infrastructure consisting of several virtual machines. For our use case, this turned out to be a largely solved problem, thanks to existing tools like fio.
For those who don’t know it, fio is a simple yet powerful program that allows simulating various kinds of I/O workloads. Its simplicity stems from two basic facts: (1) it’s a standalone, CLI executable and (2) it uses plain INI files to define workloads. It’s also powerful because of its extensibility: thanks to I/O engines, it’s not limited to just I/O simulation.
Source: Simulating memory load with fio.
A git repository can support multiple working trees, allowing you to check out more than one branch at a time. With
git worktree adda new working tree is associated with the repository, along with additional metadata that differentiates that working tree from others in the same repository. The working tree, along with this metadata, is called a "worktree".
Source: Git - git-worktree Documentation.
Introducing Venus, an attempt at establishing an opinionated idiomatic non-core object-oriented standard library for Perl 5, without years of navel-gazing, committee legislation, infighting, or stalling.
Source: Introducing Venus, a new world for Perl 5, an article by Al Newkirk.
At Spring, we maintain a large Python monorepo with complete Mypy coverage configured under Mypy’s strictest available settings. In short, that means every function signature is annotated and implicit
Anyconversions are disallowed.
Source: Using Mypy in production at Spring, an article by Charlie Marsh.
Its goal is to provide all the niceties of modern GUI-based debuggers in a more lightweight and keyboard-friendly package. PuDB allows you to debug code right where you write and test it--in a terminal.
You have probably read in a bunch of different places that you shouldn't use
SELECT(*)in MySQL when you don't need all the data.
SELECT(*)selects all the columns in the table, not just the ones that you might need. This is generally good advice! Limiting the amount of data that the database needs to return can increase performance.
Does the same warning apply to
COUNT(*)? Is that something that should be avoided too? Why would you use the full width of the table columns when you're really just looking for a count of the rows?
That's a common misconception about
COUNT(*), it doesn't use the full width of the table! While
SELECT(*)selects all the columns,
COUNT(*)is specifically optimized to count all the rows. The star means different things in different contexts.
Source: Is COUNT(*) slow in MySQL?, an article by Aaron Francis.
In modern software development, speed and agility are crucial when it comes to developing and releasing software. However, when you have a large team of developers working simultaneously, branching and merging code can become messy fast.
Therefore, teams need to have a process in place to implement multiple changes at once. This is where having an efficient branching strategy becomes a priority for these teams.
Source: GIT Branching Strategies in 2022, an article by Manuel Herrera López.