Posts tagged: thought

All posts with the tag "thought"

843 posts latest post 2026-04-15
Publishing rhythm
Apr 2026 | 17 posts

Three ways to support updating other content. Fantastic article walking through the different ways to update other parts of the screen using htmx.

In htmx there is no 2 way data binding, the dom is your state, and if you have elements derived from the same data on the screen in different places you need to think about how to keep them in sync.

sqlite-utils is primarily a cli tool for sqlite operations such as enabling full text search, and executing searches, but it also has a nice python api that is exposed and pretty straightforward to use.

from sqlite_utils import Database db = Database("database.db") db["post"].enable_fts(["title", "message", "tags]) db["post"].search("water")

This returns a generator object that you can iterate over the row objects with.

> A command-line utility for taking automated screenshots of websites

Daaaang, this is such an elegantly simple way to get web screenshots with a cli. I was literally up and running with two commands on my arch linux machine (which it warned was unsupported by playwright).

pip install shot-scraper # Now install the browser it needs: shot-scraper install shot-scraper waylonwalker.com shot-scraper https://datasette.io/ shot-scraper https://datasette.io/ -h 1280 -w 1920 shot-scraper https://datasette.io/ -h 480 -w 720 shot-scraper shot --selector '#posts' https://thoughts.waylonwalker.com/post/89

Note shot-scraper https://datasette.io/ is a full length screenshot of the entire page.

Oh and its pretty dang fast, let alone the setup time, this crushes on startup time in my attempts to use a headless browser in the past.

I’d never given this much thought, but there are so many guides that are complete guides for beginner workflows, but once you get beyond beginner there is likely no manual for what you are trying to do in programming. There is no guide that will tell you the best way to get your companies salesforce data, alongside of the ERP data and present it to the users who need to know in a way that compels them to make the right decisions. You are going to have to build this out for yourself by piecing together knowledge about each subject.

Most of the time when creating links in html you want to maintain the default behavior, as this is what users are going to expect, but sometimes your site behaves such that it does not fit, and it does something unexpected anyways. in this case you might want to make the default behavior to open the link in a new tab rather than relying on users to control click.

Use this with restraint as this can make your site feel janky and do things that do not feel natural to the web.

I went down the route of leveraging the json-enc extention in htmx, but later realized that this completely breaks browsers/users who do not wish to use javascript. While most of the web would feel quite broken with javascript disabled, I don’t want to contribute to that without good reason.

Taking a second look into this issue, rather than using json-enc, and using as_form to get form data into a model keeps the nice DX fo everything being a pydantic model, but the site still works without js. with js htmx kicks in, you get a spa like experience by loading partials onto the page, and without, you just get a full page reload.

copied from