Recent Posts

Building a Claude Code Skill to Scratch My Own Itch

3 minute read

I’ve been using Claude Code lately to work on personal projects: a CLI for searching mountain peaks, Claude Code skills for route research, a Chrome extension for Mountaineers.org, and a tool to export GPX files from Strava. When Anthropic released Claude skills, I dove in and started experimenting with Obra’s superpowers. I liked that experience so much that I started building my own skills. This is one of them.

Virtualization with vagrant

less than 1 minute read

At the 2011 Pycon.UA conference, I presented on speeding up development with virtualized dev environments using VagrantUp and Fabric. Virtualization lets developers create consistent, reproducible development environments across teams. Vagrant makes this process simple by providing a unified workflow for managing virtual machines, while Fabric automates deployment tasks.

Automatically update project version info in sphinx documentation

1 minute read

I often need project version information for documentation, About boxes, or website footers. Instead of hardcoding version numbers, I let git provide them automatically. For my projects, git describe works best. It doesn’t modify sources on checkout and provides version information in a format usable in other git commands such as git diff.

Replacing Windows console font with a more suitable one

1 minute read

The limited console settings in Windows annoy many users. In particular, the font selection is limited to Consolas, Lucida Console, and vague “Raster Fonts.” This post explains how to add support for additional fonts. Many fonts are more suitable for programming and administration tasks. You can find a good list in this article or here. I prefer Inconsolata. You can connect your favorite font to the console, though it requires some registry work. Thanks to Scott Hanselman for the tips.

Using GitHub to store personal settings

1 minute read

Everyone who works on multiple computers faces the problem of unifying personal environment settings. When working in *nix/linux, you quickly develop your own favorite set of aliases, bash functions, prompts, and environment variables. Settings for other programs matter too: vim, emacs, git. Most settings on *nix systems are stored in simple text files and can be easily copied to a new server. However, as the number of servers grows, you face limitations. Which version is the main master copy? What if your servers run multiple operating systems with different settings? What if you can’t quickly download settings to all servers—say, they’re on your work machine behind a firewall?

Setting up bash completion for git on Mac OS

1 minute read

I’ve been using git for various projects and want to share tips for making it more convenient. One of git’s advantages is cheap branches. A branch is just a file in .git/refs/heads containing the id of the last commit, so creating a new branch takes very little time. With such capabilities, most programmers use branches extensively. Whatever model you choose for branches, you can eventually forget which branch you’re on and commit code to the wrong place. Although this is easily fixed, you can avoid it by adding branch information to your bash prompt.

Bit Counting Methods Overview

2 minute read

Counting the number of bits set to “1” in a number is a classic programming problem. Donald Knuth discusses solution methods in his classic work. This problem matters for three reasons. First, several solution methods differ drastically in performance, and choosing the right implementation can significantly speed up your code. Second, it has many practical applications in routing protocols and search. Third, it appears in interviews at major companies. Counting methods fall into three categories: shifting, algebraic logic, and table lookup.