a tumblelog

First molt of the year: Ephebopus cyanognathus

In the evening I noticed a cast-off exoskeleton next to the burrow of the Ephebopus cyanognathus I keep. In the evening I took some photos of the molt.

Ephebopus cyanognathus molt
Ephebopus cyanognathus molt.

It's burrow is partially in the substrate and partially a tower it made with silk, substrate, and dead leaves.

Ephebopus cyanognathus burrow
Ephebopus cyanognathus burrow.

Troubleshooting a stuck process

I was recently troubleshooting an issue where a process seemed to be stuck, not making any progress. Eventually I was able to track down the problem, but along the way I found a few quick ways to start gathering information about a running process.

Source: Troubleshooting a stuck process, an article by Josh Mcguigan.

A Vim Guide for Advanced Users

Welcome to the third part of this series aimed to help you unleash a power never seen on Earth using the Almighty Vim. If you don’t understand what’s happening in this article, I recommend you to read the previous ones of the series first:

  1. Vim for beginners
  2. Vim for intermediate users

Source: A Vim Guide for Advanced Users, an article by Matthieu Cneude.

Creating serendipity with Python

We've been experimenting with breaking up employees into random groups (of size 4) and setting up video hangouts between them. We're doing this to replace the serendipitous meetings that sometimes occur around coffee machines, in lunch lines or while waiting for the printer. And also, we just want people to get to know each other.

Which lead to me writing some code. The core of which is divide n elements into groups of at least size g minimizing the size of each group. So, suppose an office has 15 employees in it then it would be divided into three groups of sizes 5, 5, 5; if an office had 16 employees it would be 4, 4, 4, 4; if it had 17 employees it would be 4, 4, 4, 5 and so on.

Source: Creating serendipity with Python, an article by John Graham-Cumming.

PureScript and Haskell

In this post I’ll compare and contrast my experiences writing the same program in Haskell and PureScript. The application I built was “real” enough to have some interesting design challenges. They included:

  • Exposing an HTTP endpoint
  • Parsing and generating JSON
  • Full-text search

Source: PureScript and Haskell, an article by Drew Olson.

An Interactive Guide to CSS Transitions

The world of web animations has become a sprawling jungle of tools and technologies. Libraries like GSAP and Framer Motion and React Spring have sprung up to help us add motion to the DOM.

The most fundamental and critical piece, though, is the humble CSS transition. It's the first animation tool that most front-end devs learn, and it's a workhorse. Even the most grizzled, weathered animation veterans still reach for this tool often.

There's a surprising amount of depth to this topic. In this tutorial, we'll dig in and learn a bit more about CSS transitions, and how we can use them to create lush, polished animations.

Source: CSS transitions and hover animations, an interactive guide, an article by Joshua Comeau.

Contexts and structs

In many Go APIs, especially modern ones, the first argument to functions and methods is often context.Context. Context provides a means of transmitting deadlines, caller cancellations, and other request-scoped values across API boundaries and between processes. It is often used when a library interacts — directly or transitively — with remote servers, such as databases, APIs, and the like.

Source: Contexts and structs, an article by Jean de Klerk and Matt T. Proud.

Learn to Use Email with Git

Git ships with built-in tools for collaborating over email. With this guide, you'll be contributing to email-driven projects like the Linux kernel, PostgreSQL, or even git itself in no time.

Source: Learn to use email with git!

Common Nginx misconfigurations

Nginx is the web server powering one-third of all websites in the world. Detectify Crowdsource has detected some common Nginx misconfigurations that, if left unchecked, leave your web site vulnerable to attack. Here’s how to find some of the most common misconfigurations before an attacker exploits them.

Source: Common Nginx misconfigurations that leave your web server open to attack, an article by Kristian Bremberg and Alfred Berg.

Stop Using Icon Fonts

The introduction of the @font-face CSS at-rule allowed web designers to specify custom fonts with which to display text. By 2011, all major browsers supported it. This gave birth to the idea that fonts composed of pictograms, like Wingdings, could be used in place of raster images on the web. Considering that real SVG support across all major browsers didn't become stable until early 2020, icon fonts were the defacto way to add vector-based icons on your web site.

But icon fonts on the web were fundamentally flawed from the beginning. And now, with full SVG support at our disposal, it's time to put a stop to their use, once and for all.

Source: Stop Using Icon Fonts, an article by Michael Irigoyen.

How to manage your Linux command history

You probably know about using the up and down arrow keys to scroll through your Bash history, but did you know that there's a lot more to Bash history than just repeating commands? There is much more to the story. Or, should that be much more to the history? In either case, the history command is one of those obscure commands that is powerful and handy to know on at least a basic level. This article will take the mystery out of Bash history to make it a more friendly sysadmin tool.

Source: How to manage your Linux command history, an article by Ken Hess.

Fuzzy Name Matching in Postgres

A surprisingly common problem in both application development and analysis is: given an input name, find the database record it most likely refers to. It's common because databases of names and people are common, and it's a problem because names are a very irregular identifying token.

The page "Falsehoods Programmers Believe About Names" covers some of the ways names are hard to deal with in programming. This post will ignore most of those complexities, and deal with the problem of matching up loose user input to a database of names.

Source: Fuzzy Name Matching in Postgres, an article by Paul Ramsey.

7 Best Python Code Review Tools Recommended by Developers

With software development teams growing in size, many developers utilize static code analysis tools to mitigate code smells and find bugs and vulnerabilities. While code correctness cannot be automated, code quality maintenance can be made possible through these static code analysis tools. It helps Teams to identify bugs and anti-patterns in the early stage of development.

Static code analysis tools analyze the code on every commit or pull request and point out potential code-quality, security, and style issues before the reviewer points them out. In this article, we will be reviewing 7 of the renowned Python code review tools as your perfect fit, which will make your decision-making process easier for choosing the best one.

Source: 7 Best Python Code Review Tools Recommended by Developers, an article by Saif Sadiq.

So, You Want To Understand Monads?

I was just reading an article in which a poor soul was trying really hard to explain to the reader what a monad is and failing miserably because he himself did not truly understand it. Out of mostly a desire to help him, I thought it might make sense to write an article that allows people to understand the intuition behind monads first without going into crazy functional language syntax.

Source: So, You Want To Understand Monads?, an article by Anurag Mendhekar.

Git is my buddy: Effective Git as a solo developer

At this point, most developers use Git as a tool for collaboration. We have our rote-learned commands to pull, commit, and push. And of course, there's that one coworker who knows a bit more about Git than everyone else, who helps get us back on track whenever our local repos end up in a strange state.

But what if I told you that Git can be a valuable tool without ever setting up a remote repository? I'm not just talking about having a working version of your code base to roll back to if you mess something up, although there's that too. Used correctly, Git can help to structure your work, identifying gaps in your test coverage and minimizing dead code.

Source: Git is my buddy: Effective Git as a solo developer, an article by Mikkel Paulson.

The Pretty JSON Revolution

Wouldn't it be nice if more JSON tools supported a truly pretty JSON format? Demand options for truly pretty JSON now! Viva la revolucion!

If only it were that easy. JSON format has become wildly popular over the last decade easily passing XML as the format of choice. For us humans JSON is much easier to read than XML if the JSON is properly formatted. Sadly most tools for viewing or formating JSON seem to be stuck on one of two formats. One format is the single line format and the other is a simple expanded format. There are other options though with some tools.

One tool that offers more options is the oj application which is part of the golang OjG package. The oj application will be used to illustrate the range of JSON formats from the ugly up to the beauty of pretty JSON. Follow along and try out your favorite JSON sample on each step.

Source: The Pretty JSON Revolution, an article by Peter Ohler.

An incomplete list of complaints about real code

A couple of weeks ago, I got bored and decided to come up with a list of things that have bothered me when trying to run software to get things done. These might be reliability concerns, or development issues, or really anything else that bothered me at the time. This was actually pretty illuminating.

Source: An incomplete list of complaints about real code.

Go is not an easy language

Go is not an easy programming language. It is simple in many ways: the syntax is simple, most of the semantics are simple. But a language is more than just syntax; it’s about doing useful stuff. And doing useful stuff is not always easy in Go.

Source: Go is not an easy language, an article by Martin Tournoij.

JSON With Commas and Comments

JWCC is a minimal extension to the widely used JSON file format with (1) optional commas after the final element of arrays and objects and (2) C/C++ style comments. These two features make it more suitable for human-editable configuration files, without adding so many features that it’s incompatible with numerous other (deliberate and accidental) existing JSON extensions.

Source: JSON With Commas and Comments, an article by Nigel Tao.

My Logging Best Practices

If you are a backend developer like me, logging is the window to your application. Unlike in the frontend, there’s not much to see except from some logging messages. Here are some of my personal guidelines I use when I write logs.

Source: My Logging Best Practices, an article by Thomas Uhrig.

What's a DKIM Record?

A DomainKeys Identified Mail (DKIM) record is a piece of text that you can add to your Domain Name System (DNS). The record is a special key that gives email providers (such as Gmail or Outlook) a way to verify if an email was created by the owner of a domain. Email providers can check each email received against this record to see if it is likely to be spam or forged.

Setting up DKIM will help reduce the chances of your emails being categorized as spam, and help others build confidence that the contents of your emails have come from you, without being tampered with.

Source: What's a DKIM Record?

Life of an HTTP request in a Go server

Go is a common and well-suited tool for writing HTTP servers. This post discusses the route a typical HTTP request takes through a Go server, touching upon routers, middleware and other related issues like concurrency.

Source: Life of an HTTP request in a Go server, an article by Eli Bendersky.

Level your productivity up with your shell’s history and aliases

Days ago I came across a blog post teaching about using your shell’s history more intensively to boost productivity. I wanted to reflect on my own usage, and share some of my tips and tricks.

Over the time, I created a lot of aliases useful to me, and I also reused some from the community. In the end I accumulate so much aliases that I can’t remember them all 🙂

Source: Level your productivity up with your shell’s history and aliases, an article by Morgan Wattiez.

Seize the day: Training your brain to get stuff done

You stare at a pile of notes and your list of to-dos continues to increase every day. The number of impending deadlines is overwhelming so you attempt to sit down and work. However, your brain would rather inspect that random mark on your wall than be productive. You get a notification, open it, and suddenly you are riding the procrastination train again. Sounds familiar? You are not alone.

Source: Seize the day: Training your brain to get stuff done, an article by L. Leal.

Reflections On Using Haskell For My Startup

Almost exactly one year ago I quit my job to create a Haskell startup as a solo developer. I had about 20 ideas, but eventually settled on the idea of dependency project health tracking with Deadpendency.

This post describes the experience and evaluates Haskell and its ecosystem.

Source: Reflections On Using Haskell For My Startup, an article by Alistair Burrowes.

The Rules of Margin Collapse

In CSS, adjacent margins can sometimes overlap. This is known as “margin collapse”, and it has a reputation for being quite dastardly.

Source: The Rules of Margin Collapse, an article by Joshua Comeau.

A Super-Post on Python Inheritance

Inheritance is an object oriented feature which allows us to reuse logic by defining parent classes that pass on certain behavior to subclasses.

In this article, we’ll cover some examples of inheritance with Python, the use of the super() function, and some practical examples of inheritance through the use of mixins. The focus will be more on understanding the complexities of multiple inheritance.

Source: A Super-Post on Python Inheritance, an article by Sangeeta Jadoonanan.

What security does a default OpenBSD installation offer?

In this text I will explain what makes OpenBSD secure by default when you install it. Do not take this for a security analysis, but more like a guide to help you understand what is done by OpenBSD to have a secure environment. The purpose of this text is not to compare OpenBSD to others OS but to say what you can honestly expects from OpenBSD.

There are no security without a threat model, I always consider the following cases: computer stolen at home by a thief, remote attacks trying to exploit running services, exploit of user network clients.

Source: What security does a default OpenBSD installation offer?, an article by Solène Rapenne.

Zsh Tricks to Blow your Mind

In UNIX-based programming, we often talk about shells, terminals, and the command line interfaces. Bash is probably the most well-known, but there are other widely-used options as well, such as Zsh or the Z shell. Read on to learn more about Zsh and some tips and tricks to optimize your development.

Source: Zsh Tricks to Blow your Mind, an article by Lizzie Siegle.

Efficiently Cleaning Text with Pandas

It’s no secret that data cleaning is a large portion of the data analysis process. When using pandas, there are multiple techniques for cleaning text fields to prepare for further analysis. As data sets grow large, it is important to find efficient methods that perform in a reasonable time and are maintainable since the text cleaning process evolves over time.

This article will show examples of cleaning text fields in a large data file and illustrates tips for how to efficiently clean unstructured text fields using Python and pandas.

Source: Efficiently Cleaning Text with Pandas, an article by Chris Moffitt.

Nahual bokmai

In the morning I was pleasantly surprised by Rodrigo on Facebook. In a comment he let me know that a species of short-tailed whipscorpion had been named after me back in 2019!

Parts of the Nahual bokmai article
Parts of the Nahual bokmai article.

Etymology: The specific name is a patronym, honoring John Bokma, a naturalist and amateur arachnologist, who has discovered many new species of arachnids in the surroundings of Xalapa, and guided the authors to the type locality of this species.


Xalapa bridge
Xalapa bridge.

The bridge mentioned is the Xalapa bridge which has a single pier that drops almost 90 meters to the floor of a deep canyon. It is there where this species of short-tailed whipscorpion can be found.

Canyon habitat, close to the type location
Canyon habitat, close to the type location.

In a similar habitat, also a canyon, close to the town of Palmarejo; Veracruz, which is also a short distance from Xalapa, I have found short-tailed whipscorpions walking on the underside of large rocks after rolling those over.

Female short-tailed whipscorpion Nahual cf. bokmai
Female short-tailed whipscorpion Nahual cf. bokmai.

Since this specimen was photographed in a very similar habitat I guess it's Nahual bokmai. Most likely it's impossible to tell this from the photo alone, which was made with a Canon A640 in macro mode.

Habitat of short-tailed whipscorpions near Palmarejo
Habitat of short-tailed whipscorpions near Palmarejo.

Short-tailed whip scorpions are very tiny, just a few mm, and look to the untrained naked eye like ants; except they move in a different way.

Canyon near Palmarejo, Veracruz
Canyon near Palmarejo, Veracruz.

Reference: Systematics of the short-tailed whipscorpion genus Stenochrus Chamberlin, 1922 (Schizomida, Hubbardiidae), with descriptions of six new genera and five new species. (Bulletin of the American Museum of Natural History, no. 435) Monjaraz-Ruedas, Rodrigo.; Prendini, Lorenzo.; Francke, Oscar F..

Many Small Queries Are Efficient In SQLite

The Appropriate Uses For SQLite page says that dynamic pages on the SQLite website typically do about 200 SQL statements each. This has provoked criticism from readers. Examples:

  • "200 SQL statements is a ridiculously high number for a single page"
  • "For most sites, 200 queries is way, way, way too much."
  • "[This is] bad design"

Such criticism would be well-founded for a traditional client/server database engine, such as MySQL, PostgreSQL, or SQL Server. In a client/server database, each SQL statement requires a message round-trip from the application to the database server and back to the application. Doing over 200 round-trip messages, sequentially, can be a serious performance drag. This is sometimes called the "N+1 Query Problem" or the "N+1 Select Problem" and it is an anti-pattern.

Source: Many Small Queries Are Efficient In SQLite.

Python strings are immutable, but only sometimes

The standard wisdom is that Python strings are immutable. You can't change a string's value, only the reference to the string.

Source: Python strings are immutable, but only sometimes, an article by Austin Z. Henley.

Don't Mess with Backprop

Biologically Plausible Deep Learning (BPDL) is an active research field at the intersection of Neuroscience and Machine Learning, studying how we can train deep neural networks with a "learning rule" that could conceivably be implemented in the brain.

The line of reasoning that typically motivates BPDL is as follows:

  1. A Deep Neural Network (DNN) can learn to perform perception tasks that biological brains are capable of (such as detecting and recognizing objects).
  2. If activation units and their weights are to DNNs as what neurons and synapses are to biological brains, then what is backprop (the primary method for training deep neural nets) analogous to?
  3. If learning rules in brains are not implemented using backprop, then how are they implemented? How can we achieve similar performance to backprop-based update rules while still respecting biological constraints?

A nice overview of the ways in which backprop is not biologically plausible can be found here, along with various algorithms that propose fixes.

Source: Don't Mess with Backprop: Doubts about Biologically Plausible Deep Learning, an article by Eric Jang.