RSSAmplifier

Blog

Justin Meiners Site

Welcome to my personal site about programming, math, and philosophy!

jmeiners.comRSS feed ↗47 posts

Latest posts

Take your time

Take your time 11/24/2025 I’m someone who likes to work a little slower, explore a subject in-depth, and always go back to basics. If you’re reading this, you probably appreciate a similar craftsmen -like approach, and often find good ideas, overlooked by popular trends. Craftsmen correctly identify that true principles and skills that don’t change. This helps them see past the…

Water Hammer Arrestor

Water Hammer Arrestor 08/02/25 I’m back with another house maintenance project (and not talking about computer technology). My irrigation system has been making awful water hammer noises. It’s so bad, that I haven’t felt comfortable watering my lawn, due to fear of damaging the plumbing. Here are the symptoms of my problem: Only occurs when a valve opens, not when it closes.…

Replacing hardboard siding

Replacing hardboard siding 06/21/2025 This summer I replaced part of the siding on my 1970s house in Boulder. The project turned out great, better than I hoped! While planning, I had a hard time finding good information about the techniques and materials used for this style of home. This video gave me confidence that I could do it, but lacked a lot of detail, especially in regards to possible…

Combat Robot

Combat Robot 04/05/2025 As a kid, I loved getting books from the library about combat robots. I was always interested in tools and building things, but the idea of making a robot was just a little more exciting than making furniture. Learning about robots introduced me to new building techniques, but unfortunately actually making a combat robot, was just not very accessible at the time. Welding?…

Building Scanning Patents

Building Scanning Patents At a previous startup, I invented an Augmented Reality (AR) system for scanning buildings, and automatically extracting floor plans from scans. Recently a few of the patents I wrote were published, and I wanted to share those, with a brief summary. Capturing Environmental Features Using 2D and 3D Scans US-11989895-B2 This describes an augmented reality workflow for…

Thinking styles from math

Thinking styles from math 11/18/2022 A surprising lesson I learned from graduate school is that math is just very different than everything else I have tried learning in the past. It has it’s own style of thinking that has become my primary method for solving hard problems. But, coming from a background in professional software development for years before, I expected a lot more of my core…

Iterating grid cell neighbors

Iterating grid cell neighbors 10/27/22 Suppose we need to iterate over the neighbors of a cell in a 2D grid: * * * * - * * * * This can be done with the following well known pattern: void all_neighbors() { for (int i = -1; i <= 1; ++i) { for (int j = -1; j <= 1; ++j) { if (i == 0 && j == 0) continue; std::cout << i << ", " << j << std::endl; } } } But what if we just want to iterate the horizontal…

Volcano Drop (js13kgames entry)

The Quake entity system: shell scripting for games

The Quake entity system: shell scripting for games By: Justin Meiners 07/20/2022 The Quake Engine has had an incredible influence on game technology. It was heavily licensed, including hit titles like Half-Life, Call of Duty, and Star Wars: Jedi Knights. Perhaps most impactful is the many developers who learned to make games by modding it, and brought its principles to other studios and engines.…

A simple mesh adjacency data structure

A simple mesh adjacency data structure 06/25/2022 Do you need a mesh adjacency structure? Are you considering implementing half edge or bmesh ? Here is a trick to consider first, that may save you some energy. Take your mesh&rsquo;s indices array and reverse it: // f -> v uint32_t *index_to_vert = indices; // v -> f: multimap<uint32_t, uint32_t> vert_to_index; for (size_t i = 0; i < index_count;…

Why Train When You Can Optimize?

Learn multi-variable optimization by creating a drawing assistant. No deep learning required!

Literate programming is much more than commenting code

Literate programming is much more than commenting code 03/07/22 Most programmers haven&rsquo;t heard of literate programming , and the few that have tend to think it means writing a lot of comments around your code. However, simply explaining code with prose, does not constitute literate programming. Consider the following quote from it&rsquo;s inventor: Some of my major programs could not have…

Deploying Common Lisp Scripts

Deploying Common Lisp Scripts 3/05/22 Do you want a Common Lisp workflow like Python or Perl? No dumping images, or complex deployments. Just install a single lisp interpreter on your computer ( /usr/local/bin/sbcl ) and write, run, and share source files. I&rsquo;ve done a lot of research and I&rsquo;m here to explain how to get exactly that. A step in the right direction is a .lisp file with an…

Classic Colors

Paint program for Unix. Inspired by MS Paint (Windows 95-98).

Efficient Programming with Components

Almost Solving the Halting Problem

Almost Solving the Halting Problem By: Justin Meiners The halting problem is to devise a method that can determine whether a given Turing machine terminates in a finite amount of time. It is well-known to be undecidable; no such method exists. Naturally, if you ever write a proof that implies how to solve it, there is reason for concern. In doing research for my master&rsquo;s thesis,…

Swift Proposal: Balanced Binary Reduction

Swift Proposal: Balanced Binary Reduction By: Justin Meiners 06/14/2021 Introduction Swift&rsquo;s reduce can be used to accumulate elements in a sequence. For example: [1.0, 2.0, 3.0, 4.0].reduce(0.0, +) If we visualize the expression tree for this operation it&rsquo;s essentially linear. You can think of it as a binary tree which is completely unbalanced. -----3.0----6.0---10.0 / / / / 1.0 2.0…

Three Myths about Passive Investing

Three Myths about Passive Investing 5/3/2021 Stock markets are at tremendous highs, not only in absolute price, but also in terms of earnings yield . At the same time we see unsophisticated participants taking incredible risks in Robinhood, Gamestop, Dogecoin, and Tesla, indicating a public excitement alongside the financial metrics. So is the top in? Seasoned passive investor should be amused by…

Master's Thesis: Computing the Rank of Braids

Advent of Code 2020 Day 18: Rethinking Operator Precedence

Advent of Code 2020 Day 18: Rethinking Operator Precedence 12/27/20 Part 2 of AOC Day 18 asks you to evaluate some math expressions, but with a twist. + has a greater operator precedence than * . (This is opposite of how we typically read math): 2 * 3 + (4 * 5) 2 * 3 + 20 2 * 23 46 The standard method for expression evaluation is the shunting yard algorithm. This is the right and efficient way to…

Advent of Code 2020 Day 19: An Easy way to do Part 2

Advent of Code 2020 Day 19: An Easy way to do Part 2 12/19/20 A fun mechanic in AOC is that the problem is divided into two parts, with the second only revealed after completion of the first. This challenges you to adapt an initial solution to new requirements, encouraging flexibility of design. In the case of problem 19 , a seemingly minor change, completely transforms the requirements. It may…

The Universal Property of Quotients

The Universal Property of Quotients 11/15/20 The first time you encounter a theorem concluding with &ldquo;an arrow that makes the diagram commute&rdquo; can be quite confusing. But with a little thought you can typically find that the idea expressed the theorem is obvious. The provided arrow is simply the one thing that could possibly fit. It may be tedious to construct, but understanding the…

Questioning Probability

Questioning Probability 10/8/20 Are Elections Actually Random? A popular narrative explaining the outcome of the 2016 election is Hilary Clinton was just unlucky. On election night, the odds were in her favor, but when the dice were cast she unfortunately rolled snake eyes. In a weird way, if the election were just run another day, she would win. The underlying assumption is that elections are…

Understanding LINQ GroupBy

Understanding LINQ GroupBy 09/26/20 As a C# programmer, you are probably familiar with Select , Where , and Aggregate , the LINQ equivalents of the fundamental functional programming operations map , filter , and reduce . GroupBy is an equally useful function, which you may be less familiar with, but should definitely learn about. It solves the following problem: Given a list of items, partition…

Boring Benefits of Lisp

Boring Benefits of Lisp 10/07/20 Lisp advocates are famous for having elaborate reasons for why Lisp is their favorite language. You might have heard that it&rsquo;s the most powerful language , thanks to features like macros , first class functions, and homioconicity . Certainly, Lisp has no shortage of beautiful and influential ideas. But, almost every modern language has copied it&rsquo;s most…

10 Hard Decisions: A Model for Programmer Productivity

10 Hard Decisions: A Model for Programmer Productivity 09/26/20 How do you ensure that programmers are using time effectively? What can you do to help them be productive? Managers think a lot about these questions. But too often they get the answers wrong despite being very earnest and smart. This is because they have an unexamined mental model of how programming work is actually done. With an…

Keeping Up-to-date

Keeping Up-to-date 1/23/2020 The software industry is synonmous with rapid innovation. New discoveries require changing to better ways of doing things. For programmers to stay relevant they need to constantly keep up on the latest technologies, otherwise their skills will go out of date. At least, that&rsquo;s what I&rsquo;ve been told, but the more I study computer science from 50 years ago, the…

MultiplyPoint3x4 in Unity

MultiplyPoint3x4 in Unity 01/21/2020 What is the difference between MultiplyPoint and MultiplyPoint3x4 in Unity3D? What steps of a matrix multiplication could Unity possibly be skipping to make an optimization? The optimization is possible because a scaling and rotation needs only a 3x3 matrix and another vector for the translation, so part of the full 4x4 matrix is unused and can be ignored. Here…

Write Your Own Proof-of-Work Blockchain

Think in Math. Write in Code.

Think in Math. Write in Code. 6/8/19 Programmers love to discuss programming languages. We not only debate their technical merits and aesthetic qualities, but they become integrated into our personal identities, along with the values and traits that we associate with them. Some even defend a form of Linguistic Determinism that thinking is confined to what the language makes typable. Since we spend…

Notes on Vector Libraries

Notes on Vector Libraries 05/12/2019 A good vector math library is essential for graphics and simulation programming. However, implementing one that is flexible, efficient, and easy to use is difficult. Due to so many choices, experienced programmers tend to write their own to accommodate their preference. In this article I will survey a few of the most popular techniques and offer some design…

Foundation of Math Reading List

Foundation of Math Reading List 04/13/2019 One of my favorite courses in college was philosophy of language. Along with interesting philosphy it introduced me to the foundations of math project which has since become one of my favorite subjects to learn about. Some of my favorite books of all time come out of this interest. I wanted to organize a few of these into a list for others who are…

The Skills Poor Programmers Lack

The Skills Poor Programmers Lack 02/22/2019 Updated: 04/27/2020 A friend and I had a discussion about the basic skills that are often lacking in experienced programmers. How can a programmer work for ten or twenty years and never learn to write good code? Too often they need close supervision to ensure they go down the right path, and can never be trusted to take technical leadership on larger…

McCulloch & Pitts Neural Net Simulator

An Adventure in Pre-Rendered Backgrounds

Write your Own Virtual Machine

Write your own virtual machine for the LC-3 computer!

Lisp Interpreter

Spherical Harmonics

Shamans: A 3D Turn-based Strategy Game

Modern OpenGL

Modern OpenGL These are notes sent to a friend, not a formal article. I thought they might be useful for others as well. 05/01/2017 If you&rsquo;re looking for an easy way to do 3D its probably SceneKit or Unity, but I assume you want to learn how things work. Everything you know and love in OpenGL is gone. glTranslate , glLookAt , glRotate , glVertex , glLight , etc. The reasoning is that these…

HoloLens First Impressions

HoloLens First Impressions 11/10/2016 At work, I recently started on a new medical application for the Microsoft HoloLens . I don&rsquo;t follow popular technology news, and rarely get excited about new gadgets, but I feel that the HoloLens is a robust platform, with real substance beyond the usual VR gimmicks. In this article I will talk a little bit about my experience with the hardware and…

3D Paint

3D Paint 10/30/16 In 2012 I came across the paper OverCoat: An Implicit Canvas for 3D Painting which describes a technique for creating 3D models using traditional painting methods. At the time I didn&rsquo;t have sufficient mathematical knowledge to understand all of the technical details described, but I picked up the general idea and wrote my own rough implementation. This article explains how…

Old Artwork

Old Artwork 10/15/2015 I am not much of a visual artist, but I still enjoy 3D modeling and animation. This page contains pictures of some of my older models I have worked on. Moon Rover Low-poly Cargo Ship Space Invader Sculpt While working at Infuse Medical, I taught a course on 3D programming with OpenGL. As part of my course we created a small space invaders clone. Another developer created the…

Old Games

Old Games 10/09/2015 I spent quite a bit of time experimenting with game technology when I was first learning how to program. I played with tons of ideas, many of which turned out to be no good, but I learned a ton about graphics and development in the process. An extremely fast minecraft clone. Written in C and OpenGL. I wrote my own lightmapper and UV unwrapper in Objective-C. A small demo for a…

C Craft

Image Sequence Streaming

iOS Color Wheel