AI 资讯
The day I asked three LLM agents to rewrite legacy Java for me — and what actually happened
1. The question that started everything Three weeks into my internship, my supervisor sat down across from me and asked, very casually: "OK your NLP pipeline extracts intentions and rules from legacy Java. Nice. And then what? " I looked at him. I looked at my laptop. I looked back at him. The whole project — Pulsar Modernizer — was supposed to eventually turn legacy Java into modern Spring Boot code. My part was the "understand the old code" part. F1 = 0.857 on the annotated corpus, a shiny React UI, everything humming in Docker. But the "and then?" was doing a lot of work in that sentence. That evening I wrote in my notes: "Nobody has actually tried the generation part. Everyone assumes it'll be easy because LLMs. That is very obviously wrong." So I decided to try. 2. Why "just prompt an LLM to rewrite it" doesn't work The naive move — feed the old code and the extracted rules to an LLM and say "please modernize this" — has three problems and I hit all of them in the first hour: The model hallucinates. It happily invents helper classes that don't exist and calls methods with the wrong signature. You have no criterion for stopping. The model tells you "it's done ". OK. Is it? By what test? You have no criterion for equivalence. Even if it compiles, how do you know the new code actually does what the old one did? I needed something more constrained than "prompt it and pray". 3. The setup — a chain, not a monolith I ended up building three specialized agents in sequence: IntentCard + RuleCards │ ▼ [APIDesigner] ──► JSON contract (class, methods, DTOs, throws) │ ├───────────────┐ ▼ ▼ [CodeGenerator] [TestGenerator] │ │ ▼ ▼ .java *Test.java │ │ └────► verifier (mvn test) The key insight: each rule extracted from the legacy code should become a test that the generated code has to pass. This flips the whole thing. I don't trust the LLM. I trust javac and JUnit. I did all of this on a local model — Qwen 2.5 Coder 3B via Ollama. No cloud APIs, no data leaving my Mac. On a
AI 资讯
PRINCÍPIO DA SUBSTITUIÇÃO DE LISKOV
Uma classe mãe deve ser capaz de ser substituída pelas suas classes filhas sem que a aplicação quebre. Isso na prática ajuda a organizar a ideia de herança, já que nos faz evitar estender uma classe mãe, apenas para depois remover um método já implementado ou fazer um “throw new Error(‘Not implemented’)”. Fazendo com que tenhamos mais cuidado no planejamento. O MAIOR SINTOMA DE ERRO Infelizmente é um sintoma que aparece de forma tardia, mas é justamente quando vamos fazer uma nova implementação. Você percebe que feriu o Liskov quando você vai construir uma classe ou subclasse e precisa lançar um erro proposital na implementação de um método. Justamente porque aquele método não deveria estar ali, mas está. UM EXEMPLO RUIM Por exemplo em um sistema de entregas. Nesse caso a classe “Delivery” deveria ser a mãe/base para as demais implementações. Mas a classe ‘MotoboyDelivery’ quebra isso. Exemplo de Código: // RUIM: A subclasse quebra o contrato da classe mãe. class Delivery { public calculateShipping (): number { return 15.0 ; } public getTrackingCode (): string { return " TRK123456789 " ; } } class MotoboyDelivery extends Delivery { public calculateShipping (): number { return 8.0 ; } // ERRO! Não tem código de rastreio. public getTrackingCode (): string { throw new Error ( " Motoboys não possuem código. " ); } } A SOLUÇÃO Para quem ainda não conhece o 'Liskov Substitution Principle', pode parecer que encaixar uma sequência de ifs é a solução. Mas na verdade o caminho ideal é repensar como essa abstração é construída. Um bom norte é pensar que uma classe filha sempre deve ser capaz de substituir o lugar da mãe, sem quebrar a aplicação. UM EXEMPLO BOM Ainda no sistema de entregas. ‘Delivery’ agora tem no meio do caminho ‘TrackableDelivery’. Com isso, cada “folha”/ponta da aplicação herda quem faz mais sentido e nada é quebrado. Exemplo de Código: interface Delivery { calculateShipping (): number ; } interface TrackableDelivery extends Delivery { getTrackingCode (): st
开发者
Designing CRM Workflows Like State Machines
Business workflows can look messy. A lead arrives from a website form. Someone contacts the customer. A follow-up is scheduled. A proposal is sent. The deal either moves forward or becomes inactive. But from a software design perspective, this process can be viewed in a much simpler way: A series of states and transitions. This is one reason CRM workflows can benefit from thinking like developers. Every Lead Has a State A lead is not just a row in a database. At any point in time, it has a current state. For example: NEW ↓ CONTACTED ↓ QUALIFIED ↓ PROPOSAL_SENT ↓ NEGOTIATION ↓ WON / LOST Each transition should represent a meaningful business event. This structure makes the workflow easier to understand and reduces ambiguity. Avoid Undefined Transitions Problems appear when teams can move records anywhere without clear rules. For example: NEW → WON Is that valid? Sometimes, maybe. But if a transition skips important steps, the system may lose useful context. A better workflow defines which transitions are expected: NEW → CONTACTED CONTACTED → QUALIFIED QUALIFIED → PROPOSAL_SENT PROPOSAL_SENT → NEGOTIATION NEGOTIATION → WON NEGOTIATION → LOST This doesn't mean every business needs a rigid process. It means the system should make state changes understandable. Events Can Trigger Actions State changes can also trigger workflows. For example: Event: Lead Created ↓ Assign Owner ↓ Create Follow-Up Task ↓ Notify Sales Team Or: Event: Proposal Sent ↓ Schedule Follow-Up ↓ Set Reminder ↓ Track Response This is where workflow automation becomes useful. Instead of expecting users to remember every repetitive step, the system can handle predictable actions. Separate State From History Current state tells you where something is now. History tells you how it got there. For example: Current State: NEGOTIATION That alone is useful. But an event history gives more context: Aug 10 → Lead Created Aug 11 → First Contact Aug 13 → Qualified Aug 16 → Proposal Sent Aug 19 → Negotiation Started
AI 资讯
I built a Markdown editor under 10MB because Obsidian felt too heavy
I love writing in Markdown. What I don't love is opening a 200MB+ Electron app just to jot down a note. So I built Markify - a desktop Markdown editor that weighs in at under 10MB and still ships a real feature set. Why bother Obsidian is great, but it's heavy, and most of what I actually need day-to-day is simpler: open a file, write, preview, export, done. Every "lightweight" alternative I tried either wasn't actually light, or was missing basics like PDF export or a proper file explorer. So I built the tool I wanted. What's in it Open & save .md , .markdown , .mdx files with native dialogs Sidebar file explorer - browse a whole folder, expand subfolders on demand, just like VS Code Three view modes : Read, Edit, and Hybrid (live side-by-side preview) PDF export with embedded images and proper Unicode font handling Light/dark theme that follows your system in real time 4 languages out of the box: English, French, German, Spanish Native title bar per platform (real traffic lights on macOS, custom controls on Windows/Linux) The stack Angular 22 (with Signals) on the frontend, Rust on the backend, glued together with Tauri 2 . That combo is exactly why the app stays small - no bundled Chromium, no Node runtime shipped, just the OS's native webview. 82 unit tests (Vitest) keep the core services honest. Everything is open source, AGPL-3.0: github.com/Martzcode/Markify Markdown is basically AI's native language now Here's the other reason this project felt worth building right now: every LLM defaults to Markdown. Ask ChatGPT, Claude, or Copilot for anything structured and you get headers, bullet lists, code fences, bold text - Markdown, every time. It's become the de facto output format for AI because it's plain text, unambiguous to parse, and renders cleanly almost everywhere. That shift changes what a Markdown editor needs to be good at: Copy-pasting AI output should just work - no reformatting, no broken tables, no mangled code blocks Code block rendering with copy b
AI 资讯
Pi4J LED Playground: A Community Resource for Learning Hardware Programming with Java
One of the best moments when learning electronics is seeing your first LED blink. It's a simple experiment, but it represents the bridge between software and the physical world. With Java and Pi4J, that first step is already well documented. But what happens after the first LED? How do you experiment with different animations, colours, brightness levels, or GPIO configurations without repeatedly rewriting the same code? That question led to the creation of the Pi4J LED Playground . 👉 https://igfasouza.github.io/pi4j-led-playground/ Why another example? Pi4J already provides excellent examples and documentation for getting started with Raspberry Pi hardware. The project itself encourages community-driven examples and implementations, recognising that the ecosystem grows through shared contributions. The goal of the LED Playground is not to replace those examples. Instead, it provides an interactive environment where developers can quickly experiment with LED behaviours while learning how Pi4J works. Think of it as a sandbox where changing a few lines of code immediately produces visible results. Built by the community, for the community This project started as a personal experiment while exploring Pi4J. Very quickly it became clear that the playground could be useful for others who are starting their journey with Java on Raspberry Pi. Instead of keeping it as a private repository, it was published as an open community resource where anyone can: 1. learn from the source code; 2. suggest improvements; 3. report issues; 4. contribute new LED effects; 5. help improve the documentation; Open source projects become stronger when many people contribute different ideas, and Pi4J itself has grown thanks to this collaborative model. What can you do? The playground demonstrates common LED operations such as: turning LEDs on and off; blinking patterns; brightness control (where supported); experimenting with different GPIO configurations; creating reusable animations; Because th
AI 资讯
WebMCP Agentic Web: Debugging 2‑Second Latency Spikes
webmcp agentic web: Why Backend Engineers Must Rethink Their Architecture Quick Answer webmcp agentic web: Agentic web workloads over MCP require stateless gateways, distributed context stores, prompt caching, and fine‑grained telemetry to keep latency below 350 ms and cost under control. Latency and State in Multi‑Agent LLMs When a Multi‑Agent System talks to an LLM over the Model Context Protocol (MCP) , the assumptions that hold for CRUD REST APIs break apart. A 200‑ms timeout that covers a simple GET request now collapses into a 2‑second latency spike because each tool call injects a new sub‑prompt, inflates the token budget, and forces the backend to stitch together dozens of partial contexts. In the field, the LLM behaves like a stateful, high‑throughput service that must be orchestrated, not a stateless function. Real‑World Example Consider a U.S. e‑commerce platform that needs to serve 12 k concurrent shopping sessions. Each session spawns up to five agents (pricing, inventory, recommendation, fraud, checkout). The platform’s existing micro‑service stack was built for single‑shot CRUD calls; when the agentic layer was added, the following issues surfaced: Context drift: stale prompts silently degraded recommendation quality. Token explosion: every tool call added 200–300 tokens, pushing the total payload past 8 k tokens. Throughput hit: the MCP service was throttled by Azure OpenAI’s per‑deployment request rate limits. After re‑architecting to a stateless MCP gateway backed by a distributed context store, the platform maintained 99th‑percentile latency under 350 ms even during a Black Friday surge. Trade‑Offs Aspect Option A Option B When to choose Context Storage Redis Cluster (in‑memory, low latency) Cosmos DB (strong consistency, global replication) Redis for ultra‑low latency, Cosmos for compliance or multi‑region writes Prompt Caching Enable KV‑cache on Azure OpenAI Re‑send system prompt on every request Enable when prompt size >20% of total token budge
AI 资讯
InfoQ Opens Enrollment for New AI-Assisted Engineering Online Certification Program
InfoQ has opened enrollment for the InfoQ Certified AI-Assisted Engineering Program, a five-week online certification program for senior engineers and architects who already run a coding agent against production code daily, where the open questions have moved past prompting into what the agent is allowed to touch and what catches its mistakes before a human does. By Artenisa Chatziou
开发者
I ruined my cats’ toilet time with a motion-activated neon litter box sign
My two cats live a refreshingly low-tech lifestyle. They've never experienced a robot litter box, an automated feeder, or a GPS tracker. Noodle and Loaf live blissfully unaware of the technological trappings that surround the rest of my life. Except, that is, for the glowing neon sign that turns on whenever they go to the […]
AI 资讯
How Code in the Age of Artificial Intelligence Becomes Write-Only and Disposable
Artificial intelligence (AI) makes all code write-only,. It’s too dense to read, and tests define the behaviour and become the documentation. Code is also disposable; it becomes easier to rewrite than to debug. Humans can't review AI-generated code at scale. Intent decouples from implementation; developers should focus on creativity. By Ben Linders
科技前沿
Poolease X1 Pool Robot Review: How Bad Can It Be?
The Poolease X1 can collect leaves from the pool floor, but dirt, silt, walls, and steps are all beyond its pay grade.
AI 资讯
The Audi S6 Sportback E-tron proves that sedans still matter
Last year, Audi announced that it gave its all-EV-by-2033 plan the boot, and instead will offer a mix of gasoline, hybrid, and electrified propulsion. There's no doubt still some uncertainty among bigger automakers - especially those under the Volkswagen Group umbrella - when it comes to such a (now prior) commitment. Even so, what it's […]
科技前沿
The 3 Best USB Phone Chargers (2026): Anker, DeWalt
I put top-rated USB car chargers to the test for fast charging, value, heat, and safety. These are the best I found.
AI 资讯
The next big thing in hydrogen could be underground
There’s a hunt for new sources of hydrogen, and the gas (or at least the right conditions to make it) could be hiding beneath our feet. Hydrogen can be used as a fuel in everything from large trucks to planes to steelmaking. It’s often hailed as a climate solution because when burned, it produces water…
开发者
I built flutter_auditor — a zero-config CLI tool to audit Flutter apps for permissions, dead assets, security risks, and package hygiene
Shipping a Flutter app without auditing native permissions, release keystores, or asset bloat? To help Flutter developers catch hidden production risks before App Store/Play Store review, I built flutter_auditor — an open-source, zero-config CLI health and security inspector for Flutter & Dart. In just one terminal command (dart run flutter_auditor), it scans your project for: 🔒 17+ Automated Audits: Hardcoded API secrets & exposed .jks keystores Missing iOS Info.plist privacy description strings Unused heavy assets & broken 2.0x/3.0x image variant paths Dangerous manifest flags (android:debuggable="true", allowed cleartext traffic) Unused & transitive package dependencies Give it a try locally on your project and let me know what audits you'd like to see next! 👇 pub.dev: https://pub.dev/packages/flutter_auditor GitHub: https://github.com/thakaredipali/flutter_auditor
AI 资讯
Police Are Hiding Their Use of Flock Surveillance Cameras
A usage policy for Flock license plate reader cameras tells police not to talk about the cameras: When cops use Flock to arrest someone in Wapello County, Iowa, they don’t want them to know. A usage policy for the automated license plate reader cameras in the county tells police, in no uncertain terms, to keep them a secret: “DO NOT MENTION ALPR USAGE TO THE OCCUPANTS OF THE VEHICLE,” the policy document reads. “DO NOT MENTION ALPR USAGE IN YOUR REPORT OR COMPLAINT UNLESS ABSOLUTELY NECESSARY.” This reminds me of IMSI-catchers (Stingray was the most popular) a couple of decades ago. Police would go to even more extremes to hide their usage...
AI 资讯
Unlocking hidden revenue streams with market models
Each day, an airline transports tens of thousands of passengers on hundreds of flights. Often these are not straightforward point-to-point routes, with passengers requiring multiple connections. The airline can consider potentially hundreds of variables to price each of these journeys: demand, season, time of day, current events, global markets, and competitor airline activity to name…
AI 资讯
Infrastructure Security Audits: What Businesses Should Check
Most companies think of a security audit as something that happens to them a compliance requirement, an insurance mandate, something a client's procurement team demanded before signing a contract. That framing produces exactly the kind of audit you'd expect from an obligation nobody actually wanted: a checklist gets completed, a report gets filed, and nothing operationally changes, because the audit was oriented toward satisfying a requirement rather than toward actually finding and fixing real gaps. Here's the reframe I'd actually argue for: a good audit isn't a compliance exercise you survive. It's the single best opportunity most organizations get to find out what's actually wrong before an attacker finds it for them, at a moment of your own choosing rather than theirs. Treated that way, what gets checked and how thoroughly matters enormously and most audits, even well-intentioned ones, miss a fair amount of what actually matters in practice. Start With What You Actually Have, Not What You Think You Have This sounds almost too obvious to state directly, and it's consistently where audits find the first real surprise. Asset inventory every server, every cloud resource, every network device, every application has to be genuinely accurate before anything else in the audit process means much of anything. We've run audits where the documented inventory and the actual running infrastructure diverged substantially, sometimes by a meaningful percentage of total resources, simply because provisioning had outpaced documentation for years without anyone reconciling the two. An audit that starts from an inaccurate inventory is auditing a company's own assumptions about itself, not its actual infrastructure. Genuine automated discovery not a manually maintained spreadsheet someone updates when they remember should be the actual starting point, and any discrepancy between what's documented and what's genuinely running is itself a finding worth investigating, not just a data qu
开发者
Wireframing Software Compared: Features, Pricing & Use Cases
You’ve got a product idea, a deadline creeping closer, and a blank canvas staring back at you, so...
科技前沿
Samsung is holding another Galaxy Event on August 27
Samsung says it will be launching a new addition to its S26 lineup next week.
AI 资讯
Microsoft Releases Aspire 13.5 With a Refreshed Dashboard and Workflow Improvements
Last week, Microsoft released Aspire 13.5, an update that refreshes the dashboard and the aspire.dev homepage and adds several quality-of-life features. The Interaction Service gains file imports and progress dialogs; resources can host an interactive terminal in the dashboard, and deployment adds Kubernetes persistent volumes and cross-scope Azure references. By Almir Vuk