Plurrrr

week 18, 2023

Hardening macOS (updated for Ventura)

This guide is about security, not privacy.

Additionally, security measures that heavily compromise usability were not included.

This guide aims to produce above-average secure systems, without giving up features.

Last updated for macOS Ventura (13.3).

Source: Hardening macOS, an article by Ricard Bejarano.

Frictionless developer environments

Let’s face it: learning is hard. When I get a new job, I have to learn all about the new product, how it runs, and what I can do to help contribute. For myself, this is not an issue: I am an experienced software engineer. Unravelling balls of yarn that make complex software stacks function is what I do for a living. In this post, I’m going to go over some of the ways that software projects handle implicit complexity and how most of the tools that I have used in this space have not really solved any problems. If you aren’t interested in the history lesson, you can skip to the end to read about the specific tools I use to reduce installation steps to cd project-name && devenv up.

Source: Frictionless developer environments: Simplify and add lightness, an article by Andrew Coleman.

Stabilizing async fn in traits in 2023

The async working group's headline goal for 2023 is to stabilize a "minimum viable product" (MVP) version of async functions in traits. We are currently targeting Rust 1.74 for stabilization. This post lays out the features we plan to ship and the status of each one.

Source: Stabilizing async fn in traits in 2023, an article by Niko Matsakis and Tyler Mandry.

How to make a CSS-only hamburger menu

Recently I was doing some small modifications to my site, when I rediscovered the hamburger menu I made for it. It is not very special, just a menu that, once you go into a small resolution, it will compress itself into a hidden vertical menu that you can show or hide by pushing a button. The interesting part of it is that it is made only using HTML and CSS.

Source: How to make a CSS-only hamburger menu, an article by Alberto de Murga.

Goodbye to Flake8 and PyLint: faster linting with Ruff

Flake8 and PyLint are commonly used, and very useful, linting tools: they can help you find potential bugs and other problems with your code, aka “lints”. But they can also be slow. And even if they’re fast on your computer, they may still be slow in your CI system (GitHub Actions, GitLab, or whatever else.)

Happily, there’s a new linter available, Ruff, which is much faster. And it supports many of the same lints, including those from many of Flake8’s plugins.

In this article we’ll get a sense of why Ruff’s extra linting speed is so useful compared to the alternatives.

Source: Goodbye to Flake8 and PyLint: faster linting with Ruff, an article by Itamar Turner-Trauring.

Error handling patterns

Error handling is a fundamental aspect of programming. Unless you are writing “hello world”, you will need to handle errors in your code. In this post, I will discuss a bit the most common approaches used by various programming languages.

Source: Error handling patterns, an article by Andrea Bergia.

My favorite C compiler flags during development

The major compilers have an enormous number of knobs. Most are highly specialized, but others are generally useful even if uncommon. For warnings, the venerable -Wall -Wextra is a good start, but circumstances improve by tweaking this warning set. This article covers high-hitting development-time options in GCC, Clang, and MSVC that ought to get more consideration.

There’s an irony that the more you use these options, the less useful they become. Given a reasonable workflow, they are a harsh mistress in a fast, tight feedback loop quickly breaking the habits that cause warnings and errors. It’s a kind of self-improvement, where eventually most findings will be false positives. With heuristics internalized, you will be able spot the same issues just reading code — a handy skill during code review.

Source: My favorite C compiler flags during development, an article by Chris Wellons.

Algebra and Data Types

In math class you’ve done algebra, with addition and multiplication and exponentiation and polynomials like 1 + x + x². And while programming, you’ve worked with enums and structs and functions and lists. You probably thought these things were unrelated.

Surprise! They’re deeply related, and by the end of this post you’ll see how to use algebra to refactor your data types. The crowning example in this post will be finding an equivalent representation of red-black trees.

Source: Algebra and Data Types, an article by Justin Pombrio.

Move Over, Dockerfiles! The New Way to Craft Containers

Docker has become an immensely popular tool in the world of software development, and for good reason. It provides an excellent way to create, manage, and deploy containers, which in turn enables developers to run applications that work the same way in development and production. However, creating Docker images can sometimes be a pain, as anybody who has accidentally broken the apt cache and triggered an hours-long build by making a minor change can tell you.

Source: Move Over, Dockerfiles! The New Way to Craft Containers, an article by Jason Hall and Zachary Newman.