New in Git: switch and restore
To my surprise, I recently found out about 2 new additions to the list of high-level commands: git restore and git switch.
Source: New in Git: switch and restore, an article by Dragos Barosan.
To my surprise, I recently found out about 2 new additions to the list of high-level commands: git restore and git switch.
Source: New in Git: switch and restore, an article by Dragos Barosan.
In the last several months, we've featured simple yet powerful tools for optimizing PostgreSQL queries. We've walked through how the pg_stat_statements extension can show which queries are taking up the most time to run system-wide. We've also looked at how to use the EXPLAIN command to uncover query plans for individual queries.
You can get a lot out of those two, but you may have also wondered, "What about logs? Surely I can use Postgres' logs to help me find and track slow queries too?" Today we're going to take a look at a useful setting for your Postgres logs to help identify performance issues.
Source: Logging Tips for Postgres, Featuring Your Slow Queries, an article by Kat Batuigas.
I want to take a moment to elaborate on what makes a well formed commit message. I think the best practices for commit message formatting is one of the little details that makes Git great. Understandably, some of the first commits to rails.git have messages of the really-long-line variety, and I want to expand on why this is a poor practice.
Source: A Note About Git Commit Messages, an article by Tim Pope.
Understanding query performance patterns is essentially the foundation for query performance tuning. It, in many ways, dictates how a database cluster evolves. And then there are obviously direct and indirect cost connotations as well.
PostgreSQL provides very detailed statistics through a number of catalog views and extensions that can be easily added to provide more detailed query statistics. With each view focused on a particular aspect, the picture almost always needs to be stitched together by combining different datasets. That requires effort and still, the whole picture might not be complete.
The pg_stat_monitor extension attempts to provide a more holistic picture by providing much-needed query performance insights in a single view. The extension has been evolving over the past year and is now nearing the GA release.
Source: Improve PostgreSQL Query Performance Insights with pg_stat_monitor, an article by Ibrar Ahmed and Hamid Akthar.
Open Source package managers are one of the most maligned pieces of software in common use today. I’m here to correct that criticism and tell developers that it’s not the package managers you hate — it’s what they’ve made you become. This contains a bit of a history lesson to explain how we got here today, as well as what I think the package management world will look like in the future.
Source: In Defense of Package Managers, an article by Dan Lorenc.
Initially used for simple metadata, HTTP headers now play an important role in the vast field that web security is.
Setting up HTTP security headers is the quickest, less expensive, and probably the most effective way to secure a web application today. Here is how.
Source: HTTP Security Headers: Why? How? What?, an article by Sylvain Kerkour.
Macros are one of the ways to extend Rust syntax. As The Book calls it, “a way of writing code that writes other code”. Here, I will talk about declarative macros, or as it is also called, macros by example. Examples of declarative macros are
vec!
,println!
andformat!
.
Source: First steps with Rust declarative macros!, an article by Roger Torres Paes.
As Harry Potter begins his sixth year at Hogwarts, he discovers an old book marked as "the property of the Half-Blood Prince" and begins to learn more about Lord Voldemort's dark past.
In the evening Esme, Alice, and I watched Harry Potter and the Half-Blood Prince. Adam didn't want to watch the movie. I liked the movie a lot and give it an 8 out of 10.
We recently integrated new functionality into our CrowdStrike Falcon sensor that was implemented in Rust. Rust is a relatively young language with several features focused on safety and security. Calling Rust from C++ was relatively straightforward, but one stumbling block we’ve run into is how Rust deals with out-of-memory (OOM) conditions.
Source: Dealing with Out-of-memory Conditions in Rust, an article by John Gallagher
Lately, I’ve been doing a lot more things at the command line. I’m not a hard-core terminal guy – I use VSCode more than Vim – but I’m always surprised at the number of complex tasks that can be done using just the POSIX standard command-line tools like
grep
,cat
andsort
.Tools are powerful. A good tool makes work easier and faster, and a great tool unlocks new abilities: Previously impossible things become possible and sometimes easy.
As I’ve learned more, I’ve been adding some new tools to my command-line toolbox, and in this article, I’d like to share some I’ve found valuable.
Source: 6 Command Line Tools for Productive Programmers, an article by Adam Gordon Bell.
Extensions in Swift are great. We can extend structs, classes, enums, etc., whether we own the code or not, in almost any way we need. This enables us to do easier initializations, mapping, convenience functions, protocol implementation (one of my favorites) and more. There is only one problem.
Source: Responsible code sharing using the power of protocol extensions, an article by Kamil Tustanowski.
Containers are no security devices. That's why we've curated a set of easily actionable recommendations to improve your Docker containers security.
Source: How to improve your Docker containers security, an article by Thomas Segura.
In Basics of ZFS Snapshot Management, we demonstrated how snapshots and clones can be used to access data from a given point in time. In this article, we’ll learn how ZFS boot environments (BEs) are used to boot the operating system itself into a previous point in time.
Source: Let’s Talk OpenZFS Snapshots.
Swift 5.5 introduces a new concept called “effectful read-only properties”, which essentially means that computed properties can now utilize control flow mechanisms like errors and async operations when computing their values.
Source: Throwing and asynchronous Swift properties, an article by John Sundell.
A clean git commit history is often underrated and can be immensely useful to ease code reviews and understand changes in the future (potentially in the midst of an outage).
Of course we are talking about the final history here as committed to the shared repository, not the intermediate history while we are working on the code. Sometimes the intermediate history is good enough to be pushed directly, but this is actually fairly rare.
Cleaning up the history might seem tedious at first for marginal cosmetic benefits, but it gets much easier and faster with practice. Here I am collecting some tips for cleaning up a git commit history before publishing it to others, for example in the form of a pull request.
Source: Cleaning Up Git History, an article by Robin Schroer.
I have been programming for almost six years now and have used containers for nearly the entirety of that time. For what comes with being a programmer, curiosity got the better of me and I started asking around the question, that what is a container?
Source: Life of a Container, an article by Indradhanush Gupta.
Python’s collections module provides a rich set of specialized container data types carefully designed to approach specific programming problems in a Pythonic and efficient way. The module also provides wrapper classes that make it safer to create custom classes that behave similar to the built-in types dict, list, and str.
Learning about the data types and classes in collections will allow you to grow your programming tool kit with a valuable set of reliable and efficient tools.
Source: Python's collections: A Buffet of Specialized Data Types, an article by Leodanis Pozo Ramos.
A calendar system is an attempt to make sense of the passing of time with respect to astronomical phenomena — the positioning of the Sun, the Moon and the stars with respect to our unfixed and moveable Earth. It is perhaps ironic, then, that the widely used Gregorian calendar system is a cobbled-together mishmash that better reflects the arbitrariness of history than it does either celestial order or logical consistency.
Source: Taking Months to Bits. A calendrical journey into low-level programming, an article by Kevlin Henney.
In the early afternoon I finished Stories of Your Life and Others by Ted Chiang. I liked all the stories; they are good. The ones I liked the most are Story of Your Life and Seventy-Two Letters.
So when we say PostgreSQL is the "batteries included database," this is just one reason why. With Postgres, you don't need to immediately look farther than your own database management system for a full-text search solution. If you haven't yet given Postgres' built-in full-text search a try, read on for a simple intro.
Source: Postgres Full-Text Search: A Search Engine in a Database, an article by Kat Batuigas.
Netcat is a tool that reads and writes data across network connections, using TCP or UDP protocol. Netcat has been referred to as the TCP/IP / networking swiss army knife. In this article we’ll look at different applications of netcat and how it can be useful in day to day activities of a pentester, security professional, sysadmin etc…
Source: Netcat - All you need to know, an article by Michael Ikua.
This article describes several unstable Rust compiler features. It is intended to explain the basics of these features without diving into too much detail.
Source: Awesome Unstable Rust Features, an article by Ethan Brierley.
Guile is the Prism. He is high priest and emperor, a man whose power, wit, and charm are all that preserves a tenuous peace. Yet Prisms never last, and Guile knows exactly how long he has left to live.
When Guile discovers he has a son, born in a far kingdom after the war that put him in power, he must decide how much he's willing to pay to protect a secret that could tear his world apart.
In the evening I started in The Black Prism, Lightbringer book 1 by Brent Weeks. I've already read the Night Angel trilogy by the same author and liked this trilogy a lot so I have high expectations of this series.
CSS can be hard to grasp when you're starting out. It can seem like magic wizardry and you can very easily find yourself playing whack-a-mole adjusting one property only to have something else break. It is frustrating, and that was my experience for quite a long time before things suddenly seemed to "click".
Reflecting back on this time, I think there are a few key concepts that were vital to things finally all making sense and fitting together. These were:
- The Box Model (e.g.
box-sizing
,height
,width
,margin
,padding
)- Layout (e.g.
display
)- Document Flow and Positioning (e.g.
position
,top
,left
, etc.)There are also some useful concepts to keep in mind when building reusable and composable components.
Source: My First CSS, an article by Nathan Hardy.
This booklet is intended to be a catalog of tricks and techniques you may want to use if you're doing some sort of complex scripting. Some are just useful, some are more playful, and might not have such direct impact in your day-to-day life. Some are pure entertainment. You'll have to judge by yourself which things belong to which category. I'll try to keep the rhetoric to the minimum to maximize signal/noise.
Source: Shell Field Guide, an article by Raimon Grau.
Have you ever looked at a word or phrase you’re typesetting and something just looked off about it? It might just be a kerning problem. Kerning refers to the amount of space between two letters (or other characters: Numbers, punctuation, etc.) and the process of adjusting that space to avoid awkward-looking gaps between your letters and improve legibility. In this article, we will outline how to kern like a professional designer.
Source: A beginner’s guide to kerning like a designer, an article by Janie Kliever.
Linux distributions are great to use and they have some tricks under their sleeves which users may not be aware of. Let’s have a look at some command line utilities which really come in handy when you’re the guy that likes to stick with the terminal rather than using a GUI.
Dark Patterns are deceptive UX/UI interactions, designed to mislead or trick users to make them do something they don’t want to do. This term was coined in 2010 after the boom of ecommerce industries on the web. In order to generate more sales, get subscriptions, and hit target numbers in transactions etc., designers and business associates started creating deceiving user interfaces to manipulate users.
Source: Dark patterns in UX: how designers should be responsible for their actions, an article by Arushi Jaiswal.