a tumblelog
week 06, 2020

Bot detection 101: How to detect web bots?

We can distinguish two main families of detection techniques:

  • Behavioral detection: this family of approaches leverages the user’s behavior, such as mouse movements or browsing speed, to predict whether a user is human or not.
  • Fingerprinting-based detection: this second family of approaches leverages information about the device and the browser, such as the browser version, the Operating System (OS) or the number of CPU cores.

Source: Bot detection 101: How to detect web bots?, an article by Antoine Vastel.

How to Create Printer-friendly Pages with CSS

Converting responsive, continuous media to paged paper of any size and orientation can be challenging. However, CSS print control has been possible for many years, and a basic style sheet can be completed within hours.

Source: How to Create Printer-friendly Pages with CSS, an article by Craig Buckler.

Demystifying Browsers

I’m increasingly often asked “Where do I learn about browsers?” and I haven’t had a ready answer for that question.

This post aims to answer it.

Source: Demystifying Browsers, an article by Eric Lawrence.

Analyzing the Attacks on my Website

I was casually doing a security audit on my blog ( recently and decided to look a little deeper into my security logs. With a bit of Linux command line kung fu, some Golang, and Google sheets, I was able to get a pretty good idea of where the attacks are coming from.

Source: Analyzing the Attacks on my Website, an article by Jeremy Morgan.

Breaking Out With CSS Grid Layout

let’s review what we hope to accomplish from a design standpoint:

  • We want to limit the width of prose content to promote readability.
  • But sometimes, the reader may benefit from an element being full-width. For example, a nice photograph or a detailed chart.

Source: Breaking Out With CSS Grid Layout, an article by Tyler Sticka.

Editorial Design Patterns With CSS Grid And Named Columns

By naming lines when setting up our CSS Grid layouts, we can tap into some interesting and useful features of Grid — features that become even more powerful when we introduce subgrids.

Source: Editorial Design Patterns With CSS Grid And Named Columns, an article by Rachel Andrew.

The Definitive Higher Math Guide on Integer Long Division

In mathematics, long division is a powerful procedure through which division can be carried out with pencil and paper. As powerful as it is, it is generally taught at the pre-college level without much consideration on its underlying theory or its alternatives

Source: The Definitive Higher Math Guide on Integer Long Division.

Dicts are now ordered, get used to it

There were several moments over the last few weeks when I heard people discuss differences between Python lists and dicts and one of the first ones mentioned was that lists are ordered and dicts are not.

Well, not anymore.

Source: Dicts are now ordered, get used to it, an article by Ivan Sagalaev.

Responsive YouTube Embed

Today I made embedded YouTube videos responsive as part of my work. I used the technique given in Responsive YouTube Embed, an article by John Surdakowski.

Overload Functions in Python

Function overloading is the ability to have multiple functions with the same name but with different signatures/implementations. When an overloaded function fn is called, the runtime first evaluates the arguments/parameters passed to the function call and judging by this invokes the corresponding implementation.

Source: Overload Functions in Python, an article by Arpit Bhayani.

Writing a triple polyglot script

In the previous post I've described how to write a script that's both valid Ruby and Python. Then I came up with the idea of adding Perl on top if it.

Source: Writing a triple polyglot script.

Scaling to 100k Users

Many startups have been there - what feels like legions of new users are signing up for accounts every day and the engineering team is scrambling to keep things running.

It’s a good a problem to have, but information on how to take a web app from 0 to hundreds of thousands of users can be scarce. Usually solutions come from either massive fires popping up or by identifying bottlenecks (and often times both).

With that said, I’ve noticed that many of the main patterns for taking a side project to something highly scalable are relatively formulaic.

This is an attempt to distill the basics around that formula into writing. We’re going to take our new photo sharing website, Graminsta, from 1 to 100k users.

Source: Scaling to 100k Users, an article by Alex Pareto.

An Introduction to Big Data: Clustering

Clustering is a Machine Learning technique that involves the grouping of data points. Given a set of data points, we can use a clustering algorithm to classify each data point into a specific group. In theory, data points that are in the same group should have similar properties and/or features, while data points in different groups should have highly dissimilar properties and/or features. Clustering is a method of unsupervised learning and is a common technique for statistical data analysis used in many fields.

Source: An Introduction to Big Data: Clustering, an article by James Le.

Why Discord is switching from Go to Rust

Most recently, we drastically improved the performance of a service by switching its implementation from Go to Rust. This post explains why it made sense for us to reimplement the service, how it was done, and the resulting performance improvements.

Source: Why Discord is switching from Go to Rust, an article by Jesse Howarth.

A Pythonista's Review of Haskell

over the past three months, I've been reading through “Haskell Programming, From First Principles” by Chris Allen and Julie Moronuki, the 4th release candidate of the 1.0 edition (1.0-rc4). I'm pleased to say that I made it to the end of this 1,857 page (by the e-reader PDF version) monstrosity. Here's some of the things that I, as a software engineer who has used Python in production and Haskell doing book exercises only, liked and didn't like about Haskell.

Source: A Pythonista's Review of Haskell, an article by Ying Wang.

My unpopular opinion about black code formatter

In this post, I will try to gather all my thoughts on the topic of automatic code formatting and why I personally don't like this approach. We will go for the most hippy tool — Black.

Source: My unpopular opinion about black code formatter.