The query_one() method throughout the Textual documentation allows users to retrieve a single widget that matches a CSS selector or a widget type. You can pass in up to two parameters to query_one(), which are the CSS selector and the widget type, or both at the same time.
Every iOS app I've shipped over the last nine years started the same way: a Rails developer with a great web app, users who want it in the App Store, and weeks spent on Xcode, signing certificates, and Swift boilerplate that has nothing to do with the actual product.
React tutorial: Get started with the React libraryDespite the endless churn of new frameworks, React remains the quintessential reactive engine. This updated guide walks you through the fundamentals of React development, including a This is Spinal Tap variant on the canonical counter application. Sometimes, your components just need to go to 11.
We're sunsetting Ruby Newbie and merging its content into the Ruby Users Forum. Ruby Newbie was a site dedicated to helping beginners get started with Ruby through guides, tutorials, and posts aimed at making the first steps in Ruby easier and more approachable. Here's what this means: By integrating everything into the Ruby Users Forum, we can build a stronger, up-to-date knowledge base and make it easier for new members to learn and connect with others.
If there's one universal experience with AI-powered code development tools, it's how they feel like magic until they don't. One moment, you're watching an AI agent slurp up your codebase and deliver a remarkably sharp analysis of its architecture and design choices. And the next, it's spamming the console with "CoreCoreCoreCore" until the scroll-back buffer fills up and you've run out of tokens.
The core idea is three separate attribute layers: inputs (what comes in), internals (working state), and outputs (what goes out). Each is a distinct declaration with its own namespace and type checking. Combined with declarative make calls that define action order, the data flow through a service is visible at a glance: class Payments::Process < ApplicationService::Base input :payment, type: Payment internal :charge_result, type: Servactory::Result output :payment, type: Payment make :validate_status! make :perform_request! make :handle_response! make :assign_payment
The project behind this post is intentionally a bit over-engineered - in the "let's see what breaks when things grow" sense. That's by design. While a simple recipe example could easily be modelled with plain strings and numbers, cookbook explores more advanced, real-world concerns: extensibility, customisation, validation, and precise handling of numeric values, including floating-point quantities. The recipe domain is just a familiar, low-stakes vehicle for discussing these deeper ideas.
Anthropic has launched Claude Sonnet 4.6, an update to the company's hybrid reasoning model that brings improvements in coding consistency and instruction following, Anthropic said. Introduced February 17, Claude Sonnet 4.6 is a full upgrade of the model's skills across coding, computer use, long-context reasoning, agent planning, design, and knowledge work, according to Anthropic. the model also features a 1M token context window in beta.
Kacper Borucki blogged about parameterizing exception testing, and linked to pytest docs and a StackOverflow answer with similar approaches. The common way to test exceptions is to use pytest.raises as a context manager, and have separate tests for the cases that succeed and those that fail. Instead, this approach lets you unify them. I tweaked it to this, which I think reads nicely: One parameterized test that covers both good and bad outcomes. Nice.