It’s time for my annual self review. In last year’s review[1] I said I wanted to improve my site:
- fix broken links
- organize with tags
- improve search
- post to my site instead of to social media
- move project tracking to my own site
I didn’t have any specific goals for writing articles or topics to learn. So what did I do? The biggest thing is that I’m blogging more than in recent years:
Site management
Changes to Twitter and Reddit in recent years have made me think about how I share knowledge. When I share something, I want it to be readable by everyone, forever. I don’t want it to be readable only to “members” or “subscribers”, like Quora or Medium. I had posted to some of these sites because they were open. But they’re sometimes closed now, requiring a login to view what I posted.
My web site has been up for 30 years. The Lindy Effect[3] suggests that what I post to my own site will last longer than what I post to Google+, FriendFeed, MySpace, Reddit, or Twitter. I don’t expect Mastodon, Threads, or Bluesky to be up forever either. The article Don’t Build Your Castle in Other People’s Kingdoms[4] recommends I focus on my own site. But while my own site is easy to post to, my blog hosted by Blogger is not.
I want to make blogging easier for me. I looked at my options for blogging software[5], and concluded that my web site already supports many of the things I need for a blog. So I decided to write my own blogging software. How hard could it be? Famous last words, right? It’s foolish in the same way as “write a game, not a game engine”.
But it actually went pretty well! I only had to support the features needed for my own blog, not for everyone’s blogs. I didn’t need it to scale. I could reuse the existing features I have built for my web site. There are still some features I want to add, but I think I got 80% of what I wanted in <200 lines of Python.
I made it easier to post to my blog, and I posted a lot more this year than in the previous few years. I’m happy about this.
New pages
I sometimes pair a “theory” page with an “implementation” page. The A* theory page describes the algorithms and the A* implementation page describes how to implement them. The Hexagons theory page describes the math and algorithms and the Hexagons implementation page describes how to implement them.
Last year, I studied mouse+touch drag events in the browser[6] and then wrote up a theory page with my recommendations for how to handle the browser events. I claimed that the way I structured the code led to a lot of flexibility in how to handle UI state. This year I made an implementation page with lots of runnable examples showing that flexibility. I show basic dragging, constraints, snapping, svg vs div vs canvas, handles, scrubbable numbers, drawing strokes, painting areas, sharing state, resizing, and Vue components. I show the code for each example, and also link to a runnable CodePen and JSFiddle.
I’m very happy with that page, and I wrote a blog post about it.
I also wanted to write a reference page about Bresenham’s Line Drawing Algorithm. This page failed. I had started in 2023 with an interactive page that lets you run different implementations of the algorithm, to see how they don’t match up. But I realized this year that my motivation for writing that page was anger, not curiosity. My goal was to show that all the implementations were a mess.
But anger isn’t a good motivator for me. I don’t end up with a good result..
I put the project on hold to let my anger dissipate. Then I started over, wanting to learn it out of curiosity. I re-read the original paper. I read lots of implementations. I took out my interactive visualizations of brokenness. I changed my focus to the properties I might want in a line drawing algorithm.
But I lost motivation again. I asked myself: why am I doing this? and I didn’t have a good answer. There are so many things I want to explore[7], and this topic doesn’t seem feel like it’s that interesting in the grand scheme of things. So I put it on hold again.
Updates to pages
I treat my main site like a personal wiki. I publish new pages and also improve old pages. I treat my blog differently. I post new pages, but almost never update the existing posts. This year on the main site I made many small updates:
- Wrote up what I currently understand about “flow field” pathfinding
- Rewrote parts of a page about differential heuristics, but still quite unhappy and thinking about more rewrites
- Simplified the implementation of animations in the hexagon guide, when switching from pointy-top to flat-top and back
- Added more animation modes to my animated mapgen4. This is a fun page you can just stare at for a while.
- Fixed a long-standing bug in A* diagrams - a reader alerted me to mouse positions not quite lining up with tiles, and I discovered that functions like
getBoundingClientRect()
include the border and padding of an element. - Added a demo of combining distance fields[8] to my page about multiple start points for pathfinding.
- Updated my two tutorials on how to make interactive tutorials (1 and 2) to be more consistent, point to each other, and say why you might want one or the other.
- Updated my “hello world” opengl+emscripten code[9] with font rendering and other fixes
- Continued working on version 3 of my dual-mesh library. I don’t plan to make it a standalone project on GitHub until I have used it in a new project, but you can browse the copy of the library inside mapgen4[10].
- Made my hexagon guide printable and also savable for offline use using the browser’s “Save As” feature.
- Improved typography across my site, including some features that Safari and Firefox support but Chrome still doesn’t.
- Reduced my use of CDNs after the polyfill.io supply chain attack[11]. I continue to use CDNs for example code that I expect readers to copy/paste.
- Switched from
yarn
topnpm
. I liked yarn 1 but never followed it to yarn 2 or yarn 3, and decided it was time to move away from it. - Made of my pages internally linkable, so you can link to a specific section instead of the whole page.
- Used Ruffle[12]’s Flash emulator to restore some of the Flash diagrams and demos on my site. When I tried it a few years ago, it couldn’t handle most of my swf files, but now it does, hooray!
I didn’t remember all of these. I looked through my blog, my notes, and version control history. Here’s the git
command to go through all my project folders and print out commits from 2024:
for git in $(find . -name .git) do dir=$(dirname "$git") cd "$dir" echo ___ "$dir" git --no-pager log --since=2024-01-01 --pretty=format:"%as %s%d%n" cd - >/dev/null done
Learning
I decided that I should be focusing more on learning new things for myself, instead of learning things to write a tutorial. The main theme this year was maps:
- I made a list of topics related to labels on maps. These were all potential projects.
- I ended up spending a lot of time on basic font rendering. What a rabbit hole! Most of the blog posts in 2024 are about font rendering.
- I did some small projects using square, triangle, hexagon tiles.
- I experimented with generating map features and integrating them into an existing map. For example, instead of generating a map and detecting peninsulas, I might want to say “there will be a peninsula here” so that I can guarantee that one exists, and what size it is.
- I tried my hand at gradient descent for solving the parameter dragging problem. In my interactive diagrams, I might have some internal state
s
that maps into a draggable “handle” on the diagram. We can represent this as a functionpos(s₁)
returning positionp₁
. When the handle is moved to a new locationp₂
, I want to figure out what states₂
will havepos(s₂)
closest top₂
. Gradient descent seems like a reasonable approach to this problem. However, trying to learn it made me realize it’s more complicated than it seems, and my math skills are weak. - I wanted to create a starter project for rot.js with Kenney tiles[13]. I was hoping to use this for something, but then never did.
- While learning about font rendering, I also got to learn about graphics, antialiasing, sRGB vs linear RGB, gamma correction, WebGL2. This was a rabbit hole in a rabbit hole in a rabbit hole in a rabbit hole…
But secondarily, I got interested in programming language implementation:
- I’m reading Crafting Interpreters[14], Bob Nystrom’s book about how to write interpreters and compilers. It’s been great so far. I haven’t done the exercises yet.
- I’m learning more about Web Assembly (wasm). I first got interested in Emscripten in 2011, before wasm or even asm.js. I want to try out some of the new features that became available this year, like garbage collection and tail calls[15].
- I followed part of Tomas Petricek’s programming language course[16], and did the exercises after learning some F#.
- I watched some of Ian Piumarta[17]’s talks (1[18], 2[19]) and read some of the papers (Open, extensible composition models[20] from 2011, Making COLAs with Pepsi and Coke[21] “a white-paper advocating widespread, unreasonable behaviour” from 2005)
At the beginning of the year I was following my one-week timeboxing[22] strategy. I’ve found it’s good to prevent me from falling into rabbit holes. But my non-work life took priority, and I ended up relaxing my one-week limits for the rest of the year. I also fell into lots of rabbit holes. I am planning to resume timeboxing next year.
Next year
I want to continue learning lots of new things for myself instead of learning them for writing tutorials. The main theme for 2025 will probably be text:
- name generators
- large language models
- programming languages
- procedurally generating code
I also want to continue working on maps. It has been six years since I finished mapgen4, and I am starting to collect ideas for new map projects. I won’t do all of these but I have lots of choose from:
- towns, nations, cultures, factions, languages
- roads, trading routes
- farms, oil, gold, ore
- valleys, mountain ranges, lakes, peninsulas, plateaus
- rivers, coral reefs, caves, chasms, fjords, lagoons
- forests, trees, snow, waterfalls, swamps, marshes
- soil and rock types
- groundwater
- atmospheric circulation
- ocean currents
- tectonic plates
- animal and plant types
- named areas
- icons, stylized drawing
- update the graphics code in mapgen4
I don’t plan to make a full map generator (but who knows!). Instead, I want to learn techniques and write quick&dirty prototype code. I also plan to continue enhancing my web site structure and build process, including navigation, link checking, project management, bookmarks, more blog features, and maybe sidenotes[23]. Although text and maps are the main themes, I have many more project ideas[24] that I might work on. Happy 2025 everyone!