macOS 12 Monterey: The Ars Technica review

Monterey feels of a piece with maintenance-mode macOS updates like El Capitan or Sierra or High Sierra—change the default wallpaper, and in day-to-day use you can easily forget that you've upgraded from Big Sur at all. It's not that there aren't any new features here—it's just that improving any operating system as mature as macOS involves a lot of tinkering around the edges.

But there are plenty of things to talk about in even the most minor of macOS releases, and Monterey is no different. The update refines the Big Sur design and rethinks automation and what's possible via local wireless communication between devices. It also makes a long list of minor additions that won't be exciting for everyone but will be interesting for some subset of Mac users.

Source: macOS 12 Monterey: The Ars Technica review, an article by Andrew Cunningham.

How to Clean Install macOS Monterey Easily

Apple today released macOS 12 Monterey, and whenever a new operating system is released for the Mac, some users prefer to perform a clean installation. This article explains how to perform what is effectively a clean install of Monterey using a brand new option that's available on Apple silicon-powered Macs and Intel Macs with a T2 security chip.

Source: How to Clean Install macOS Monterey Easily Using the New Erase Mac Option, an article by Tim Hardwick.

Specialized extensions using generic type constraints

Combining Swift’s powerful generics system with the fact that any Swift type can be extended with new APIs and capabilities enables us to write targeted extensions that conditionally add new features to a type or protocol when it fits certain requirements.

It all starts with the where keyword, which lets us apply generic type constraints in a range of different situations. In this article, let’s take a look at how that keyword can be applied to extensions, and what sort of patterns that can be unlocked by doing so.

Source: Specialized extensions using generic type constraints, an article by John Sundell.

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 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 to configure your package builds is going to be removed. The only thing you must stop doing is directly executing the 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 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.

A short overview of DNS

I've recently changed DNS provider for this blog, and that forced me to look into how DNS works a bit closer. I did manage a DNS server for a couple years circa 2006, but I have to say I'd forgotten most of it. In case I forget it again, I'm recording my notes here.

Source: A short overview of DNS, an article by Gary Verhaegen.

The Burning White: Not So Good

In the evening I finished The Burning White, the final book in the Lightbringer series by Brent Weeks. I was a bit disappointed by this book. Too much text that didn't really add to the story in my opinion and an ending that could've been better. Still, I would recommend this series, especially book 2. But I also consider the Night Angel Trilogy better. Maybe The Lightbringer series should've been a trilogy as well.

NixOS in the Cloud, step-by-step: part 1

In the last few months, I migrated both my workstation and my servers (a DigitalOcean VPS and a Raspberry Pi 3) to NixOS. To best summarize the benefits, let's just say that it's like having a "dotfiles" repo, but for your entire system (or multiple!), including custom software, service configuration, drivers, kernel tweaks, etc.

Source: NixOS in the Cloud, step-by-step: part 1, an article by Justinas Stankevičius.

Making slow Rust code fast

Performance is one of the top reasons developers choose Rust for their applications. In fact, it's the first reason listed under the "Why Rust?" section on the homepage, even before memory safety. This is for good reason too--many benchmarks show that software written in Rust is fast, sometimes even the fastest. This doesn't mean that everything written in Rust is guaranteed to be fast, though. In fact, it's surprisingly easy to write slow Rust code, especially when attempting to appease the borrow checker by cloning or Arc-ing instead of borrowing, a strategy which is generally recommended to new Rust users. That's why it's important to profile and benchmark Rust code to see where any bottlenecks are and to fix them, just like you would in any other language. In this post, I'll demonstrate some basic tools and techniques for doing so, based on my recent experience working to improve the performance of the mongodb crate.

Soruce: Making slow Rust code fast, an article by Patrick Freed.

What's great about Python 3.10?

What changed in Python 3.10 and which of those changes matter for you?

I’ve spent this week playing with Python 3.10. I’ve primarily been working on solutions to Python Morsels exercises that embrace new Python 3.10 features. I’d like to share what I’ve found.

Source: What's great about Python 3.10?, an article by Trey Hunner.

Top Python Tools for Malware Analysis

Python developers are in demand in the cybersecurity industry. Malware analysis, a huge part of cybersecurity, is the process of examining malicious software to understand how it operates. Malware analysts need to be skilled in reverse engineering and programming, as well as familiar with the operation of computers and how they work.

Python is a popular programming language for malware analysis and reverse engineering because it's easy to learn, fast to code, and runs on Windows, Linux, Unix and Mac. This blog post will discuss some of the best python tools (libraries and command-line programs) you can use for malware analysis.

Source: Top Python Tools for Malware Analysis.