In training classes, one of the things I always say (besides “Ask
questions!”) is “Always look at the first error message, not the
last one.” It’s so tempting to look at the last line of the
compiler’s output first: after all, it’s the one that’s right there
in front of you when the compiler finishes running. You think,
“Well, I need to fix all the errors at some point anyway; might as
well start here.” It’s a trap! Suppress that temptation, and
scroll up to the first error message first.
Everyone is talking about
Polars. Polars is
supposed to replace Pandas. Will it? Maybe 10 years from now. You
can’t untangle Pandas from everywhere it exists overnight. Do you
still want to replace Pandas with Polars and be one of the cool
kids? Ok. Let’s take a look at a practical guide to replacing Pandas
with Polars, comparing functionally used by most people.
The immense breadth of Java and its ecosystem, having grown and
matured over nearly three decades, can also be challenging though
for folks just starting their careers as a Java developer. Which
Java version should you use? How to install it? Which build tool and
IDE are the right ones? For all these, and many other questions,
there are typically a number of options, which can easily overwhelm
you if you are new to Java. As the platform has evolved, tools have
come and gone, things which were hugely popular years ago have
fallen into obsolescence since then. As related information can
still be found on the internet, it can be hard to identify what’s
still relevant and what not.
The idea for this blog post is to provide an opinionated guide for
folks getting started with Java development in 2023, helping you
with your very first steps with that amazing platform. Note I’m not
saying that the things I’m going to recommend are the best ones for
each and every situation. The focus is on providing a good
getting-started experience. Some of the recommended tools or
approaches may make less sense to use as you get more experienced
and other choices might be better suited for you then, based on the
specific situation and its requirements.
Also, very importantly, there is a notion of personal taste and
preference to these things, those are my recommendations, and
those of others might look different, which is perfectly fine.
40% of Rust
believe Rust's debugging experience could use improvement. And
that's not surprising: when we write code we make assumptions, and
sometimes we assume wrong. This leads to bugs, which we then track
down and fix. This is what we call "debugging", and is a core part
of programming. The purpose-built tools which help us with debugging
are called "debuggers".
Unlike the Rust compiler, the Rust project doesn't actually provide
a "Rust debugger". Users of Rust are instead expected to use a
third-party debugger such as gdb, lldb, or windbg to debug
their programs. And support for Rust in these debuggers is not
always great. Basic concepts such as "traits", "closures", and
"enums" may have limited support. And debugging async code, or
arbitrary user-defined data structures may be really hard if not
impossible. This limits the utility of debuggers, and in turn limits
the Rust user's debugging experience.
I was on the cusp of the Python 2→3 transition being the last class
in my grad school to learn Python 2, so I remember being put off by
Python 3. By then the transition had been going on for almost a
decade so a lot of libraries had already been updated. But the final
date for Python 2 was no where in sight. I was lucky that my
transition was relatively painless, but it wasn’t for a lot of
people. Lets take a look back and see how it started, but first a
When you think of animating CSS properties, which ones come to mind?
I recently started wondering about the ones that don’t come to mind
— properties that aren’t typically associated with animation, but
turn out to be animatable.
This articles explores some of the unexpected things that CSS can
animate and some nifty things you can do by animating them.
If you need to speed up Python, Cython is a very useful tool. It
lets you seamlessly merge Python syntax with calls into C or C++
code, making it easy to write high-performance extensions with rich
That being said, Cython is not the best tool in all
circumstances. So in this article I’ll go over some of the
limitations and problems with Cython, and suggest some alternatives.
This got me thinking – but what about integers? Of course integers
have all kinds of problems too – anytime you represent a number in a
small fixed amount of space (like 8/16/32/64 bits), you’re going to
run into problems.
Lately I've been iterating on a reusable set of open-source
continuous integration (CI) tools for my Python projects. Here's an
overview, along with a sample GitHub Actions workflow file that runs
People get confused by Rust’s build system a lot. I have been trying
for a while to figure out what makes Rust uniquely hard here, as a
lot of the people who are confused are experienced compiler
engineers who have used staged compilers in the past. Here are some
theories I have.
Ever since I got involved with open-source Python projects,
tox has been vital for testing packages across
Python versions (and other factors). However, lately, I’ve been
increasingly using Nox for my projects
instead. Since I’ve been asked why repeatedly, I’ll sum up my
This blog post is meant to cover my experience going down the Rust
rabbit hole and tips I wish some learning resources could have
taught better. Personally, I cannot learn a new language from simply
watching youtube videos, but rather through seeking out solutions
for myself, making mistakes, and feeling humbled by the process.
You can often hear online that indexing into a slice, such as
my_slice[i] is slow in Rust and you should do something else
instead for performance.
The details, however, are murky. There’s little in the way of
benchmarks, and hardly any documentation on removing this overhead
without resorting to unsafe code.
So after optimizing a bunch of high-profile crates by removing
bounds checks (and also removing unsafe code from some of them), I
figured I should write down the results, and the techniques I
Symmetric encryption is widely used today, and there are efficient
algorithms, some even implemented on hardware. Examples of symmetric
encryption algorithms are AES (Advanced Encryption Standard), 3DES,
ChaCha, Salsa, Twofish, Blowfish, and Serpent. In this type of
encryption, we use the same key to encrypt and decrypt messages
(therefore, if someone can send encrypted messages, he can decrypt
them as well).
As the 20th century came to a close, ARM was on the precipice of
massive change. Under its first CEO, Robin Saxby, the company had
grown from 12 engineers in a barn to hundreds of employees and was
the preferred choice in RISC chips for the rapidly expanding mobile
market. But the mobile and computer worlds were starting to merge,
and the titans of the latter industry were not planning to surrender
to the upstarts of the former.
resolution is always at the heart of everything. Despite its central
place in our tools, not much time has been spent on making that
aspect fast. With the changes discussed in this blog post tools can
be sped up by as much as 30%.