Mathspp Blog

342 391,958 32,910
articles words lines of code

In this article I explore a common code smell related to conditionals and Boolean values and show how to fix it.

This article explains why a user would need to use enums in their code and shows how to do it with a simple example.

This article shows 5 ways of flattening a list of lists, ranked from worst to best.

In this article we reimplement the built-in enumerate in the best way possible.

The Zen of Python says “there should be one -- and preferably only one -- obvious way to do it”, but what if there's a dozen obvious ways to do it?