As generative AI evolves, the tools used to orchestrate these models must also advance. Gemini 3 provides developers with a powerful new model, but raw API calls rarely suffice for production environments. To build robust applications, you need a framework that manages state, streaming, structured data, and external APIs. This post explores how to integrate Gemini 3 with LangChain, bridge the frontend-backend gap using LangServe, and build model-agnostic applications that work across OpenAI and Anthropic. Gemini 3 and LangChain LangChain supports Gemini 3 through the @langchain/google-genai package. Because Gemini 3 maintains compatibility with existing API infrastructure, you can often upgrade...
In the modern web development landscape, performance is a business requirement. To measure success, developers often rely on tools like Google Lighthouse or PageSpeed Insights. While these tools are valuable for catching regressions and spotting unoptimized images, they often create a "green score" placebo effect. These tools measure Lab Data—a sterile, controlled simulation—rather than Field Data, which represents the chaotic, hostile reality of your actual users. Relying solely on synthetic scores is akin to testing a car's fuel efficiency on a treadmill in a climate-controlled room and expecting the same results during a rush-hour commute in a blizzard. This post...
When you build modern web applications, you often rely on third-party services like Content Delivery Networks CDNs to host essential files. While CDNs improve performance, they also introduce a vector for supply chain attacks. Subresource Integrity SRI provides a standardized defense against these risks. This post will explain what SRI is, how it works, and why it's crucial for securing your web applications. We'll also discuss the performance implications of using SRI and how to implement it effectively, even for resources hosted on your own server. Finally, we'll provide a TypeScript script to generate SRI hashes for your assets. What...
Designing APIs is difficult; designing good APIs is even harder. While web developers often focus on the implementation details of applications, the design of the APIs they create profoundly impacts usability, maintainability, and overall success. Developers design APIs regardless of the application type. The principles of good API design apply whether building a RESTful API for a web service, a GraphQL API for a mobile app, a web component, or a simple function meant for broader codebase consumption. This post explores principles of good API design and how to implement them in projects, drawing inspiration from Lea Verou's post Bluesky...
Webpack and other bundlers often produce large JavaScript bundles that can negatively impact web application performance. While Webpack Bundle Analyzerhttps://www.npmjs.com/package/webpack-bundle-analyzer offers a visual way to analyze bundle contents and identify optimization opportunities, it is—as the name implies—Webpack-specific. Developers using other bundlers like Rollup, Vite, or Parcel require a different tool. This post covers how to set up Sondahttps://sonda.dev/, a generic bundle analyzer, and use it to analyze JavaScript bundles within Vite and Rollup projects. What is Sonda? Sonda is a generic bundle analyzer that provides a detailed breakdown of a bundle's contents, including module sizes and dependencies. It supports multiple...
Defining CSS4 is a tricky endeavor. Unlike the annual ECMAScript specifications or the monolithic releases of CSS2 and HTML5, modern CSS evolves continuously. It consists of many different modules, each with its own specification and development timeline. This post explores how we can rethink CSS4 as a concept, approach its definition, and understand its implications for web developers. Historical Context To understand why "CSS4" remains a complex topic, we must look at how the language outgrew its original structure. Before CSS, developers styled web pages using HTML attributes and tags, leading to inconsistent, fragile designs. html This text is red....
Writing modes have a significant impact on how text is displayed on a webpage. By manipulating writing modes, designers can create unique and engaging layouts that enhance the user experience. Below are some examples of different writing modes and their effects. Until recently, not all browser could use sideways text, they could only display vertical text in the upright orientation. This woulld work well for languages like Chinese, Japanese, and Korean, but not so well for Latin-based languages. Now, with better support for the text-orientation property, we can create more versatile designs in all languages. This post will explore the...
AI can be a very effective writing partner given the right context and approach. Here are two ways I use AI to enhance my writing process, along with the tools and techniques I employ. Tools and Setup I use Gemini Pro via the online UIhttps://gemini.google.com/ as my LLM. I use Markdownlinthttps://github.com/DavidAnson/markdownlint via the VSCode extensionhttps://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint to ensure my Markdown formatting is consistent and clean. I use YAML front matter for metadata like title, date and tags for the Eleventy static site generator. I can add specific tools later as needed. The following example front matter adds the default metadata title,...
Working with modules in Node.js has evolved significantly. It used to be simple: CommonJS was the only game in town. With the introduction of ES Modules ESM and their stabilization in Node.js, developers now have powerful options—but also new complexity. The flexibility comes with its own set of challenges for both module authors and consumers. In this post, we’ll explore the differences between CommonJS and ESM, discuss how to navigate interoperability, and provide practical examples for building hybrid packages. A Little Bit Of History To understand the current landscape, we need to look back at how modules evolved in the...
GitHub Copilot is an AI pair programmer that provides intelligent suggestions as you work. It can suggest single lines of code, entire functions, documentation, and even prose based on the context of your file and your comments. This tutorial will guide you through installing, authenticating, and using its core features in VSCode for both coding and writing. This post will explore Github Copilot's capabilities, focusing on practical examples as well as its use as a writing assistant for documentation and blog posts. Copilot, and all other AI tools I'm aware of, generate non-deterministic outputs. This means that if you follow...