Plurrrr

a tumblelog
week 53, 2020

Simple.css - A classless CSS framework

Simple.css is a classless CSS template that allows you to make a good looking website really quickly.

By classless I mean that there are no CSS classes anywhere in the CSS or the HTML. So your website can look just like this using plain old vanilla HTML.

Source: Simple.css - A classless CSS framework, an article by Kev Quirk.

How to read a query plan from Postgres EXPLAIN

Got a web app responding too slowly because of a database query? The query plan is what you'd want to look at. Let's look at the execution plan that Postgres shows you when you use the EXPLAIN statement and see how to interpret that.

Source: How to read a query plan from Postgres EXPLAIN.

List of some Shell goodies for OpenBSD

I'm sharing here some practices I'm following and some small tips/tools which facilitate my usage of OpenBSD in my day to day.

Some a really specific to my usage, others could be re-used.

Source: List of some Shell goodies for OpenBSD, an article by Vincent Delft.

Blood on Snow: A novel

This is the story of Olav: an extremely talented “fixer” for one of Oslo’s most powerful crime bosses. But Olav is also an unusually complicated fixer. He has a capacity for love that is as far-reaching as is his gift for murder. He is our straightforward, calm-in-the-face-of-crisis narrator with a storyteller’s hypnotic knack for fantasy. He has an “innate talent for subordination” but running through his veins is a “virus” born of the power over life and death. And while his latest job puts him at the pinnacle of his trade, it may be mutating into his greatest mistake. . . .

In the evening I started in Blood on Snow: A novel by Jo Nesbø.

Rehousing a Heteroscodra maculata?

In the afternoon I prepared a larger enclosure for a Heteroscodra maculata I keep. When done I took the enclosure and the smaller enclosure with the spider to the bathroom to transfer it to its new home.

Heteroscodra maculata terrarium
Heteroscodra maculata terrarium.

I used the bathroom because this spider is lightning fast. The 5th of November it had even escaped from its small enclosure with me not really noticing it. Only when I couldn't find a trace of the spider and recalled I had something move from the corner of my eye I checked my desk and found the spider resting against a small box on the desk.

So this time I was prepared, or so I thought. While I carefully checked its enclosure I couldn't find a trace of the spider. I checked it above the larger enclosure which I had for additional security placed in a even larger plastic box. But no spider. So in the end I moved all substrate and moss to the new enclosure as well and hope the spider is hidden in all this somewhere. Otherwise it's either dead or now living somewhere in our house...

A half-hour to learn Rust

In order to increase fluency in a programming language, one has to read a lot of it. But how can you read a lot of it if you don't know what it means?

In this article, instead of focusing on one or two concepts, I'll try to go through as many Rust snippets as I can, and explain what the keywords and symbols they contain mean.

Ready? Go!

Source: A half-hour to learn Rust.

Remarkable 2: Thoughts on reinventing paper

Remarkable 2 is a very nice product but its shortcomings are a nice illustration of the hidden complexity that can occurre when trying to replace even simple things like paper.

I initially thought about writing a real world review but I do not write reviews here, it is against my editorial line. I will try to lean more towards what can he learnt about product design and development.

Source: Remarkable 2: Thoughts on reinventing paper, an article by Fräntz Miccoli.

A Comprehensive (and Animated) Guide to InnoDB Locking

Recently, I had a chance to go deep on InnoDB’s locking mechanisms while attempting to debug some contention in MySQL that only appeared during high-throughput. This post is a culmination of my learnings on how InnoDB locking behaves under common scenarios.

Source: A Comprehensive (and Animated) Guide to InnoDB Locking.

Happy New Year

Fireworks as seen from the front door of our house
Fireworks as seen from the front door of our house.

The Claus Family (2020)

After discovering his grandfather is Santa Claus, Jules has to help him deliver his presents all around the world. But Jules' hatred for Christmas might make that more difficult than Santa thought.

In the evening we watched The Claus Family (2020). The movie was a bit boring. I give it a 6 out of 10.

My Python Setup

This is an opinionated summary-guide of my current setup for the future me. Feel free to follow along with me!

Source: My Python Setup, an article by Ayoub Labiad.

How To: Using Tor From The Command Line

If you're going to be doing work in the “dark web”, it'll be useful to understand how to quickly and easily run commands via Tor.

Source: How To: Using Tor From The Command Line, an article by Mark Langston.

The Saints of Salvation: good

Just before 6pm I finished The Saints of Salvation, book 3 in the Salvation Sequence by Peter F. Hamilton. I enjoyed the book a lot, but recall the previous two books as being slightly better. I did like the ending, which either leaves room for more books; three perhaps, or gives readers something to think about. Recommended.

Johnny English Reborn (2011)

Johnny English goes up against international assassins hunting down Chinese Premier Xiang Ping.

In the evening we watched Johnny English Reborn (2011). I had a few good laughs. I give this movie a 7 out of 10.

Virtualise your network on FreeBSD with VNET

FreeBSD Jails are a well-known feature and have become core to many excellent tools on FreeBSD such as the Poudriere package builder. Jails offer process and file system isolation, but for a long time they did not offer very satisfying network isolation. VIMAGE provides isolation for networking through virtual network stacks or VNET.

Source: Virtualize Your Network on FreeBSD with VNET, an article by Tom Jones.

Getting started with SwiftIO

SwiftIO is an electronic circuit board that runs Swift on the bare metal. It can control sensors, displays, lights, motors and more.

Source: Getting started with SwiftIO, an article by Tibor Bödecs.

How Python attributes work

What happens when we get or set an attribute of a Python object? This question is not as simple as it may seem at first. It is true that any experienced Python programmer has a good intuitive understanding of how attributes work, and the documentation helps a lot to strengthen the understanding. Yet, when a really non-trivial question regarding attributes comes up, the intuition fails and the documentation can no longer help. To gain a deep understanding and be able to answer such questions, one has to study how attributes are implemented. That's what we're going to do today.

Source: Python behind the scenes #7: how Python attributes work, an article by Victor Skvortsov.

Some Git

In the afternoon I needed to find to which branch a commit belonged to. Since I already had done the same command about 2 weeks ago I still could remember it:

git branch --contains <commit>

A little later I needed to find the commit that had deleted a few lines of code in a given file. Since one line contained a unique string I could use:

git log -S <string> path/to/file

Later on I needed to revert a commit, so I used:

git revert <commit>

NumPy Illustrated: The Visual Guide to NumPy

NumPy is a fundamental library that most of the widely used Python data processing libraries are built upon (pandas, OpenCV), inspired by (PyTorch), or can efficiently share data with (TensorFlow, Keras, etc). Understanding how NumPy works gives a boost to your skills in those libraries as well. It is also possible to run NumPy code with no or minimal changes on GPU.

The central concept of NumPy is an n-dimensional array. The beauty of it is that most operations look just the same, no matter how many dimensions an array has. But 1D and 2D cases are a bit special.

Source: NumPy Illustrated: The Visual Guide to NumPy, an article by Lev Maximov.

Computer Science textbooks that are freely available online

Below is a loosely-categorized collection of links to CS textbooks in a variety of areas that are freely available online, usually because they are one of the following:

  • An open textbook (such as PLAI, SF, or the HoTT book)
  • An older book that is out of print, for which the copyright has returned to the original author(s) (such as TTFP)
  • An author’s own preprint or draft of a textbook. This includes cases where the author has made special arrangements with a publisher to host an electronic copy of a published text on their homepage while it remains in print.

Most of these I’ve only used for brief personal reference, and have not read in depth. The exceptions, those books I’ve spent considerable time with and highly recommend, are marked with asterisks.

I also include below a list of papers I consider good stand-alone introductions to certain topics, and a list of links to thorough special topics courses.

Source: Electronic References, an article by Colin Stebbins Gordon.

json-diff

There are a lot of tools that diff json, but only json-diff makes it easy to write programs to process the diff output. In this post, we’ll explore json-diff, how to use it and how to write programs that use its output.

Source: json-diff, an article by Tyler Adams.

The Performance Overhead of JavaScript Promises and Async Await

JavaScript as a language is heavily asynchronous, with promises being deeply integrated. The inclusion of async/await syntax has massively improved this, making asynchronous code much more readable. Being able to mark methods as async makes it much easier to integrate into existing parts of code, sometimes causing large chains of method calls to become async for a single deep method call. While this is sometimes the best solution, can the overhead of promises pose a problem for hot code?

Source: The Performance Overhead of JavaScript Promises and Async Await, an article by Matthew Miller.

6 Small Unit Testing Tips

Choosing test values when writing unit tests is mostly guided by the need to cover all cases of the program logic. However, some values are better than others. Here are a few tips on how to pick values that make mistakes easy to spot and the tests easy to read. Plus a bonus tip on a quick way to double check your tests.

Source: 6 Small Unit Testing Tips, an article by Henrik Warne.

11 Swift Features Every iOS Developer Should Know

Swift introduces a variety of features that are handy in writing simple, safe, and readable code. This article will help you to find some of the best swift features that every iOS developer should know. Ready? Let us begin.

Source: 11 Swift Features Every iOS Developer Should Know.