Ask LLMs to Teach You, Not Tell You 
 A large language model can help you understand a subject, but usually people just use it to get an answer. This won’t help you. It matters who is doing the work and thinking. You should try to use assistants to provide hints, encourage effort, and give you feedback and not just a quick answer. That is if you want to learn. 
 TLDR; To use LLMs for…
Software Design in a World of AI 
 How we build and design software is obviously changing with LLMs. For the most part AI is creating the same software previously done by hand, same general principles and structure, just faster and more efficient. However, should it be creating software using those same principles? 
 If we know an LLM is going to be the primary tool to create, edit, and…
The Wake of AI 
 I saw this graph posted on Hacker News recently of Stack Overflow questions over time: 
 
 The rise from 2008 to 2014 mirrors the explosion of web development, mobile apps, and an entire generation learning to code. The plateau through 2020 represents a mature ecosystem. And then the cliff. 
 Starting around 2022, coinciding with the release of ChatGPT and the rise…

 
 Safer Parking Lot Design 
 Typical parking lots seem like they’re designed for cars first and people as an afterthought. The common layout is rows of stalls with the cars facing each other with no space between, so the only walking path ends up being walking down the roadway cars are driving and behind the cars backing out. Drivers are forced to inch out blindly looking for…
Create an IMDb Query Agent with PydanticAI 
 After building my IMDb MCP server using FastMCP, I wanted to compare it to another approach using PydanticAI . The MCP architecture is great for creating reusable tools that multiple agents can access, but what if you just want a simple, self-contained application? PydanticAI fit the bill nicely. 
 What is PydanticAI? 
 PydanticAI is a…
What runs mkaz.blog 
 This post documents the various technology stacks I’ve run this site. Rather than creating a new post each time I switch, which I was doing, I’ll keep this one updated as the guide to what powers mkaz.blog. Over the years, I’ve used my site as a playground to test out various technologies, though now I’m settling back to keeping it simple. 
…
Jujutsu VCS - Getting Started Guide 
 Jujutsu (jj) is a new version control system that’s been picking up a fair amount of interest. While Git has dominated for nearly two decades, Jujutsu promises a simpler, more intuitive approach to version control. 
 Do we really need a new VCS? 
 I’ll be honest: I was skeptical. A VCS claiming to be “so much easier and more…
Create a Local IMDb MCP Server in Python 
 I was looking for examples on creating an MCP (Model Context Protocol) server in Python and took me awhile cobbling together a few different sources and actually getting it to work. Plus too much useful content hides behind Medium paywalls, how is this still a thing? So, I figured I’d write it all up and let
 Cunningham’s Law help me…
Functions 
 Functions are one of the core building blocks of any language. Here are some examples of how to use functions in Python 
 Basic Function Definition 
 The simplest function looks like this: 
 def greet (): 
 print ( 'Hello, World' ) 
 
 greet () # Call the function 
 Functions are defined with the def keyword, followed by the function name and…
Classes 
 Classes are Python’s way of creating your own custom data types, used to bundle related data and functions together. Python classes provide all the standard features of Object Oriented Programming. 
 Basic Class Definition 
 Here’s a simple class example: 
 class Person : 
 def __init__ ( self , name ): 
 self . name = name 
 
 # Create an…
Project Structure 
 Organizing your Python projects with a clear structure and modern tools makes your code easier to maintain, test, and share. Here’s how I scaffold a project with a standardized layout, using pyproject.toml for configuration and uv for environment and dependency management. 
 Standard Project Structure 
 This layout separates source code, tests, documentation,…
Dev Environment 
 Python Development with uv 
 I recommend using uv for Python installation and package management. It’s an extremely fast Python package manager written in Rust that replaces pip, virtualenv, pyenv, and more in a single tool. 
 Installing uv 
 On macOS and Linux: 
 curl -LsSf https://astral.sh/uv/install.sh | sh
 On Windows: 
 powershell -c 'irm…
Python Idioms 
 Python has many idiomatic patterns that make code more readable, maintainable, and “Pythonic”. Here are the essential idioms every new Python developer should know. 
 The if __name__ == "__main__" Pattern 
 This is one of the most important Python idioms you’ll encounter: 
 def main (): 
 print ( 'This script is being run directly' ) 
 #…
Type Hints 
 In Python 3.5, type hints were introduced as a means for adding type information. Python 3.9 made many types available as built-ins, and Python 3.10 expanded these capabilities with the union operator ( | ) and other improvements. This guide assumes Python 3.10+. 
 Why Use Type Hints? 
 Type hints are optional annotations that specify expected types for variables, function…
System Commands 
 To embrace the unix way, letting each tool do it’s thing, you need to be able to execute a system command from Python. There are a few ways to call shell commands, but the modern and recommended way is with the subprocess module. 
 os.system() 
 The older and very basic way was to use os.system() which is good for “one-liner” tasks that you…
Regular Expressions 
 Regular expressions in Python use the standard module re . 
 Use raw strings for a regex pattern to avoid issues with escaping special characters. Recent versions of Python will issue a warning when not using a raw string for escaped characters. 
 Basic regular expression matching 
 The two main regex functions are re.search() and of re.match() . The…
Python Testing Guide: How to Test Your Code with pytest 
 Testing isn’t as hard as it seems. With AI and generative code, it is even more important now to build confidence and provide checks when making changes. Here’s your complete guide to testing Python code with pytest. 
 Quick Start / TL;DR 
 
 Install pytest : uv add pytest 
 Test functions start with test_…
Reading List 2024 
 A look back at what I read in 2024, split into fiction and non-fiction books. You can see my previous years
 2015 ,
 2016 ,
 2017 ,
 2018 ,
 2019 ,
 2020 ,
 2021 ,
 2022 , and
 2023 . 
 You can see my Goodreads Year in Books 2024 for the full list. I set out with the goal to read 30 books in the year and ended up one over reading 31,…
Neovim plugin in Python 
 The Vimwiki plugin is quite useful, but I only use a small subset of its
features, primarily the daily notes and checking off of todo lists. See my
 Vimwiki page in my Working with Vim
guide . 
 However, the daily notes don’t organize how I want them to, I want to store them
in YYYY/MM/note.md . The plugin has limited customization so I…
Reading List 2023 
 A look back at what I read in 2023, split into fiction and non-fiction books. You can see my previous years
 2015 ,
 2016 ,
 2017 ,
 2018 ,
 2019 ,
 2020 ,
 2021 , and
 2022 . 
 You can see my Goodreads Year in Books 2023 for the full list. I set out with the goal to read 30 books in the year and ended up reading 33, for a total of 12,241…
Collections 
 Aside from lists and dictionaries Python has several other collection objections that are useful in the standard collections module. 
 See: Python Collections documentation 
 Sets 
 Python set object is equivalent to a mathematical set, and supports similar operations. You can also think of a set as a list , but every element is unique and a set is unordered. 
…
No. 4 Pihole Drive 
 I run a Pi-hole to block internet junk at the network level, which I
 wrote about previously . The Pi-hole has stats for number
of queries blocked which is mildly interesting, but requires navigating to the
admin page. I have a few 7-segment displays laying around from
work prototypes, so why not use one to display the info. 
 My daughter has a couple…
Terminal Animation with Python 
 I got stuck while working on the Advent of Code Day 12, 2022 puzzle and turned
to using a terminal visualization to see what was going on. This post walks
through how I used the rich library in
Python to figure it out. 
 Background 
 The puzzle is a grid, you are given a start point and an end point and you need
to find the shortest path…
Lists 
 The primary data structure for collections in Python are lists. Lists are a built-in data structure and are ordered , mutable , and a single list can contain items of different types. 
 Create Lists 
 Python lists are defined using square brackets [ ] 
 a = [ 'a' , 'b' , 'c' ] 
 Append item to list 
 a = [ 1 , 2 , 3 ] 
 a . append ( 4 ) 
 a 
 # [1, 2, 3,…
Control Flow 
 Conditionals 
 Basic if conditionals 
 The basic if syntax in Python, with elif (else if) and else : 
 x = 5 
 if x > 0 : 
 print ( f ' { x } is positive' ) 
 elif x < 0 : 
 print ( f ' { x } is negative' ) 
 else : 
 print ( 'Zero. Your number is zero.' ) 
 Ternary operator 
 Python doesn’t have a specific ternary operator…
Numbers 
 Convert string to integer 
 You must explicitly convert strings to integers, use the int() function to convert. You will get a TypeError if you don’t convert. 
 s = '13' 
 s + 2 
 # TypeError: can only concatenate str (not 'int') to str 
 Instead use: 
 s = '13' 
 int ( s ) + 2 
 # 15 
 You need to be aware that the + operator is used for…
Dictionaries 
 The Python dict data structure is an associative array, or key-value pair data
structure. 
 Creating dicts 
 To specify dictionary looks similar to the JSON object defintion. 
 d = { 'k1' : 'v1' , 'k2' : 'v2' , 'k3' : 'v3' } 
 Use dict() constructor to build a dictionary from a list of key-value tuples. 
 d = dict ([ ( 'k1' , 'v1' ), ( 'k2' , 'v2' ), (…
Working with Files 
 Reading files 
 Here are several common ways to read files in Python. I use the with method to
work with files because it will automatically close the file pointer after use. 
 Read entire file to list of lines 
 Use .readlines() to read the entire file in to a list, each line as an element
in the list. Note, this will include the newlines at the end of…
Strings 
 A set of examples working with strings in Python. 
 String delimiters 
 You can use single or double quotes to specify a string in Python, this does not change the interpretation of the string like in PHP. 
 s1 = 'Single quote' 
 s2 = 'Double quote' 
 Special characters such as \n for new line will be converted: 
 print ( 'String with a \n new line' ) 
 #…
Add React to an Existing Page 
 I wanted to add React to an existing page, just some Javascript to fancy up the UI. Sadly, there wasn’t good documentation on how to do this. There is plenty of documentation on how to use create-react-app to start an entire new application, with built-in web servers, routing, tree shaking, and other things I don’t need for just a bit of React. 
…
Reading List 2022 
 A look back at what I read in 2022, split into fiction and non-fiction books. You can see my previous years
 2015 ,
 2016 ,
 2017 ,
 2018 ,
 2019 ,
 2020 , and
 2021 . 
 You can see my Goodreads Year in Books 2022 for the full list. I set out with the goal to read 25 books in the year and ended up reading 27, for a total of 9,646 pages. 
…
One-line Journaling 
 Journaling is a practice that always sounds better then actually doing. I want to be a thoughtful and insightful person who self-reflects and grows personally each day, but do I really have to bother with all that writing? 
 The journaling method I use, that doesn’t fade after the first entry, is to write a short one-line about big days and events. This makes a…
Using REAPER instead of Audacity for Podcasts 
 I’m switching to REAPER for editing our podcast audio. My buddies and I started the Reel DMC movie podcast at the start of the pandemic and two years later still going strong (both the podcast and pandemic ☹️). 
 Previously I used Audacity and I’m still a big fan of the open-source tool, but REAPER is a lot more powerful, well…
Reading List 2021 
 A look back at what I read in 2021, split into fiction and non-fiction books. You can see my previous years
 2015 ,
 2016 ,
 2017 ,
 2018 ,
 2019 , and
 2020 . 
 You can see my Goodreads Year in Books 2021 for the full list. I set out with the goal to read 25 books in the year and ended up reading 29, for a total of 9,366 pages. 
 Fiction…
Fixing software bugs 
 Set screws. 
 These are the tiny little screws used to hold on the handles for some bathroom fixtures. I didn’t know what they were called before, that would’ve saved me some time. 
 The handles of our bathroom faucets would occasionally fall off, not often, but maybe weekly. I never really had a problem with them, but the kids more so, especially the…
The WordPress Command Line Tool 
 One of my favorite WordPress tools is WP-CLI , the wp command-line tool. 
 The tool allows you to do numerous things from installing WordPress, to upgrading, installing, and activating plugins and themes, configuring installs, and even generating dummy content. 
 I’ll include a few of the most common things, check out the official WP-CLI…
Using Block Patterns as content templates 
 Block patterns are great, one of the features I’m most excited for in WordPress. As block patterns mature and people adopt, they will be one of the best ways to share designs and templates. I’m looking forward to a rich repository to pull design ideas, the pattern directory is already filling up. 
 Block patterns aren’t just for…
Gutenberg and WordPress Core 
 I recently had the need to update Gutenberg packages that are in WordPress core for a point release. This required setting up a development environment where I can test Gutenberg code in WordPress but without using the Gutenberg plugin. 
 This is not something most developers will need to do, it is my first time after working on Gutenberg for a couple years…
Make your own create-block templates 
 Did you know the create-block script can support templates? With templates you can create your own files to be generated for a new block. I see this being quite useful especially if you are an agency or business that creates many custom blocks, or for developers to share different block starting points. 
 What is the create-block script? 
 First…
Using theme.json in a classic theme 
 WordPress 5.8 introduced theme.json, a way to specify styles to be generated for the editor and front-end. Theme.json is part of a suite of full site editing tools being developed for WordPress. You can start using it now in existing themes. 
 Let’s dive in and show a few things you can do with it. 
 Colors 
 You can define a color…
Modern WordPress Development 
 There is a good discussion on modern WordPress development and a general lament about it’s complexity and change in the developer experience. 
 Chris Wiegman tweeted out 
 
 The deeper I get with modern WP dev the more I understand why newer devs don’t like to work on it. This is not the same project as it was in the past. The learning curve is…
Working with Animated GIFs 
 A few resources and snippets for working with animated GIFs on Linux. I use animated GIFs for various screenshots to highlight bugs or demonstrate features. It is quite useful to have 
 For Windows 10, the ScreenToGif app is excellent. It is the only app I know that shows you every frame captured and allows editing them directly before saving. Unfortunately, it…
Conditionally Load Block Assets, Part 3 
 In WordPress 5.8, releasing on July 20, there is a much easier way to conditionally load block assets. This is the loading of JavaScript and/or stylesheets on the frontend only if the block is shown on the page. 
 
 
 
 
 I wrote twice previously about solving this same problem. The first time , I solved checking if each post in the…
The Hill We Climb 
 I absolutely love the inauguration poem The Hill We Climb by Amanda Gorman . It was exactly what we needed, the poem is full of optimism and reality; beautifully capturing the current moment. 
 It is rejuvenating to hear the poem and see the strength in Gorman, it fills me with hope. 
 The text of the poem is included below, but I recommend watching her recite it .…
Reading List 2020 
 A look back at what I read in 2021, split into fiction and non-fiction books. You can see my previous years
 2015 ,
 2016 ,
 2017 ,
 2018 , and
 2019 . 
 For 2020, I ended up reading 28 books, this marks my third year in a row going over my goal of 25 books a year. This works out to about a book every two weeks, not a bad pace if you aren’t…
Use Cornell Notes for Online Class 
 I’ve found two things that help me get more out of online classes: first is to make space and pay attention, and second I use the Cornell Note taking method during the class. 
 There isn’t anything that different using the Cornell Note method for an online class, than an in-person class, except you can pause the teacher. This makes a big…
Enable Learning in Technical Writing 
 My goal writing documentation is to enable a student to learn, give them confidence they can learn, and not just copy-paste their way. 
 This is not easy and I’m still learning myself what is the best way to organize any given set. This post covers my thinking around, it is a deeper follow on to previous notes on technical writing . 
 
…
Scale QT Apps for HiDPI 
 Most of Ubuntu/GNOME scale nicely with a high dpi (hidpi) display, there has been built-in support since 19.04 and now fractional scaling is just a simple toggle away in the latest 20.04. 
 I use a 4K external monitor so a 150% scaling works great, however, not for all apps. Zoom is the most common app that appears really small on my hidpi display. 
 Zoom is…
Contribute Developer Documentation to Gutenberg 
 Another post in my series on contributing to the WordPress Gutenberg project. This post complements my Good First Issue post that focused more on a coding contribution. Here I take a step back and focus on documentation and dive deeper into the GitHub pull request process. 
 
 
 
 
 Video screencast of the process 
 Find…