Skip to Content

A Day With Python

Where have you been all my life?

Today I installed Python for the first time.

Whenever I learn something new I like to stay motivated with a small project. A friend and data engineer told me that Python excels at crunching numbers—and lately I’ve been quite a Numberphile—so I built a small library for generating my favorite OEIS integer sequences. When I encounter exciting sequences in the future they’ll surely get added.

You can explore the result at this GitHub repository.


The few hours I spent with Python were revealing. My previous experience with JavaScript and PHP afforded me several transferrable skills needed for success. So most of the friction resulted from a desire to write idiomatic code despite an unfamiliarity with its documentation, syntax, and standard libraries. Fortunately this will improve with practice.

Ultimately what I enjoy about Python is how its design allows me to focus on writing clean code with clarity. By eliminating semicolons and curly braces there are less keystrokes and syntactical rules to remember. Similarly, its mandatory indentation rules force its code to be legible and scannable. As someone with an attention disorder these aspects greatly help my efficiency.

As my library grows there are a few things I’d like to learn along the way. For example, generating Mersenne primes takes a long time after the eighth iteration, so it would be desirable to cache the states of generator functions so it can recall them later. This would be especially helpful for Golomb’s sequence, which needs access to several of its previous values.

Or maybe I’ll just build a supercomputer. That’ll fix it.