Choosing good colors for your charts is hard. This article tries to
make it easier.
I want you to feel more confident in your color choices. And if you
have no sense for colors at all, here’s my attempt to help you find
good ones anyway. We’ll talk about common color mistakes I see out
there in the wild, and how to avoid them.
This is not the right article for you if you’re trying to find good
gradients or shades. But if you need to find beautiful, distinctive
colors for different categories (e.g. continents, industries, bird
species) for your line charts, pie charts, stacked bar charts, etc.,
read on.
Inspired by a few different conversations with friends who’ve
switched to macOS where I give them a whole bunch of tips and
recommendations I’ve learned about over many years which are super
important to how I use my computer, but often quite hard to find out
about, I decided to write them all down:
If you’ve done much Python development you’re probably familiar with
importing dependencies using pip,
or even
easy_install,
if you’ve been at this for awhile. Whether you were aware of it or
not, these dependencies likely came from the public Python Package
Index (PyPI) or perhaps an internal mirror of
the PyPi
repository
that is hosted by your company.
What you may not have been aware of is how these dependencies are
actually packaged, delivered, and installed, and the differences
between the different distribution types available for Python.
There are lots of command lines which can be used with the Google
Chrome browser. Some change behavior of features, others are for
debugging or experimenting. This page lists the available switches
including their conditions and descriptions.
When object files get linked at the final build stage, the linker
needs to know which libraries to link against. For example, if you
add #import <AppKit/AppKit.h> to an implementation file, you need to
also add -framework AppKit to the linker flags.
Auto Linking aims to remove the latter step, i.e., it aims to derive
the library linker flags from the import statements in your
code. Developers do not need to add any framework/library linker
flags anymore, they can just start using any framework by importing.
Few things are as annoying on the web as having the page layout
unexpectedly change or shift while you’re trying to view or interact
with it. Whether you’re attempting to read an article as it wriggles
around in front of you, or you try to click a link only to have
another one push it out of the way and take you off to somewhere
unexpected, it’s always frustrating.
Scrypt is a slow-by-design hash
function
or more accurately, a
KDF
function. Its purpose is to take some input data, and create a
fingerprint of that data, but to do it very slowly. A common
use-case is to take a password and create an n-bit private key,
which is much longer and more secure. Here at
Qvault we use a
similar KDF for securing user passwords.
While working on a completely different project, I started to ask
myself how the who command was working under the hood. In the end, I
thought it was a good topic for a blog post.
Go is famous for making concurrency easy, through good language
support for goroutines. Except
what Go makes easy is only one level of concurrency, the nuts and
bolts level of making your code do things concurrently and
communicating back and forth through channels. Making it do the
right things concurrently is still up to you, and unfortunately Go
doesn't currently provide a lot of standard library support for
correctly implemented standard concurrency patterns.
For example, one common need is for a limited amount of concurrency;
you want to do several things at once, but only so many of them. At
the moment this is up to you to implement on top of goroutines,
channels, and things like the sync
package. This is not as easy as it looks, and quite competent people
can make mistakes here. As it happens, I have an example ready to
hand today.
Recently, while idly browsing through the source code of Python, I
came upon an interesting comment in the bytecode VM implementation
(Python/ceval.c) about using the computed
gotos
extension of GCC
[1]. Driven
by curiosity, I decided to code a simple example to evaluate the
difference between using a computed goto and a traditional switch
statement for a simple VM. This post is a summary of my findings.
I feel like dynamically loading modules with webpack’s code
splitting was
discussedeverywhere
and
everyone
is doing it at this point. Thought I’d reiterate on how we do it in
Blocksy and on the tiny layer of abstraction we built on top of the
import() function.
The heap is a data structure that I use all the time and that others
somehow use rarely. (I once had a coworker tell me that he knew some
code was mine because it used a heap) Recently I was writing code
that could really benefit from using a heap (as most code can) but I
needed to be able to pop items from both ends. So I read up on
double-ended priority
queues
and how to implement them. These are rare, but the most common
implementation is the “Interval Heap” that can be explained quickly,
has clean code and is only slightly slower than a binary heap. But
there is an alternative called the “Min-Max Heap” that doesn’t have
pretty code, but it has shorter dependency chains, which is
important on modern hardware. As a result it often ends up faster
than a binary heap, even though it allows you to pop from both
ends. Which means there might be no reason to ever use a binary heap
again.
In this article, I am going to talk about 10 more web APIs that are
not so popular. Lesser popular doesn't mean, they are not
useful. You can use them in various use-cases of your
project. Please have a look.
There are many underutilized features in browsers these days but
there is one that had been present in Firefox for a long time and is
apparently completely unknown to most web developers, they are
called page styles and they expose alternative style
sheets
to the user.
Over the last few months, I've been seeing an increase in a third
type of hidden pixels: PNG padding. Almost all of these sightings
have been associated with steganographic challenges,
capture-the-flag forensic contests, and similar puzzles. (Ever since
people began staying home due to COVID-19, there seems to have been
an increased interest in security, steganography, and related
topics.)
Netflix on Tuesday
announced
that David Benioff and D.B. Weiss, the showrunners of HBO’s Game of
Thrones, are working on an adaptation of Chinese science fiction
author Liu Cixin’s The Three-Body Problem trilogy as their first
major project since signing exclusive contracts with the streaming
service last
year.
“Liu Cixin’s trilogy is the most ambitious science-fiction series
we’ve read, taking readers on a journey from the 1960s until the end
of time, from life on our pale blue dot to the distant fringes of
the universe. We look forward to spending the next years of our
lives bringing this to life for audiences around the world,” reads
the duo’s joint statement.
In this post, which can be read as a follow up to our ultimate web
scraping
guide,
we will cover almost all the tools Python offers you to web
scrape. We will go from the more basic to the most advanced one and
will cover the pros and cons of each. Of course, we won't be able to
cover all aspect of every tool we discuss, but this post should be
enough to have a good idea of which tools does what, and when to use
which.
Today I noticed that the sunflower that grew from a seed dropped by a
bird was mostly open, so I took a photo of it. Because the strong
winds recently bend it, Alice has attached it to the fence that's
covered in ivy.
Working as a core maintainer for PyTorch
Lightning,
I've grown a strong appreciation for the value of tests in software
development. As I've been spinning up a new project at work, I've
been spending a fair amount of time thinking about how we should
test machine learning systems. A couple weeks ago, one of my
coworkers sent me a fascinating
paper
on the topic which inspired me to dig in, collect my thoughts, and
write this blog post.
We are releasing
Opacus,
a new high-speed library for training PyTorch models with
differential privacy (DP) that’s more scalable than existing
state-of-the-art methods. Differential privacy is a mathematically
rigorous framework for quantifying the anonymization of sensitive
data. It’s often used in analytics, with growing interest in the
machine learning (ML) community. With the release of Opacus, we hope
to provide an easier path for researchers and engineers to adopt
differential privacy in ML, as well as to accelerate DP research in
the field.