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!

Splitting Images

I recently came across a problem where I had a single image with a transparent background containing multiple images that I wanted to split into their component parts. For example, split this:

Into these:

read more...


Crosslinks by Title in Hugo

Another quick Hugo post. One thing I miss about my previous blogging platform(s) was the ability to generate quick links between posts just by using the title of the post. So rather than this:

a cool post

This is [a cool post]({{< ref "2021-07-15-crosslinks-by-title-in-hugo" >}}), go read it.

You could do this:

This is {{< crosslink title="Crosslinks by Title in Hugo" text="a cool post" >}}.

Or shorter: {{< crosslink "Crosslinks by Title in Hugo" >}}.

And it should just work.

read more...


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

by Hajime Isayama

Hard Mode ✓


Five SFF Short Stories

Any short story as long as there are five of them.

Hard Mode: Read an entire SFF anthology or collection.

The Poppy War

by R.F. Kuang

Hard Mode ✓


Set in Asia

Any book set in Asia or an analogous fantasy setting that is based on a real-world Asian setting.

Hard Mode: Written by an Asian author.

The Changeling

by Victor LaValle

Hard Mode ✓


A Selection from the r/Fantasy A to Z Genre Guide

Any book listed in our A to Z Genre Guide.

Hard Mode: A book by a BIPOC author.

The House in the Cerulean Sea

by T.J. Klune

Hard Mode ✓


Found Family

Or as TV Tropes calls it - Family of Choice. Often not biologically related, these relationships in a group typically form through bonds of shared experiences and become as important (in some cases more) as family members.

Hard Mode: Featuring an LGBTQ+ character as a member of the found family.

The Scorpio Races

by Maggie Stiefvater

Hard Mode ✓


First Person POV

Defined as: a literary style in which the narrative is told from the perspective of a narrator speaking directly about themselves. Link for examples.

Hard Mode: There is more than one perspective, but each perspective is written in First Person.

The Wyrmling Horde

by David Farland


Book Club OR Readalong Book

Any past or active r/Fantasy book clubs count as well as past or active r/Fantasy readalongs. See our full list of book clubs here.

Hard Mode: Must read a current selection of either a book club or readalong and participate in the discussion.

The Borrowers Afield

by Mary Norton

Hard Mode ✓


New to You Author

This would be an author whose work you’ve yet to read, meaning no novel, no novella, no short fiction, etc.

Hard Mode: Not only have you never read their work before but you’ve not heard much about this author or their work before deciding to try a book by them.

Mexican Gothic

by Silvia Moreno-Garcia

Hard Mode ✓


Gothic Fantasy

Gothic Fantasy is similar to Gothic Fiction but it includes fantasy elements or settings. Gothic Fiction is “a style of writing that is characterized by elements of fear, horror, death, and gloom, as well as romantic elements, such as nature, individuality, and very high emotion. These emotions can include fear and suspense.” (Source) Here is a good ‘introductory post’ on Gothic Fantasy for further reading from Book Riot.

Hard Mode: NOT one of the ten titles listed in the Book Riot article.

Transmetropolitan, Vol. 1: Back on the Street

by Warren Ellis

Hard Mode ✓


Backlist Book

For our purposes we’re considering ‘backlist’ an author’s older titles that are not their latest published book or part of a currently running series (no further sequels announced when you read it). The author must also be a currently publishing author.

Hard Mode: Published before the year 2000.

Red Sister

by Mark Lawrence

Hard Mode ✓


Revenge-Seeking Character

Book has a character whose main motivation in the story is revenge.

Hard Mode: Revenge is central to the plot of the entire book.

Six Wakes

by Mur Lafferty

Hard Mode ✓


Mystery Plot

The main plot of the book centers around solving a mystery.

Hard Mode: Not a primary world Urban Fantasy (secondary world urban fantasy is okay!)

Wild Sign

by Patricia Briggs

Hard Mode ✓


Comfort Read

This is one of those ‘personal to you’ squares. Any book that brings you comfort while reading it. You can use a reread on this square and it WON’T count for your ‘1 reread’.

Hard Mode: Don’t use a reread, find a brand new comfort read!

Tales of Nezura: Book 1: The Zevolra

by Randall Cooper

Hard Mode ✓


Published in 2021

A book published for the first time in 2021 (no reprints or new editions).

Hard Mode: It’s also a debut novel–as in it’s the author’s first published novel.

Hellblazer, Vol. 1: Original Sins

by Jamie Delano

Hard Mode ✓


Cat Squasher: 500+ Pages

Time to go tome hunting–find a book that is over 500 pages in length.

Hard Mode: Lion Squasher - a book that is over 800 pages.

Daemon Voices

by Philip Pullman

Hard Mode ✓


SFF-Related Nonfiction

Back by popular demand! Any nonfiction book that is related to SFF. Could be a book about the history of something in SFF, writing SFF, essays from a SFF writer, etc.

Hard Mode: Published within the last five years.

Cece Rios and the Desert of Souls

by Kaela Rivera

Hard Mode ✓


Latinx or Latin American Author

Author is from Latin America or of Latinx/Hispanic heritage.

Hard Mode: Book has fewer than 1000 Goodreads ratings.

Black Rain and Paper Cranes

by R.S. Craig

Hard Mode ✓


Self-Published

Only self-published novels will count for this square. If the novel has been picked up by a publisher as long as you read it when it was self-pubbed it will still count.

Hard Mode: Self-pubbed and has fewer than 50 ratings on Goodreads.

Annihilation

by Jeff VanderMeer

Hard Mode ✓


Forest Setting

This setting must be used be for a good portion of the book.

Hard Mode: The entire book takes place in this setting.

Gideon the Ninth

by Tamsyn Muir

Hard Mode ✓


Genre Mashup

A book that utilizes major elements from two or more genres. Examples: a romance set in a fantasy world, a book that combines science fiction and fantasy, etc.

Hard Mode: Three or more genres are combined.

The Midnight Library

by Matt Haig

Hard Mode ✓


Has Chapter Titles

A book where each chapter has a title (other than numbers or just a character’s name).

Hard Mode: Chapter title is more than a single word FOR EVERY SINGLE CHAPTER

An Alchemy of Masques and Mirrors

by Curtis Craddock

Hard Mode ✓


Title: _____ of _____

The title of the book must feature the format X of Y. Example: The Harp of Kings by Juliet Marillier.

Hard Mode: _____ of ______ and ________. Format of title must be X of Y and Z.

Project Hail Mary

by Andy Weir

Hard Mode ✓


First Contact

From Wikipedia: Science Fiction about the first meeting between humans and extraterrestrial life, or of any sentient species’ first encounter with another one, given they are from different planets or natural satellites.

Hard Mode: War does not break out as a result of contact.

Black Sun

by Rebecca Roanhorse


Trans or Nonbinary Character

A book featuring a trans or nonbinary character that isn’t an alien or a robot.

Hard Mode: This character is a main protagonist.

The Long Way to a Small, Angry Planet

by Becky Chambers

Hard Mode ✓


Debut Author

An author’s debut novel or novella.

Hard Mode: The author has participated in an AMA. AMA List linked here.

A Great and Terrible Beauty

by Libba Bray

Hard Mode ✓


Witches

A book featuring witches. Note - characters practicing what is traditionally in their culture referred to as witchcraft would also count. For example brujos or brujas would count for this square.

Hard Mode: A witch is a main protagonist.

Full categories

    Five SFF Short Stories

    Any short story as long as there are five of them.

    Hard Mode: Read an entire SFF anthology or collection.

    Set in Asia

    Any book set in Asia or an analogous fantasy setting that is based on a real-world Asian setting.

    Hard Mode: Written by an Asian author.

    A Selection from the r/Fantasy A to Z Genre Guide

    Any book listed in our A to Z Genre Guide.

    Hard Mode: A book by a BIPOC author.

    Found Family

    Or as TV Tropes calls it - Family of Choice. Often not biologically related, these relationships in a group typically form through bonds of shared experiences and become as important (in some cases more) as family members.

    Hard Mode: Featuring an LGBTQ+ character as a member of the found family.

    First Person POV

    Defined as: a literary style in which the narrative is told from the perspective of a narrator speaking directly about themselves. Link for examples.

    Hard Mode: There is more than one perspective, but each perspective is written in First Person.

    Book Club OR Readalong Book

    Any past or active r/Fantasy book clubs count as well as past or active r/Fantasy readalongs. See our full list of book clubs here.

    Hard Mode: Must read a current selection of either a book club or readalong and participate in the discussion.

    New to You Author

    This would be an author whose work you’ve yet to read, meaning no novel, no novella, no short fiction, etc.

    Hard Mode: Not only have you never read their work before but you’ve not heard much about this author or their work before deciding to try a book by them.

    Gothic Fantasy

    Gothic Fantasy is similar to Gothic Fiction but it includes fantasy elements or settings. Gothic Fiction is “a style of writing that is characterized by elements of fear, horror, death, and gloom, as well as romantic elements, such as nature, individuality, and very high emotion. These emotions can include fear and suspense.” (Source) Here is a good ‘introductory post’ on Gothic Fantasy for further reading from Book Riot.

    Hard Mode: NOT one of the ten titles listed in the Book Riot article.

    Backlist Book

    For our purposes we’re considering ‘backlist’ an author’s older titles that are not their latest published book or part of a currently running series (no further sequels announced when you read it). The author must also be a currently publishing author.

    Hard Mode: Published before the year 2000.

    Revenge-Seeking Character

    Book has a character whose main motivation in the story is revenge.

    Hard Mode: Revenge is central to the plot of the entire book.

    Mystery Plot

    The main plot of the book centers around solving a mystery.

    Hard Mode: Not a primary world Urban Fantasy (secondary world urban fantasy is okay!)

    Comfort Read

    This is one of those ‘personal to you’ squares. Any book that brings you comfort while reading it. You can use a reread on this square and it WON’T count for your ‘1 reread’.

    Hard Mode: Don’t use a reread, find a brand new comfort read!

    Published in 2021

    A book published for the first time in 2021 (no reprints or new editions).

    Hard Mode: It’s also a debut novel–as in it’s the author’s first published novel.

    Cat Squasher: 500+ Pages

    Time to go tome hunting–find a book that is over 500 pages in length.

    Hard Mode: Lion Squasher - a book that is over 800 pages.

    SFF-Related Nonfiction

    Back by popular demand! Any nonfiction book that is related to SFF. Could be a book about the history of something in SFF, writing SFF, essays from a SFF writer, etc.

    Hard Mode: Published within the last five years.

    Latinx or Latin American Author

    Author is from Latin America or of Latinx/Hispanic heritage.

    Hard Mode: Book has fewer than 1000 Goodreads ratings.

    Self-Published

    Only self-published novels will count for this square. If the novel has been picked up by a publisher as long as you read it when it was self-pubbed it will still count.

    Hard Mode: Self-pubbed and has fewer than 50 ratings on Goodreads.

    Forest Setting

    This setting must be used be for a good portion of the book.

    Hard Mode: The entire book takes place in this setting.

    Genre Mashup

    A book that utilizes major elements from two or more genres. Examples: a romance set in a fantasy world, a book that combines science fiction and fantasy, etc.

    Hard Mode: Three or more genres are combined.

    Has Chapter Titles

    A book where each chapter has a title (other than numbers or just a character’s name).

    Hard Mode: Chapter title is more than a single word FOR EVERY SINGLE CHAPTER

    Title: _____ of _____

    The title of the book must feature the format X of Y. Example: The Harp of Kings by Juliet Marillier.

    Hard Mode: _____ of ______ and ________. Format of title must be X of Y and Z.

    First Contact

    From Wikipedia: Science Fiction about the first meeting between humans and extraterrestrial life, or of any sentient species’ first encounter with another one, given they are from different planets or natural satellites.

    Hard Mode: War does not break out as a result of contact.

    Trans or Nonbinary Character

    A book featuring a trans or nonbinary character that isn’t an alien or a robot.

    Hard Mode: This character is a main protagonist.

    Debut Author

    An author’s debut novel or novella.

    Hard Mode: The author has participated in an AMA. AMA List linked here.

    Witches

    A book featuring witches. Note - characters practicing what is traditionally in their culture referred to as witchcraft would also count. For example brujos or brujas would count for this square.

    Hard Mode: A witch is a 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

by Hajime Isayama

Hard Mode ✓


Five SFF Short Stories

Any short story as long as there are five of them.

Hard Mode: Read an entire SFF anthology or collection.

The Poppy War

by R.F. Kuang

Hard Mode ✓


Set in Asia

Any book set in Asia or an analogous fantasy setting that is based on a real-world Asian setting.

Hard Mode: Written by an Asian author.

The Changeling

by Victor LaValle

Hard Mode ✓


A Selection from the r/Fantasy A to Z Genre Guide

Any book listed in our A to Z Genre Guide.

Hard Mode: A book by a BIPOC author.

The House in the Cerulean Sea

by T.J. Klune

Hard Mode ✓


Found Family

Or as TV Tropes calls it - Family of Choice. Often not biologically related, these relationships in a group typically form through bonds of shared experiences and become as important (in some cases more) as family members.

Hard Mode: Featuring an LGBTQ+ character as a member of the found family.

The Scorpio Races

by Maggie Stiefvater

Hard Mode ✓


First Person POV

Defined as: a literary style in which the narrative is told from the perspective of a narrator speaking directly about themselves. Link for examples.

Hard Mode: There is more than one perspective, but each perspective is written in First Person.

The Wyrmling Horde

by David Farland


Book Club OR Readalong Book

Any past or active r/Fantasy book clubs count as well as past or active r/Fantasy readalongs. See our full list of book clubs here.

Hard Mode: Must read a current selection of either a book club or readalong and participate in the discussion.

The Borrowers Afield

by Mary Norton

Hard Mode ✓


New to You Author

This would be an author whose work you’ve yet to read, meaning no novel, no novella, no short fiction, etc.

Hard Mode: Not only have you never read their work before but you’ve not heard much about this author or their work before deciding to try a book by them.

Mexican Gothic

by Silvia Moreno-Garcia

Hard Mode ✓


Gothic Fantasy

Gothic Fantasy is similar to Gothic Fiction but it includes fantasy elements or settings. Gothic Fiction is “a style of writing that is characterized by elements of fear, horror, death, and gloom, as well as romantic elements, such as nature, individuality, and very high emotion. These emotions can include fear and suspense.” (Source) Here is a good ‘introductory post’ on Gothic Fantasy for further reading from Book Riot.

Hard Mode: NOT one of the ten titles listed in the Book Riot article.

Transmetropolitan, Vol. 1: Back on the Street

by Warren Ellis

Hard Mode ✓


Backlist Book

For our purposes we’re considering ‘backlist’ an author’s older titles that are not their latest published book or part of a currently running series (no further sequels announced when you read it). The author must also be a currently publishing author.

Hard Mode: Published before the year 2000.

Red Sister

by Mark Lawrence

Hard Mode ✓


Revenge-Seeking Character

Book has a character whose main motivation in the story is revenge.

Hard Mode: Revenge is central to the plot of the entire book.

Six Wakes

by Mur Lafferty

Hard Mode ✓


Mystery Plot

The main plot of the book centers around solving a mystery.

Hard Mode: Not a primary world Urban Fantasy (secondary world urban fantasy is okay!)

Wild Sign

by Patricia Briggs

Hard Mode ✓


Comfort Read

This is one of those ‘personal to you’ squares. Any book that brings you comfort while reading it. You can use a reread on this square and it WON’T count for your ‘1 reread’.

Hard Mode: Don’t use a reread, find a brand new comfort read!

Tales of Nezura: Book 1: The Zevolra

by Randall Cooper

Hard Mode ✓


Published in 2021

A book published for the first time in 2021 (no reprints or new editions).

Hard Mode: It’s also a debut novel–as in it’s the author’s first published novel.

Hellblazer, Vol. 1: Original Sins

by Jamie Delano

Hard Mode ✓


Cat Squasher: 500+ Pages

Time to go tome hunting–find a book that is over 500 pages in length.

Hard Mode: Lion Squasher - a book that is over 800 pages.

Daemon Voices

by Philip Pullman

Hard Mode ✓


SFF-Related Nonfiction

Back by popular demand! Any nonfiction book that is related to SFF. Could be a book about the history of something in SFF, writing SFF, essays from a SFF writer, etc.

Hard Mode: Published within the last five years.

Cece Rios and the Desert of Souls

by Kaela Rivera

Hard Mode ✓


Latinx or Latin American Author

Author is from Latin America or of Latinx/Hispanic heritage.

Hard Mode: Book has fewer than 1000 Goodreads ratings.

Black Rain and Paper Cranes

by R.S. Craig

Hard Mode ✓


Self-Published

Only self-published novels will count for this square. If the novel has been picked up by a publisher as long as you read it when it was self-pubbed it will still count.

Hard Mode: Self-pubbed and has fewer than 50 ratings on Goodreads.

Annihilation

by Jeff VanderMeer

Hard Mode ✓


Forest Setting

This setting must be used be for a good portion of the book.

Hard Mode: The entire book takes place in this setting.

Gideon the Ninth

by Tamsyn Muir

Hard Mode ✓


Genre Mashup

A book that utilizes major elements from two or more genres. Examples: a romance set in a fantasy world, a book that combines science fiction and fantasy, etc.

Hard Mode: Three or more genres are combined.

The Midnight Library

by Matt Haig

Hard Mode ✓


Has Chapter Titles

A book where each chapter has a title (other than numbers or just a character’s name).

Hard Mode: Chapter title is more than a single word FOR EVERY SINGLE CHAPTER

An Alchemy of Masques and Mirrors

by Curtis Craddock

Hard Mode ✓


Title: _____ of _____

The title of the book must feature the format X of Y. Example: The Harp of Kings by Juliet Marillier.

Hard Mode: _____ of ______ and ________. Format of title must be X of Y and Z.

Project Hail Mary

by Andy Weir

Hard Mode ✓


First Contact

From Wikipedia: Science Fiction about the first meeting between humans and extraterrestrial life, or of any sentient species’ first encounter with another one, given they are from different planets or natural satellites.

Hard Mode: War does not break out as a result of contact.

Black Sun

by Rebecca Roanhorse


Trans or Nonbinary Character

A book featuring a trans or nonbinary character that isn’t an alien or a robot.

Hard Mode: This character is a main protagonist.

The Long Way to a Small, Angry Planet

by Becky Chambers

Hard Mode ✓


Debut Author

An author’s debut novel or novella.

Hard Mode: The author has participated in an AMA. AMA List linked here.

A Great and Terrible Beauty

by Libba Bray

Hard Mode ✓


Witches

A book featuring witches. Note - characters practicing what is traditionally in their culture referred to as witchcraft would also count. For example brujos or brujas would count for this square.

Hard Mode: A witch is a main protagonist.

Full categories

    Five SFF Short Stories

    Any short story as long as there are five of them.

    Hard Mode: Read an entire SFF anthology or collection.

    Set in Asia

    Any book set in Asia or an analogous fantasy setting that is based on a real-world Asian setting.

    Hard Mode: Written by an Asian author.

    A Selection from the r/Fantasy A to Z Genre Guide

    Any book listed in our A to Z Genre Guide.

    Hard Mode: A book by a BIPOC author.

    Found Family

    Or as TV Tropes calls it - Family of Choice. Often not biologically related, these relationships in a group typically form through bonds of shared experiences and become as important (in some cases more) as family members.

    Hard Mode: Featuring an LGBTQ+ character as a member of the found family.

    First Person POV

    Defined as: a literary style in which the narrative is told from the perspective of a narrator speaking directly about themselves. Link for examples.

    Hard Mode: There is more than one perspective, but each perspective is written in First Person.

    Book Club OR Readalong Book

    Any past or active r/Fantasy book clubs count as well as past or active r/Fantasy readalongs. See our full list of book clubs here.

    Hard Mode: Must read a current selection of either a book club or readalong and participate in the discussion.

    New to You Author

    This would be an author whose work you’ve yet to read, meaning no novel, no novella, no short fiction, etc.

    Hard Mode: Not only have you never read their work before but you’ve not heard much about this author or their work before deciding to try a book by them.

    Gothic Fantasy

    Gothic Fantasy is similar to Gothic Fiction but it includes fantasy elements or settings. Gothic Fiction is “a style of writing that is characterized by elements of fear, horror, death, and gloom, as well as romantic elements, such as nature, individuality, and very high emotion. These emotions can include fear and suspense.” (Source) Here is a good ‘introductory post’ on Gothic Fantasy for further reading from Book Riot.

    Hard Mode: NOT one of the ten titles listed in the Book Riot article.

    Backlist Book

    For our purposes we’re considering ‘backlist’ an author’s older titles that are not their latest published book or part of a currently running series (no further sequels announced when you read it). The author must also be a currently publishing author.

    Hard Mode: Published before the year 2000.

    Revenge-Seeking Character

    Book has a character whose main motivation in the story is revenge.

    Hard Mode: Revenge is central to the plot of the entire book.

    Mystery Plot

    The main plot of the book centers around solving a mystery.

    Hard Mode: Not a primary world Urban Fantasy (secondary world urban fantasy is okay!)

    Comfort Read

    This is one of those ‘personal to you’ squares. Any book that brings you comfort while reading it. You can use a reread on this square and it WON’T count for your ‘1 reread’.

    Hard Mode: Don’t use a reread, find a brand new comfort read!

    Published in 2021

    A book published for the first time in 2021 (no reprints or new editions).

    Hard Mode: It’s also a debut novel–as in it’s the author’s first published novel.

    Cat Squasher: 500+ Pages

    Time to go tome hunting–find a book that is over 500 pages in length.

    Hard Mode: Lion Squasher - a book that is over 800 pages.

    SFF-Related Nonfiction

    Back by popular demand! Any nonfiction book that is related to SFF. Could be a book about the history of something in SFF, writing SFF, essays from a SFF writer, etc.

    Hard Mode: Published within the last five years.

    Latinx or Latin American Author

    Author is from Latin America or of Latinx/Hispanic heritage.

    Hard Mode: Book has fewer than 1000 Goodreads ratings.

    Self-Published

    Only self-published novels will count for this square. If the novel has been picked up by a publisher as long as you read it when it was self-pubbed it will still count.

    Hard Mode: Self-pubbed and has fewer than 50 ratings on Goodreads.

    Forest Setting

    This setting must be used be for a good portion of the book.

    Hard Mode: The entire book takes place in this setting.

    Genre Mashup

    A book that utilizes major elements from two or more genres. Examples: a romance set in a fantasy world, a book that combines science fiction and fantasy, etc.

    Hard Mode: Three or more genres are combined.

    Has Chapter Titles

    A book where each chapter has a title (other than numbers or just a character’s name).

    Hard Mode: Chapter title is more than a single word FOR EVERY SINGLE CHAPTER

    Title: _____ of _____

    The title of the book must feature the format X of Y. Example: The Harp of Kings by Juliet Marillier.

    Hard Mode: _____ of ______ and ________. Format of title must be X of Y and Z.

    First Contact

    From Wikipedia: Science Fiction about the first meeting between humans and extraterrestrial life, or of any sentient species’ first encounter with another one, given they are from different planets or natural satellites.

    Hard Mode: War does not break out as a result of contact.

    Trans or Nonbinary Character

    A book featuring a trans or nonbinary character that isn’t an alien or a robot.

    Hard Mode: This character is a main protagonist.

    Debut Author

    An author’s debut novel or novella.

    Hard Mode: The author has participated in an AMA. AMA List linked here.

    Witches

    A book featuring witches. Note - characters practicing what is traditionally in their culture referred to as witchcraft would also count. For example brujos or brujas would count for this square.

    Hard Mode: A witch is a 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. Calculate all possible paths.

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...