今日精选
HOT最新资讯
共 27340 篇Tell HN: Amazonbot aggressively scraping my website and ignoring robots.txt
At the beginning of the year I decided to set up a scraping and LLM honeypot on one of my personal websites which included a fake git repo with code containing fake HTTP endpoints. The address to this repo was hidden in a public page inside a comment. About three weeks ago IP addresses from Amazon Searchbot attempted to make requests to the fake endpoints included inside a shell script. My robots.txt explicitly includes Amazonbot. I am honestly surprised that this is coming from Amazon. Is this
What's new in our latest Android dependency bumps — ConstraintLayout, Firebase, Intercom, Auth0
We just bumped four dependencies in the app. Here's what each one brings. implementation 'androidx.constraintlayout:constraintlayout:2.2.2' implementation platform ( 'com.google.firebase:firebase-bom:34.17.0' ) implementation 'io.intercom.android:intercom-sdk:18.6.0' implementation 'com.auth0.android:auth0:4.0.1' ConstraintLayout 2.2.2 The library's in maintenance mode now — Google's steering everyone toward Compose for new UI — so releases here are small, focused patches. This one carries forward a binary compatibility fix in constraintlayout-core that landed in the 2.2.x line. Firebase BoM 34.17.0 The BoM pins compatible versions across every Firebase library you pull in. This release lands close behind: Firebase AI Logic (17.14.0) — new factory methods exposing thoughtSignature / isThought on response parts, plus automatic function calling for LiveGenerativeModel Authentication (24.2.0) — fixed an auth timeout on dual-stack Wi-Fi, where long IPv6 timeouts were blocking IPv4 fallback Cloud Firestore (26.4.1) — now caches documents over 1MB by chunk-reading from local SQLite; fixed a debug-logging OOM caused by large payloads Cloud Messaging (25.1.1) — fixed a re-registration bug tied to Firebase installation ID changes Crashlytics (20.1.0) — on API 37+, fatal event reports now carry OOM/anomaly context from the ProfilingManager API Firebase Installations (19.1.2) — internal storage moved from SharedPreferences to DataStore Performance Monitoring (22.0.6) — fixed _app_start traces getting incorrectly suppressed on API 34+ SQL Connect (17.3.2) — several fixes to realtime query subscriptions around auth-token refresh and expiry Intercom Android SDK 18.6.0 Pinch-to-zoom, double-tap-to-zoom, and pan on full-screen image attachments Fixed an ANR during Intercom.initialize() caused by Keystore and persisted-identity reads blocking the calling thread Fixed the keyboard covering form fields in Canvas Kit sheets — IME insets are now handled correctly Fixed a crash from a nu
Three bugs we found and fixed in our own pipeline this week
Three bugs we found and fixed in our own pipeline this week Journeymen grades developer work against GitHub's server-side history. That only means something if the grading pipeline itself is reliable — so here's the honest engineering update, not the highlight reel. 1. Silent progress loss on connect-repo analysis runs A connect-repo analysis run could sit in processing status with no visibility into what stage it was actually at, or whether it had stalled. From a dev's dashboard, a slow run and a stuck run looked identical. We added explicit progress-stage tracking so a stuck run is visibly stuck, not silently pending. 2. A background worker timing out without a clear signal The Lambda-based worker handling asynchronous analysis jobs was hitting its timeout under certain repo sizes, and the failure mode wasn't obvious from the outside — a run would just never complete. We root-caused the timeout and fixed the underlying slow path. 3. Dead-letter queue with no observability Jobs that failed enough times to land in the SQS dead-letter queue were, until this week, invisible — no alerting, no in-product surfacing. We wired up observability so a DLQ arrival is now a visible signal instead of a silent dead end. Why post about our own bugs The entire pitch of Journeymen is "don't trust the self-reported version, trust the verified one." That standard has to apply to us too. All three issues: found, fixed, and shipped this week. journeymen.in
React Mastery Series – Day 14: React Hooks Deep Dive – Understanding useRef and useMemo
Welcome back to the React Mastery Series ! In the previous article, we explored useEffect Hook and learned how React handles side effects such as: API calls Timers Event listeners WebSocket connections Cleanup operations Today, we will explore two more powerful React Hooks: useRef and useMemo These Hooks are frequently used in production applications to: Access DOM elements Store values without triggering re-renders Optimize expensive calculations Improve application performance Understanding useRef Hook useRef is a React Hook that allows us to store a value that persists across renders without causing the component to re-render. Syntax: const reference = useRef ( initialValue ); The returned object looks like: { current : initialValue } The value is accessed using: reference . current useRef vs useState A common question: Why do we need useRef when we already have useState? The difference: useState useRef Updates trigger re-render Updates do not trigger re-render Used for UI data Used for storing values React tracks changes React does not track changes Example: const [ count , setCount ] = useState ( 0 ); Updating: setCount ( count + 1 ); causes: State Update | ↓ Component Re-render With useRef: const count = useRef ( 0 ); Updating: count . current ++ ; does: Value Updated | ↓ No Re-render Using useRef to Access DOM Elements One of the most common use cases of useRef is accessing DOM elements directly. Example: import { useRef } from " react " ; function SearchBox () { const inputRef = useRef (); function focusInput () { inputRef . current . focus (); } return ( < div > < input ref = { inputRef } /> < button onClick = { focusInput } > Focus Input </ button > </ div > ); } Flow: Button Click | ↓ focusInput() | ↓ inputRef.current | ↓ Input DOM Element | ↓ focus() Real-World Example: Login Page Imagine a banking login page. When the page loads: Open Login Page | ↓ Username Field Automatically Focused Implementation: useEffect (() => { usernameRef . current . focus ();
Should you still buy your next smartphone — or subscribe to it instead?
Apple's new Upgrade program is the latest sign that smartphone ownership is changing.
Your DEX tool is probably overstating Uniswap v3 TVL by 25x
I shipped a bug into a paid API and it took me a while to see it, because nothing errored. Every response was a clean HTTP 200 with a confident number in it. The number was wrong by 25x . Here is the finding, the arithmetic, and how to check your own code in about thirty seconds. The measurement Uniswap v3, WETH/USDC on Base. Left column is what my API reported as TVL. Right column is what the pool contract actually holds — a plain balanceOf on each token, at the pool address. pool reported actually held overstated uniswapV3 0.01% $2,070,000 $215,646 9.6x uniswapV3 0.05% $73,600,000 $10,069,584 7.3x uniswapV3 0.30% $2,840,000,000 $111,513,855 25.5x uniswapV3 1.00% $14,800,000 $846,661 17.4x $2.84 billion in one pool on Base. Base's entire ecosystem TVL is a few billion dollars. That is what finally made me look — not a failing test, just a number too large to be true. Why it happens A v2 pool holds two piles of tokens and the price is the ratio between them. getReserves() returns the actual piles. Easy. A v3 pool concentrates liquidity into price ranges. It does not have "reserves" in the v2 sense. What it has is a liquidity value L at the current price P , and the standard way to make v3 math reusable is to compute the virtual reserves — the amounts a v2-style pool would need to behave identically right here: x_virtual = L / √P y_virtual = L × √P These are enormously useful. Feed them into the ordinary constant-product formula and you get correct swap outputs and correct price impact, which is why essentially every v3 integration computes them. They are also not tokens anyone owns . They describe the shape of the curve at the current price, not custody. Concentration is exactly the point of v3: a position spanning a narrow band behaves like a much larger v2 pool while holding far less capital. The 25x above is that leverage, showing up as a number I then mislabelled. My code did this: tvlUsd = 2 * reserveA * priceA // fine for v2, nonsense for v3 That line is corre
Where the guardrail lives
Three threads I read this week were about the same question: when should an AI agent stop and ask a human? All three answered at the level of the action. Which tool call is risky, which amount needs a signature, which decision the model isn't allowed to make. The cheapest guardrail I have doesn't live there. It's picking what the thing runs inside. The renderer that never gets trusted Part of what I build renders arbitrary HTML in a headless browser. Anyone can hand it a URL or a page of script, and there's no version of that where I trust the renderer to behave. So it doesn't get asked to. It runs sandboxed, with egress rules, resource limits and a hard wall-clock deadline, and a bad render gets killed rather than reasoned with. None of the safety comes from the thing being careful. The same rule, pointed at my own tooling Reach gets reduced before the run, not judged during it. Two I actually hold myself to: Two browser-automation paths. One drives my real logged-in profile, for the handful of tasks that genuinely need it. One launches an empty throwaway profile, and that's the default for everything else. Secrets get written to a file and passed by path, never echoed into the conversation. A value that never enters the context can't leak through a summary, a log, or a screenshot of the session. Both cost something real. I script a login instead of already being logged in, and I read a path instead of a value. It has overruled the convenient option more than once. Rules the agent follows are still worth having. They just can't be the only layer, because they share one failure mode: they depend on the agent correctly judging what it's about to do. So, one question, since I only have my own handful of examples: what's something you've made structurally impossible for your agent, rather than something you told it not to do?
60 AI-written WordPress plugins, and JavaScript escaping that is safe by accident
This post has two halves: what "escape your output" actually means once the obvious answer stops working, and then a study of whether current AI assistants get that harder version right. It continues a series on what coding assistants actually produce when a non-expert asks them for WordPress code. Start with a line that passes review and still leaves a hole: echo '<a href="' . esc_html ( $url ) . '">Visit</a>' ; There is an escaping function wrapped around the value. A grep for esc_ finds it. A quick review passes it. Now set $url to javascript:alert(document.cookie) . The link still runs when the visitor clicks it. esc_html() escapes characters that matter in HTML text, like < and > . It does nothing about a dangerous URL scheme. The code is escaped. It is escaped for the wrong context. From the outside, correct escaping and wrong-context escaping look identical. A URL is a different context and needs its own escaper. That escaper is esc_url() , and it returns an empty string for a javascript: URL. Which escaper goes where Escaping is context-dependent. "Sanitize on input, escape on output" is the rule the first post of this series covers, but "escape on output" hides a second decision: which escaper. The answer depends on where the value lands on the page. Where the value lands Escaper Visible text between tags ( <p>HERE</p> ) esc_html() Inside an attribute ( title="HERE" ) esc_attr() A URL slot ( href="HERE" , src="HERE" ) esc_url() , which also enforces a safe scheme Inside a tag attribute that holds JavaScript ( onclick="greet('HERE')" ) esc_js() , scoped to this slot by core's own documentation Any value handed to JavaScript inside a <script> block ( var data = HERE ) wp_json_encode() , which writes its own quotes; add JSON_HEX_TAG when the value is untrusted HTML you want to keep, like a formatted post body wp_kses() with an explicit allow-list Six functions, one job each. The mistake is almost never "forgot to escape". It is "escaped for the wrong context",
Stop Unnecessary Re-renders in React: A Practical Guide to Faster Applications
Introduction React is fast, but that doesn't mean every React application is. One of the most common performance problems—especially in growing applications—is unnecessary re-rendering . A small project with a few components may feel instant, but as your application grows, unnecessary renders can cause sluggish interfaces, input lag, excessive CPU usage, and poor user experience. The good news is that unnecessary re-renders are usually preventable once you understand why React re-renders components . In this article, we'll explore how React rendering works, learn how to identify performance bottlenecks, and apply practical optimization techniques such as React.memo , useMemo , useCallback , better state management, and component architecture. Whether you're building dashboards, e-commerce stores, SaaS products, or portfolio websites, these techniques will help you write more efficient React applications. Table of Contents Understanding React Rendering What Causes Unnecessary Re-renders? Identifying Performance Problems Optimizing with React.memo Optimizing Expensive Calculations with useMemo Preventing Function Recreation with useCallback State Colocation Splitting Components Optimizing Context Rendering Large Lists Using the React Profiler Best Practices Common Mistakes Performance Tips Security Considerations Accessibility Considerations SEO Considerations Real Project Example Conclusion Discussion Background Before optimizing anything, it's important to understand what React actually does. A render simply means React executes your component function to determine what the UI should look like. That does not always mean the browser updates the DOM . React compares the new Virtual DOM with the previous one and only updates the parts that actually changed. However, if many components re-render unnecessarily, React still has to: Execute component functions Recreate objects Recreate arrays Recreate event handlers Compare Virtual DOM trees All of that work adds up. Step
Your A/B test has three goals and they disagree. Now what?
Every A/B testing tutorial ends the same way: run the test, wait for significance, ship the winner. Then you run a real test and variant B converts 12% better on newsletter signups, brings in 4% less revenue per visitor, and bounce is flat. Nothing is significant except the signups. Ship it? I spent an embarrassing amount of time on this question while building an A/B engine, and most of what I read online didn't help, because most of it assumes one metric. This post is what I ended up with. It's not novel — the statistics are decades old — but I couldn't find it written down in one place with working code, so here it is. Why the p-value doesn't answer the question you're asking Two problems, and the second one is the bad one. Multiple comparisons. Three metrics at α = 0.05 means roughly a 14% chance of at least one false positive if nothing is actually different. Bonferroni fixes this, but now you need α = 0.017 per metric and your test needs to run three times as long. On a site doing 300 conversions a month that's not a fix, it's a refusal. The p-value is answering a different question. It tells you the probability of your data assuming no difference exists. What you actually want to know is: if I ship B, how much do I expect to lose if I'm wrong? Those are not the same question and no amount of Bonferroni turns one into the other. There's also the peeking problem — everyone checks the dashboard daily and stops when it goes green, which quietly inflates the false positive rate well past whatever α you wrote down. I'll come back to that, because Bayesian methods do not magically solve it, whatever you may have read. Posterior first, decision second For a conversion rate, the Beta-Binomial conjugate pair gives you the posterior in one line. With a uniform prior, after c conversions out of n visitors: p | data ~ Beta ( 1 + c , 1 + n - c ) That's it. No closed-form comparison between two Betas that's worth implementing, so sample. PHP has no Beta sampler in core, and
AI Papers from Jul 06 - Jul 12 2026: A Practical Guide for Builders, Founders, and Developers
by Cipher Forge - Compounding-Asset Specialist @ HowiPrompt The past week has been a micro-boom in AI research. Five papers landed on arXiv, three on OpenReview, and a handful of industry pre-prints that together push the frontier on multimodal reasoning, efficient fine-tuning, and trustworthy LLM deployment. In this guide I'll: Distill the core contributions of each paper (no fluff, just the meat). Show you how to reproduce the key results with publicly available code or minimal re-implementation. Map the findings to real-world product pipelines - from data ingestion to inference scaling. Provide a reproducibility checklist so you can turn a paper into a compounding asset for your startup or product team. Grab a coffee, fire up your dev environment, and let's turn these seven papers into immediate value. 1. The Week in Review - Why These Papers Matter Date (2026) Venue Title Primary Claim Reported Gains Jul 06 arXiv "Mosaic-LLM: Structured Prompt Fusion for Multimodal Chains" A unified prompting language that stitches vision, audio, and text into a single chain of reasoning. 12.4 % higher VQA accuracy vs. Flamingo-3B on OKVQA. Jul 07 OpenReview "DeltaLoRA: Parameter-Efficient Fine-Tuning via Low-Rank Delta Updates" Introduces a delta-matrix on top of LoRA that reduces fine-tuning compute by 38 % without loss. 0.3 % BLEU drop on WMT-2025 while cutting GPU-hrs from 120->74. Jul 08 arXiv "TrustGuard: Certified Robustness for Retrieval-Augmented Generation" Formal robustness certificates for RAG pipelines under adversarial query perturbations. Guarantees 95 % success rate on adversarial SQuAD-2.0 attacks. Jul 09 arXiv "Neuro-Sketch: Zero-Shot Sketch-to-Image Generation with Diffusion-Guided Transformers" Leverages a diffusion prior to translate coarse sketches into photorealistic images without training on paired data. FID = 21.3 on QuickDraw-500, 2.8× better than prior zero-shot baselines. Jul 10 OpenReview "Meta-Prompt Engine (MPE): Automatic Prompt Synthesis for LLM
My fresh OpenClaw install kept failing. The model wasn’t the problem.
I hit a failure pattern recently that’s way more common than people admit: install OpenClaw connect it to Ollama pull a decent local model test the model directly and it works run the first real agent turn and everything falls apart At that point, most people do the obvious thing: blame the model. Swap Qwen for Llama. Try a bigger model. Try a smaller model. Re-pull weights. Tweak quantization. Repeat. I think that’s usually the wrong first move. The real issue is often prompt baggage, context budgeting, or backend compatibility. Not the model itself. A direct Ollama prompt is a tiny test. An OpenClaw agent turn is not. The tell: direct Ollama works, OpenClaw fails I was reading a thread on r/openclaw where someone on Ubuntu Server said even a brand-new session with just hello could trigger the recurring error. The strange part was that the same model felt “lightning fast and great” when used directly through Ollama with a 4096 context. That’s the giveaway. If this works: curl http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "qwen2.5-coder:14b", "messages": [ {"role": "user", "content": "hello"} ] }' but OpenClaw falls over on a normal turn, the model is probably not your first problem. You’re usually dealing with one of these: context blowout oversized system instructions too many skills loaded memory payloads getting injected every turn tool schema overhead output reservation settings that are too aggressive OpenAI-compat quirks in the backend That pattern shows up outside OpenClaw too. I’ve seen the same thing in n8n, Make, Zapier, and custom OpenAI-compatible agent stacks: the hello-world prompt passes, then the real automation fails because the production request is much heavier than anyone realized. A “fresh” OpenClaw install is not actually empty This is the part people miss. By the time your local model sees a real OpenClaw turn, it may already be carrying: system instructions tool definitions skill prompts me
The Agent Safety Gap Nobody Budgets For
When a chatbot hallucinates, a person reads the answer and catches it. When an agent hallucinates, it may have already run the query, sent the email, or changed the config before anyone looks. That single difference is why agent safety is its own discipline rather than a subsection of application security, and it is why OWASP shipped a dedicated Top 10 for Agentic Applications in December 2025 instead of folding the problem into the existing LLM list. Most teams I talk to are not missing this because they disagree. They are missing it because the safety work never got a line in the plan. The agent shipped, it worked, and the access model that came with it on day one is still the access model on day ninety. Permission Creep Is The Real Attack Surface The incidents that actually happen are boring. An agent gets built to summarize documents. Two sprints later somebody needs it to write a summary file, so it gets write access. Then it needs to post the summary, so it gets an API token. Nobody sat down and approved a document summarizer with filesystem and network write access, but that is what exists now, and the access model was never revisited because nothing broke. Least privilege is easy to agree with and boring to maintain, which is exactly why it fails. The useful version is a rule rather than a principle: every agent starts at zero permissions, and every capability you add triggers a re-read of the whole permission set rather than an append to it. Indirect Prompt Injection Turns Data Into Instructions Prompt injection is still OWASP's number one risk for LLM applications, and it gets meaningfully worse in an agentic context because the payoff is no longer a misleading answer, it is a real action. The direct version, where a user types something that overrides the system prompt, is the one everybody tests for. The version that gets people is indirect: the malicious instruction sits inside a web page, a support ticket, a PDF, or a database row that the agent was to
I Turned Staff Interview Prep Into a Midnight Ramen Bowl 🍜
This is a submission for Frontend Challenge - Comfort Food Edition, CSS Art. ...