今日已更新 237 条资讯 | 累计 29690 条内容
关于我们

标签:#m

找到 8781 篇相关文章

AI 资讯

Demystifying React Hooks: A Streamlined Guide for Developers

React Hooks have revolutionized how we write React components, offering a powerful way to manage state and side effects directly within functional components. This paradigm shift has led to cleaner, more readable, and often more maintainable codebases by moving away from the complexities of class components. Why the Shift to Hooks? Before Hooks, managing stateful logic and side effects often meant relying on class components. This approach could introduce several challenges: understanding this binding, managing complex lifecycle methods across different phases of a component's life, and dealing with "wrapper hell" – deeply nested component structures resulting from Higher-Order Components (HOCs) and render props when trying to reuse logic. Hooks solve these problems by allowing developers to "hook into" React features directly from functional components. This makes logic reuse more straightforward and components inherently easier to understand and test. Essential React Hooks at a Glance Let's explore the core Hooks that form the backbone of modern React development: 1. useState : Adding State to Functional Components The useState Hook is the most fundamental. It allows you to declare state variables in functional components. Instead of dealing with this.state and a separate this.setState() method, useState provides a direct variable for your state and a dedicated function to update it. This simplifies local component state management significantly, making it more intuitive and less prone to errors. 2. useEffect : Handling Side Effects The useEffect Hook is designed for performing side effects in functional components. Side effects encompass operations like data fetching from an API, setting up event listeners or subscriptions, or directly manipulating the DOM. This Hook consolidates logic that was previously spread across multiple lifecycle methods like componentDidMount , componentDidUpdate , and componentWillUnmount in class components. A key aspect of useEffect i

2026-08-01 原文 →
AI 资讯

qm multiplayer AI agent tutorial: Cut Latency 20% with Node.js

This article was originally published on BuildZn . Everyone talks about multi-agent systems but few show you how to actually coordinate them without a ton of boilerplate and deadlocks. I spent weeks trying to get agents to talk, especially when building something like FarahGPT's multi-agent trading system, often hitting insane latency. Turns out, qm can drastically simplify this, and this qm multiplayer AI agent tutorial will show you how to cut task completion times by 20% using a specific Node.js workflow. Why Multi-Agent Systems Aren't Just Hype Anymore (and qm Helps) Single LLM calls hit a wall, fast. You get generic answers, struggle with complex, multi-step tasks, and prompt engineering becomes a full-time job. I've built 9-agent YouTube automation pipelines and an AI gold trading system that needed to analyze market data, news sentiment, and historical trends concurrently. Trying to jam all that into one prompt for a single agent? Forget about it. You need a collaborative AI agent architecture . That's where multi-agent systems shine. You break down complex problems into smaller, manageable tasks, assign them to specialized agents, and have them work together. Think of it like a dev team: one person focuses on backend, another on frontend, another on CI/CD. This is how you handle real-world complexity, and it's how I scaled FarahGPT to 5,100+ users. The challenge? Orchestration. How do these agents communicate? Who manages their state? How do you ensure they don't step on each other's toes or get stuck waiting for slow upstream tasks? This is exactly where qm , a lightweight agent harness, becomes a game-changer for building AI teams. It gives you the primitives to define agents, tasks, and workflows without drowning in custom event loops. The Core Concept: Task Delegation in qm Most qm examples show simple agent interactions. Agent A asks Agent B. Done. But what if Agent A needs to delegate a task that itself needs parallel sub-tasks, and then aggregate the

2026-08-01 原文 →
AI 资讯

JWT Validation: Verifying Tokens for Authentication and Authorization

JWT Validation: Verifying Tokens for Authentication and Authorization A practical guide to JWT validation — the process of checking a JSON Web Token's signature, claims, and structure to confirm a request is genuinely authenticated and authorized — covering signature verification, standard claim checks, key rotation, validation in ASP.NET Core, and the mistakes that most commonly lead to broken or bypassed validation. Table of Contents Introduction Anatomy of a JWT Signing Algorithms What "Validation" Actually Checks Signature Verification and Key Rotation Standard Claim Validation Validating JWTs in ASP.NET Core Custom Validation Logic Token Revocation: JWT's Fundamental Limitation Validating JWTs Across Services Common Vulnerabilities Debugging Validation Failures Quick Reference Table Conclusion Introduction A JWT arriving in an Authorization: Bearer <token> header is just a string until it's actually validated — and validation is doing considerably more work than it might first appear. It's not just "does this look like a JWT" or even just "is the signature valid" — proper validation confirms the token was issued by a trusted party, intended for this specific API, still within its valid time window, and hasn't been tampered with in any way. Get any one of these checks wrong or skip it, and you can end up with an API that accepts tokens it absolutely shouldn't. builder . Services . AddAuthentication ( JwtBearerDefaults . AuthenticationScheme ) . AddJwtBearer ( options => { options . Authority = "https://login.microsoftonline.com/{tenant-id}/v2.0" ; options . Audience = "api://my-api" ; }); Those two lines look simple, but they configure a genuinely thorough validation pipeline underneath — this guide covers exactly what that pipeline actually checks, why each check matters, and where things commonly go wrong when validation is configured incorrectly or bypassed under pressure. 1. Anatomy of a JWT Three parts, dot-separated eyJhbGciOiJSUzI 1 NiIsInR 5 cCI 6 IkpXVC

2026-08-01 原文 →
AI 资讯

Fixing a Memory Leak in React by Cleaning Up useEffect

Project Overview The project is a React-based web application that fetches data from a REST API and displays it in a dynamic dashboard. Users can navigate between pages, search data, and interact with multiple components that rely on asynchronous API calls. While testing the application, I noticed that navigating away from a page during an active API request occasionally caused React warnings and unnecessary memory usage. This issue affected the application's stability and could lead to performance degradation over time. The problem was caused by an asynchronous operation continuing even after the component had been unmounted. For example, an API request initiated inside useEffect would still complete after the user navigated away, attempting to update the component's state. React would warn that a state update was attempted on an unmounted component. Before useEffect(() => { fetch("/api/users") .then((res) => res.json()) .then((data) => setUsers(data)); }, []); If the component unmounted before the request finished, the callback still attempted to update the state. After I solved the issue by using the AbortController API to cancel the request during cleanup. useEffect(() => { const controller = new AbortController(); fetch("/api/users", { signal: controller.signal, }) .then((res) => res.json()) .then((data) => setUsers(data)) .catch((err) => { if (err.name !== "AbortError") { console.error(err); } }); return () => controller.abort(); }, []); This ensures that pending requests are cancelled when the component unmounts, preventing unnecessary state updates and avoiding memory leaks. Code Prince3963 (Patel Prince) / Repositories · GitHub Prince3963 has 48 repositories available. Follow their code on GitHub. github.com My Improvements This fix focused on improving both performance and application reliability. What I improved Prevented memory leaks caused by unfinished asynchronous requests. Added proper cleanup logic inside useEffect. Eliminated React warnings about u

2026-08-01 原文 →
AI 资讯

How Much Memory Does Your Agent Need? — A Practical Memory Store Selection Guide

The Pain : You search GitHub and find everyone using different memory stores — ChromaDB, PostgreSQL, plain Markdown files, "SQLite is good enough for a decade." Which is right? The Answer : All of them. And none of them. Choosing without understanding your scenario is like buying a car without checking the road. 1. The Counter-Intuitive Question: Does Your Agent Actually Need "Memory"? When I was building a university admissions data scraper (91 universities), I made the classic mistake: I equipped the agent with a full ChromaDB + vector retrieval stack, spent three days tuning it, and then discovered — 95% of the agent's time was just reading "which page did I get to last time." A boolean would have sufficed. I built a vector database capable of semantic search. An engineer friend at ByteDance told me their internal agent platform found, after six months, that vector retrieval accounted for only 3.7% of all Memory Store requests. The remaining 96.3%? Key-value lookups, state reads/writes, error dedup. The vector search you spent two weeks integrating might serve less than 4% of your queries. So before discussing "which storage," we must answer a more fundamental question: what does your agent actually need to remember? I categorize memory into four types: Memory Type Typical Content Size Access Frequency Consistency Session state "Processing university 37/91" ~100 bytes Every call Strong Domain knowledge "A-University rate limit is 10 req/s" ~1KB On demand Eventual Error history "B-University returns 403 because UA blocked" ~MB Before new task Append-only Semantic memory "Map 'that red button' to settings page" varies Occasional Eventual See the pattern? If your agent mainly does multi-step automation (data scraping, report generation, CI/CD pipelines), the first three types are the real needs — and none of them require a vector database. Core thesis: memory selection is about finding the layer that is "just enough." One layer too many is waste; one layer too few i

2026-08-01 原文 →
AI 资讯

On-premise RAG without GPU, cloud, or Docker: five lessons that cost me a week each

Every RAG tutorial I've read makes the same two assumptions: you have a GPU, and you can call a cloud API. For the environments I build for, both assumptions are wrong. I work on health information systems in the public sector. The stack has to run inside institutional infrastructure — no data leaves the network — and the hardware I get is whatever the procurement cycle produced two years ago. In practice that means Windows Server, CPU only, and open-weight models running locally. So I built a RAG stack that runs entirely on-premise, no GPU, no cloud, no Docker. It's open source at github.com/psychohub/rag-onpremise : ASP.NET Core 9 for orchestration, Ollama for local inference, Qdrant for vectors, Python for the ingest pipeline, Mistral 7B as the LLM, nomic-embed-text for embeddings. Getting it into production took longer than the design did, because five things broke that no tutorial had warned me about. This is the field report. The environment, and why it matters Before the lessons, it's worth being precise about the constraint, because it changes what "good" looks like. The stack has to run on a Windows Server, not a Linux workstation. Docker is not available on many of the target machines — either because it wasn't approved, because GPO policies restrict it, or because ops teams already run everything as Windows services and adding a container runtime is a new operational surface nobody wants to own. GPUs are aspirational. In the meantime, you have CPU inference and you have to make it work. None of this is exotic. It's the default reality in a lot of public sector, healthcare, and legacy enterprise environments. It's also the reality most RAG content on the internet quietly assumes away. The overall shape of the system: Documents (PDF / Word / Excel) │ ▼ [ Python ingest ] ├─ Text extraction (pdfplumber, python-docx, openpyxl) ├─ Chunking (500 tokens, 50 overlap) ├─ Embeddings (nomic-embed-text via Ollama) └─ Store (Qdrant, cosine similarity) │ User query │ │

2026-08-01 原文 →
AI 资讯

Upgrade .NET 8 to .NET 10 Without Breaking Your API Contract

If I need to upgrade .NET 8 to .NET 10 , I treat the work as an API contract migration, not a project-file edit. A service can compile, pass unit tests, and still surprise consumers with a changed JSON shape, status code, authentication response, or OpenAPI document. That risk matters now because Microsoft has confirmed that .NET 8 and .NET 9 reach end of support on November 10, 2026 . .NET 10 and C# 14 are the current stable releases, and .NET 10 is the supported LTS destination. Why the deadline changes my upgrade order My first step is inventory, not retargeting. I list every deployable project, test project, global.json , container base image, CI SDK pin, and Microsoft package reference. dotnet --list-sdks shows what a machine can build; dotnet --info shows what the current environment actually resolves. If that inventory needs more detail, my older guide to dotnet sdk check is a useful starting point. For APIs still on .NET 8, the broader Web API setup and security checklist can help identify behavior worth protecting before the move. I then separate the migration into three changes: SDK and target framework, NuGet dependencies, and runtime infrastructure. Keeping those changes visible makes a failure easier to locate. A giant dependency-refresh commit may be quick to create, but it is hard to diagnose. Upgrade .NET 8 to .NET 10 behind contract tests Before changing net8.0 , I add a small set of tests around the endpoints consumers cannot tolerate changing. I care about observable behavior: status codes, content types, required JSON names, and authentication boundaries. I avoid asserting an entire serialized string because harmless property ordering can make that test noisy. Here is a focused xUnit test for a Minimal API: using System.Net ; using System.Text.Json ; using Microsoft.AspNetCore.Mvc.Testing ; using Xunit ; public sealed class ProductContractTests ( WebApplicationFactory < Program > factory ) : IClassFixture < WebApplicationFactory < Program >> { [

2026-08-01 原文 →
AI 资讯

Why Your AI Agent Forgets Everything Overnight — From Prompt to Loop Engineering

The Pain : You spent an afternoon tuning your agent. Next morning, it stares at you blankly — as if yesterday never happened. What You'll Learn : The 4-stage evolution (Prompt → Context → Harness → Loop), and a runnable 50-line Loop Agent that persists memory. 0. Prerequisites Python ≥ 3.10 pip install openai (openai ≥ 1.0.0) OpenAI API Key OS: macOS / Linux / Windows WSL Goal : Copy-paste the code, run it, and see a Loop Agent that doesn't forget. 1. The Pain: Why Does Your Agent Forget Overnight? At 2 AM, you finally got that multi-step workflow working. The agent followed your carefully designed prompt — data fetching, cleaning, analysis, charting. You close your laptop, satisfied. Next morning, you open the conversation full of hope — and the agent looks at you blankly, as if none of it ever happened. You check the logs. No errors. No exceptions. The agent regenerated everything — it just "forgot" where it stopped yesterday. This isn't a joke. It's the nightmare every serious Agent developer experiences. The root cause isn't "the model isn't smart enough." It's a more fundamental fact: your agent was never designed to survive the night. 2. Four-Stage Evolution: Prompt → Context → Harness → Loop 4-Stage Evolution — each stage solves the previous flaw but adds its own constraint. To understand this, let's use a simple evolution framework: Stage What You Do Fatal Flaw Prompt Engineering Write task description, examples, format into prompt Any unexpected input crashes output Context Engineering Stuff history + intermediate results into context window Token cost grows linearly, hits window limit Harness Engineering Add tool calling, structured output, error capture Framework built, but agent is still "one-shot" Loop Engineering Build closed loop: state + memory + feedback + retry + persistence True engineering — agent starts to "live" Loop Engineering isn't a rejection of Prompt Engineering — it's a transcendence. Prompt still matters. But it's the engine, and you ca

2026-08-01 原文 →
AI 资讯

Google Gemini’s AI Trip Planner Is an Established Travel Tool, Not a New Launch

Google Gemini offers an AI trip planner that combines travel research, itinerary generation and Google service integrations in one conversational workflow. The capability can surface real-time flight and hotel options, build itineraries around a traveler’s interests and adjust plans as needs change. Although Google is continuing to promote the feature, its official materials position it as an established part of the Gemini ecosystem rather than a newly launched product. The practical appeal is straightforward: trip planning often requires moving among airfare searches, hotel listings, maps, saved locations and notes. Gemini is designed to bring several of those steps together. On Google’s official Gemini AI trip planner page , the company describes prompts such as planning a four-day Tokyo visit around particular interests, then using Gemini to organize a tailored schedule by neighborhood. What Gemini’s travel planner can do Gemini’s travel functionality is framed as a consumer assistant for the research and planning stages of a trip. Users can describe a destination, trip length, interests or preferred travel style in natural language. Gemini can then help turn that input into an itinerary while drawing on relevant Google travel and mapping services. The official descriptions identify several connected capabilities: Real-time flight options through Google Flights. Real-time hotel options through Google Hotels. Customized itineraries organized around a traveler’s requested interests and locations. Plan adjustments during the trip , rather than a fixed itinerary created only before departure. Maps integration for navigation and points of interest along a route. Google’s Gemini Apps support material also confirms that the apps can help plan trips and retrieve live flight information. Maps integration matters because it extends the experience beyond trip inspiration: a user can move from deciding what to do to navigating to places and discovering points of interest whi

2026-08-01 原文 →
AI 资讯

Linear Regression: From Least Squares to Production-Ready Practice

Linear Regression: From Least Squares to Production-Ready Practice Tags : machinelearning , datascience , python , tutorial Linear regression is the first algorithm most people learn, and the one most people never study deeply. It is also the model you will still find in production after fancier algorithms fail, because it is fast, stable, and explainable. This article is not a "call .fit() and read the score" tutorial. We will cover the math, the statistical assumptions, the diagnostics, regularization, evaluation, production concerns, and the interview questions that separate beginners from engineers. Why Linear Regression Deserves a Second Look Linear regression is the foundation for understanding almost every other supervised model: Logistic regression is linear regression with a sigmoid on top. Ridge and Lasso are linear regression with constrained weights. Neural networks are stacked linear transformations with nonlinear activations. Tree models are judged against the same baseline: "can I beat a linear model?" More importantly, linear regression is still the right answer in many business problems. When you need to explain a prediction to a regulator, a client, or a finance team, a clean linear model with interpretable coefficients beats a black box. The Math: Least Squares and the Normal Equation Given features X and target y , a linear model assumes: y = X * beta + epsilon The goal is to minimize the residual sum of squares: L(beta) = ||y - X*beta||^2 Taking the derivative with respect to beta and setting it to zero gives the normal equation : beta = (X^T * X)^(-1) * X^T * y In practice, use the pseudoinverse ( pinv ) instead of the inverse, because X^T X may be singular or numerically unstable when features are collinear. import numpy as np def normal_equation ( X , y ): Xb = np . c_ [ np . ones ( X . shape [ 0 ]), X ] # add intercept beta = np . linalg . pinv ( Xb . T @ Xb ) @ Xb . T @ y return beta Three Equivalent Views of Least Squares 1. Geometric view

2026-08-01 原文 →
AI 资讯

Part 4: When It Breaks, Just Fix the 'Raw Parts'. The Self-Reliance to Maintain Tools Yourself by Commanding AI

This article was originally published on e-shikumi-labo . Hello, I'm Shin from e-Shikumi-Labo. This is the final installment (Part 4) of "Systematized Thinking," where we use AI to build our own tools and independently maintain them. So far, we have discussed creating a prototype that automatically saves Gemini chat logs, converting them to Markdown for Obsidian integration, and elevating it to a safe, fully automated system. In this final installment, we will cover the "countermeasures for downtime due to screen specification changes," an unavoidable issue when operating tools that handle web data, and the core of the "self-reliance" humans should possess in the AI era. 1. The Web Data Extraction Compromise: "You Can't Extract What Isn't on the Screen" During development, there was a time when I thought, "I also want to record the exact date and time (timestamp) when the chat was sent." However, no matter how much I analyzed Gemini's screen structure, the exact timestamp of each utterance did not exist in the HTML. The fundamental rule of web data extraction is: "You cannot extract data that does not exist on the browser screen." As long as you are extracting data from the screen (DOM) rather than via an API, forcing the extraction of something that isn't there will require complex guesswork processes and will instead become a cause of trouble. Understanding this "technical limit," gracefully giving up on what cannot be done, and judging to maintain simplicity is also an important element of tool building. 2. Specification Changes Are Not Defects, But "Fate" As long as you deal with tools that extract data from other people's websites, the time will inevitably come when the tool suddenly stops working one day due to design changes or updates on Google's side. "It was working fine until yesterday, but suddenly it stopped saving." This is not a defect in the tool, but an unavoidable "fate" as long as you depend on someone else's platform. The important thing is not t

2026-08-01 原文 →
AI 资讯

Restoring Codebase Harmony

The Chaotic Bug: The Infinite State Loop & Memory Leak In a real-time clinical AI health suite, high-frequency telemetry streaming (such as 60Hz ECG canvas updates) demands surgical precision. During heavy load testing, our frontend performance suddenly degraded: CPU thread usage hit 98%, heap memory ballooned to over 1.4 GB, and DOM frame rendering dropped to single digits. The Root Cause A subtle React useEffect hook listening to the incoming WebSocket data stream contained the state setter inside its dependency array: // ❌ THE CHAOTIC BUG (Caused infinite state sync re-renders) useEffect(() => { const sub = ecgDataStream.subscribe((point) => { setEcgPoints((prev) => [...prev, point]); // Triggered full tree re-render on every frame! }); return () => sub.unsubscribe(); }, [ecgPoints]); // Including state array in deps created recursive re-subscription storm! Every incoming telemetry frame pushed new state, triggering an immediate top-level component re-render, which re-subscribed to the stream and accumulated thousands of orphaned event listeners. Best Use of Sentry: Pinpointing & Clearing the Lineup Sentry Performance Tracing and Sentry Error Tracking proved invaluable in isolating this silent killer: Transaction Waterfalls: Sentry flagged transaction spans render_ecg_canvas exceeding the 500ms threshold (averaging 842ms). Breadcrumb Trail: Sentry logged a rapid succession of CanvasRenderer memory allocation warnings (>64MB/sec). Issue Grouping: Sentry grouped 14,000 React Maximum update depth exceeded exceptions into a single actionable alert. The Fix & Restored Harmony We refactored the streaming engine to bypass React state re-renders entirely for frame accumulation, employing a zero-allocation useRef buffer paired with a requestAnimationFrame render cycle, and instrumented Sentry Breadcrumbs: // ✅ THE RESILIENT FIX (Zero-allocation ref buffer + Sentry Breadcrumb) import * as Sentry from '@sentry/react'; const bufferRef = useRef([]); useEffect(() => { Sentry.a

2026-08-01 原文 →
AI 资讯

Part 3: The '1.5-Second Trap' Overlooked by AI. Avoiding Account Ban Risks Using Years of Scraping Experience

This article was originally published on e-shikumi-labo . Hello, I'm Shin from e-Shikumi-Labo. This is Part 3 of "Systematized Thinking," where we use AI to build our own tools and independently maintain them. Last time, I talked about creating a system to automatically output Markdown (.md) files to Google Drive simultaneously with appending to a spreadsheet. With list management in a spreadsheet and a comfortable viewing environment in Obsidian established, it was getting very close to completion as a tool. However, as I continued to use it practically, new challenges emerged on the operational front. This time, I will share the risks I faced while transitioning from a "manual button" to "full automation," and the process of evolving into safe code. 1. I Want to Eliminate the "Hassle of Pressing a Button" During the prototype stage, the system was designed so that logs were saved by pressing a button placed on the screen. However, as long as a human operates it manually, there are inevitably limitations. If you are concentrating on the conversation, you might forget to press the save button and close the screen. If the conversation gets long, you might miss past utterances that are no longer displayed on the screen. "If I have the screen open and am conversing, I want it to automatically save in the background without bothering human hands." Thinking this, I asked the AI to write the code for full automation. 2. The Code the AI Produced: "Patrolling the Screen Every 1.5 Seconds" When I consulted the AI, it immediately presented code for full automation. The mechanism was, "Start a timer every 1.5 seconds, check the entire screen in the background, and send any new utterances." When I actually tried it, the logs accumulated automatically as soon as I conversed without pressing the button, and at first glance, it looked like exceptionally well-done full automation. However, I felt something was slightly off regarding this "monitoring on a 1.5-second cycle." 3. The B

2026-08-01 原文 →
AI 资讯

Is GitHub Copilot Worth It? Who It Pays Off For (and Who Can Skip It)

A practical, no-hype breakdown of GitHub Copilot's features, free vs paid tiers, real limitations, and the kind of developer who actually gets their money's worth. "Is GitHub Copilot worth it?" usually means one of two things: will it save enough time to justify the subscription? or is a paid plan meaningfully better than the free one? This guide answers both, based on GitHub's documented features and the trade-offs that tend to matter in day-to-day development work. The short version is that Copilot has a genuinely useful free tier and a low-cost paid tier, so the real question is rarely "should I spend a lot of money" — it's "does an AI pair-programmer fit how I work." Below we cover what you get, what it costs, where it helps, and where it falls short, so you can decide for your own workflow. At a glance In short For developers who write code most days, GitHub Copilot is generally worth trying — and the free tier lets you find out at zero cost. The low-priced Pro plan is small relative to the time many users save on boilerplate, tests, and unfamiliar APIs, but you still have to review everything it produces. It's a weaker value for occasional coders, for those working mainly in niche or proprietary codebases where suggestions are less accurate, or for anyone who finds constant autocomplete distracting. Start on the free tier, test it on your real work, and upgrade only if you hit the caps or want agent mode and model choice. Always confirm current pricing and limits on GitHub's site. Pricing Confirm current pricing on each vendor's site. Free$0 Capped monthly code completions and chat messages Access in supported editors and on GitHub.com Good for evaluating Copilot at no cost Confirm current monthly caps on GitHub's plans page View Copilot plans ProAbout $10/month (or ~$100/year)confirm current pricing Removes the tight free-tier caps Agent mode and model selection Monthly allowance of premium requests (overage billed separately) Free trial has historically been

2026-08-01 原文 →
AI 资讯

The gate for an agent belongs in the environment, not in the agent

There's a discussion running on Product Hunt right now about where an AI agent should stop and hand a decision back to a person. The framing that stuck with me: "can this be undone?" is the wrong gate. It over-fires on things nobody cares about, like writing a log line, and under-fires on the ones that actually hurt. A mass email. A migration you can only roll back with downtime. The proposed replacement is reach. Not "is this safe" but "how far does this go if I'm wrong." And the sharpest point in that thread is that the agent is the worst possible judge of its own reach, because it doesn't know there are 50,000 people on the list. I've been building a browser with an agent in it, and the browser case makes that concrete in a way the terminal case doesn't. A coding agent's blast radius is usually one person: you, reading a diff. A browser agent doesn't start there. It inherits every session you're already signed into. The reach of a click isn't a property of the agent's plan, it's a property of the cookie jar it's holding. The same "click the blue button" step is harmless on a docs site and irreversible on a payments dashboard, and nothing in the agent's own summary distinguishes them. So I stopped trying to make the agent classify risk. Here's what I do instead, with the caveat that this is alpha and I've been wrong about it before. Some things never reach the model. Credential fields are filtered out of the page snapshot before the agent sees it. That means password inputs, and anything with cc-number , cc-csc , cc-exp , or one-time-code autocomplete semantics. A fill targeting a password field refuses outright. The agent cannot misjudge the reach of a control it was never shown, and that's a stronger guarantee than any classifier, because it doesn't depend on getting a judgment right. The model's judgment is a floor, never a ceiling. For everything that does reach it, the agent can say "this needs approval" and be believed. It cannot say "this is routine" and be

2026-08-01 原文 →
AI 资讯

Hello World! 👋 A Computer Science Student & Technical Writer on a Journey

Hi Dev.to community! 👋 As an aspiring technical writer and a Computer Science student, I've been working hard on building a series of deep-dive articles about AI, Python, and software concepts. I just published a guide on Natural Language Processing (NLP) over on my Hashnode blog, featuring text preprocessing pipelines and a Python code example using spaCy! I would love for you to check it out and share your feedback—especially if you have tips on how I can improve my technical explanations: 👉 [ https://hilda-biende.hashnode.dev/natural-language-processing-nlp-explained-how-computers-understand-human-language ] Looking forward to connecting with fellow devs and writers here!

2026-08-01 原文 →
AI 资讯

"Your GitOps Hub Will Become the Bottleneck Long Before Cluster Count Tells You"

Your GitOps Hub Will Become the Bottleneck Long Before Cluster Count Tells You GitOps hub bottlenecks are usually predicted more accurately by watched object volume, reconcile queue depth, and controller memory growth than by cluster count alone. Large-scale testing described in the discussion showed Argo CD application controllers hitting out-of-memory failures around 15,000 to 20,000 cached objects per hub, while sharding and tuning delayed the limit without removing the underlying memory cost. The most important lesson was uncomfortable because it challenged the usual instinct to keep tuning the existing platform. At very large scale, architecture mattered more than configuration. Hydrated manifests helped. More replicas helped. Dynamic sharding helped. None of them changed the fact that a centralized reconciliation model still had to hold and process a huge amount of state. The testing was not presented as a universal benchmark or as proof that one tool always beats another. It was a record of one setup, built through dozens of iterations over several months, and the failures were as valuable as the successful runs. That is exactly why the results matter. They show where teams should look before the hub becomes the thing taking the fleet down. Cluster count is the wrong first metric A fleet with 1,000 tiny clusters may place less pressure on a GitOps control plane than a much smaller fleet containing thousands of applications and deeply expanded resource trees. The number of managed clusters is visible and easy to report, but it does not describe the controller’s actual workload. The more useful mental model is objects over clusters. Each application contributes desired state, live state, cached trees, reconciliation work, and queue activity. A cluster that runs a few small addons may be cheap to manage. Another cluster with many applications and large manifest sets may consume far more memory and reconciliation time. That means two fleets with the same cluster

2026-08-01 原文 →
AI 资讯

Building an AI lineup optimizer for a Discord esports bot (the algorithm, not the hype)

Every esports team captain has done this by hand at least once: open Discord, scroll through a dozen "I can play Thursday after 8" messages, cross-reference them against who plays Tank versus DPS, remember that one of your DPS is actually a sub, and try to assemble a starting five that can actually scrim tonight. It takes fifteen minutes, you get it slightly wrong, and you do it again the next day. I build Supatimer , a free Discord bot for competitive gaming teams, and "generate the lineup for me" was the single most requested feature. This post is about how the lineup optimizer actually works, why it is genuinely AI (and not in the marketing sense), and where a large language model fits in versus where it absolutely does not. "AI" is doing a lot of work in this industry Half the Discord bots on the market slapped "AI" on their landing page the week ChatGPT launched. Usually it means there is a chatbot command somewhere that proxies to an LLM. That is fine, but it is not what your team needs when it is 7:45pm and you have a scrim at 8. There are two honest definitions of AI worth separating: Search and optimization - the classical branch. Constraint satisfaction, combinatorial optimization, planning. This is the part of AI that solves "given these rules and these resources, find the best valid arrangement." Machine learning / LLMs - the statistical branch. Pattern recognition, generation, extraction from unstructured text. The lineup problem is squarely a problem for the first kind. So that is what I built first. The lineup problem, stated precisely Strip away the gaming context and a lineup is a constrained assignment problem: You have N players , each with a set of roles they can fill (Tank, DPS, Support, IGL, and so on). Each player has an availability signal for a given time block (available, maybe, unavailable). Each player has a roster status (starter, substitute, trial). The game defines a required composition : Overwatch 2 wants 1 Tank, 2 DPS, 2 Support. Va

2026-08-01 原文 →
AI 资讯

I automated my weight logging into Notion, and gave myself a new daily chore

What I wanted I'm building a system where all my daily records live in Notion, so I can point an AI at it and get feedback. Goals, tasks, daily logs, finances — those are all manual entry, and that's fine. But one day it hit me that weight would be nice to sync automatically. The requirements were simple: Every morning, my weight and body fat percentage get appended to a Notion database as one row No manual typing That's it. My scale is a Withings Body Smart. The design I picked first This one: Scale → vendor app → Apple Health → iOS Shortcut → Notion API I chose Apple Health as the hub for these reasons: It doesn't depend on the scale model. As long as the data lands in Health, the same implementation works for any vendor. No server required. A time-based Shortcuts automation handles it end to end — no always-on machine, no cron. Free. No extra subscription. Extensible later. Anything that's already in Health — steps, sleep, heart rate — could be added the same way (if I ever wanted to). Generic, zero cost, extensible. The design looked sound to me. Implementation Here's what the Shortcut looks like: 1. Find Health Samples [Weight] latest, limit 1 2. Get Details of Health Sample [Value] → variable Kg 3. Get Details of Health Sample [Start Date] → variable SampleDate 4. Format Date yyyy-MM-dd → variable Ymd 5. If Ymd == today 6. Text ← build the JSON 7. Get Contents of URL ← POST to the Notion API Step 5 matters. Without it, on a day you don't step on the scale, yesterday's weight gets appended under today's date . Here's the JSON built in step 6: { "parent" : { "database_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, "properties" : { "Date" : { "title" : [ { "text" : { "content" : "@@YMD@@" } } ] }, "Measured" : { "date" : { "start" : "@@YMD@@" } }, "Weight kg" : { "number" : @@KG@@ }, "Body fat %" : { "number" : @@FAT@@ } } } (My real database uses Japanese property names. What matters is that they match your database exactly.) I write this as a plain string in a

2026-08-01 原文 →