Elektrine lite

← Feed

alexwlchan

alex@social.alexwlchan.net

<p>Writing software · Stitching embroidery · Making tiny magical worlds · Doing digital stuff in cultural heritage · Genderfluid shapeshifter</p>

Posts

  • Post #3085761

    Rendering a chat thread in CSS and JavaScript: https://alexwlchan.net/2026/css-chat/ I want to add text conversation to my scrapbook of social media, so I needed to render text bubbles in a web browser. It was tricky but I got it working. Modern web tech is amazing! 💬 💬 💬

  • Post #2901547

    Auditing my local Python packages: https://alexwlchan.net/2026/python-package-audit/ Recent supply chain attacks have me wondering “what Python packages do I have installed” – and virtual environments make that harder. I’ve started keeping a list of my environments so I can see exactly what’s installed, and where.

  • Post #2901546

    Building a basic cache with SQLite: https://alexwlchan.net/2026/sqlite-cache/ I wrote about how I’m using a simple key-value lookup to cache expensive operations and dramatically speed up working on my website.

  • Post #2901545

    Using Playwright to test my static sites: https://alexwlchan.net/2026/playwright/ I wrote about how I’m using Playwright to test my static websites from Python, the pytest fixtures I use, and a bunch of example assertions.

  • Post #2427317

    Watching for file changes on macOS: https://alexwlchan.net/2026/watch-files-on-macos/ I wrote about my new Swift/Python scripts to get notified of file changes… without using third-party dependencies. I’ve got a Swift script that uses the FSEvents API to get notified of file changes, then I’m using stdout as a bridge to forward those notifications to Python.

  • Post #1702024

    HTTP GET requests with the Python standard library: https://alexwlchan.net/2026/python-http-with-the-stdlib/ For my local scripts I only need a handful of HTTP requests at a time, so I can do everything I want with a lightweight wrapper around urllib.request. Fewer dependencies FTW. 🥰

  • Post #865086

    Creating a personalised bin calendar: https://alexwlchan.net/2026/bin-calendar/ I wrote a quick post about how I create my a fridge calendar that tells me about bin day. Python stdlib + CSS = 🚮 💚

  • Post #486290

    How I create static websites for tiny archives: https://alexwlchan.net/2025/mildly-dynamic-websites/?utm_source=mastodon I wrote an in-depth walkthrough of the ideas and code I use to build small static websites: ✨ Splitting data and presentation ✨ Template literals to reduce repetition ✨ Filtering, sorting, and pagination ✨ User-visible errors when things go wrong ✨ Tests and other safety nets