Dublin Library

The Publishing project

Implementing feature flags

Feature flags, also known as feature toggles, are a software engineering technique that lets you turn specific functionality on or off during runtime without deploying new code. They decouple feature release from code deployment, which gives teams granular control over how and when users interact with new changes. How feature flags work At their core, feature flags are conditional control points strategically placed inside your codebase. When the application runs, it evaluates the condition the flag to determine which execution path to take. Instead of hardcoding these conditions, the application retrieves the flag's state from an external source. Because the...

Web and Node.js Streams

Handling massive datasets or high-frequency real-time data efficiently requires a fundamental shift in how applications process information. Loading an entire multi-gigabyte video or parsing thousands of database rows into memory at once creates significant performance bottlenecks and risks crashing your application. Streams solve this by processing data incrementally in small, manageable chunks. This guide explores the architecture of streams, the differences between the Web Streams API and Node.js streams, how to manage errors and cancellations, and how to recover broken stream pipelines. Node.js Streams vs. Web Streams API Before writing code, understand the historical context and the architectural differences between...

Reintroducing Web Components

Web Components comprise a suite of technologies for creating reusable custom elements. By encapsulating functionality from the rest of the application code, Web Components provide a standards-based approach to building widgets native to the browser. Unlike components in frameworks like React or Vue, Web Components rely on W3C-standardized APIs to define new HTML tags, encapsulate styles, and manage lifecycle events without external dependencies. The Web Components Umbrella The term "Web Components" refers to three main technologies used in tandem: mermaid graph TD WCWeb Components --> CECustom Elements WC --> SDShadow DOM WC --> HTHTML Templates CE --> |Define| TagNew HTML...

Running Python Data Science Libraries in the Browser with Pyodide

Python has always been the lingua franca of data science. Its rich ecosystem of libraries: NumPyhttps://numpy.org/ for numerical computing, Pandashttps://pandas.pydata.org/ for data manipulation, Matplotlibhttps://matplotlib.org/ for visualization, and Scikit-learnhttps://scikit-learn.org/ for machine learning—has made it the go-to language for analysts and researchers worldwide. Traditionally, these libraries run on a server or local machine, with users interacting through Jupyter notebookshttps://jupyter.org/ or command-line interfaces. Recent advancements in WebAssembly WASM have opened the door to a new paradigm: running Python directly in the browser. Pyodidehttps://pyodide.org/, a project initiated by Mozilla, has ported the CPython interpreter to WebAssembly, allowing you to execute Python code and leverage...

Working with monospace fonts: fixing an annoying bug

A persistent CSS quirk often baffles developers: when styling inline <code> elements inside a heading, the monospace text appears significantly smaller than the surrounding text. Inspecting the element confirms that the font size inherits perfectly, yet the browser stubbornly renders the monospace text smaller than the rest of the heading. This discrepancy does not originate in the CSS itself. It stems from a longstanding behavior known as the user agent fixed-width font size quirk. Modern browsers maintain distinct default font sizes for standard text and fixed-width text. This post explores why this discrepancy occurs, how the font-family: monospace, monospace; declaration...

Migrating Your Homebrew Tap to GitHub Actions and GitHub Packages

I've maintained a public Hombrew tap for several years, initially to distribute custom builds of packages that were not available in the main Hombrew repositories. Over time the tap evolved to include a mix of my custom tools and scripts and my own builds of tools I wanted to customize. But the build process and infrastructure have changed significantly since I first set it up, and I recently migrated the tap to use GitHub Actions and GitHub Packages for building and distributing bottles. Distributing your custom Homebrew formulas with pre-compiled binaries bottles ensures fast, frictionless installations for your users. If...

Vendoring and Code Splitting in the HTTP/2 Era

Code splitting is the practice of breaking JavaScript code into small chunks that the browser can load on demand. This technique optimizes load times and improves user experience by only loading the code necessary for the current page or route. Vendoring often called vendor chunking is the practice of extracting third-party dependencies—such as React, Lodash, or utility libraries—from the main application code and bundling them into separate files. Instead of serving a single, massive bundle.js file to users, you serve the application code app.js and the dependencies vendor.js separately. This strategy optimizes browser caching because third-party libraries change much less...

Archival Web: Exploring the Past, And Improving the Future

The web has evolved significantly since its creation, and with it, the technologies that power it. Chief among them is CSS, which has undergone significant changes since it was first introduced in 1996. As developers look to the future of web development, it is important to look back and understand the history of CSS, how it has evolved, and what lessons the industry can learn from its past. This post explores the history of CSS, from its early days to its current state, and how developers can use that knowledge to improve future web development practices. It also examines tools...

Exploring Dublin Core: Metadata, Linked Data, and the Web

The Dublin Core Metadata Initiative DCMI provides a robust vocabulary for describing digital resources. While understanding the theory behind DCMI is helpful, applying it correctly ensures your content is discoverable and interoperable across the web. This guide provides practical examples of how to use Dublin Core metadata and explores the technical history behind its dual namespaces. The history and evolution of Dublin Core To understand how to apply Dublin Core today, it helps to understand why it was created. In 1995, during the OCLC/NCSA Metadata Workshop in Dublin, Ohio, the World Wide Web was experiencing explosive growth. Finding specific information...

Document order, visual order, and accessibility

While exploring features like CSS grid lanes/experimental-native-css-grid-masonry/, a critical question arises: If the visual order of items differs from the Document Object Model DOM order, does it break accessibility for users who rely on assistive technologies? The answer requires understanding the difference between document order the sequence of elements in the HTML and visual order the sequence in which items display on the screen. When these two orders diverge, it can severely impact users with different kinds of disabilities. This post explores document order, visual order, and how to balance complex CSS layouts with strict accessibility requirements. Defining the problem...