a tumblelog
week 10, 2020

How I Start: Nix

Nix is a tool that helps people create reproducible builds. This means that given the a known input, you can get the same output on other machines.Let’s build and deploy a small Rust service with Nix. This will not require the Rust compiler to be installed with rustup or similar.

Source: How I Start: Nix, an article by Christine Dodrill.

11 things you may have overlooked when you made your website live

A student of mine recently put up their first website and asked me if they'd missed anything. I thought it would be useful to put up a checklist of things that are very easily overlooked and forgotten about when you put your shiny new site live.

Source: 11 things you may have overlooked when you made your website live, an article by Tom Butler.

Rules of Makefiles

A somewhat tongue-in-cheek title, but this page lists a few very important rules you should always keep in mind when creating makefiles. Following these rules will allow your makefiles to be both pithy and beautiful. And they will make maintaining and modifying them, and thus your entire life, a much more pleasant experience.

Source: Rules of Makefiles, an article by Paul D. Smith.

A visit to Avonturia De Vogelkelder

Today we paid a visit to Avonturia, also known as "De Vogelkelder", located in the city of The Hague. I bought two new "pets": a Brachypelma smithi and an Aphonopelma seemanni. Read about it in my blog post: A visit to Avonturia De Vogelkelder.

Author handling a Aphonopelma seemanni
Author handling an Aphonopelma seemanni. Photo by Esme.

Hacking up your own shell completion

In this post I’ll be walking through a simple hack I added to my shell that I think makes me more productive (if nothing else it makes me happy).

Source: Hacking up your own shell completion, an article by Jeremy Feltracco.

Zip Files: History, Explanation and Implementation

I have been curious about data compression and the Zip file format in particular for a long time. At some point I decided to address that by learning how it works and writing my own Zip program. The implementation turned into an exciting programming exercise; there is great pleasure to be had from creating a well oiled machine that takes data apart, jumbles its bits into a more efficient representation, and puts it all back together again. Hopefully it is interesting to read about too.

This article explains how the Zip file format and its compression scheme work in great detail: LZ77 compression, Huffman coding, Deflate and all. It tells some of the history, and provides a reasonably efficient example implementation written from scratch in C.

Source: Zip Files: History, Explanation and Implementation, an article by Hans Wennborg.

How to Work From Home Without Losing Your Mind

Yes, working from home has its perks. You’re always there to accept deliveries. You can play whatever music you want as loudly as you want. You don’t have to abide the loud chewing or ungracious smells of your colleagues. But you also have to contend with the Scylla and Charybdis of isolation and distraction.

Source: How to Work From Home Without Losing Your Mind, an article by Brian Barrett.

Why you should not use (f)lex, yacc and bison

Lex and Yacc were the first popular and efficient lexers and parsers generators, flex and Bison were the first widespread open-source versions compatible with the original software. Each of these software has more than 30 years of history, which is an achievement in itself. For some people these are still the first software they think about when talking about parsing. So, why you should avoid them? Well, we found a few reasons based in our experience developing parsers for our clients.

Source: Why you should not use (f)lex, yacc and bison, an article by Federico Tomassetti.

Handling NULL Values in PostgreSQL

There is often some confusion about NULL value, as it is treated differently in different languages. So there is an obvious need to clarify what NULL is, how it works in different languages, and what the actual value is behind the NULL.

Source: Handling NULL Values in PostgreSQL, an article by Ibrar Ahmed.

Time Disorder: don't order events by timestamp

When presented with a series of events, many developers will first be tempted to sort them by time. This is dangerous because timestamps do not provide the strict ordering they've assumed.

Out of order events can lead to infrequent but significant bugs: consider "add to basket then checkout" vs "checkout then add to basket".

Instead of timestamps, developers should prefer simple counters and proper conflict detection. Timestamps may still be useful, but should be approached with caution due to the complexities outlined below.

Source: Time Disorder: don't order events by timestamp, an article by Caolan McMahon.

The death of Agile?

I read an article on the death of Agile. It’s not the first article I’ve seen claiming that Agile is dead, and I’m sure it won’t be the last.

Source: The death of Agile?, an article by Mike Loukides.

How to use Restricted Shell

You have users logging in to your Linux system. Those users might have not have sudo rights, but they quite possibly could have free rein to poke around most of the system directory tree. You don't want that. Why? Although those users might not be able to edit the vast majority of your configuration files, you certainly don't want those users viewing them. Same holds true for your client data--you want that locked down.

Source: How to use Restricted Shell to limit user access to a Linux system, an article by Jack Wallen.

Know Your Database Types

There can be a number of reasons why your application performs poorly, but perhaps none are as challenging as issues stemming from your database. If your database's response times tend to be high, it can cause a strain on your network and your users’ patience. The usual culprit for a slow database is an inefficient query being executed somewhere in your application logic.

Source: Know Your Database Types, an article by Ben Fritsch.

Scaling Python Asyncio with Ray

Scale your existing asyncio application to thousands of cores with 20 lines of code. Ray added two features to enable seamless integration with Python asyncio ecosystem. Both features help to scale your existing asyncio application to multi-core and multi-node.

Source: Scaling Python Asyncio with Ray, an article by Simon Mo.

Answers to Frequently Asked Questions about Tolkien Elves

Michael Martinez provides answers to several FAQs about Tolkien Elves in his blog post Answers to Frequently Asked Questions about Tolkien Elves.

And no, Michael doesn't imply that Gandalf was an elf, just that he was believed to be an elf by most people in the north.

Little known features of iTerm2

Despite owning a Mac mini for years now I still haven't tried iTerm2. If you use this program check out Shrey Banga's Little known features of iTerm2.

Calling C or C++ From Python

Are you a Python developer with a C or C++ library you’d like to use from Python? If so, then Python bindings allow you to call functions and pass data from Python to C or C++, letting you take advantage of the strengths of both languages. Throughout this tutorial, you’ll see an overview of some of the tools you can use to create Python bindings.

Source: Python Bindings: Calling C or C++ From Python, an article by Jim Anderson.