Notes #12

Python errors as values: Comparing useful patterns from Go and Rust

A thrown error interrupts the control flow, propagating down the call stack until it’s caught. If it isn’t caught then the program cashes. A big problem with this approach is a lack of clarity on where an error might occur.


HTML First

HTML First is a set of principles that aims to make building web software easierfaster, more inclusive, and more maintainable by…

  1. Leveraging the default capabilities of modern web browsers.
  2. Leveraging the extreme simplicity of HTML’s attribute syntax.
  3. Leveraging the web’s ViewSource affordance.

Litestream: Cron-based backup

Sometimes Litestream can be overkill for projects with a small database that do not have high durability requirements. In these cases, it may be more appropriate to simply back up your database daily or hourly. This approach can also be used in conjunction with Litestream as a fallback. You can never have too many backups!


tailspin

A log file highlighter


Guide to Implement an SSH Client Using Golang

I’m researching SSH clients in Go to build a server management CLI tool. Something like Ansible but that understandable to my brain.


URL explained – The Fundamentals

…the syntax and use of an URL and the difference between URI, URL, URN, and URC…


HUG CSS, how I approach CSS architecture

  1. Classless HTML for the core styles.
  2. Utility classes to nudge and tweak elements when needed.
  3. Group classes to simplify styling collections of elements that may have more complex needs.

I’ve been doing something very similar recently and like it more than using Tailwind CSS.


HTML Web Components: An Example

Web components give you an approach of augmentation, where you can provide basic functionality and then progressively enhance the experience depending on the end user’s capabilities.


ZAPit

ZAPit is a new feature in 2.14.0 which performs a quick ‘reconnaissance’ scan of the URL specified. It currently only runs from the command line.


An Interactive Guide to CSS Grid

Great tutorial. Just started using grid on a new project recently and works great for the general layout of pages. You can still use flex box for some situations where it makes sense.


A Complete Guide to CSS Grid

Another great grid guide.


HTML with Superpowers

Web components guide to get started.


GNU Stow

GNU Stow is a symlink farm manager which takes distinct packages of software and/or data located in separate directories on the filesystem, and makes them appear to be installed in the same place.


Pesky little scripts

Great idea to name aliases starting with , making them super easy to find with tab completion.


Implementing Reactivity from scratch

Reactivity is at the heart of many web interfaces. It makes programming robust and interactive web apps much, much easier. Although most frameworks have reactivity as a built in feature, there will always be a point when you need reactivity in plain JavaScript. So, here I will show you how to implement reactivity in JavaScript.


Web Components Eliminate JavaScript Framework Lock-in

web components can dramatically loosen the coupling of JavaScript frameworks.


dango-unfold

Modern Django admin theme for seamless interface development


You’re (probably) using connectedCallback wrong

In general, work should be deferred to connectedCallback as much as possible—especially work involving fetching resources or rendering. However, note that connectedCallback can be called more than once, so any initialization work that is truly one-time will need a guard to prevent it from running twice.

In general, the constructor should be used to set up initial state and default values, and to set up event listeners and possibly a shadow root.

* Code that only needs to run once should be put in the `constructor`.
* Code that needs to be run every time the component is added/removed from the DOM should be put in `connectedCallback` and `disconnectedCallback`.

greemansk

Greenmask is an open-source util written on go that provides features for logical backup dumping, obfuscation and restoration. Brings wide functionality for backing up, anonymization and masking. It is written fully in pure go with ported required PostgreSQL library.


the component gallery

The Component Gallery is a collection of interface components from real-world design systems.


Perfect

Prefect is a workflow orchestration tool empowering developers to build, observe, and react to data pipelines


Go Testing By Example


Customize the Django admin to differentiate environments

If you have a ENVIRONMENT context variable available (as we do) you could add the following template as admin/base.html to your project, giving you a red color scheme for the production environment (to discourage people from updating content) and a nice scheme for the preproduction environment which clearly deviates from the standard color scheme used everywhere else…


Let it snow

A great step by step blog post on how to build a winter themed web component.


Jurassic Systems

A very cool recreation of the operating system used in the original Jurassic Park movie. Super fun!


Maybe We Don’t Need UUIDv7 After All

When using any kind of random primary key, make sure you use a hash index instead of the default B tree.


Forcing pip to use virtualenv

Just do it.

JSON Logging with Django


Learn Makefiles


Creating Dynamic Forms with Django


Don’t disable buttons


Patterns for Reactivity with Modern Vanilla JavaScript


You don’t need JavaScript for that


Behavior Belongs in the HTML


Bash One-Liners for LLMs