AI 资讯
A Privacy-First Browser Workflow for AI Photo Editing
AI photo editors look simple from the outside: upload an image, describe a change, and download the result. The hard part is everything around the model call. If you are building or evaluating a browser-based image editor, the workflow needs to protect the original file, reject bad inputs early, make retries safe, and help the user compare the result with the source. This article walks through a small implementation pattern that does that without turning the UI into a complex desktop editor. 1. Validate the image before upload Do not rely on the file extension. Check the MIME type, file size, and whether the browser can actually decode the image. const ACCEPTED_TYPES = new Set ([ " image/jpeg " , " image/png " , " image/webp " , ]); async function validateImage ( file ) { if ( ! ACCEPTED_TYPES . has ( file . type )) { throw new Error ( " Use a JPG, PNG, or WebP image. " ); } const maxBytes = 10 * 1024 * 1024 ; if ( file . size > maxBytes ) { throw new Error ( " The image must be smaller than 10 MB. " ); } const bitmap = await createImageBitmap ( file ); const dimensions = { width : bitmap . width , height : bitmap . height }; bitmap . close (); if ( dimensions . width < 64 || dimensions . height < 64 ) { throw new Error ( " The image is too small for a useful edit. " ); } return dimensions ; } This catches renamed files, broken images, and tiny inputs before they consume bandwidth or model credits. 2. Treat the prompt as a single edit contract Open-ended chat is useful, but it can make image editing unpredictable. A clearer UI asks for one concrete change at a time: remove the person on the right; replace the background with a plain white wall; repair the crease across the top-left corner; extend the image to a 16:9 frame. The request object should preserve that intent without mixing it with UI state: function buildEditRequest ( file , prompt , options = {}) { const normalizedPrompt = prompt . trim (). replace ( / \s +/g , " " ); if ( normalizedPrompt . length < 5 )
AI 资讯
I Built an Agent Evaluation Harness for Local AI — What Most People Get Wrong
I Built an Agent Evaluation Harness for Local AI — Here's What Most People Get Wrong DOYR | Not financial/legal/tax advice. For educational purposes only. Three months ago, I started building AI agents for my trading business. First agent: Fetches Nifty option chain data. Second agent: Analyzes PCR, OI, max pain. Third agent: Predicts direction using XGBoost. Fourth agent: Sends Telegram alerts. I had 4 agents doing 5 jobs. And I had no idea if they were any good . Sure, my trading results were +₹96,000 over 6 months. But was that because my agents were smart, or because I was overriding their bad decisions? I couldn't answer that question. So I built something to find out. An Agent Evaluation Harness. What Is an Agent Evaluation Harness? An Agent Evaluation Harness is a systematic framework for testing AI agents. It answers one question: "How good is this agent, actually?" Most people skip evaluation. They build an agent, test it once or twice manually, and call it "done." Then they wonder why it fails in production. An evaluation harness forces you to: Define success metrics — what does "good" mean? Create test suites — what scenarios will you test? Run evaluations — how does the agent perform across all scenarios? Measure regressions — did a change make the agent worse? Track improvements — is version 2 better than version 1? This is not optional. This is engineering 101 . Why Most Agent Evaluations Are Wrong I reviewed 50+ "agent evaluation" frameworks online. Here's what I found: Mistake 1: Single-Task Testing What they do: Test the agent on one task. "Can it book a flight?" → Yes/No. What's wrong: Real agents face thousands of variations of the same task. "Book a flight from Delhi to Mumbai on Friday" vs "Book a flight from Delhi to Mumbai next Friday" vs "Book a flight from Delhi to Mumbai on August 15th." A good harness tests variations , not just one example. Mistake 2: No Edge Cases What they do: Test happy paths only. "Book a flight when everything works.
AI 资讯
The Check That Only Confirmed a Name
The owner had already asked for the alert emails to stop. A fix shipped. Then another email landed. Then another. "ong it just ssent me abother email," he said, voice-dictated, unedited. Fifteen minutes later: "go another one." The system was reporting an outage that did not exist. The Transport That Only Ever Failed A 14-PR merge train had just moved every cron producer's alerting off shared email and onto Buzz, a Nostr-relay team chat. One producer per PR, each with its own liveness contract and a bead receipt. It shipped cleanly. But the library backing those producers carried a default that had only one job: fail. AF_BUZZ_CMD = " ${ AF_BUZZ_CMD :- af_default_buzz_post } " af_default_buzz_post returned 1 with "no Buzz transport injected". Every caller that sourced the library (which is every cron producer) exhausted its Buzz retries and fell through to the email floor. The system reported a false Buzz outage while the relay was healthy. It did this 2 to 5 times per hour. Evidence arrived in the logs: 581 dedup markers, a steady stream of "[INTENT ALERT FLOOR: Buzz unreachable]" emails, and sweep.log showing buzz=ok only for the handful of callers invoked through the CLI entrypoint rather than by sourcing the library. That asymmetry was the bug. The CLI had a one-line fixup swapping in the real transport, annotated in a comment as "the library path is unchanged". The library path did not, and the cron producers all take the library path. The fix promoted the real transport to the default for both seams. af_buzz_transport already discovers the installed buzz-notify.sh and already fails closed when it is genuinely missing. The dead CLI fixup was deleted. Fail-closed behavior survives, but now it is conditional on genuine absence rather than on every caller remembering to opt in. Why not migrate callers one at a time? Because the per-caller route leaves the next new producer to rediscover this the same way. Flipping the default fixes the class, not the instance. The
AI 资讯
Advice
Hi guys, I'm a 2026 fresher. I'm confused about choosing between Java, Python, .NET, and MERN. Is Full Stack still worth learning with AI growing so fast? Can a skilled fresher still get a job? Any advice?
AI 资讯
TypeScript Strict Null Checks in 2026: Real-World Patterns for Handling `undefined` Without the Noise
TypeScript Strict Null Checks in 2026: Real-World Patterns for Handling undefined Without the Noise This article was written with the assistance of AI, under human supervision and review. Most TypeScript null safety problems stem from teams treating strictNullChecks as a boolean toggle instead of a design constraint. The compiler flag eliminates an entire class of production bugs, but codebases that flip it on without adjusting their patterns end up drowning in type assertions and optional chaining operators. The result is worse than the original false confidence wrapped in noise. The fundamental issue is that JavaScript conflates absence and failure. A missing property, an API error, and an uninitialized variable all return undefined or null , but they represent completely different failure modes. When teams enable strictNullChecks without encoding these distinctions into their types, the compiler forces them to handle every potential undefined the same way. That leads to defensive checks that obscure intent and catch nothing of value. The correct approach treats null safety as a type design problem. Discriminated unions encode why a value is missing. Branded types prove non-nullability at the boundary. Type guards narrow only when the business logic demands it. The patterns are simple, but they require understanding what the compiler is actually checking and what guarantees your code actually needs. This post covers the essential patterns teams need to write null-safe TypeScript in 2026 without the noise. Apply these in production and the difference will be immediate. Key Takeaways strictNullChecks eliminates runtime null errors only if your types encode why values are missing, not just that they might be missing. Discriminated unions outperform null returns for API responses because they force exhaustive handling of failure cases at compile time. Non-null assertions ( ! ) are acceptable at proven boundaries where external systems guarantee non-null values, but ne
开发者
Building for the Next Wave: My Journey Crafting Next.js Templates for the Nigerian Market
Bridging Design and Code to Empower Local Businesses As a full-stack developer specializing in JavaScript and React, one of the most exciting ventures I'm currently on is building ready-made websites and Next.js templates through Softchic. This isn't just about coding; it's about deeply understanding the needs of businesses, particularly within the vibrant and rapidly evolving Nigerian market, and translating those into high-performance, beautiful web solutions. Why Next.js? Performance, SEO, and Developer Experience My choice of Next.js as the primary framework for these templates was deliberate: Performance: Server-side rendering (SSR) and static site generation (SSG) capabilities are crucial. In areas where internet speeds might vary, a fast-loading website isn't just a nice-to-have; it's essential for user retention and conversion. SEO: For businesses looking to establish a strong online presence, robust SEO capabilities out-of-the-box mean our templates provide a solid foundation for discoverability. Developer Experience: Building with Next.js allows for efficient development, leveraging the power of React while simplifying routing, data fetching, and API routes. This means faster iteration and higher quality templates. The Nigerian Market: Unique Challenges, Immense Opportunity Crafting templates specifically for the Nigerian market presents a fascinating set of considerations: Design Aesthetics: Understanding local preferences in terms of color palettes, layouts, and user flows is critical. It's not just about what looks good globally, but what resonates locally. This is where my dual role as creative director for promotional materials comes into play – applying that eye for design directly to the templates. Mobile-First Mentality: A significant portion of internet users in Nigeria access the web via mobile devices. Every template is meticulously designed with a mobile-first approach to ensure optimal responsiveness and user experience on smaller screens. Aff
AI 资讯
I tried using an AI agent to set up a fresh Windows PC and Reddit was right about Ninite
I tried the obvious nerd experiment on a fresh Windows machine: let an AI agent handle setup. It looked clever for about two minutes. Then I watched OpenClaw get stuck on installer checkboxes, pause on modal windows, and generally do the digital equivalent of forgetting why it walked into the room. While it was still fighting one installer, I switched tactics: Ninite for the common app bundle WinGet for package installs I wanted to keep and rerun PowerShell for the boring system-level stuff GPT-5 or Claude for planning, not clicking That combo finished 18 app installs before the agent recovered. And after reading through this r/openclaw thread , I think the real lesson is bigger than Windows setup: GUI-driving agents are the wrong abstraction for deterministic work. If the task is "figure out what this machine needs," use a model. If the task is "install these 18 things and stop being interesting," use scripts. The mistake: asking an agent to be a mouse I’m not anti-agent. I’m anti-fragile-automation. OpenClaw, GPT-5, and Claude are useful when the problem is ambiguous: "Set this machine up for Python, Docker, VS Code, Node, and a local Ollama stack" "Compare package managers and suggest the cleanest install path" "Draft a setup script and explain what might fail" They are much less useful when the problem is fully deterministic: Click Next Decline the bundled toolbar Choose default install path Wait Repeat 17 times That second category is where WinGet, Ninite, and PowerShell win by being boring. Boring is good. This is the same pattern you see in real automations in n8n, Make, Zapier, or custom agent workflows: let GPT-5 or Claude interpret messy input let deterministic steps execute the plan keep the model out of the loop unless judgment is required That architecture is faster, easier to debug, and usually cheaper. What actually worked on a fresh Windows setup Here’s the split I’d use again. Job Best tool Install common desktop apps fast Ninite Create a repeatable
开发者
Review: Spider-Man: Brand New Day reminds us that superhero movies can be good
It's as much about grounded characters and well-timed emotional beats as CGI-filled action extravaganzas.
AI 资讯
Lucid Motors just delayed its affordable EV. Now what?
The Cosmos EV is now slated for release in the second half of 2027. CEO Silvio Napoli said he's focused on getting the EV right, as well as its nearer-term robotaxi project with Uber and Nuro.
开发者
EVgo starts building Tesla Superchargers under license
The V4 Superchargers will show up in the Tesla nav app and have NACS and CCS1 plugs.
创业投融资
When Your VPS Never Had the Resources It Was Sold With
I needed a VPS to run CyberPanel. Simple enough: 1 vCPU, 1 GB RAM, 10 GB SSD, IPv6 only. CyberPanel...
AI 资讯
The proxy industry needs you to never open the network tab
I run 75 scrapers in production. Three of them do any fingerprint spoofing. Maybe five use residential proxies. The rest run on plain datacenter IPs or no proxy at all, and they have been running for months. If you learned scraping from blog posts, that number probably sounds wrong to you. Every tutorial you have read starts the same way: sign up for a residential pool, install a stealth browser, randomize your fingerprint, throttle like a human. Then, on step five, you finally get to look at the actual website. That order is backwards, and it is backwards on purpose. Proxy companies write most of the scraping content on the internet. They were never going to write "you probably do not need us." The scraper with the $80 a month costume Last month my guy sent me his Greenhouse job board scraper to fix. It had everything. Puppeteer with the stealth plugin. Rotating residential proxies. Randomized mouse movements between actions. Human-like typing delays. It still kept dying. So I did the thing nobody had done: opened the page in a normal browser with devtools up. The entire job list was sitting in one XHR request to a public JSON endpoint. No auth. No cookies. A rate limit so loose I never managed to hit it. I deleted basically his entire codebase and replaced it with a fetch call. It has not broken since. He had been paying for proxies for months to hit an endpoint that does not care who you are. This was not a rare lucky case. This is most cases. The 20 minute method What I do on every new target, before writing a single line of code: Open the network tab, filter to XHR/fetch. Reload the page. Click around. Paginate. Search. Find the request that returns the actual data. It is usually JSON and usually obvious. Right click, copy as cURL. Paste it in a terminal and start deleting headers one at a time. Rerun after each delete. Whatever survives step five is your scraper. Most of the time the answer is a user agent header and nothing else. Sometimes a referer. Occasion
AI 资讯
I built skill.md file to stop AI from Generic UI SLOP
Here's the problem. Every AI coding agent (Cursor, Codex, Claude Code, whatever) is trained on millions of websites. Most of those websites are average. So when you prompt "build me a landing page," the model gives you the average of everything it's seen: a centered hero, a purple gradient, three equal feature cards, Inter font, ease-in-out , done. It's not broken. It's just mediocre by default. I'm 17 and I got tired of fighting this in every conversation. So I built VibeCurb : a collection of strict constraint skill files, that force AI agents to actually think about design before they touch code. How it works Every skill follows the same four-phase pipeline: Design Read - The agent reads your reference image, existing codebase, or brief and extracts design signals: typography, palette, layout, focal element, spacing. No code is written here. Quality Gate - The extraction has to pass before the agent is allowed to generate anything. It must prove it understands the design direction, not just spit out defaults. Precise Build - Code generation happens against the extraction, not against the model's built-in idea of what a "website" looks like. Each skill has its own build sequence. Visual Diff - The output is checked against the reference using PASS/FAIL tables across composition, typography, color, motion, and responsiveness. If it drifts, it gets caught. There's also an inline drift rejection layer. It catches known AI defaults (CSS keyword easings like ease-in-out , AI-purple #7c3aed gradients, generic glassmorphic cards, placeholder Lorem ipsum content) and flags them before they make it into the output. The skills Each skill constrains a specific problem space: awwwards-hero - Hero sections only. Six documented architectures (Cinematic Center, Editorial Split, etc.) with implementation blueprints. The agent picks one and commits. awwwards-sections - Pricing tables, bento grids, feature highlights, footers. Same pipeline, different element constraints. awwwards-
科技前沿
How to use Android Auto without turning off your VPN
A VPN might compromise your Android Auto experience at first, but there are some easy workarounds.
AI 资讯
I let an AI agent into my repo. Here's what I lock down first.
An AI coding agent isn't autocomplete. It runs shell commands, reads your files, installs packages, and opens things you never pointed it at. That's the whole reason to have one. It's also why I don't start projects the way I used to. Nothing dramatic happened to me, by the way. I'm not writing this from the wreckage of a dropped production table. I'm writing it because I spent an afternoon going through what could plausibly go wrong, expecting a long list of hard problems, and instead found that most of it is handled by about ten minutes of config nobody mentions on day one. So here's the ten minutes. Prose isn't protection This is the bit that took me embarrassingly long to get. You can tell an agent things two ways. A rule is prose it reads and weighs - good for judgement calls like naming, style, when to stop and ask. A ban is a config entry that makes something impossible. The trap is using the first for the second job. Writing "never force-push" into a CLAUDE.md feels like a control. It isn't. It's a request sitting in a context window next to a few thousand other tokens, competing with whatever you actually asked for. It'll usually win. Usually is fine for naming conventions. It's not fine for git push --force . 1. The deny list .claude/settings.json : { "permissions" : { "deny" : [ "Bash(rm -rf:*)" , "Bash(git push --force:*)" , "Bash(git push -f:*)" , "Bash(git reset --hard:*)" , "Bash(psql*production*)" , "Bash(*DROP DATABASE*)" , "Bash(*DROP TABLE*)" , "Bash(*TRUNCATE*)" , "Read(./.env)" , "Read(./.env.local)" , "Read(./.env.*.local)" ] } } These don't run. Not "the agent is discouraged" - they don't run, including in the scenario the list exists for, which is you at midnight approving a plan you skimmed. Two things to know before you test it. It takes effect from the next session, not immediately. So you write the file, try the blocked command in the same session, watch it go through, and conclude the whole feature is broken. Restart first. Keep the .env
AI 资讯
Grafana Agent vs Alloy: What Changed and Why
TL;DR: Grafana Agent reached End-of-Life on November 1, 2025 and has been replaced by Grafana Alloy. Alloy consolidates Agent's Static mode, Flow mode, and Kubernetes Operator into a single collector built on the OpenTelemetry Collector while maintaining native support for Prometheus and Loki. If you're using Flow mode, migration is relatively straightforward. If you're using Static mode, the migration process will involve reviewing and testing the converted configuration. Before switching over, verify relabeling rules, recheck resource usage, and confirm that Prometheus and Loki are receiving the same data and labels as before. If you're still running Promtail, it's worth migrating both to Alloy at the same time since Promtail is also End-of-Life. If you deployed Grafana Agent a couple of years ago, there's a good chance you haven't thought about it since. It quietly collects metrics, ships logs, and generally stays out of the way. What you may not realize is that Grafana Agent reached End-of-Life on November 1, 2025. That includes Static mode, Flow mode, and the Kubernetes Operator. Grafana Labs has stopped creating bug fixes, security patches, and official support. If you're still running it, your collection layer is probably still performing normally, but is now unsupported. That doesn't necessarily mean it will stop working tomorrow, plenty of unsupported software continues running for years. It does mean you're taking on the risk yourself, especially as the rest of your monitoring stack continues to evolve. This article covers why Grafana Labs replaced Agent with Alloy, what actually changes during the migration, and where people tend to run into problems. Why Grafana Agent was deprecated One of the biggest issues with Grafana Agent is that it was essentially three agents, not one product: Static mode, which used YAML and looked similar to Prometheus. Flow mode, which introduced a component-based configuration using River. The Kubernetes Operator, which manage
AI 资讯
Tailscale as an ngrok / local tunnel / Cloudflare Tunnel alternative
If you've ever needed to let a third-party service talk to your local dev environment, you've probably reached for ngrok. I've been moving some of that over to Tailscale Funnel instead — here's what works, what broke, and how it stacks up against Cloudflare Tunnel. Key takeaways Tailscale Funnel exposes a local dev server to the public internet, similar to ngrok or Cloudflare Tunnel — useful for testing webhooks, payment callbacks, or anything a third party needs to reach on your machine. It's free for solo/small use, with no device limit on the Personal plan (up to 6 users). tailscale serve is tailnet-private; tailscale funnel is what actually makes something public — easy to mix up. Getting it working behind Caddy + Symfony in Docker means fixing two separate redirect loops (one from Symfony, one from Caddy's own auto-HTTPS) and explicitly telling Symfony to trust the proxy. The one real trade-off versus Cloudflare Tunnel: no custom domain with a valid cert — you're stuck with the ts.net hostname unless you accept a browser cert warning. This isn't a "ngrok / local tunnel / Cloudflare tunnel is bad" post. It's a "here's another tool that does the same job, and here's exactly what broke when I set it up" post. Why bother? A few reasons I looked at Tailscale instead of just defaulting to ngrok again: Stable hostname. ngrok's free tier gives you a random URL that changes every time you restart it. Tailscale Funnel gives you a fixed hostname tied to your machine ( your-machine.your-tailnet.ts.net ) that doesn't change. Genuinely free for solo/small use. Tailscale's free Personal plan covers up to 6 users with no device limit at all — plenty for a solo dev juggling a laptop, a desktop, and a couple of test machines. No "3 device" ceiling to bump into. Already in my toolchain. I use Tailscale for other things, so there's no new account, no new pricing tier to think about. Automatic HTTPS. Tailscale handles certificate provisioning for you — no separate cert step. The tr
产品设计
Enterprise MCP Gateway with Built-In Security: OAuth 2.0, RBAC, and Tool Access Control
TL;DR MCP servers are powerful, but they can provide access to production systems if...
开发者
General Challenge Updates Moving Forward
Hey all, as part of our expanding challenge program we want to update and clarify some challenge...
开源项目
BenQ GV50 Review: Highly Portable, but With Quality Trade-Offs
This affordable, portable projector doesn’t try to be a cinematic marvel, but it’s fun to use.