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

标签:#softwareengineering

找到 218 篇相关文章

AI 资讯

Github Stacked PR

🎯 What a “Stacked PR” Is (and Why You’ll Want One) A stacked pull request (sometimes called a stacked PR , stacked diff , or dependent PR ) is a series of PRs that build on top of each other, each one containing a small, logically‑isolated change. main ──► A ──► B ──► C │ │ │ │ │ └─ PR‑C (depends on B) │ └─ PR‑B (depends on A) └─ PR‑A (directly on main) A is based on main . B is based on A (its head). C is based on B , etc. When you eventually merge the stack in order (A → B → C), each change lands cleanly, and reviewers can focus on one cohesive piece at a time. Why Stack PRs? Problem Stacked PR Solution Huge, monolithic PRs that are hard to review & cause long CI times Break the work into bite‑size PRs (e.g., “feature flag”, “data model”, “UI”) Inter‑dependent changes (e.g., a new API + its consumer) Each dependent change lives in its own PR, but they still get tested together because they are built on top of each other Rebasing on main constantly drags in unrelated changes Only the bottom PR needs to be rebased onto main ; the rest stay on top of it Need to ship part of a larger change early Merge the first PR in the stack; the rest stay pending until they’re ready CI resources Only the bottom PR runs the full suite against main ; higher PRs can run a lighter subset because they already passed lower‑level tests 📦 The Landscape of Tools (as of 2026) Tool / Service Key Features Installation / Setup Typical Workflow ghstack (GitHub CLI plugin) - Creates stacked PRs automatically from a series of commits. - Handles base‑branch updates, resolves merge conflicts, and can re‑stack after rebases. - Works with GitHub's GraphQL API, so you get “dependent PR” links in the UI. pip install ghstack (or brew install ghstack ). Requires a personal access token with repo scope. bash git checkout -b feature/stacked\n# create many commits …\nghstack push\n# later, after rebasing on main\nghstack rebase . | | GitTown (aka git-town ) | - git town ship can ship a stack of dependent br

2026-08-06 原文 →
AI 资讯

A Deep Dive into the Memory Model

A Deep Dive into the Memory Model From Source Code to Machine Instructions A five-part journey through compilers, executables, virtual memory, and the CPU Introduction: What Really Happens When Code Runs Consider a simple C program: include <stdio.h> int value = 10; int add(int a, int b) { return a + b; } int main() { int x = 5; int result = add(x, value); printf("%d", result); return 0; } Most programmers look at this and see only the visible outcome: 5 + 10 = 15 But behind that single printed number lies a much deeper story. Where does the data actually live? Who moves it from one place to another? How does the CPU find the instructions it needs to run? And how does the result finally make its way to the screen? Answering these questions means understanding a concept that many programmers use daily but rarely examine closely: the memory model. What Is a Memory Model, Really? Ask most developers what a "memory model" means, and the answer usually comes back in two words: stack and heap. That answer isn't wrong - it's just incomplete. A memory model is really a description of five things at once: How data is stored How data is accessed How long data exists Who is responsible for managing that lifetime How different parts of a system communicate through memory A program never leaps directly from C source code into RAM. Several distinct layers sit between the two, each one translating the layer below it into something the layer above can reason about. This article walks through all of them, one at a time, and then reassembles the full picture. The Four Layers, at a Glance Layer What It Deals With Typical Concepts 1. Programming Language Human-readable code scope, lifetime, ownership 2. Compiler Translating code to instructions registers, optimization, assembly 3. Operating System Running the program as a process virtual address space, .text/.data/.bss 4. CPU Architecture Executing raw instructions registers, cache, pipeline, ALU The rest of this article follows a sing

2026-08-05 原文 →
开发者

LLD Data Structures in Design Context: Trie — A Data Structure Designed for Prefix Search

"A Trie isn't designed to store words. It's designed to make finding everything that shares the same beginning incredibly efficient." In the previous article, we explored a different kind of software problem. Some systems don't search using complete values. Instead, users provide only part of the information they know. The system must immediately suggest possible matches. Once you recognize that requirement, another question naturally follows. How should the system organize data so prefix searches become fast and natural? This is exactly the problem a Trie solves. Think About a Dictionary Imagine opening a physical dictionary. Suppose you're looking for the word: Application Do you start reading from page one? Of course not. You first go to the words beginning with: A Then you narrow further. Ap Then: App Every additional letter reduces the search space. A Trie works in a very similar way. Instead of repeatedly searching through every word, it follows the characters one by one. What Is a Trie? A Trie is a tree-like data structure where each node represents a character. Words that begin with the same characters share the same path. Consider these words. car card care cart A Trie stores them like this. Root ↓ c ↓ a ↓ r ├── end ├── d → end ├── e → end └── t → end Notice something interesting. The prefix: car is stored only once. Every longer word simply continues from that shared path. Every Data Structure Answers a Different Question By now we've seen several data structures, each solving a different design problem. A HashMap asks: Where is this exact object? A Heap asks: Which item has the highest priority? A Queue asks: Which task should happen next? A Stack asks: What is the current working context? A Trie asks: What begins with these characters? Choosing the right data structure starts with identifying which question your software needs to answer. Inserting a Word Imagine inserting: cat The Trie creates a path. Root ↓ c ↓ a ↓ t Now insert: car The beginning alread

2026-08-05 原文 →
AI 资讯

Designing a Reliable PDF Translation Job Pipeline in TypeScript

Uploading a PDF and calling a translation model looks like a two-step feature. In production, it is a job pipeline with untrusted input, two different extraction paths, several expensive stages, and an output that can be fluent while still being wrong. That distinction matters for a small SaaS team. The translation request may come from support, sales, or an internal operations task. Nobody wants to operate a document platform, but the workflow still needs to answer basic questions: Was the upload actually a PDF? Does the file contain selectable text or scanned page images? Can a retry create a second charge or a conflicting result? What happens when page 37 fails after the first 36 pages succeed? How do we know the translated PDF is not blank or visually broken? When are the source and result deleted? The translation model is one component. Reliability comes from the system around it. Define the Job Contract First I would not let a file reach an extractor until the API has established a narrow contract. For example, a translation request might include: type TranslationStyle = " general " | " technical " | " academic " ; interface CreateTranslationJob { uploadId : string ; sourceLanguage : string | " auto " ; targetLanguage : string ; style : TranslationStyle ; idempotencyKey : string ; containsRestrictedData : boolean ; } The request should be rejected when the source and target languages are identical, the upload is missing, the target language is unsupported, or policy says the document cannot leave an approved environment. File validation should also be explicit. Do not trust the filename or browser-supplied MIME type. Check at least: the actual byte size; the file signature; whether the parser can open the document; whether the PDF is encrypted; the page count; whether the job fits the account or product limit. A 20 MB limit is simple to explain in a user interface, but size alone is not a good predictor of work. A compressed 200-page text PDF can be smaller th

2026-08-05 原文 →
AI 资讯

AWS launches Kiro Crew for autonomous engineering teams

AWS introduced Kiro Crew on Tuesday as a new open-source orchestration platform. This tool aims to help businesses shift from interactive AI coding assistants toward autonomous engineering workflows. The system manages tasks across various repositories and developer tools over multiple work sessions to increase overall efficiency. Orchestrating autonomous development cycles Kiro Crew goes beyond simple code generation by coordinating multiple AI agents simultaneously. It schedules recurring work and maintains project context even when a session ends. This allows the system to integrate with standard developer tools for investigating incidents or monitoring pull requests. It triages tickets and automates software engineering tasks while developers are away from their workstations. The platform functions as an application layer that turns AI coding agents into self-learning teammates. It features persistent memory and multi-agent orchestration tools to ensure continuity. Security remains a priority with features like sandboxing and signed audit logs. Users can monitor activity through a dedicated web and desktop dashboard designed for transparency. Before its public release, the project existed inside Amazon as an internal tool named MeshClaw. More than 39,000 Amazon builders adopted it in less than six months. This internal success paved the way for the current open-source offering. Companies can deploy the platform entirely within their own environments, such as on local laptops or virtual machines. Reference applications and practical use cases AWS launched several reference applications to show how the platform functions in real-world scenarios. DevFleets manages worktrees, while Issue Radar handles the triage of pull requests and tickets. Task Runner focuses on executing engineering tasks that require a long duration to complete. These apps use specific interfaces combined with the core orchestration engine. These tools are not standalone products but rather exam

2026-08-05 原文 →
AI 资讯

25 Programming Mistakes I Learned After 10 Years of Software Engineering

When you start as a junior developer, you think software engineering is about writing code. A few years in, you think it's about choosing the right architecture and frameworks. After ten-plus years in the trenches - shipping features, surviving on-call disasters, and watching "perfect" codebases turn into unmaintainable monsters - you realize the truth: Software engineering is mostly about managing complexity, human communication, and trade-offs. Here are 25 mistakes I made, witnessed, or had to clean up over the past decade. Hopefully, reading them saves you a few years of painful trial and error. 1. Code & Architecture 1. Abstracting Too Early The DRY (Don't Repeat Yourself) principle is heavily drilled into beginners, but premature abstraction is far worse than duplicate code. Abstracting before you have 3–4 concrete use cases leads to rigid, over-engineered abstractions that are nightmare-inducing to change. Duplication is far cheaper than the wrong abstraction. 2. Falling in Love with "Clever" Code If your code requires a three-minute internal monologue or a complex diagram just to parse a single line, it's not smart - it's a liability. Write obvious, clear, and boring code. Your future self on a 2 AM incident response call will thank you. 3. Misunderstanding the Cost of Dependencies Adding a third-party library to solve a small problem feels like a quick win. In reality, every dependency is a contract you sign with an external team. You inherit their bugs, security vulnerabilities, breaking updates, and maintenance cycles. Ask yourself: Can we build the 5% of this library we actually need in 20 lines of code? 4. Over-Architecting for Scale You Don't Have Designing a system for 10 million daily active users when you currently have 500 is a classic trap. You end up with distributed microservices, message queues, and complex caching strategies that slow down development speed by 10x. Build for today's scale, but keep the boundary clean enough to refactor tomorrow

2026-08-04 原文 →
AI 资讯

LLD Data Structures in Design Context: Stack — Understanding Last In, First Out Through Design

"A Stack isn't designed to store data. It's designed to make the most recent piece of work the easiest to access." In the previous article, we discovered a new kind of design problem. Some systems don't need to find the fastest item. Some don't need to process tasks in arrival order. Instead, they need to work with whatever happened most recently . That's exactly the problem a Stack solves. In this article, we'll understand how a Stack works and why its behavior appears naturally in many software systems. Imagine a Stack of Plates Think about a stack of dinner plates. Plate 4 ────────── Plate 3 ────────── Plate 2 ────────── Plate 1 ────────── When you need a plate, which one do you take? The one on the top. You don't pull out the bottom plate. Likewise, when placing a new plate, you put it on top. This simple rule defines the behavior of a Stack. What Is a Stack? A Stack is a data structure where both insertion and removal happen from the same end. The last item added is always the first one removed. This behavior is called LIFO (Last In, First Out). Push A ↓ Push B ↓ Push C ↓ Pop ↓ C Notice something important. A Stack isn't trying to preserve arrival order like a Queue. Instead, it preserves recency . The newest item is always the easiest to access. Every Data Structure Solves a Different Design Problem By now, we've seen several data structures, each answering a different question. A HashMap asks: Where is this object? A Heap asks: Which item has the highest priority? A Queue asks: Which task has been waiting the longest? A Stack asks: What happened most recently? Choosing the right data structure begins with identifying which of these questions your system needs to answer. Push and Pop Stacks are built around two simple operations. Push Adding a new item. Before Top ↓ B ↓ A Push C After Top ↓ C ↓ B ↓ A Pop Removing the most recent item. Before Top ↓ C ↓ B ↓ A Pop After Top ↓ B ↓ A Only the top item is removed. Everything below remains untouched. Real-World Examp

2026-08-04 原文 →
AI 资讯

MCP Explained: The Protocol Powering AI Agents

Introduction Artificial Intelligence has evolved far beyond answering questions and generating code. Modern AI systems can search databases, interact with APIs, read files, execute commands, access cloud services, and even coordinate multiple tools to complete complex tasks. This shift has given rise to AI agents - systems that don't just generate responses but can actively perform work on behalf of users. However, enabling an AI model to interact with external tools introduces a challenge. Every application, service, and API exposes its capabilities differently. Without a common standard, every AI platform would need custom integrations for every tool it wanted to support. This is where the Model Context Protocol (MCP) comes in. MCP provides a standard way for AI models to discover, understand, and use external tools, data sources, and services. Instead of building separate integrations for each AI model and every application, developers can expose capabilities through a common protocol that different AI clients can understand. In this article, we'll explore what MCP is, why it matters, how it works, and how it's changing the way developers build AI-powered applications. The Problem Before MCP Imagine you're building an AI assistant that needs to interact with: GitHub Slack Google Drive PostgreSQL Jira Notion Local files Internal company APIs Without a shared protocol, every integration becomes a custom implementation. For each tool, you need to define: Authentication API endpoints Request formats Response parsing Error handling Documentation Now imagine supporting multiple AI models. Every model may require different integration logic, increasing development effort and maintenance costs. This creates unnecessary complexity. What Is MCP? At its core, the Model Context Protocol (MCP) is a communication standard between AI models and external systems. Instead of hardcoding every integration, MCP defines a consistent way for an AI client to: Discover available tools U

2026-08-04 原文 →
AI 资讯

Designing a Form Engine from Zero to One

Author: Skydu Summary: A form engine may look like the most basic capability in a low-code platform, but it is really the entry point for business modeling, data structure, permissions, workflows, and future AI understanding. Opening In the previous post, I wrote about why INFORMAT is not meant to be only a low-code tool. Starting from this post, I want to go into specific modules. The first module I want to write about is the form engine. The reason is simple: in a low-code platform, forms look basic, but a form is not just a page. Many enterprise business systems begin with a form. Customer registration, contract approval, project initiation, purchase requests, inventory receiving, equipment inspections, and production reporting are all, at their core, ways to collect, organize, and move business data. So a form engine is not about dragging a few input boxes onto a canvas. It is the entry point for the platform's business modeling capability. The initial requirement looked simple Before building the form engine, my most straightforward idea was this: users should be able to create business forms, configure fields, and let the system automatically generate data-entry pages and data lists. That idea does not sound complicated. A form name, a group of fields, a save button, and a data list seem like enough. But once implementation begins, a series of questions appear quickly. What field types should exist? Can fields be grouped? Can fields depend on each other? Should data be validated? Should a workflow be triggered after submission? Can different people see different fields? How will form data be used by reports, automation, and AI? When these questions stack together, the form engine stops being only a frontend component. It becomes a core module that connects the data model, permission system, workflow system, and automation system. A form is not a page, but a business model I gradually became more certain of one judgment: forms in a low-code platform should not

2026-08-04 原文 →
AI 资讯

Understanding Race Conditions in Backend Systems and How to Solve Them with Express.js

Modern backend applications handle thousands or even millions of requests every second. Users perform actions simultaneously: buying products, transferring money, updating profiles, sending messages, and more. But what happens when two requests try to modify the same data at the same time? This is where race conditions appear — one of the most subtle and dangerous problems in backend development. A race condition can cause incorrect data, security issues, financial losses, and unpredictable application behavior. Understanding how race conditions happen and how to prevent them is an essential skill for backend developers. What Is a Race Condition? A race condition occurs when multiple processes or requests access and modify shared data at the same time, and the final result depends on the order in which those operations execute. The problem is that the developer expects operations to happen in a specific sequence, but the computer executes them based on timing, network delays, database speed, and system load. Simple Example: Bank Account Withdrawal Imagine a user has: Account Balance: $100 Two withdrawal requests arrive at the same time: Request A: Withdraw $80 Request B: Withdraw $50 The backend checks the balance: Request A: Balance >= 80? Yes Request B: Balance >= 50? Yes Both requests continue because they saw the original balance of $100. The system processes: $100 - $80 = $20 $100 - $50 = $50 The final balance might become: $50 instead of: -$30 (which should have been rejected) The application has allowed money to be withdrawn that does not exist. This is a race condition. How Race Conditions Happen in Express.js Express.js applications are often built around asynchronous operations: Database queries API calls File operations Background jobs Message queues Consider this simple inventory system: app . post ( " /purchase " , async ( req , res ) => { const product = await Product . findById ( req . body . productId ); if ( product . stock > 0 ) { product . stock -

2026-08-04 原文 →
AI 资讯

Alibaba releases Qwen3.8-Max to compete with western AI

Alibaba officially launched Qwen3.8-Max on Monday, marking the debut of its most substantial artificial intelligence model. This new open-weight release aims at enterprise sectors, specifically targeting software engineering and complex reasoning. It represents a significant expansion of the company’s existing portfolio of digital tools for large-scale business operations. Technical architecture and performance benchmarks The Qwen3.8-Max model utilizes a mixture-of-experts (MoE) design, featuring a total of 2.4 trillion parameters. However, the system only activates approximately 95 billion of those parameters during any single inference cycle. This approach balances high-level processing power with the need for operational speed. Alibaba plans to make the open-weight versions of this technology available to the public through its cloud-based studio platform starting next week. Company representatives stated that this new architecture ranks among the most capable systems currently in existence. They position it as a direct competitor to the most advanced frontier models available globally. Internal data suggests the performance levels are trailing only the very top tier of experimental AI systems. This move signals a clear intent to capture market share from established western technology firms. Competitive testing and industry analysis To prove its capabilities, Alibaba released internal data comparing Qwen3.8-Max against top models from Anthropic and OpenAI. The tests focused heavily on coding benchmarks such as SWE-bench Pro. According to the company, their new model held its own against Claude Opus 4.8 and GPT-5.6 Sol. They utilized the specific coding frameworks recommended by each competitor to ensure a fair and rigorous comparison during the evaluation process. Industry analysts have noted that the gap between proprietary and open-weight models is closing rapidly. While proprietary leaders still hold certain advantages, the rise of open-weight alternatives pr

2026-08-03 原文 →
AI 资讯

Compressing Video to a Target File Size: The Bitrate Math in TypeScript

A practical calculator for turning an upload limit into a video bitrate, with enough margin for audio and container overhead. “Make this video smaller” is an open-ended request. “Make this three-minute video fit under 10 MB” is an engineering constraint. The second version sounds more precise, but a quality slider alone cannot solve it. A quality setting tells an encoder how aggressively to preserve detail. It does not directly tell us how many bytes the final file may contain. If the destination has a hard upload limit, the useful starting point is a bit budget. This article builds that calculation in TypeScript, then looks at the assumptions that make the answer less exact than the formula first appears. File Size Is Bitrate Multiplied by Time A video file contains several streams plus a container. For a simple MP4, the largest pieces are usually: the video stream; the audio stream; container metadata and indexing overhead. If we ignore overhead for a moment, the relationship is straightforward: file size in bits = total bitrate in bits per second × duration in seconds Rearranging it gives us the total bitrate available for a target size: total bitrate = target size in bits / duration in seconds That total must cover both video and audio. The approximate video budget is therefore: video bitrate = total bitrate - audio bitrate - overhead allowance The result is not a promise. It is a budget that an encoder can aim at. Be Explicit About MB and MiB Before writing code, decide what “10 MB” means. Storage vendors and many web services use decimal megabytes: 1 MB = 1,000,000 bytes Operating systems and developer tools often display binary mebibytes: 1 MiB = 1,048,576 bytes The difference is about 4.9%. That is large enough to turn a file that looks safe locally into a rejected upload. For a hard external limit, I prefer to calculate with decimal MB and keep an additional safety margin. For an internal tool where the unit is clearly MiB, I make that choice explicit in th

2026-08-03 原文 →
AI 资讯

Why Documentation Is Architecture

Most of the engineers consider documentation as an after-thought; a README on a finished system written in the final 20 minutes before a PR gets merged. That's the wrong way to do this relationship. Documentation is not a description of architecture. It is part of the architecture, and marking it as separate is the cause of so many rotting systems, which still pass all tests. The compiler doesn't care, your team does It could be a consistent codebase and yet it be undocumented garbage from the point of view of anybody who didn't write it. Only one sort of correctness is enforced by the compiler (or interpreter): does this code perform the operation that the instructions say it performs. It doesn't weigh in on why a specific table contains a deleted_at column, versus a hard delete, or why a service tries 3 times with exponential back-off, versus 5 times with a fixed interval. Those decisions include constraints that are not apparent in the diff, regulatory, historical, or performance. If these are only in the mind of the programmer who wrote them, the actual architecture is partially undocumented, and these constraints will be breached as soon as someone else messes with the code when it is under a tight deadline. Architecture is not only the shape of your services and schemas, it's the set of decisions and constraints that shape stayed within. Undocumented constraints are like walls that we don't see, or know about. They are walked through without anyone knowing they exist, and one of the assumed conditions is broken at a time. Documentation as a design artifact, not a report Good documentation should be done prior to and/or in the midst of implementation, not after. When writing a design doc that explicitly states the problem, the options you considered, the one you selected, and the tradeoffs you made, you are actually doing real design work, you are making mistakes in your thinking process that would only become apparent during production. There have been more ti

2026-08-02 原文 →
AI 资讯

Three bugs we found and fixed in our own pipeline this week

Three bugs we found and fixed in our own pipeline this week Journeymen grades developer work against GitHub's server-side history. That only means something if the grading pipeline itself is reliable — so here's the honest engineering update, not the highlight reel. 1. Silent progress loss on connect-repo analysis runs A connect-repo analysis run could sit in processing status with no visibility into what stage it was actually at, or whether it had stalled. From a dev's dashboard, a slow run and a stuck run looked identical. We added explicit progress-stage tracking so a stuck run is visibly stuck, not silently pending. 2. A background worker timing out without a clear signal The Lambda-based worker handling asynchronous analysis jobs was hitting its timeout under certain repo sizes, and the failure mode wasn't obvious from the outside — a run would just never complete. We root-caused the timeout and fixed the underlying slow path. 3. Dead-letter queue with no observability Jobs that failed enough times to land in the SQS dead-letter queue were, until this week, invisible — no alerting, no in-product surfacing. We wired up observability so a DLQ arrival is now a visible signal instead of a silent dead end. Why post about our own bugs The entire pitch of Journeymen is "don't trust the self-reported version, trust the verified one." That standard has to apply to us too. All three issues: found, fixed, and shipped this week. journeymen.in

2026-08-02 原文 →
AI 资讯

LLD Data Structures in Design Context: The Heap Property — The Simple Rule That Makes Heaps Powerful

"A Heap doesn't stay useful because everything is sorted. It stays useful because every parent follows one simple rule." In the previous article, we learned that a Heap is built for continuous decision-making. Whether it's assigning the nearest driver, scheduling the next process, or selecting the most urgent support ticket, the system always needs one thing: The next best candidate But that raises an interesting question. How can a Heap always know the best candidate without sorting everything? The answer lies in one simple rule: The Heap Property. This single rule is what gives a Heap its power. The Biggest Misconception About Heaps Many beginners imagine a Heap like this. 100 95 90 82 76 64 51 Everything perfectly sorted. It feels logical. If the largest element should always come first, shouldn't every element be arranged in order? Surprisingly, no. A Heap solves a much smaller problem. It only guarantees that the best element is always easy to reach . Everything else only needs to follow one simple relationship. Imagine a Company Hierarchy Think about the structure of a company. CEO ↓ Engineering Director ↓ Engineering Manager ↓ Software Engineer The CEO doesn't directly manage every employee. Instead, each manager is responsible only for the people immediately below them. The entire organization works because every manager fulfills their local responsibility. A Heap works in a very similar way. Every node only needs to maintain the correct relationship with its immediate children. It doesn't need to know about every other node in the structure. The Heap Property Let's look at a Max Heap. 100 / \ 90 80 / \ / \ 75 60 70 50 Notice the pattern. Every parent has a value greater than or equal to its children. That's the Heap Property. Parent ≥ Children That's it. There is no rule saying that every node must be greater than every other node in the Heap. Only the parent-child relationship matters. What About a Min Heap? Some systems want the smallest value first. For

2026-08-01 原文 →
AI 资讯

LLD Data Structures in Design Context: Heap — A Data Structure Built for Continuous Decision Making

"A HashMap helps you find what you already know. A Heap helps you decide what should happen next." In the previous article, we discovered that not every software problem is about finding a specific object. Sometimes, the system already knows exactly what it's looking for. Find User ID = 1024 ↓ Return User Other times, the system doesn't know the answer in advance. Instead, it has to repeatedly answer questions like: Which task should run next? Which driver should be assigned? Which customer should be served first? Which alert is the most critical? These are fundamentally different problems. Instead of retrieving an object, the system is making a decision. This is where a Heap comes in. A Heap Is Built for Decisions, Not Searches Imagine you're managing a hospital emergency room. Patients keep arriving throughout the day. Patient A Minor Injury Patient B Heart Attack Patient C Broken Arm Patient D High Fever Should doctors treat patients in the order they arrived? Probably not. Instead, they ask one question. Who needs treatment first? Notice something important. The hospital isn't searching for a particular patient. It's choosing the highest-priority patient. A Heap is designed for exactly this kind of problem. A Different Way of Thinking When beginners hear "data structure," they often think about storing data. Experienced engineers think differently. They ask: "What operation does my system perform repeatedly?" If the answer is: Find User Find Order Find Product that's a lookup problem. But if the answer is: Choose Highest Priority Choose Nearest Driver Choose Earliest Deadline that's a decision problem. A Heap is optimized for continuous decision-making. What Exactly Is a Heap? A Heap is a data structure that keeps the most important element immediately available. Depending on the system, "most important" can mean different things. For example: Highest priority Lowest cost Earliest deadline Highest score Closest driver Most urgent ticket The Heap doesn't decide w

2026-08-01 原文 →
AI 资讯

LLD Data Structures in Design Context: Why Some Problems Need the "Best" Result Instead of Any Result

"Finding something quickly and finding the best thing quickly are two completely different engineering problems." So far in this series, we've explored one of the most common behaviours in software systems: Fast lookup. Whenever a system already knows what it's looking for—a User ID, Product ID, Order ID or Session ID—a HashMap becomes an excellent choice. But not every software problem works this way. Imagine you're building a ride-sharing application. A rider requests a cab. The system doesn't already know which driver to assign. Instead, it must answer a different question: "Out of all available drivers, who is the best choice?" Now consider a task scheduler. Hundreds of jobs are waiting to run. The scheduler doesn't ask: "Find Job #123." It asks: "Which job should run next?" Or imagine a gaming platform. Thousands of players are competing. Nobody asks: "Find Player ID 1057." Instead, users ask: "Who are the top 10 players?" These problems are fundamentally different from fast lookup. They're not about finding a specific object . They're about finding the best object according to some priority. This shift in thinking introduces another important design behaviour. Fast Lookup vs Best Selection Let's compare two different requirements. Requirement 1 Customer ID = 1052 ↓ Retrieve Customer The system already knows exactly what it needs. The challenge is retrieving it efficiently. Requirement 2 Available Drivers ↓ Find Nearest Driver ↓ Assign Ride The system doesn't know the answer yet. It must compare multiple candidates before making a decision. These two behaviours may look similar. In reality, they solve completely different engineering problems. Every Software System Doesn't Search the Same Way Consider these questions. Find Order #50231 versus Find the highest priority order. Or: Retrieve Product ID = P1042 versus Recommend the most popular product. Or: Find Employee ID = 2107 versus Find the employee with the highest sales this month. The first question always

2026-08-01 原文 →
AI 资讯

Herdr and the Throughput Case for Parallel Coding Agents

Most agent tooling is still built around a single conversation: one agent, one task, one terminal, one stream to babysit. Fine for small tasks, bad for real engineering work. Herdr is interesting because it treats that as the default shape of the work. The simplest way to describe it is: Herdr is tmux for coding agents. More precisely, it is an agent multiplexer that runs inside your existing terminal. It gives each agent a real PTY, keeps processes alive where the work is happening, shows agent state, and exposes a CLI plus a local socket API. That distinction matters. Herdr is not another desktop agent app. It is a binary you run where the code and terminals live: a server, a Mac Mini, a VM, a dev machine under your desk. Close the laptop, detach, ssh back later, reattach, even from a phone. The work did not die because your terminal window did. The throughput problem Coding agents changed the cost of starting work. I can ask one agent to explore a bug, another to write a failing test, another to draft a migration plan. The bottleneck is supervision. The problem is that normal terminals do not understand supervision. tmux and Zellij give you persistence and panes, but they do not know whether an agent is blocked, working, done, idle, or just sitting there after printing a question three screens ago. Desktop apps often understand the agent state better, but then the workflow is stuck to the machine with the GUI. Worktree orchestrators can coordinate parallel tasks, but they usually want to own the workflow. Herdr sits in a useful middle: terminal model, plus agent awareness. The performance multiplier is not magic. It comes from four practical properties: Multiple agents run in real PTYs, each with its own shell, logs, prompts, and process state. Herdr rolls up semantic state, so you can see which agents are blocked, working, done, or idle. The server owns the panes, so sessions survive client detach, laptop sleep, and terminal death. The CLI and socket API let scr

2026-08-01 原文 →
AI 资讯

How AI Is Transforming Software Development Workflows in 2026

How AI Is Transforming Software Development Workflows in 2026 By 2026, AI has moved far beyond autocomplete and boilerplate generation. It has become an integral, intelligent partner in the entire software development lifecycle. From writing initial architecture to diagnosing production incidents, AI agents are embedded into the fabric of modern engineering workflows. This transformation is not just about speed—it's a fundamental shift in the way developers think, collaborate, and deliver software. The Rise of AI-Native Development Environments The days of classic IDEs with a chat sidebar bolted on are behind us. In 2026, AI-native development environments are the norm. These IDEs are built around context-aware AI models that understand not just the syntax but the semantic intent of the codebase. Tools like Cursor and Windsurf have evolved into full-blown autonomous agents that can navigate large codebases, propose cross-file refactors, and even execute multi-step changes with minimal supervision. Consider a common task: adding a new payment gateway. In a traditional workflow, a developer would manually trace API routes, update database schemas, and write integration tests. In 2026, the developer simply describes the requirement in natural language. The AI agent explores the existing adapter patterns, creates the new integration, updates configuration files, and runs the test suite. The developer reviews the diff, tweaks edge cases, and signs off. This paradigm shift has accelerated feature delivery by an order of magnitude. Intelligent Automated Testing and Debugging Testing has always been a critical yet time-consuming part of development. AI in 2026 has revolutionised this domain. Instead of writing every test case manually, developers use AI to generate exhaustive test suites that cover edge cases, security vulnerabilities, and performance bottlenecks. The AI analyses the code's control flow, historical bug data, and production logs to generate tests that would

2026-08-01 原文 →
AI 资讯

# Backend Engineers Learning AI: The Fundamentals Still Matter

I've spent years working with backend systems. APIs, databases, caching, integrations, performance, authentication, cloud infrastructure — these are the kinds of problems that become familiar after you've been building software for a while. Recently, I've been spending more time learning another side of software engineering: LLMs, RAG, AI Agents, tool calling, and MCP. At first, it felt like entering a completely different world. New terminology. New frameworks. New architectural patterns. And honestly, it made me feel like a beginner again. But the deeper I went, the more I noticed something interesting: AI engineering has a lot more backend engineering in it than I initially expected. The Traditional Backend Mental Model A simplified backend architecture might look like: Client ↓ API ↓ Business Logic ↓ Database ↓ Cache / External Services Of course, production systems have much more around this: Authentication Authorization Logging Monitoring Queues Caching Load balancing Rate limiting Distributed systems Cloud infrastructure But the general flow is deterministic. The application receives a request. Our code decides what happens. The application returns a response. Then we add AI. Adding an LLM Looks Easy The first architecture is surprisingly simple: User ↓ API ↓ LLM ↓ Response Send a prompt. Get a response. Done. For a prototype, this can be enough. But production applications rarely stay this simple. Suppose we're building an assistant that answers questions using internal company documents. Now we need retrieval. Enter RAG A simplified Retrieval-Augmented Generation pipeline might look like: Documents ↓ Chunking ↓ Embeddings ↓ Vector Database Then, when the user asks a question: User Question ↓ Embedding ↓ Vector Search ↓ Relevant Documents ↓ Context ↓ LLM ↓ Answer Conceptually, this is easy to understand. But implementing it properly raises a lot of questions. How should we chunk documents? A fixed number of characters? Tokens? Paragraphs? Sections? Semantic

2026-07-31 原文 →