Working on the Word Counting Calendar layout code. Slow going! I share the drawing code parameterization process.


Today's sharepiece is the preparation I'm doing to make custom form generation software for the November Word Counting Calendar I posted yesterday. The goal is to have software draw a calendar for any month of any year using different color palettes, like this 2024 package that was made by hand with digital illustration software:


Figuring out the Parameters
To reproduce the original design, I need to parameterize the calendars so they can handle the variable number of weeks in a month. There are potentially up to six different weeks, so it's not possible to have a single overlay that "looks good" to me.
The first step I took was to figure out what some of the parameters for drawing the calendar areas were.


The hardest part is figuring out the layout grid which will be used for rendering both the individual cells and their layout as a whole.
The diagram above just shows the horizontal and vertical grid setup for the cells, but eventually I'll want to have a page grid as well that handles the larger elements like the TITLE and WEEK NAME COLUMNS. There will be a lot of numbers calculated.
After I have the numbers calculated, I can then use them to align elements on a PDF page that's generated by the software. As an example, here's the debug grid that shows the placement of editable fields on an ETP page and year and holiday text fields.


Then I had to figure out the data generation to determine the start and end days of the calendar. I had written some code back in January 2024 for this, but it was a mess and I needed to review it. Below you can see the code output showing the calculated data generated from the start date of November 1, 2025.


That's as far as I got today. Tomorrow, I'll try to actually draw something onto a PDF. My guess is it will take two or three days, but it will be a significant advance in my product-generating infrastructure!
All Building Challenge Posts
This challenge starts October 11th and ends when 30 artifacts have been posted. Weekends are exempt from production.
URSYS Web App Template
Embedded TypeScript Apps in Eleventy
A Review of Old Work and Stories
Eleventy Templates for Atom Feeds
Productivity Energy Crash
Workshopping the 'Activity Bingo' Form (part 1)
Last Run of ETP Notebook Production
Activity Bingo Form Progress (part 2)
ETP Mini Notebook Printing Press Tour
Identity and Logo Thinking Pass
Unprofessional Business Cards
Word Counting Calendar Reboot
Word Counting Calendar Interim Release
Calendar Layout Code Progress
BUILD CHALLENGE COMMENTARY
It's a bit boring working on this by myself, honestly. I wish there were people doing stuff like this with me. I am a reluctant programmer when working solo without creative energy from others swirling around me. So I'm pacing myself, making a little bit of progress every day so I don't burn out. A little bit of progress is better than no progress.
BONUS ACHIEVEMENTS
I also had to spend a bit of time fixing the Visual Studio Code Intellisense configuration, as it was not catching errors in my code as I typed. This is a mixed-mode codebase consisting both of Typescript and CommonJS files in the server and in the client, so configuration is a bit tricky. I admit I relied ton Claude Code to check things. By combining its general patterns with my debugging insight, we got it done without a lot of frustration. Before such tools, I would have spent hours searching the web for some hint to how the configuration was supposed to work. It's an enormous mess, made even worse today because Google Search is essentially broken now.
We chat about personal projects and challenges on the DS|CAFE Community Discord Server every day. Come visit! Maybe you'll make some friends!
You can reach me at Mastodon or Bluesky. Or subscribe to the blog feed to stay up-to-date.