Today I became aware of the existence of the builtin Python module fractions. The fractions module handles rational number arithmetic. Here's a simple example using the Fraction class to covert a decimal into a Fraction with the numerator and denominator reduced to the lowest terms. My ...
Today I Learned
.mjs extension (A JavaScript module file) | Today I Learned
Today, I needed to reference the MDN docs for JavaScript modules. As I skimmed through the page, something caught my eye: a file name with the .mjs extension. My first reaction was confusion. This was my first time seeing a file with that extension. Upon further reading, I learned .mjs is a ...
DevSpace 2019 Recap
DevSpace is a two day, annual technical conference back for its 5th year in Huntsville, AL. Sessions covered a wide range of topics such as functional programming, game development, machine learning, AWS, testing and more. This was my second time attending the conference (first time was back in ...
JavaScript’s Null Coalescing Operator | Today I Learned
Scroll below for an important language update to this blog post. I was fixing a bug in a portion of code when I came across a getter structured very similar to the lines below: At first glance, I was confused thinking why would you return a Boolean here? Shouldn’t this be a ternary ...
Avoid using mutable values as default parameter values in Python (Today I Learned)
Today I learned something interesting about the way Python functions behave with default parameter values: avoid using mutable objects such as lists as default values for function parameters. What's the problem? Default parameter values are evaluated when function is evaluated. Which means ...