Tuesday, August 13, 2024

## Creative and Fun Uses of Hashing (Part 1)

In this post, I’ll demonstrate a fun and creative use of hashing. Before I explain briefly what is hashing for those unfamiliar, let me just give you an overview of my original intent of this exercise. We know that hash functions will give us unique values for a given input (letters, numbers, binaries), so I […]

## Creating universal unique IDs

I wanted a way to generate an automatic but unique code or password without it being easily back-traceable and collision-proof. i.e. each time it is executed, it must generate a unique universal ID, aka UUID. Additionally, that code or password must be 8 characters long and must contain a combination of letters and numbers and […]

## Saving output from Turtle as an image (Python)

Saving output from the turtle module in Python involves a few unique steps compared to other libraries. The turtle module primarily uses the Tkinter canvas to render graphics, and saving these drawings typically requires converting the canvas to a PostScript file using the postscript() method. This file can then be converted to more common image […]

## Given 4 numbers and a resulting number, create the equation to solve

You’re given four numbers and a result. You are supposed to create an equation with those four numbers that yield that given/desired result. Easy enough. Yeah, right! That’s the kind of puzzles some newspapers are running to challenge the readers as in Epoch Times et al. This is commonly referred to as the 4Numbers game. […]

## How to calculate streaks in Excel

Streaks refer to trends in the data. These can be linear, exponential, damped, seasonal, irregular/random, stationary, or cyclical. Streaks are important for several reasons: There isn’t any built-in function in Excel for calculating streaks, but there different ways we can make Excel do some of that heavy-lifting by using a combination of functions such as […]

## What’s Your Chart Signature? Graphing a name in Excel

Have you ever wondered: how does my name look like if plotted in Excel? Well, wonder no more. In this post, I’ll show you how to enter any name (or any string of characters) and plot it in dynamically to make your unique name come alive as a chart. To make it fully dynamic, I […]

## Sorting, grouping, defragging…a visual working demo

Watching a sorting, grouping, or just a defragmentation process graphically is both educational and curiously satisfying. So, I created a Python script that sorts a set of randomly placed, randomly colored, ungrouped tiles on a board by colors so that all like-colored tiles are placed consecutively, adjacently. Think of it like the good old Windows […]

## How much does it cost to retire in each state?

Recently, I collected data on cost of living, and average longevity in every state + D.C. From the data, I derived the COLI, or Cost of Living Index, which is then normalized to 100 (where 100 represents the national average cost of living). Additionally, using data from Bureau of Labor Statistics (BLS), I populated by […]