Implementing Batching
There are some tools we keep in our engineering toolbox which are extremely helpful in various situations but can be a little tricky to get our heads around initially. Let’s take a look at something which is pretty simple, but just needs a little practice sometimes to get the hang of: batching.
Read More
A Check Digit Code Challenge
I was recently playing with a code challenge on CodeWars called “Modulus 11 - Check Digit” where I was using Ruby. It got me thinking about all of the Enumerable module methods in Ruby and how nice they can be.
Read More
Efficiently Equating Triangular and Square Numbers
Number Theory is full of fun questions that may not have the most immediate practical applications, until they do. For example, many of the concepts which are foundational to cryptography were initially viewed as having no real world applications and being little more than mathematical and academic exercises, but as we know cryptography is a crucial component upon which the security of our technological systems are built upon. For fun, let’s look at an efficient way to find values where a triangular number is equal to a square number. This post also provides a great showcase of how computer science and mathematics have such deep overlaps.
Read More
1D Array Indices to N-Dimensional Coordinates
If we have values in an \(m\) by \(n\) plane, such that \((m, n) \in \mathbb{R}^2\), we may want to convert the \(x\) and \(y\) coordinates to a single index to store them in a single array within consecutive slots of memory. We can do this using the integer division and modulo functions. We can also generalize this to higher, or \(n\), dimensional tensors.
Read More
Chicken Soup Games
While I had been deeply interested in computer gaming as a youth, even designing and creating many of my own, I regained the interest and passion for playing games over the last few years. I found myself initially drawn to some of the older point and click adventures – essentially an interactive story experience. Unfortunately, point and click adventures aren’t great with respect to replay value unless you haven’t played it in some time. After playing through many of my old favourites, I found that I thoroughly enjoy other genres like rogue-like deckbuilders, tower defense, and builder games. Recently though I heard the term “chicken soup games” and this reallly made a ton of sense.
Read More
Finding a Trendline with Least Squares
When we look at a bunch of points, it can sometimes be challenging to see how the data is moving and it is very helpful to be able to identify a trendline.
Read More
Implementing Norms
Artificial Intelligence (AI) models often need some sort of quantity or length function so we can get a single numeric value from a vector with many components. I actually prefer to think about these as “value” functions, because these functions give us a way to reflect an amount or value, in the economic sense, for any particular vector.
Read More
Building a Pile of Cubes
I was playing with some code challenges and found one called Building a Pile of Cubes. While there is a naïve, linear-time solution, with a little bit of mathematics we can find a far more elegant, constant-time solution to the problem.
Read More
Finding Primes Quickly
When it comes to topics like cryptography, prime numbers are absolutely essentially. We often need to determine if a number is prime or generate a list of primes. Let’s look at a few ways this is done.
Read More
What's This All About?
At the end of 2023, I left my most recent role at Addressable when the company closed down. The product space had a lot of opportunity and despite offering customers great services, the company ran out of funds and the board decided to close the doors permanetly.
Read More