week 19, 2021

Be more productive with use of your BASH history

If you spend time working in the terminal, whether for work or leisure, a lot of the commands you type often have a dependency on other recent commands, might be repetitive actions, or be very similar to other commands previously run. Gaining mastery over your shell history is a great way to be more productive in the terminal.

I’m going to share some tips which improve my speed while using the shell to perform common sysadmin tasks, or file manipulation.

Source: Be more productive with use of your BASH history.

Things you can’t do in Rust

As a moderator of the Rust subreddit, I regularly happen upon posts about developers’ attempts to transpose their respective language paradigms to Rust, with mixed results and varying degrees of success.

In this guide, I’ll describe some of the issues developers encounter when transposing other language paradigms to Rust and propose some alternative solutions to help you work around Rust’s limitations.

Source: Things you can’t do in Rust (and what to do instead), an article by Andre Bogus.

5 steps to faster web fonts

In my previous post, I wrote about system fonts and their advantages over web fonts. I encouraged a ‘system fonts first’ approach, arguing that, compared to system fonts, web fonts (a) can negatively impact performance, (b) use more data, and (c) increase your site’s energy consumption. But a web without web fonts would be a far less interesting one — maybe by using web fonts a little more responsibly we can get all their benefits, while minimising the disadvantages.

Source: 5 steps to faster web fonts, an article by Iain Bean.

Building a 32 core Kubernetes cluster for less than $1,000

I enjoy working with distributed systems, and I also enjoy working with embedded devices and single-board computers, so I thought it would be fun to combine these interests and build a Kubernetes cluster using some Raspberry Pi computers. This seemed like a low-cost way to have an always-on cluster that can be used to learn more about Kubernetes, and distributed computing in general.

Source: Building a 32 core Kubernetes cluster for less than $1,000, an article by Andy Grove.

Manual UIKit Layout

Whenever I mention that I don't use Interface Builder, Storyboards or Auto Layout, developers, especially newer developers, ask me how it's even possible to write UIKit apps like that. So many iOS tutorials dump you straight into Interface Builder and constraint-building, and while that does have benefits at the mid-to-high-end, like with localization and right-to-left languages, it's still a fairly sharp learning curve and mental overhead that leaves many beginners not really understanding what is going on under the hood. It's no wonder that SwiftUI seems so refreshing and easy to use, in comparison.

Source: Manual UIKit Layout, an article by Steve Troughton-Smith.

Aiming for idiomatic Rust

Recently I was exploring ways to work with pattern matching in Rust - using a small relatable example that many people may have come across during technical interviews or in online code challenges.

The problem is as follows: given a string input, determine if parenthesis, brackets and braces are 'balanced'.

Source: Aiming for idiomatic Rust, an article by Shane Osbourne.

Half a million lines of Go

When we started Goliath, no one on the team knew Go beyond the experiments we ran to validate that Go would be a better choice for us than our other options. Today, all of our backend and full-stack engineers write Go, and our incremental delivery of Goliath has vaulted us over a big milestone: More than 500,000 lines of Go now running in production. This seemed like a good point to reflect on Go itself.

Source: Half a million lines of Go, an article by Kevin Dangoor.

Top Ten Git Tips & Tricks

Let's face facts. Git is not fun. Git is not friendly. No. It's just infuriatingly useful, so we're stuck with it. But what if you could make git more friendly? More convenient? Would that make your day a little less stressful?

Source: Top Ten Git Tips & Tricks, an article by Julie Kent.

Basics of ZFS Snapshot Management

OpenZFS stands out in its snapshot design, providing powerful and easy-to-use tools for managing snapshots. Snapshots complement a backup strategy, as they are instantaneous and don’t require a backup window. Since snapshots are atomic, they are not affected by other processes and you don’t have to stop any running applications before taking a snapshot.

Source: Basics of ZFS Snapshot Management.

pprof++: A Go Profiler with Hardware Performance Monitoring

Golang is the lifeblood of thousands of Uber’s back-end services, running on millions of CPU cores. Understanding our CPU bottlenecks is critical, both for reducing service latencies and also for making our compute fleet efficient. The scale at which Uber operates demands in-depth insights into codes and microarchitectural implications.

Source: pprof++: A Go Profiler with Hardware Performance Monitoring, an article by Milind Chabbi.

The Plan for the Rust 2021 Edition

We are happy to announce that the third edition of the Rust language, Rust 2021, is scheduled for release in October. Rust 2021 contains a number of small changes that are nonetheless expected to make a significant improvement to how Rust feels in practice.

Source: The Plan for the Rust 2021 Edition, an article by Mara Bos.

Praise for Alpine Linux

In terms of simplicity, Alpine Linux is unpeered. Alpine is the only Linux distribution that fits in my head. The pieces from which it is built from are simple, easily understood, and few in number, and I can usually predict how it will behave in production. The software choices, such as musl libc, are highly appreciated in this respect as well, lending a greater degree of simplicity to the system as a whole.

Source: Praise for Alpine Linux, an article by Drew DeVault.

Debugging HTTP services with mitmproxy

I spend a lot of my time at work writing Go services that talk to other Go services over HTTP. Much of the time, everything works as expected, but every now and then a situation arises where I’m struggling to understand why my program is receiving a specific value. Is my request not being built correctly? Am I not properly deserializing the response? Logging can be helpful, but sometimes I really just want to look at the HTTP traffic between services.

Source: Debugging HTTP services with mitmproxy, an article by Ben Burwell.