Plurrrr

week 42, 2021

A 16 Year History of the Git Init Command

In this article, we'll discuss how the git init command originated and how it has changed each year for the past 16 years since Git's inception in April 2005. Then we will examine snapshots from Git's code every year from 2005 to 2021 to get a feel for how the git init command and the object database have evolved, from a code perspective, over the past 16 years.

Source: A 16 Year History of the Git Init Command, an article by Jacob Stopak.

Static Analysis: An Introduction

The relationship between source code, computers, and people is complex. Though most code exists to be run on a computer, its purpose is not limited to that. It is also intended to be read and understood. The complexity of modern software development stands in opposition to the effort to understand code: Software that cannot be understood cannot be easily maintained or improved, and many empirical studies indicate a correlation between a given codebase's complexity and its rate of defects. It's difficult to understand a codebase of any significant size, and programmers therefore need and deserve every useful tool and technique to help them understand complex codebases.

One such category of tool, static program analysis, consists of programs or algorithms designed to extract facts from another program's source code, without executing the program in question and usually as a distinct stage in the day-to-day software development process. Software developers who use tools for static program analysis (usually referred to simply as static analysis) then have an opportunity to use the facts yielded by the analysis to further understand, evaluate, and modify the associated codebase.

Source: Static Analysis: An Introduction, an article by Patrick Thomson

A cool Rust optimization story

In this blog post, we will jump into one specific performance-critical piece of code that went through some fascinating changes over the years.

This piece of code is one of my favorite snippet to showcase the power of rustc / LLVM.

Source: A cool Rust optimization story, an article by Paul Masurel.

CSS Layers Tutorial: Real CSS Encapsulation

Just around the corner, a new feature is rearing its head and it's getting frontend developers excited. That feature is CSS layers. With layers, we'll finally be able to fully encapsulate our CSS for import. That means modules, scripts, or anything else imported into your projects can have CSS that is entirely separate from your own, putting to bed the age old problem of styles overriding each other. It will also let us be more agile with the CSS we add to our pages with custom import statements.

Source: CSS Layers Tutorial: Real CSS Encapsulation, an article by Johnny Simpson.

Paddington 2 (2017)

Paddington, now happily settled with the Brown family and a popular member of the local community, picks up a series of odd jobs to buy the perfect present for his Aunt Lucy's 100th birthday, only for the gift to be stolen.

In the evening we watched Paddington 2. I liked the movie and give it a 7 out of 10.

Shazam! (2019)

A newly fostered young boy in search of his mother instead finds unexpected super powers and soon gains a powerful enemy.

In the evening we watched Shazam!. I liked the movie a little so a 6 out of 10.

A gentle introduction to the FFT

ome terms: The Fast Fourier Transform is an algorithm optimization of the DFT Discrete Fourier Transform. The “discrete” part just means that it’s an adaptation of the Fourier Transform, a continuous process for the analog world, to make it suitable for the sampled digital world. Most of the discussion here addresses the Fourier Transform and its adaptation to the DFT. When it’s time for you to implement the transform in a program, you’ll use the FFT for efficiency. The results of the FFT are the same as with the DFT; the only difference is that the algorithm is optimized to remove redundant calculations. In general, the FFT can make these optimizations when the number of samples to be transformed is an exact power of two, for which it can eliminate many unnecessary operations.

Source: A gentle introduction to the FFT, an article by Nigel Redmon.

A Little Hatred

The chimneys of industry rise over Adua and the world seethes with new opportunities. But old scores run deep as ever. On the blood-soaked borders of Angland, Leo dan Brock struggles to win fame on the battlefield, and defeat the marauding armies of Stour Nightfall. He hopes for help from the crown. But King Jezal's son, the feckless Prince Orso, is a man who specializes in disappointments. Savine dan Glokta -- socialite, investor, and daughter of the most feared man in the Union -- plans to claw her way to the top of the slag-heap of society by any means necessary. But the slums boil over with a rage that all the money in the world cannot control. The age of the machine dawns, but the age of magic refuses to die. With the help of the mad hillwoman Isern-i-Phail, Rikke struggles to control the blessing, or the curse, of the Long Eye. Glimpsing the future is one thing, but with the guiding hand of the First of the Magi still pulling the strings, changing it will be quite another . . .

In the evening I started in A Little Hatred, The Age of Madness book 1 by Joe Abercrombie. I've read the First Law trilogy and the three standalone novels—of which I liked Best Served Cold the most—so I look forward to this new series.

Builder pattern in Rust

As you know, Rust does not support optional function arguments nor keyword arguments, nor function overloading. To overcome this limitation rust developers frequently apply builder pattern. It requires some extra coding, but from the API ergonomics perspective, gives a similar effect as keyword arguments and optional arguments.

Source: Builder pattern in Rust, an article by Sergey Potapov.

Tests aren’t enough: Case study after adding type hints to urllib3

Since Python 3.5 was released in 2015 including PEP 484 and the typing module type hints have grown from a nice-to-have to an expectation for popular packages. To fulfill this expectation our team has committed to shipping type hints for the v2.0 milestone. What we didn’t realize is the amount of value we’d derive from this project in terms of code correctness.

We wanted to share the journey, what we learned, and problems we encountered along the way as well as celebrate this enormous milestone for the urllib3 project.

Source: Tests aren’t enough: Case study after adding type hints to urllib3, an article by Seth Michael Larson.

Why you shouldn't invoke setup.py directly

The setuptools team no longer wants to be in the business of providing a command line interface and is actively working to become just a library for building packages. What you should do instead depends on your use case, but if you want some basic rules of thumb, there is a table in the summary section.

This does not mean that setuptools itself is deprecated, or that using setup.py to configure your package builds is going to be removed. The only thing you must stop doing is directly executing the setup.py file — instead delegate that to purpose-built or standards-based tools, preferably those that work with any build backend.

Source: Why you shouldn't invoke setup.py directly, an article by Paul Ganssle.

Explaining top(1) on FreeBSD

We all know and have at least once used the top(1) command to track information about our cpu and processes, but how many of you know what each field means? Today we will guide you through each of these fields. By default, top(1) displays the ‘top’ processes on each system and periodically updates this information every 2.0 seconds using the raw cpu use percentage to rank the processes in the list.

Source: Explaining top(1) on FreeBSD.

The Burning

A raging wildfire. A massive blackout. A wealthy man shot to death in his palatial hilltop home.

For Clay Edison, it’s all in a day’s work. As a deputy coroner, caring for the dead, he speaks for those who cannot speak for themselves. He prides himself on an unflinching commitment to the truth. Even when it gets him into trouble.

Then, while working the murder scene, Clay is horrified to discover a link to his brother, Luke. Horrified. But not surprised. Luke is fresh out of prison and struggling to stay on the straight and narrow.

And now he’s gone AWOL.

The race is on for Clay to find him before anyone else can. Confronted with Luke’s legacy of violence, Clay is forced to reckon with his own suspicions, resentments, and loyalties. Is his brother a killer? Or could he be the victim in all of this, too?

In the evening I started in The Burning a Clay Edison novel by Jonathan and Jesse Kellerman.