• I’ve been starting on a refactoring of Tanzawa to help improve maintainability.

    I’m taking a layered approach where each package is broken down into a data layer (models) at the bottom, queries (data access) above that,Β  application (business logic) above that and finally your views at the top.

    The idea being that the top layers can go down the stack, but upper layers can’t go up. I’m not sure if I’m going to enforce it via linting, but I probably will, eventually.

    We’ve been using a similar structure at work and once you get used to it, it’s quick to find the code you’re looking for and keeps things tidy. And linting helps enforce it when we forget or want to be lazy. πŸ˜€
  • Plugins can now be enabled and disabled in production (when running in gunicorn/uWSGI) without bringing the server down πŸ˜€.

    The issue was that only a single process (the one that handled the request) got the plugin dynamically enabled. When the other processes tried to lookup urls/templates from the plugin, it didn't exist as it's not enabled and returned an error.
  • How to Gracefully Restart A Parent Process

    When enabling or disabling plugins in Tanzawa, for urls to register correctly across all sub-processes, you must restart all processes, not just fiddle with the process that made the request.

    The complete changes are in PR #121, but the line of interest is below.

    import os
    import signal
    os.kill(os.getppid(), signal.SIGHUP)

    Where getppid gets the process id of the parent process (gunicorn, uwsgi, etc...) and sends it a HUP signal.
  • Bookmark of Digital esthetics, environmental change and the subcultures of computer art

    For decades, the development of information technology has been characterized by a very strong growth orientation, which is now coming to an end with the fading of Moore's Law and environmental change. Academic research in computing has only recently begun to wake up to the fact that there are limits to growth, and that a more fundamental paradigm shift is required to achieve sustainable computing; mere technical tinkering is not enough.

    Growth-centricity has also dictated the development of digital esthetics, which will thus need to change as well. I suggest that the guidelines for this change should be sought in subcultures of computer art whose esthetic ideals are very different from the mainstream Maximalism and Virtualism – the self-serving glorification of the big and plentiful and the hiding of the technical basis of things. I have chosen demo art, chip music, pixel graphics and glitch art as examples of these subcultures. The ideals of "digitality" are also being challenged by post-digitality, so I will also look at these subcultures through this concept.

    I will conclude with reflections on the possible impacts of environmental change on digital esthetics and computing more generally, and on the ways in which computer art subcultures could play a pioneering role in these developments.
    I haven't actually read all of this, but from what I have I'm completely on board. Mostly a reminder for myself to finish reading this.
  • Bookmark of SerenityOS

    SerenityOS is a love letter to ’90s user interfaces. Andreas Kling demos some of the best aspects of his new operating system.
    Maybe it's just nostalgia, but SerenityOS looks great. As the big OSes integrate into opaque web services, the mental model of your PC has become too complex. In many ways it feels like usability is getting worse. SerenityOS is such a breath of fresh air.
  • in Chuo, Japan
    Commuting with noise canceling ear buds, in my case AirPodPros, changes the experience entirely. Just putting them in transports you to a quiet, peaceful place. When you take them out and your eardrums get assaulted by the noisy world is when you realize, you can’t go back.
  • I've been blocked with Tanzawa development for a while as I mull how to simultaneously use Tanzawa to make my own unique site and let it be flexible enough for others without making them adapt to everything I do. If someone else is using Tanzawa to power their site, I want it to be an expression of them, not me.

    I recently figured out the answer to allow this: plugins.

    Inspired by @maique's Tanzawa Love post, I finally sat down and started working on what plugins might look like. Ideally a plugin should be able to customize or extend anything anywhere, but I'm starting small: adding things to public pages.

    This is the first plugin: a widget to display the current localtime in the top nav.

    Localtime displayed in Tanzawa...by a Plugin

    I imagine the capabilities growing over time. I'd like to let plugins store and manage data (e.g. settings), let them schedule periodic work ( e.g. call this api every hour and do something ), and maybe even run background tasks. But for now they're simple. Thank you for the inspiration @maique!
  • Checkin to TGγ‚ͺγ‚―γƒˆγƒ‘γ‚Ήγ‚¨γƒŠγ‚ΈγƒΌζ ͺ式会瀾

    in Chuo, Tokyo, Japan
    At the office.
    Fancy Enteance
  • Response to Guide on UI customisation Β· Issue #83 Β· jamesvandyne/tanzawa

    I'd donate to you for a theme decoupling. This is high on my list! :)
    I appreciate the sentiment πŸ˜ƒ. It's not money that's preventing me, it's time.

    I've been thinking about how to handle theming for Tanzawa properly. It's a big task, but not impossible. There's 2 different ways to think of theming: 1) css only changes theme support, 2) complete theme support (i.e. colors and layout). The move from css only changes wouldn't be much less work than allowing full customization.

    Roughly here's what I think would be required:

    • Extract all mentions of tailwind colors from templates/public (e.g. bg-negroni-700 ) and replace them with a common name – perhaps role based?
    • Create a record / setting somewhere ( django-admin?) to track the active theme.
    • Create a custom template loader (or other shim) that will prioritize rendering with the selected theme's public themes.
    • Set Tanzawa to only include the css of the selected theme.
    • Document how to make a custom theme.

    Theming isn't my top priority, but it's not low either. If anyone is interested helping before I have a chance to get to it, I'm happy to answer questions / provide direction and so forth. Β 
  • Technology I Use

    Inspired by James, I'll chime in with the technology I use. Most of it is a few years old at best.

    Computer Setup

    My main computer is a mid-2014 15" Macbook Pro with a 2.8Ghz Intel i7 CPU, 16GB ram, and 512GB SSD hard drive. It got a fresh battery back in January so it should be good for another few more years.

    I do feel the limits of it occasionally, but not often. As it's been a while since I've gotten a new computer, I am getting the urge to replace or augment it. If I replace it outright, it would probably be with another Mac, Thinkpad, or a Frame.work.

    If I were to replace it with a desktop, it would probably be a used Mini PC coming off lease from some business. But since I mostly use my personal laptop from the kitchen table (not my home office), I'd need to remote into the desktop most of the time. But I'm not sure I'd do that.

    Home Server

    I have a 2012 MacMini with 16GB of ram acting as a home media server. I got it from my brother and the clips that hold the ram in are broken / missing (I have no idea how). So it's using a broken cd-r (as is how I received it) to create pressure to keep them in place.

    This server also runs mac OS and is hooked up to my ScanSnap and a Drobo withΒ  14TB of storage. Since it redundant, only half is actually usable. As is, it'ss fairly under-utilized with just Plex and iTunes. Maybe spending time on r/SelfHosting could improve that. If I were to get a new Mini computer, it would likely be replacing both my laptop and my home server.

    Work Setup

    I've been working remotely / working from home for all but 2 years of the past decade. I've always kept my work setup separate from my home setup in that period. Currently my work computers are provided by my employer and they're generally the latest MacBookPro that's refreshed every 3 years.
    • Keyboard: Happy Hacking Lite2 USB with a US layout
    • Headphones: Airpods on mobile.Β  Sony MDR7506 Professional Large Diaphragm at my desk.
    • Mouse: Magic Trackpad and a random Microsoft Optical mouse
    • Webcam/Microphone: Built in. (I really should upgrade this)
    • Monitor: Dell U2720QM 27 inch 4K


    • Operating System: macOS Catalina at home, BigSur at work. Ubuntu on my servers.
    • Browsers: Firefox
    • Terminal: Terminal.app / iTerm2
    • Code Editor: PyCharm / emacs
    • Music: Plex / YouTube


    iPhone XR (Yellow, 64GB)


    Apple Watch (Series 5)

    Site Technology

    This site is powered by Tanzawa, an open source blogging engine I started building about a year ago. Tanzawa is built with Python/Django with a splashes of Javascript (Stimulus) for the maps. Mapping is powered by Leaflet.js.
Previous 2 of 10 Next