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

标签:#RAM

找到 2533 篇相关文章

AI 资讯

Product-Judgment Layer for AI Coding Agents

AI coding agents are getting very good at writing code. They can build components, create APIs, fix bugs, and implement features from short prompts. But I kept noticing one issue: Working code does not always mean a good product. For example, if you ask an agent: “Add a delete button to every project.” It may technically do exactly that. But will it also think about: confirmation before deletion error handling undo options accessibility clear feedback to the user Those are not just coding problems. They are product judgment problems. That led me to experiment with a reusable instruction layer for AI coding agents at AudranLab. The idea is simple: Instead of only asking an agent, “Can you build this?”, also encourage it to ask, “Is this a good way to build it?” I want agents to consider things like accessibility, failure states, destructive actions, usability, and sensible defaults while they work. This does not magically turn an AI into a product designer. But I think it raises an interesting question: Can explicit product principles consistently improve the quality of software generated by coding agents? That is what I’m currently exploring. My next step is to test the approach across different coding tasks and compare the results with and without the additional product-judgment layer. If you’re interested in AI agents, LLM reliability, developer tools, or applied AI, I’ll be sharing more experiments here. AudranLab: https://www.audrantechlab.online/

2026-08-29 原文 →
开发者

Sealed Isn't a Restriction, It's a Promise

Leaving a class open to inheritance is a design decision, not a default you can ignore. The core idea An unsealed class is a promise: every virtual member can be overridden without breaking what the class guarantees. Most classes never meant to make that promise. They're just unsealed by default, because that's what class gives you unless you say otherwise. Common mistake: treating sealed as "I don't want to think about subclassing" rather than "this type's invariants would break if someone could." One override breaks the promise Here's the promise, a BankAccount that refuses to go negative: public class BankAccount { public decimal Balance { get ; protected set ; } public virtual void Withdraw ( decimal amount ) { if ( amount > Balance ) throw new InvalidOperationException (); Balance -= amount ; } } And here's the override that breaks it: public class RiskyAccount : BankAccount { public override void Withdraw ( decimal amount ) { Balance -= amount ; // no check } } Nothing here is exotic. It compiles cleanly, and RiskyAccount is a perfectly legal BankAccount as far as the type system is concerned. Open one with a balance of 100 and withdraw 500: BankAccount account = new RiskyAccount ( 100m ); account . Withdraw ( 500m ); Console . WriteLine ( $"Balance: { account . Balance : F2 } " ); Real dotnet run output: Balance: -400.00 The check on the left never ran. virtual was an open invitation, and RiskyAccount took it. Sealing turns a silent bug into a compile error Without sealed , the code above compiles and produces a wrong answer at runtime; nothing points you at the problem until it's already in production. With sealed , the same mistake becomes something the compiler catches before the code ever runs: public sealed class BankAccount { public decimal Balance { get ; protected set ; } public void Withdraw ( decimal amount ) { if ( amount > Balance ) throw new InvalidOperationException (); Balance -= amount ; } } public class RiskyAccount : BankAccount { } // error

2026-08-29 原文 →
AI 资讯

How we tunnel a public URL into an untrusted sandbox

Have you ever thought about how a sandbox tunnels a public URL out to the world when one end of the tunnel is untrusted code owned by the user? Take an example: a localhost:3000 app running in a sandbox inside a VM. The user wants a public link for it. It looks like a reverse proxy. It isn't, because the app behind the link is untrusted code. It feels easy, but for security it's full of hiccups. The naive version, and the holes it leaves. If there's just a public URL, anyone can hit it, and if the user doesn't want it shown to the world, that's not acceptable. If we put a secret token in the URL, it leaks, via browser history, referer headers, and server logs. And either way, the hostile app can steal or forge the visitor's session. A normal reverse proxy forwards traffic to a backend it trusts: your own app. This gateway forwards to a backend it must distrust: the user's code running in the VM. It's still a reverse proxy, it's just one whose backend you can't trust. That single inversion is why every byte crossing it, in both directions, gets inspected. What we actually want: a secure runtime URL, behind a reverse proxy, that can't be exploited, not against the visitor and not against the worker the sandbox stays executable and runnable while the URL is live the user can share it with anyone they choose, but it is not public This is deliberately not a plain browser-link architecture. It works through cookies, and it needs one extra sign-off step before the user gets a usable session. So how do we stop a random person from just landing on a particular sandbox's exposed URL? HMAC. How it actually works, in real time. There is no dumb reverse proxy blindly routing traffic into the sandbox. First, the traffic hits the edge (Caddy, wildcard TLS) and lands on cmd/preview-gateway. Its first job is to parse the host into sandboxID + port. Both are client-supplied through the URL, so the sandboxID is then strictly UUID-validated. Second, it verifies the token against its si

2026-08-29 原文 →
产品设计

Follow-up: Running the same Spring Boot app on a 256 MB VPS with JDK 25

Follow-up to my 512 MB Spring Boot experiment: I tried the same application on a 256 MB Alpine VPS. JDK 21 struggled badly at this size, but with JDK 25 and a tuned 80 MB heap, the app plus lightweight monitoring completed a one-hour run without restarts or OOM kills. Still not something I’d recommend for normal production, but the difference was interesting. submitted by /u/fykup [link] [留言]

2026-08-28 原文 →
AI 资讯

How to talk about trade-offs without sounding like you are hedging

Nuance is the thing that gets you levelled up, and hedging is the thing that gets you levelled down. They sound almost identical from the outside, and the difference is entirely structural. Ask a junior engineer whether to use SQL or NoSQL and you get an answer. Ask a senior engineer and you often get "well, it depends", which is correct, and delivered badly it costs them the round. The problem is not the nuance. It is the order. Hedging leads with the uncertainty and never arrives at a decision. Judgement leads with the decision and then shows the uncertainty around it. Same knowledge, opposite impression. Why hedging reads badly An interviewer is trying to answer one question: would I trust this person to make a call without me in the room. A candidate who lists options without choosing has actively failed to demonstrate the thing being assessed, no matter how well they understand the options. There is a second, less obvious cost. Refusing to commit removes the interviewer's ability to go deeper. They cannot probe a decision you did not make, so the conversation stays shallow, and shallow conversations produce mid-level scores by default. A candidate who says it depends and stops has told the interviewer nothing except that they know it is complicated. Everyone at this level knows it is complicated. The four-part structure This works for almost any technical choice you will be asked about, and it takes about twenty seconds to deliver. Commit. Name what you would actually ship. One sentence, no preamble. Justify. Give the specific reason, tied to the constraints in the question rather than to general virtue. Cost. Say what you are giving up. Every choice loses something and naming it is the seniority signal. Trigger. State the condition that would change your mind, and ideally what you would watch for it. Notice that all the nuance from "it depends" is present. It is simply arranged behind a decision instead of in place of one. Would you use a relational database o

2026-08-28 原文 →
AI 资讯

About little me

Hello! I'm a beginner developer with my sights set on backend development and data modeling. Like a lot of people starting out, I didn't come in with a computer science degree or years of professional experience — just curiosity about how applications actually store, organize, and make sense of data behind the scenes. Backend work has always felt like the "engine room" of software to me. While frontend gets the visual credit, it's the data layer that quietly decides whether an application is fast, reliable, and able to grow. That's what pulled me toward backend and database design in the first place. My biggest challenge so far has been learning SQL and data modeling from scratch. It sounds simple on paper — write some queries, design some tables — but in practice it meant rewiring how I think. I had to move from "how do I make this work right now" to "how do I structure this so it still works when the data grows, the requirements change, or someone else has to read my schema six months from now." Concepts like primary keys, foreign keys, relationships between tables, and eventually normalization weren't hard to memorize, but they were hard to internalize — to actually reach for instinctively when designing something from a blank page. A few things clicked for me along the way: A good schema is a form of communication. Table and column names, relationships, and constraints tell a story about the business logic, not just the data. Getting it "perfectly right" on the first try isn't the goal. Iterating on a design after seeing how data actually flows through it taught me more than any tutorial did. SQL rewards precision. Small differences — a missing JOIN condition, the wrong key, an unindexed column — can quietly break correctness or performance, so being deliberate matters. Constraints are a beginner's best friend. Things like NOT NULL, UNIQUE, and foreign key constraints catch mistakes early instead of letting bad data pile up silently. This foundation in SQL and d

2026-08-28 原文 →
AI 资讯

How BitTorrent Turned Every Downloader Into a Server

Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback. A couple of posts back we spent a while inside XOR distance , then used it to build Kademlia , the DHT algorithm that lets a network find anything without a directory. Kademlia: Algo That Turned XOR Distance Into a Network Athreya aka Maneshwar Athreya aka Maneshwar Athreya aka Maneshwar Follow Aug 26 Kademlia: Algo That Turned XOR Distance Into a Network # webdev # programming # beginners # algorithms 20 reactions Add Comment 6 min read I promised that algorithm shows up "under BitTorrent, IPFS, Ethereum." Today we cash that check. We're taking BitTorrent apart, piece by piece, and Kademlia is going to walk right back in through the side door. Also, fun fact before we start: a suspicious number of people on Reddit think Bram Cohen, the guy who wrote BitTorrent alone in Python in 2001, is secretly Satoshi Nakamoto. I'm not saying it's true. I'm saying that by the end of this post you'll understand why people keep saying it. The number that should not have been possible In 2004, a measurement firm called CacheLogic reported that BitTorrent alone was responsible for roughly 35% of all internet traffic. More than every other peer to peer network combined. More than the entire web. One protocol. Written by one guy. No company. No datacenter. No servers anywhere with "BitTorrent Inc" on the rack. That last part is the whole story. Every "normal" system you've ever worked on scales by throwing money at it: bigger box, more replicas, a CDN in front. BitTorrent had nobody to throw money at anything, so every hard problem, capacity, trust, scheduling, incentives, discovery, had to get solved inside the protocol itself . Problem 1: the client-server ceiling has a name Distributing a file in 2001 meant one server, one uplink, and every download eating

2026-08-28 原文 →
AI 资讯

De prompts genéricos a um sebo virtual funcional

A ideia de um sebo que não perde estoque: No primeiro período, nosso grupo desenvolveu um Sebo Virtual. O objetivo era resolver a dificuldade de sebos tradicionais em conciliar estoque físico e virtual, com pagamento via PIX e envio de recibo por e-mail. Minha responsabilidade foi a engenharia de prompt utilizando o Lovable. Quando a IA não entendia o que eu queria: Os primeiros prompts retornaram resultados incompletos. Ao solicitar "explique o código por trás da aplicação", a resposta foi genérica e não detalhou a integração com o banco de dados. Também houve dificuldade em fazer a ferramenta compreender fluxos específicos, como leilão de itens, validação de cupons e cálculo de frete por CEP. O que mudou quando usei diagrama e contexto: O resultado melhorou quando passei a incluir contexto e artefatos. Três prompts funcionaram bem: para wireframe, enviei o diagrama e solicitei o protótipo das telas; para o leilão, pedi quatro telas com checkout e histórico de transações; para o back-end, solicitei as linguagens utilizadas e o fluxo de integração ao banco preservando as informações da documentação. Com isso, identifiquei a stack gerada: React com TypeScript no frontend e Supabase no backend, com consultas como from('pedidos').select('*').eq('usuario_id', id) . Do sebo para qualquer loja online: As regras implementadas, como cupons LIVRO10 e SEBO20, frete proporcional ao peso e checkout via PIX para o endereço base na Rua dos Livros, 707, João Pessoa, são aplicáveis a qualquer e-commerce de pequeno porte. O método permite transformar uma ideia em protótipo navegável em poucas horas. O que levo disso para a carreira? O projeto mostrou que, além do código, a capacidade de formular perguntas claras e organizar a documentação em fluxograma e diagrama de classes é fundamental. Foi meu primeiro case prático e base para portfólio na área de dados e produto. EN Summary: As a first-semester student, our team built a Virtual Bookstore to manage physical and online inventory w

2026-08-28 原文 →
AI 资讯

🤔 Windows + WSL2 + Ollama - which architecture should I use?

I’m setting up a local AI development environment on Windows + WSL2 and I’m trying to decide between two architectures. Option 1 — Ollama/Models on Windows WSL2 ┌───────────────────┐ │ Application │ │ ├── Python │ │ ├── .venv │ │ └── Source code │ └───────┬───────────┘ │ HTTP localhost:11434 │ ▼ Windows ┌───────────────┐ │ Ollama │ │ ↓ │ │ Models │ │ ↓ │ │ GPU │ └───────────────┘ Option 2 — Ollama/Models inside WSL2 WSL2 ┌─────────────────────────┐ │ Application │ │ ↓ │ │ Ollama │ │ ↓ │ │ Models │ └────────────┬────────────┘ │ GPU access │ ▼ Windows ┌─────────────────────────┐ │ GPU / Driver │ └─────────────────────────┘ My current setup is Option 1 , and it works: WSL2 can access the Windows Ollama API through localhost:11434. But I’m wondering if Option 2 is a better long-term architecture for local AI/LLM development. I’m especially interested in: 🚀 Performance 🎮 GPU utilization 🧠 Model management 💾 Disk usage 🔧 Setup and maintenance 🐧 Linux/ML tooling 🐳 Docker integration 🌐 Networking 📈 Future scalability If you use Ollama with Windows + WSL2, which architecture would you choose and why? And if you've actually used both setups, I'd especially like to hear about your experience. 👇 Option 1 or Option 2?

2026-08-28 原文 →
AI 资讯

Go Doesn't Force Clean Architecture. That's Your Job.

The criticism of this is everywhere. Open any Go thread long enough and someone will show up to perform the same ritual: "Go projects become messy. There's no framework to guide you. Nest, Django, Spring, they all tell you exactly where to put things. Go? It just says 'organize it somehow.'" It's a fair criticism. Go is unusually permissive about structure. I just think blaming Go for a messy codebase is like blaming the empty document for the bad essay. I don't think Go encourages bad architecture but rather it exposes it. The Hell Is A Perfect Folder Structure?? Ask a hundred Go developers where to put business logic and you'll get a hundred answers (and 200 opinions). "Should I use internal/ ?" "Is everything supposed to live under pkg/ ?" "Should I follow Clean Architecture?" "What about the cmd/ directory?" We spend so much time debating folder structures as if the arrangement of directories somehow determines code quality. As if renaming utils/ to pkg/shared/ is going to save us. God. folders don't create architecture. Dependencies do. You can meticulously organize your project like this: my-app/ cmd/main.go internal/ handler/ service/ repository/ pkg/domain/ pkg/utils/ And still write tightly coupled garbage. Handlers calling repositories directly. Services importing database drivers. Business logic mixed with HTTP concerns. Everything circular. Beautiful folders, though. Very organized looking on GitHub. There are better projects I've seen with just 5 packages, they just don't screenshot as well. Architecture Is About Dependency Direction The architecture is about making intentional decisions about how code depends on other code. Have a look at this: HTTP Handler ↓ Business Service ↓ Data Repository This isn't sacred because of folder names. It's valuable because of what it represents: The handler only knows how to translate HTTP The service only knows business rules The repository only knows how to fetch data Each layer depends on the layer below, never upw

2026-08-28 原文 →
AI 资讯

AI autocomplete isn't a productivity tool. It's a judgment test you take every few seconds.

Intro There's a pitch behind every AI coding assistant: it makes you faster. Fewer keystrokes, less boilerplate, more shipped features per sprint. The pitch is half true. What it leaves out is the gap between a tutorial demo and a real codebase under real pressure. In a demo, every suggestion is correct because the demo was built to make the suggestion look correct. In production, the assistant doesn't know your architecture, your team's conventions, or the ticket you're actually trying to close. It just knows what tends to come next in code that looks like yours. That gap is where the noise lives. The instant-accept trap Say a developer is mid-flow, wiring up a new endpoint. The assistant suggests a validation helper that looks reasonable, so they hit tab. It compiles, tests pass, they move on. Three weeks later a teammate finds two nearly identical validation helpers in the codebase: one written by a human eight months ago, one autocompleted last sprint. Nobody meant to duplicate logic. The suggestion was locally correct and globally redundant, and nothing about "correct code that compiles" caught that. (This is an illustrative scenario, not a specific incident, but most teams running Copilot or similar tools for more than a few months will recognize the shape of it.) Architecture creep, one suggestion at a time No single autocompleted line breaks your architecture. That's exactly the problem. An assistant trained on generic patterns will happily suggest a new abstraction, a new dependency, a new way of doing something you already do three other ways elsewhere in the codebase, because it has no visibility into "elsewhere." Accept enough of these one at a time and the codebase drifts into a dozen small dialects of the same idea, none of them wrong in isolation. The review tax The real cost isn't the code that's obviously bad, that gets caught. It's the code that's plausible enough to pass a quick glance and wrong enough to need real review time later. If you accept

2026-08-28 原文 →
AI 资讯

Making HTTP Fail on Purpose: Building a Small Chaos Library for Java - Flaky HTTP

I recently built and open-sourced Flaky HTTP , a small Java 11 library for deliberately making HTTP calls less reliable. That may sound like an unusual goal. Most of the time, we work hard to make HTTP calls reliable. We add retries, timeouts, circuit breakers, fallbacks, caches, and monitoring. But eventually we need to answer a more difficult question: How do we know any of that behavior actually works? The original idea was simple: wrap Java's standard HttpClient , add controlled latency or synthetic HTTP errors to selected requests, and leave the rest of the application unchanged. That simple idea led to a few interesting decisions around API design, asynchronous cancellation, response body handling, deterministic testing, and the boundary between application-level failure injection and real network chaos. This article goes beyond a launch announcement. I want to explain why I built the library, how it works internally, where it is useful, and where it is deliberately limited. TL;DR Flaky HTTP is a lightweight wrapper around Java 11's java.net.http.HttpClient . It can: add fixed or random latency; return synthetic HTTP errors with a configurable probability; target requests using a full-URI regular expression; handle synchronous and asynchronous calls; propagate cancellation for delayed asynchronous work; and run without runtime dependencies beyond Java 11. The Maven coordinate is com.tapadyuti:flaky-http:1.0.0 . The shortest useful test setup is a deterministic failure: FlakyConfig config = FlakyConfig . builder () . failureRate ( 1.0 ) . errorStatus ( 503 ) . build (); Every targeted call now returns an empty synthetic 503 response without reaching the network. Replace 1.0 with 0.0 and add LatencyStrategy.fixed(500) when the test should exercise slowness without an HTTP error. It is intended for integration tests, resilience tests, local development, and controlled demonstrations. It is not a replacement for a network proxy or a full chaos-engineering platform

2026-08-28 原文 →
AI 资讯

Speaker - Designing Systems That Contain Failure - CS Week Perú 2026

Designing Systems That Contain Failure — CS Week Perú 2026 On August 13, 2026, I had the opportunity to speak at CS Week Perú 2026 , an event organized by IEEE Computer Society student chapters across Peru. My session was: “Isolation and Trust Boundaries in Production: Designing Systems That Contain Failure” The talk explored how production systems can be designed to limit the impact of failures through explicit trust boundaries, architectural invariants, and evidence-based validation. The central idea was simple: The goal isn't to prevent every failure. The goal is to control its blast radius. Production systems fail. Requests overlap, processes crash, memory is exhausted, credentials can be compromised, and dependencies can become unavailable. Reliable engineering is not about assuming that none of these things will happen. It is about deciding what can be affected when they do . From Unit Tests to System Properties A green unit-test suite demonstrates that the tested units behave correctly under the conditions we defined. But it does not necessarily demonstrate that the system as a whole preserves its architectural properties under concurrency, multiple tenants, resource exhaustion, or real deployment conditions. A function can be correct in isolation while the system still violates an important invariant. That led to one of the central questions of the talk: What properties must never be violated? Trust Boundaries I used the concept of a Trust Boundary to make architectural assumptions explicit. For each boundary, we can ask three questions: What are we protecting? What is allowed to cross the boundary? What happens if the condition is violated? From there, we can define invariants : properties that the system must preserve under the conditions established by its design. In the architecture discussed during the session, three dimensions were particularly important: Context → Logical isolation Identity → Cryptographic isolation Execution → Physical/process isolat

2026-08-28 原文 →
AI 资讯

A tabbed form that silently refused to submit — required fields hidden behind another tab

Background The site edit modal kept accumulating fields — site name, category, SSH connection details, WordPress install location — until editing anything meant scrolling up and down a single long form to find the right field. To clean this up, we split it into three tabs: "Registration info," "SSH," and "WordPress info." That change broke form submission itself, in a way that was hard to spot at first. What tabbing broke The tab implementation itself is straightforward. Each tab's fields live in a <div class="site-tab-content" data-tab="..."> , and CSS toggles which one is visible. .site-tab-content { display : none ; } .site-tab-content.active { display : block ; } An inactive tab is hidden with display: none . Nothing unusual so far, and visually it worked fine. The problem showed up when a required field sat in a tab that was not currently active, and the user left it empty while saving from a different tab. Clicking the save button did nothing . No error message appeared. The form just looked stuck. Root cause: a browser cannot report an error on a field it cannot show HTML5 form validation works by having the browser automatically block the submit event whenever a constrained field (like required ) fails, then focusing that field and showing its standard validation bubble (equivalent to calling reportValidity() ). Note: reportValidity() is a method from the HTML5 Constraint Validation API. It checks whether a form element's value satisfies its constraints (required, pattern, etc.) and, if not, displays the browser's standard error bubble. But when the failing field sits inside a tab hidden with display: none , the browser has nowhere to anchor that error bubble. It still faithfully blocks the submit — but it cannot visualize the error, so it simply stops without any visible feedback. From the user's side, this looks exactly like a button that does not respond. Before tabbing, every field lived on the same screen, so this never surfaced. Introducing tabs — a UI

2026-08-28 原文 →