The earliest memory I have of ‘programming’ is in the early/mid 90s when my father brought home a computer from work. We could play games on it … so of course I took the spreadsheet program he used (LOTUS 123, did I date myself with that?) and tried to modify it to print out a helpful message for him. It … halfway worked? At least I could undo it so he could get back to work…

After that, I picked up programming for real in QBASIC (I still have a few of those programs lying around), got my own (junky) Linux desktop from my cousin, tried to learn VBasic (without a Windows machine), and eventually made it to high school… In college, I studied computer science and mathematics, mostly programming in Java/.NET, although with a bit of everything in the mix. A few of my oldest programming posts on this blog are from that time.

After that, on to grad school! Originally, I was going to study computational linguistics, but that fell through. Then programming languages (the school’s specialty). And finally I ended up studying censorship and computer security. That’s about where I am today!

But really, I still have a habit of doing a little bit of everything. Whatever seems interesting at the time!

Ordering Board Game Geek GeekLists by Rank

A quick script.

I play a lot of board games. With the whole COVID-19 mess, I’ve been playing a lot on Board Game Arena, which is a wonderful site. But one thing that’s a bit lacking is having ratings / metadata about games to great games I’ve just not heard about before. Where can you get lots of that data? Board Game Geek!

The problem though, is merging the two. So, how do we do it? Well, this time around, I’m going to start with this GeekList that someone else maintains of BGA games on BGG. Which has the games, but no ranks. And apparently there are no ways to rank those by BGG (for some reason). But that’s easy when you know a bit of scripting!

read more...


Generating a Book Bingo Chart in Hugo

Another r/Fantasy 2021 Book Bingo post! How in the world am I generating this (updating) chart in Hugo?

2021 Book Bingo

Attack on Titan, Vol. 1

(Hard Mode)


5 SFF Short Stories (Hard: An entire anthology or collection)

The Poppy War

(Hard Mode)


Set in Asia (Hard: by an Asian author)

The Changeling

(Hard Mode)


r/Fantasy A to Z Genre Guide (Hard: by a BIPOC author)

The House in the Cerulean Sea

(Hard Mode)


Found Family (Hard: featuring an LGBTQ+ character)

The Scorpio Races

(Hard Mode)


First person POV (Hard: Multiple)

The Wyrmling Horde

r/Fantasy Book Club (Hard: with participation)

Replaced with: Sequel: Not the First Book in the Series (2017)

The Borrowers Afield

(Hard Mode)


New to you author (Hard: haven’t heard much about)

Mexican Gothic

(Hard Mode)


Gothic Fantasy (Hard: not in the Book Riot article)

Transmetropolitan, Vol. 1: Back on the Street

(Hard Mode)


Backlist book (Hard: published before 2000)

Red Sister

(Hard Mode)


Revenge-seeking character (Hard: revenge as the major book plot)

Six Wakes

(Hard Mode)


Mystery plot (Hard: not primary world urban fantasy)

Wild Sign

(Hard Mode)


Comfort read (Hard: that isn’t a reread)

Tales of Nezura: Book 1: The Zevolra

(Hard Mode)


Debut novel (Hard: published in 2021)

Hellblazer, Vol. 1: Original Sins

(Hard Mode)


Cat squasher (500+ pages; Hard: 800+ pages)

Daemon Voices

(Hard Mode)


SFF-related nonfiction (Hard: published in the last 5 years)

Cece Rios and the Desert of Souls

(Hard Mode)


Latinx or Latin American author (Hard: with fewer than 1000 Goodreads ratings)

Black Rain and Paper Cranes

(Hard Mode)


Self published (Hard: with fewer than 50 Goodreads ratings)

Annihilation

(Hard Mode)


Forest setting (Hard: for the entire book)

Gideon the Ninth

(Hard Mode)


Genre mashup (Hard: of three or more genres)

The Midnight Library

(Hard Mode)


Has chapter titles of more than one word (Hard: for every chapter)

An Alchemy of Masques and Mirrors

(Hard Mode)


___ of ___ (Hard: and ___)

Project Hail Mary

(Hard Mode)


First contact (Hard: that doesn’t lead to war)

Black Sun

Trans or Nonbinary (Hard: protagonist)

The Long Way to a Small, Angry Planet

(Hard Mode)


Debut author (Hard: with an AMA)

A Great and Terrible Beauty

(Hard Mode)


Witches (Hard: as the main protagonist)

read more...


A Generic Brute Force Backtracking Solver

One of the projects I’ve had vaguely in the back of my head is a sort of generic puzzle solver. I really love puzzles, but of the pencil and paper and video game varieties. So I think it would be awesome to write out a definition of a puzzle (say how to play Sudoku), give it input, and have it give me an answer back.

Well, I finally got around to trying it!

read more...


Categorizing r/Fantasy Book Bingo Books

I’ve been working through the r/Fantasy 2021 Book Bingo this year:

2021 Book Bingo

Attack on Titan, Vol. 1

(Hard Mode)


5 SFF Short Stories (Hard: An entire anthology or collection)

The Poppy War

(Hard Mode)


Set in Asia (Hard: by an Asian author)

The Changeling

(Hard Mode)


r/Fantasy A to Z Genre Guide (Hard: by a BIPOC author)

The House in the Cerulean Sea

(Hard Mode)


Found Family (Hard: featuring an LGBTQ+ character)

The Scorpio Races

(Hard Mode)


First person POV (Hard: Multiple)

The Wyrmling Horde

r/Fantasy Book Club (Hard: with participation)

Replaced with: Sequel: Not the First Book in the Series (2017)

The Borrowers Afield

(Hard Mode)


New to you author (Hard: haven’t heard much about)

Mexican Gothic

(Hard Mode)


Gothic Fantasy (Hard: not in the Book Riot article)

Transmetropolitan, Vol. 1: Back on the Street

(Hard Mode)


Backlist book (Hard: published before 2000)

Red Sister

(Hard Mode)


Revenge-seeking character (Hard: revenge as the major book plot)

Six Wakes

(Hard Mode)


Mystery plot (Hard: not primary world urban fantasy)

Wild Sign

(Hard Mode)


Comfort read (Hard: that isn’t a reread)

Tales of Nezura: Book 1: The Zevolra

(Hard Mode)


Debut novel (Hard: published in 2021)

Hellblazer, Vol. 1: Original Sins

(Hard Mode)


Cat squasher (500+ pages; Hard: 800+ pages)

Daemon Voices

(Hard Mode)


SFF-related nonfiction (Hard: published in the last 5 years)

Cece Rios and the Desert of Souls

(Hard Mode)


Latinx or Latin American author (Hard: with fewer than 1000 Goodreads ratings)

Black Rain and Paper Cranes

(Hard Mode)


Self published (Hard: with fewer than 50 Goodreads ratings)

Annihilation

(Hard Mode)


Forest setting (Hard: for the entire book)

Gideon the Ninth

(Hard Mode)


Genre mashup (Hard: of three or more genres)

The Midnight Library

(Hard Mode)


Has chapter titles of more than one word (Hard: for every chapter)

An Alchemy of Masques and Mirrors

(Hard Mode)


___ of ___ (Hard: and ___)

Project Hail Mary

(Hard Mode)


First contact (Hard: that doesn’t lead to war)

Black Sun

Trans or Nonbinary (Hard: protagonist)

The Long Way to a Small, Angry Planet

(Hard Mode)


Debut author (Hard: with an AMA)

A Great and Terrible Beauty

(Hard Mode)


Witches (Hard: as the main protagonist)

read more...


Partitioning a Linked List

One more fairly standard tech interview problem (for better or for worse, you’re likely to see one of these if you go for a programming job):

Given a linked list and an element x. Partition the list so that all elements less than x are before elements greater than or equal to x, but do not otherwise change the order of the elements.

read more...


Dynamic Programming over a Matrix

Another LeetCode problem. Given an MxN matrix of numbers, find the longest path of strictly increasing numbers. So for example in this matrix: 994 668 211 You can start with the 1 in the bottom center, go left to the two, then up to the 6, and 9. That’s the longest path, so return a 4. In this 3x3 case, it’s really easy to just brute force.

read more...


Phone Words--In English!

Okay, let’s take this one step further. Rather than generating just phone words, let’s actually generate phone words. Someone has provided a list of words in English as a package, so we’ll add a filter to add that to our comprehension: from english_words import english_words_set def letterCombinations(self, digits: str) -> List[str]: if not digits: return [] letters = { '1': '', '2': 'abc', '3': 'def', '4': 'ghi', '5': 'jkl', '6': 'mno', '7': 'pqrs', '8': 'tuv', '9': 'wxyz', '0': ' ', } return [ word for product in itertools.

read more...


Phone Words

Working through a few problems on LeetCode. I haven’t quite decided what I think of the site, but it’s a fun way to play with simple algorithms. Figured I might as well write up any I find interesting.

First interesting problem:

Given a standard lettered keypad, generate all words from a given phone number.

read more...


A quick ruby DSL for creating L-Systems

L-Systems are pretty awesome. With only a bare few rules, you can turn something like this:

LSystem.new("Barnsley Fern") do
    start "+++X"

    rule "X", "F+[[X]-X]-F[-FX]+X" 
    rule "F", "FF"

    terminal "F" do forward end
    terminal "[" do push end
    terminal "]" do pop end
    terminal "-" do rotate -25 end
    terminal "+" do rotate +25 end
end

Into this:

read more...


A Tabbed View for Hugo

One thing I’ve been using for a lot of my recent posts (such as Backtracking Worms) is a tabbed view of code that can show arbitrarily tabs full of code or other content and render them wonderfully! For example, we can turn: {{< tabs >}} {{< sourcetab ruby "examples/art-station.rune" >}} {{< tab "art-station.svg" >}} {{< include "output/art-station.svg" >}} {{< /tab >}} {{< sourcetab ruby "examples/astrology-and-moons.rune" >}} {{< tab "astrology-and-moons.svg" >}} {{< include "output/astrology-and-moons.

read more...