Mathspp Blog

A blog dedicated to mathematics and programming!

This blog has a really interesting assortment of articles on mathematics and programming. You can use the tags to your right to find topics that interest you, or you may want to have a look at

You should also subscribe to the blog newsletter.

Today I learned about the type hint Any and its bidirectional compatibility with all other types.

Today I learned what precision Python floats have.

Today I (re)learned how to delete a file in Python with the module pathlib.

Today I (re)learned Heron's formula to compute the area of a triangle from its three sides.

Today I learned that you can add suggestions directly when reviewing pull requests on GitHub.

Today I learned how to edit multiple lines in the VS Code code editor.

How do you create a Python package? How do you set up automated testing and code coverage? How do you publish the package? That's what this article teaches you.

This is the written version of my EuroPython 2022 lightning talk “Smoosh all the things”.

This is the most obfuscated “Hello, world!” program I have ever seen!

In this article we go over the most obscure “Hello, world!” Python program I have ever seen.

Learn about the dunder method __init__, responsible for initialising class instances.

This is an introduction to dunder methods in Python, to help you understand what they are and what they are for.

This article explains how to extend the JSON format by using a custom encoder and a custom decoder to turn arbitrary Python objects into JSON and back.

Today I finished learning how to use a custom JSON decoder to convert JSON to arbitrary Python objects.

Can you align all of the coins on the right edge of the board?

Today I learned how to do custom JSON decoding in Python with the module json.

Today I learned how to do custom JSON encoding in Python with the module json.

Three mathematicians discuss a beautiful flower garden and the coloured flowers within.

Two realtors discuss who's netting the award for highest average commission, but it isn't clear who the winner is...

Today I learned how to use JavaScript functions in PyScript.