AI 资讯
How Enterprises Govern AI Agents: Practices That Work in Production
TL;DR Traditional API security fails with AI agents because non-deterministic agents autonomously select tools, query databases, and execute multi-step plans across enterprise systems. Production agent governance requires an infrastructure control plane that decouples policy enforcement from application code using scoped virtual keys, granular tool filtering, and runtime guardrails. Bifrost adds only 11 microseconds of latency overhead at 5,000 requests per second while enforcing spend limits, content safety, and provider routing across more than 1,000 models. Model Context Protocol (MCP) governance restricts which tools, APIs, and file systems an agent can invoke, preventing prompt injection attacks from triggering unauthorized operations. Endpoint visibility through Bifrost Edge brings local coding agents and desktop developer tools under the same centralized gateway policies enforced across the enterprise fleet. Enterprise AI agents that operate across corporate data stores, cloud infrastructure, and customer-facing interfaces introduce operational risks that static API security policies cannot mitigate. Bifrost , an open-source AI gateway developed in Go by Maxim AI, provides the runtime control plane organizations need to govern autonomous workflows. Rather than treating an agent as an anonymous script or embedding custom governance logic directly inside agent prompts, engineering teams use centralized gateways to enforce access limits, model routing, and spend controls. This guide details the architectural patterns and production practices engineering teams use to safely govern autonomous agents at scale. Why Traditional Governance Fails for Autonomous AI Agents Passive language model applications accept a prompt and return text, allowing security teams to inspect the output before a human acts on it. AI agents, by contrast, pursue high-level objectives through autonomous execution loops: they evaluate context, choose tools, formulate queries, parse intermedia
AI 资讯
Blume: Zero-Config Docs Framework That Turns a Markdown Folder into an AI-Ready Website
Blume is an open-source documentation framework that converts Markdown into a complete documentation site. Built with Astro and Vite, it requires only Node.js and a single Markdown file for setup. The framework supports various configurations, offers automatic SEO features, and includes tools for document testing. It facilitates migration from other documentation systems. By Daniel Curtis
AI 资讯
CodePen: CryptoCap Landing Page
Crypto landing page with a sleek dark/light mode toggle, stylish Chart.js market graph, and smooth scroll animations using sal.js. Built with Tailwind CSS for a pixel-perfect, fully responsive design. Design inspired by: https://www.figma.com/community/file/1047142300578798855/cryptocurrency-landing-page-dark-mode
AI 资讯
NeurIPS 2026 Automatic Reference Checker [R]
Just received an email about the automatic reference/citation checker. Did anyone receive a follow up email about whether the checker was included in the paper's decision making too, along with the general instructional email? submitted by /u/Emergency_Plate241 [link] [留言]
AI 资讯
Language Models Can Control Their Own Attention [R]
Abstract Language models spend most of their attention on a small fraction of context, yet they read the entire KV cache to find the few tokens that matter. If the user asks about a previous detail in a 1M-token conversation, global attention layers must scan the full context to generate each token of the reply. A prominent approach mitigates this cost by pre-selecting relevant tokens via lightweight proxy scores, but this extrinsic scoring still incurs O(N) per step. We take an intrinsic approach motivated by the simple question: wouldn't the model already know which parts of the context are relevant? To this end, we introduce Declarative Attention (DA), a protocol that elicits the model to declare where it needs to attend within its chain-of-thought, partitioning generation into three modes: <global> (full context), <focus> (a specific region), and <local> (recent output only). The inference engine parses these declarations like tool calls and skips most of the KV cache read. Under zero-shot evaluation across 15 long-context tasks, DA on off-the-shelf models (Gemma-4-31B, Qwen-3.6-27B) significantly reduces total attended tokens during decoding (52.0%, 31.1%) with modest accuracy drops (1.27pp, 2.75pp) that shrink with model scale. DA unlocks a new axis of sparse attention, with further potential under training-based methods that future work can explore. Subjects: Computation and Language (cs.CL) ; Artificial Intelligence (cs.AI); Machine Learning (cs.LG) Cite as: arXiv:2609.02737 [cs.CL] (or arXiv:2609.02737v1 [cs.CL] for this version) https://doi.org/10.48550/arXiv.2609.02737 Focus to learn more submitted by /u/eigenlaplace [link] [留言]
AI 资讯
Implementing Embedding Gemma from scratch in PyTorch [P]
submitted by /u/Winter_Mistake_3185 [link] [留言]
AI 资讯
Demystifying HarmonyOS NEXT: A Deep Dive Into the Architecture, ArkUI, and Distributed Core
Under-the-hood breakdown of Huawei’s “Pure HarmonyOS” SDK for engineers and architects. For the past decade, mobile operating system architecture has been dominated by two paradigms: Android’s JVM-based, garbage-collected model, and iOS’s Darwin/Mach kernel with Swift/Objective-C. Huawei’s HarmonyOS NEXT introduces a third path. Often referred to as “Pure HarmonyOS,” this iteration completely drops AOSP (Android Open Source Project) compatibility. It is a microkernel-based, distributed operating system built from the ground up around a custom AOT compiler and a declarative UI framework. If you are a senior engineer or architect, looking at the HarmonyOS SDK can feel disorienting. The terminology shifts from Activities to UIAbilities, from ViewGroups to ArkUI, and from Java/Kotlin to ArkTS. To truly master this ecosystem, we must strip away the IDE abstractions and marketing terminology. Let’s reconstruct the HarmonyOS NEXT SDK from the silicon up — the Feynman way — to understand exactly how the machine breathes. The Core Engine: How Does HarmonyOS Execute Code Without a JVM? Press enter or click to view image in full size Android translates Java/Kotlin into Dalvik bytecode, which runs on the Android Runtime (ART) virtual machine atop a Linux kernel. HarmonyOS NEXT takes a fundamentally different path, utilizing the ArkCompiler and the Ark Runtime. JavaScript and TypeScript are dynamically typed. A virtual machine spends massive amounts of CPU cycle time inferring types and managing garbage collection. This overhead is unacceptable for a high-performance OS UI layer. ArkTS is a strict subset of TypeScript. It explicitly bans any , dynamic property addition, and eval . Why? Because the ArkCompiler is an AOT (Ahead-of-Time) compiler. When you trigger a build in DevEco Studio: 1.The ArkTS code is statically parsed. 2.Because the compiler possesses absolute type certainty (due to strict typing), it translates ArkTS directly into C/C++ data structures. 3.These structures
AI 资讯
AI Agents Failed to Prove Fermat's Last Theorem. Then They Got a Shared To-Do List
On September 4, Anthropic published something that sounds like a headline from a decade in the future: the first complete, computer-checked proof of Fermat's Last Theorem, written by a team of Claude agents working largely autonomously over 11 days. Thirteen million lines of Lean. Nearly 30,000 intermediate theorems. About six billion output tokens. I want to talk about a detail that most coverage will bury, because it is the only part that matters if you build software with agents instead of reading about them. The first attempts failed. Not because the model was too weak. The agents had early success, then lost track of the project's state and stopped collaborating effectively. What fixed it was not a smarter model. It was a shared directed acyclic graph acting as the team's memory. If you have ever run two AI agents on the same codebase and watched them trample each other's work, you already understand this failure. You just have not seen it dramatized at the scale of one of the hardest proofs in mathematics. What actually happened, in numbers First the facts, because they are dramatic enough on their own. Fermat scribbled his claim around 1637: no positive integers a, b, c satisfy aⁿ + bⁿ = cⁿ for any n greater than 2. Andrew Wiles proved it in 1995 after a 129-page proof, and even that is underselling the drama. He presented the proof in June 1993, a reviewer's question exposed a critical gap two months into verification, and Wiles spent a year, first alone and then with his former student Richard Taylor, fixing it. Formalizing that proof, meaning rewriting it so a proof assistant like Lean can verify every step algorithmically, has been a community project since 2024, led by Kevin Buzzard at Imperial College London. The blueprint for just the initial phase runs 86 pages. It was scoped as a multi-year effort. Then Tianyi Peng, an Anthropic researcher whose group at Columbia University builds AI formalization tools, tested whether Claude could make progress on i
AI 资讯
Advanced React Server Components Architecture in 2026 | Nainik Mehta
The Hidden Cost of React Server Components When React Server Components (RSC) were first introduced, they were hailed as the solution to the "bundle bloat" problem. By shifting rendering logic to the server, we promised users faster initial page loads and a cleaner separation of concerns. However, after deploying RSC at scale in production environments throughout 2026, many teams are discovering a harsh reality: RSC is not just a syntax update; it is a fundamental shift in architectural paradigm that punishes lazy design. If you aren't careful, your "performance-first" architecture can quickly become a massive bottleneck. Let’s dive into three critical lessons learned from the trenches of production RSC development. 1. The Sequential Waterfall Regression In the traditional client-side React world, we were accustomed to useEffect data fetching patterns. Moving to an async/await model in Server Components feels intuitive, but it introduces the risk of sequential waterfalls that block your entire render pipeline. The Anti-Pattern Consider a scenario where you need to fetch user profile data and their associated posts. A naive implementation might look like this: // ❌ The Waterfall: This will block the render until both finish async function Profile ({ id }) { const user = await getUser ( id ); const posts = await getPosts ( id ); return < ProfileView user = { user } posts = { posts } /> ; } In this example, the server must wait for getUser to resolve before even initiating the getPosts request. This doubles your latency. The Optimization: Parallelism and Streaming To fix this, you must leverage Promise.all to initiate requests concurrently. Even better, you should push these fetches into separate sibling components to allow React to stream the results as they arrive. // ✅ The Optimized Approach function Profile ({ id }) { return ( <> < Suspense fallback = { < UserSkeleton /> } > < UserComponent id = { id } / > < /Suspense > < Suspense fallback = { < PostsSkeleton /> }
AI 资讯
บทวิเคราะห์ paper 'Agentic Software', วิชาที่เกิดใหม่เมื่อ agent เข้ามาแทนที่โค้ด
บทวิเคราะห์ "Agentic Software", paper ที่เลิกใช้ชื่อ "The End of Software Engineering" เพื่อเล่าเรื่องวิชาใหม่ที่กำลังเกิด โดย Nokka (นก-กา), นักเขียนอิสระสายเทคโนโลยี ผู้เขียนบทความอธิบายเทคโนโลยีให้คนทั่วไปเข้าใจ 30+ บทความบน dev.to | 5 กันยายน 2026 บทความนี้เขียนโดย AI (glm-5.3 via ollama-cloud) ผ่าน Hermes Agent ภายใต้การควบคุมและตรวจสอบคุณภาพโดยมนุษย์, Nokka (นก-กา), อ้างอิงจาก paper วิจัยบน arXiv ฉบับเต็ม (2606.05608v1) ของ Zhenfeng Cao มี paper หนึ่งบน arXiv ที่จัดเป็นประเด็นที่สุดของปีหนึ่งงาน: "Agentic Software: How AI Agents Are Restructuring the Software Paradigm" โดย Zhenfeng Cao จาก Lingxi Intelligent Investment เมืองเสิงเจ๋น [1] เกร็ดที่ทำให้ paper นี้น่าสนใจกว่าชื่อที่เห็นคือมันเคยใช้ชื่อห้าวห้าสุดมาก่อน: ฉบับแรก (v1, มิ.ย. 2026) มีชื่อว่า "The End of Software Engineering: How AI Agents Are Fundamentally Restructuring the Software Paradigm" ก่อนผู้แต่งจะตัดคำว่า End ทิ้งเองใน v2 ซึ่งออกมาหกวันต่อจาก v1 พอดี เหมือนยอมรับว่าคำนั้นกลายเป็นการตัดสินประเด็นเกินเนื้อหาจริง เรื่องนี้ไม่ได้แค่เล่าจับฉาก แต่มีโครงเหตุผลจริงเป็นสามชั้น: วิชา software engineering เกิดจากข้อตั้งต้นหนึ่งที่ใช้มา 50 ปี, ข้อตั้งต้นนั้นกำลังหมดความหมายเพราะ agent, และสิ่งที่จะเกิดขึ้นแทนมีชื่อใหม่ที่ผู้เขียนเรียกว่า Agentic Engineering บทความนี้พาไล่ดูตามเหตุผลของเขาทีละชั้น พร้อมบอกด้วยว่าจุดไหนควรเชื่อแค่ไหน ก่อนอื่น, ทำความเข้าใจศัพท์ Software engineering : วิชาวิธีสร้างซอฟต์แวร์อย่างเป็นระบบ เกิดเป็นศัพท์ทางการที่ประชุม NATO ปี 1968 จากวิกฤต "ซอฟต์แวร์บวม" ของยุคนั้น AaaS (Agent-as-a-Service) : ศัพท์ที่ paper ตั้งใหม่ สำหรับยุคที่ผู้ใช้จ่ายเงินแลก "ผลลัพธ์จาก agent" ไม่ใช่ "ชั่วโมงหรือสิทธิ์ใช้ซอฟต์แวร์" Intent architect : บทบาทมนุษย์ยุคใหม่ที่ paper ทำนาย คนที่เขียน "เจตนา" ให้ชัดพอที่ agent จะเอาไปรันได้ แทนการเขียนโค้ดเอง ถ้าให้อุปมา: วิชาเดิมเหมือนวิชา "สถาปัตรกรรมสำหรับอาคารอิฐ" ที่สอนว่าจะกออิฐทีละก้อนอย่างไรให้บ้านไม่พัง วันหนึ่งปรากฏเครนอัตโนมัติที่รับแบบจากคำบอกของเจ้าของบ้านแล้วสร้างเองได้ทั้งหลัง วิชากออิฐยังมีคนใช้อยู่ แต่คำถามสำคัญที่สุดของวิชาย้ายจาก "กอยังไงไม่ให้พ
AI 资讯
ช่องว่าง 0.3% แต่ราคาต่าง 2 เท่า, อ่านตาราง Terminal-Bench 4.0 ให้เป็น
ช่องว่าง 0.3% แต่ราคาต่าง 2 เท่า, อ่านตาราง Terminal-Bench 4.0 ให้เป็น โดย Nokka (นก-กา), นักเขียนอิสระสายเทคโนโลยี ผู้เขียนบทความอธิบายเทคโนโลยีให้คนทั่วไปเข้าใจ 30+ บทความบน dev.to | 5 กันยายน 2026 บทความนี้เขียนโดย AI (glm-5.3 via ollama-cloud) ผ่าน Hermes Agent ภายใต้การควบคุมและตรวจสอบคุณภาพโดยมนุษย์, Nokka (นก-กา), อ้างอิงจากตาราง leaderboard จริงของ Terminal-Bench 4.0 และข้อมูลราคาจาก TokenCost สัปดาห์นี้ตาราง Terminal-Bench 4.0 มีโมเดลใหม่สองตัวขึ้นครองสองอันดับแรกพร้อมกัน: GPT-6 Astra ผ่าน Codex อยู่ที่ 58.2% และ Claude Fable 5.1 ผ่าน Claude Code ตามติดที่ 57.9% [1] พาดหัวข่าวส่วนใหญ่เล่าเรื่องความเก่ง แต่ผมอยากชวนอ่านตารางนี้ให้ลึกกว่านั้น เพราะคอลัมน์ที่อยู่ขวาสุดของตารางคือสิ่งที่นักพัฒนาตัวจริงควรจ้อง: ต้นทุนต่อรันเต็ม ทั้งสองตัวต่างกันแค่ 0.3 จุดในคะแนน แต่ต่างกันเกือบสองเท่าในเงิน: รันเต็มชุดของ Astra ใช้ประมาณ 3,300 ดอลลาร์ ขณะที่ Fable 5.1 ใช้ราว 6,200 ดอลลาร์ [1] บทความนี้เล่าว่าภาพนี้บอกอะไรเกี่ยวกับตลาดโมเดลปี 2026 และจะอ่านตาราง benchmark แบบนี้ให้เป็นยังไง ก่อนอื่น, ทำความเข้าใจศัพท์ Terminal-Bench : benchmark ที่วัดโมเดลผ่านงานจริงใน terminal ลีนุกซ์ เช่น ตั้งเครื่อง แก้ไฟไฟล์ config รันโค้ด จัดการ process เกินกว่าการตอบคำถาม รันเต็ม (full run) : การวิ่งโมเดลผ่านทุกโจทย์ในชุดหนึ่งรอบ เงินที่เห็นคือค่า API รวมของรอบนั้น ค่าความไม่แน่นอน (± ) : ตัวเลขหลังคะแนนบอกว่าถ้ารันใหม่ผลอาจลอยไปเท่าไหร่ เช่น 58.2% ± 2.8% หมายถึงอยู่ระหว่างราว 55-61% ถ้าให้อุปมา: ตารางนี้เหมือนตารางแข่งรถที่ป้ายบอกแค่เวลาเข้าเส้นชัย แต่สิ่งที่ลืมดูคือราคาน้ำมันที่แต่ละคันกินต่างกันเท่าตัว เวลาเข้าเส้นชัยต่างกัน 0.3 วินาทีไม่ได้แปลว่าคุ้มกันเสมอ ถ้าคันหนึ่งกินน้ำมันแพงกว่าสองเท่า ตารางจริง 14 อันดับ, อ่านคู่คะแนนกับราคา จากตารางทางการ ณ ต้นเดือน ก.ย. [1] อันดับ โมเดล (ผ่าน harness ไหน) คะแนน ราคาต่อรันเต็ม 1 GPT-6 Astra (Codex) 58.2% ± 2.8% $3.3k 2 Fable 5.1 (Claude Code) 57.9% ± 3.8% $6.2k 3 Opus 5 (Claude Code) 51.8% ± 3.4% $6.0k 4 Fable 5 (Claude Code) 44.5% ± 3.8% $7.3k 5 GLM-5.3 (Claude Code) 41.8% ± 3.2% $2.7k 6 GPT-5.6 Sol (Codex) 37.3% ± 3.8% $2.5k 7 Opus 4.8 (Claud
AI 资讯
เมื่อ Benchmark โกหกคุณ, SWE-Bench ProMax กับคะแนนจริงที่โมเดลเก่งสุดทำได้แค่ 41.2%
เมื่อ Benchmark โกหกคุณ, SWE-Bench ProMax กับคะแนนจริงที่โมเดลเก่งสุดทำได้แค่ 41.2% โดย Nokka (นก-กา), นักเขียนอิสระสายเทคโนโลยี ผู้เขียนบทความอธิบายเทคโนโลยีให้คนทั่วไปเข้าใจ 30+ บทความบน dev.to | 5 กันยายน 2026 บทความนี้เขียนโดย AI (glm-5.3 via ollama-cloud) ผ่าน Hermes Agent ภายใต้การควบคุมและตรวจสอบคุณภาพโดยมนุษย์, Nokka (นก-กา), อ้างอิงจาก paper วิจัย SWE-Bench ProMax บน arXiv ฉบับเต็ม เลข 90% ที่ทุกค่าย AI โชว์กันในปี 2026 อาจไม่ได้แปลว่าโมเดลเก่งขนาดนั้น paper วิจัยใหม่บน arXiv เปิดตัว benchmark ชื่อ SWE-Bench ProMax แล้วชี้ตัวเลขที่ต่างจากกระแสโดยสิ้นเชิง: เมื่อวัดด้วยงาน refactor จริงข้ามหลายไฟล์หลายภาษา โมเดลที่ดีที่สุดทำได้แค่ 41.2% [1] แต่ก่อนจะไปถึงตัวเลขใหม่ เรื่องที่ทำให้ paper นี้คุ้มอ่านที่สุดคือส่วนแรก: มันอธิบายว่าทำไมคะแนน benchmark เดิมถึงเชื่อไม่ได้เท่าที่คิด และนี่คือเรื่องเล่าแบบนั้นครับ ก่อนอื่น, ทำความเข้าใจศัพท์ SWE-bench Verified : benchmark เก่าที่ใช้กันทั้งอุตสาหกรรม วัดจาก issue จริงบน GitHub ของโปรเจกต์ Python Gold patch : เฉลยที่นักพัฒนาตัวจริงเคย commit ไว้ใน repository สาธารณะ Data contamination : โมเดลเคยเห็นเฉลยระหว่างเทรนจากข้อมูลสาธารณะ ทำให้ "จำ" ได้แทนที่จะ "คิด" Refactoring : การปรับโครงสร้างโค้ดใหม่โดยพฤติกรรมภายนอกเป็นเหมือนเดิมทุกอย่าง ถ้าให้อุปมา: สนามเดิมเหมือนข้อสอบที่ปล่อยเฉลยไว้ในห้องสมุดสาธารณะมาหลายปี นักเรียนคนไหนตั้งใจท่องห้องสมุดก็ทำข้อสอบได้เกือบเต็ม ส่วนข้อสอบใหม่ของ ProMax คือเขียนโจทย์สดจากงานจริงที่ยังไม่มีใครเคยเฉลยในที่สาธารณะ และบังคับให้แก้ทั้งเมือง ไม่ใช่เพียงบ้านหลังเดียว สามปัญหาที่ทำให้ benchmark เดิมเชื่อไม่ได้ จากการตรวจสอบ (audit) ที่ paper อ้างถึง ปัญหาของ SWE-bench Verified มีสามชั้นที่ซ้อนกัน [1] ชั้นที่หนึ่ง: test พังเกือบ 60% ในบรรดาโจทย์ที่โมเดล "ยังแก้ไม่ได้" เกือบ 60% มีปัญหาอยู่ที่ test เอง แบ่งเป็น 35.5% ที่ test แคบเกินไป (โมเดลแก้ถูกแล้วแต่ถูกตัดเพราะวิธีไม่ตรงกับที่คนเขียน test คิด) และ 18.8% ที่ test กว้างเกินไป (ตรวจสิ่งที่โจทย์ไม่เคยบอกให้ทำ) หนักสุดคือ OpenAI ถอด benchmark นี้ออกจากการใช้งานไปแล้วทั้งหมด ชั้นที่สอง: โมเดลจำเฉลยได้ งานวิจัยพบว่าโมเดล frontier สามารถขึ้นมาซ้ำเฉลยจา
AI 资讯
13 repositories, 13 bugs: what open source taught me about my own tool
I built a tool that draws architecture diagrams from a repository, where every edge cites the file, line and commit it came from. Then I ran it against thirteen repositories it had never seen, and every single one of them found something wrong with it. There were thirteen. These are the ones worth writing down. The list says nothing about those codebases. It says something about testing: a tool that reads other people's repositories has to be tested against other people's repositories, and there is no substitute. The rule the tool works by Nothing is drawn that cannot be cited. Every edge in the output carries the file, the line and the commit that justifies it — click an arrow, see the import statement. If a reference cannot be resolved to something in the repository, it is not quietly dropped and it is not guessed at. It is reported as a gap. That second half is what made these bugs findable. A tool that silently drops what it cannot resolve looks perfect and is useless. A tool that reports gaps by name and count tells you, loudly, every time it is confused. Java: a library sharing your package prefix is not you Guava declares com.google.common . Truth is a separate library, and it lives in com.google.common.truth . My resolver matched on package prefixes, so Truth looked like Guava's own code, and every reference to it became a gap against a package Guava does not contain. 834 false gaps — 28% of the repository. The fix is to require the next path segment to look like a type before peeling, because com.google.common.truth.Truth peels to a package and com.google.common.collect.ImmutableList peels to a class, and those are different shapes. Java: a file importing its own nested type Java requires the import for a nested enum constant even inside the same file. Treating that as a dependency has you drawing an arrow from a file to itself. It accounted for all 137 remaining gaps on Spring Boot and all 34 on Guava. Java: static imports point one segment too deep import
AI 资讯
XDOF, just three months out of stealth, is in talks for a Series B at a $1.2B valuation
The round is being raised just months after the robot data startup exited from stealth.
AI 资讯
Sorting Out My Question Before I Ask AI (Bite-size Article)
Introduction It's been a few years now since generative AI worked its way into everyday life. AI has made life more convenient for a lot of people, but at the same time, I've been seeing more and more talk about its downsides. The one I come across most often lately is the idea that using AI has a negative effect on how well you retain and understand things. For example, something like this: you split people into a group that solves a problem using AI and a group that solves it without, and when you check on them again after some time has passed, the group that used AI remembers less about it. This is something I can relate to. Or rather — I can't say for sure, but compared to how I was before AI, I've been handing whole tasks over to it more often, and I feel like I retain less and learn less by thinking things through. I build things up piece by piece less than I used to. Instead, more and more, it's AI laying the groundwork for my ideas and my work. I Was Handing Over the Wrong Things So is AI entirely to blame? I don't think so — I think it's a matter of how you use it and how you approach it. Looking back at my own usage, the problem was less about AI itself and more about what I was handing over to it. Take coming up with ideas. Throw it at AI and you'll get plenty of plausible-sounding ones. But I've come to feel that some subjects suit this and some don't, especially anything involving my own opinion or taste. For those, thinking it through myself from the start usually gets me to the finish line faster, and leaves me more satisfied with the result. When I hand the initial idea over to AI instead, what comes back often feels detached, like it belongs to someone else, and a little thin. On the other hand, there's work where the rough shape is already there but it isn't finished yet. Smoothing off the rough edges of that kind of thing is where I think AI is good. Pointing out gaps and typos, offering a different way to phrase something, cross-checking against
开发者
Beyond Development: What It Really Takes to Build Enterprise Applications
Lessons from building 24hours.lk and its companion mobile suite, the 24 Eco System Building an application is easy when everything is predictable. The database is clean. The API works. The user follows the expected flow. The server has enough resources. Nothing changes. Real enterprise applications are nothing like that. While working on 24hours.lk and the 24 Eco System mobile applications, I started to understand the difference between building something that works and building something that can survive in a real production environment. The most valuable part of the experience wasn't creating screens — it was dealing with everything that happens behind them. It Started Looking Like a Normal Application At first, an application can look deceptively simple: a user opens the app, authenticates, views some data, submits something. The backend processes the request. The database stores it. Done. But that simple flow hides a much larger engineering problem: What happens if two requests arrive at exactly the same time? What happens if the database becomes slow? What happens if the mobile app is running an older API version? What happens if a user closes the app halfway through an operation? What happens when thousands of records need to be retrieved? What happens when one service goes down but the rest of the ecosystem keeps running? That's where enterprise development really begins. 1. The Architecture Becomes More Important Than the Feature One of the biggest mindset changes I experienced was realizing that a feature is never really isolated. A new feature can touch mobile UI → API → authentication → business logic → database → storage → notifications → infrastructure, all at once — and changing one part can unexpectedly affect another. Because of that, I had to think about things like: Separation of concerns API contracts Service boundaries Database relationships Reusable business logic Error propagation Authentication flows Backward compatibility Deployment strategy
AI 资讯
C# Concurrent Collections: A Practical Guide
Choosing a thread-safe collection is not simply a matter of replacing Dictionary<TKey, TValue> with ConcurrentDictionary<TKey, TValue> . The right choice depends on the operations you need to make atomic, the ratio of reads to writes, whether consumers must block, and whether the data can become immutable after construction. This guide explains how ordinary generic collections fail under concurrent access, then compares the main types in System.Collections.Concurrent with immutable and frozen collections. The goal is to give you enough mechanical detail to defend the choice in code review—not just a catalog of APIs. C# Concurrent Collections: Quick Selection Guide Requirement Start with Concurrent FIFO processing ConcurrentQueue<T> Concurrent LIFO processing ConcurrentStack<T> Concurrent key-based reads and updates ConcurrentDictionary<TKey, TValue> Unordered items produced and consumed by the same workers ConcurrentBag<T> Blocking or bounded producer-consumer flow BlockingCollection<T> Snapshot-style updates System.Collections.Immutable Build-once, read-many lookup data System.Collections.Frozen The table is a starting point, not a substitute for checking which compound operations must be atomic. The sections below explain the mechanics and tradeoffs behind each choice. Why C# Needs Thread-Safe Collections C# 1.0 introduced System.Collections , which includes ArrayList , Hashtable , Stack , Queue , and other collection classes. The problem is that these collections are not type-safe. They store elements as object , which can lead to type-mismatch exceptions and to performance costs from boxing and unboxing. C# 2.0 then introduced the System.Collections.Generic namespace and collection classes such as List<T> , Dictionary<TKey, TValue> , Stack<T> , and Queue<T> . These collections are type-safe, but not thread-safe. Type safety means that when you create a generic collection, you specify the type it stores as a generic type parameter. Reading an element then returns
AI 资讯
Vibe Coding Is Creating a Generation of Developers Who Can’t Debug Their Own Systems
The Shift from Syntax to “Vibe Coding” Writing code used to be the bottleneck. Now, code is free and that’s precisely the problem. If you had told me Five years ago that my terminal would routinely spin up background execution agents, draft full-stack features, and push PRs before I finished my morning coffee, I would have assumed you were selling a tech startup pipe dream. Back then, GitHub Copilot was a neat trick: an glorified tab-completion tool that occasionally saved you from typing out a boiler-plate fetch request or regex string. Fast forward to today, and we’ve entered the era of “Vibe Coding.” You state intent in natural language. You direct agents in your editor. You prompt terminal workflows. Code manifests at conversational speed. You aren’t typing out syntax line-by-line; you’re steering an autonomous orchestra. The developer experience feels almost magical, fluid, and dizzyingly fast. But as the velocity of code creation hits lightspeed, an uncomfortable truth is beginning to surface across engineering teams: the cognitive load of software engineering hasn’t disappeared — it has simply shifted. We traded the friction of writing syntax for the far more taxing chore of evaluating architectural integrity, managing context drift, and catching silent edge-case failures in code we didn’t actually write. Code is easier to generate than ever, but system comprehension is at an all-time low. And nowhere is this trade-off creating more friction than in the middle tier of the software engineering workforce. The “Middle-Tier” Squeeze Senior engineers act as directors; AI handles the grunt work. Where does that leave everyone in between? For decades, the career progression of a software engineer followed a reliable, well-trodden path. You entered the industry as a junior, grinding away on bug fixes, writing unit tests, and building basic CRUD endpoints. Slowly, through hundreds of hours of raw syntax exposure, you built up mental models. You learned how state manag
AI 资讯
What You Refuse to Check Decides the Quality of a Linter
I built a checker for a configuration directory. The time went not into adding rules, but into deciding what not to add . Things you could detect are easy to think of. That was never the constraint. One false positive is enough to get the tool thrown out A checker is asymmetric. A miss goes unnoticed. The cost is only that you did not learn something you could have. A false positive stops the reader and demands a decision: is this actually wrong? And once someone has been burned, they read every finding with suspicion . Twice, and the tool comes out of CI. So a checker that calls a valid configuration broken is worse than no checker. Better ten rules with no false positives than thirty with one. That is obvious in the abstract and hard in practice, because while you are writing the code, every "oh, I could check that too" pulls in the other direction. No citation, no rule So I fixed one condition for adding a rule: Only check what the official documentation states outright — as an error, as skipped, or as ignored. If the documentation does not say it, the rule does not go in, however wrong the pattern looks. What this buys is that the judgement stops living in my memory. "I'm fairly sure that form was invalid" is not a citation, and my memory goes stale the moment the tool it describes releases a new version. In the implementation, every finding carries its reason: export interface Finding { severity : " error " | " warn " ; file : string ; line ?: number ; /** what is wrong, in one sentence */ message : string ; /** why that can be claimed — includes the source URL */ because : string ; } Making because required is the point. A rule you cannot justify cannot be written , because the type will not let you leave the field out. If no source comes to mind, the rule never gets implemented. The tests enforce it too: for ( const f of findings ) { if ( ! f . because . includes ( " https:// " )) fail ( `no source: ${ f . message } ` ); } One finding without a source URL fai
AI 资讯
The Transactional Outbox Pattern: Dual-Write Consistency in Distributed Systems
The Transactional Outbox Pattern: Dual-Write Consistency in Distributed Systems One of the most dangerous anti-patterns in microservices architecture is the Dual-Write Vulnerability : updating a database record and immediately publishing an event to a message broker (e.g., RabbitMQ, Kafka) in the same API call. If the network fails or the broker is unavailable after the database transaction commits, the event is lost forever. Conversely, if the event publishes but the database rollback triggers, downstream consumers process a phantom event that does not exist in the source of truth. In this deep dive, we architect the Transactional Outbox Pattern with Change Data Capture (CDC) to guarantee At-Least-Once delivery with zero distributed locking overhead. Technical & Interview Cheat Sheet Approach Consistency Guarantee Failure Mode Overhead Dual Write (Naive) None (Eventual inconsistency) Message lost if broker drops Low 2-Phase Commit (2PC / XA) Strict Atomicity Blocking locks, single point of failure Very High Transactional Outbox (Polling) At-Least-Once Polling query table contention Moderate Outbox + CDC (Debezium) At-Least-Once (Zero Table Locking) Requires WAL decoder plugin Optimal 1: Database Schema Design The business entity change and the outbox event MUST commit within the exact same database transaction: -- Business Entity CREATE TABLE orders ( id UUID PRIMARY KEY DEFAULT gen_random_uuid (), customer_id UUID NOT NULL , total_amount NUMERIC ( 12 , 2 ) NOT NULL , status VARCHAR ( 32 ) NOT NULL , created_at TIMESTAMPTZ NOT NULL DEFAULT NOW () ); -- Transactional Outbox Table CREATE TABLE outbox_events ( id UUID PRIMARY KEY DEFAULT gen_random_uuid (), aggregate_type VARCHAR ( 64 ) NOT NULL , aggregate_id VARCHAR ( 64 ) NOT NULL , event_type VARCHAR ( 64 ) NOT NULL , payload JSONB NOT NULL , created_at TIMESTAMPTZ NOT NULL DEFAULT NOW () ); -- Index for high-throughput CDC streaming CREATE INDEX idx_outbox_created ON outbox_events ( created_at ); 2: Atomic C# Tra